/**
 * Single artist page (patterns/template-single-artist.php). Loaded on is_singular('artist') and,
 * for the components the fair page shares — hero, anchor row, works grid, buttons, call to
 * action — on is_singular('exhibition') too (with assets/css/exhibition.css). Tokens from
 * theme.json presets.
 */
.cg-artist-hero { position: relative; height: min(78vh, 760px); overflow: hidden; background: #111; color: #fff; }
.cg-artist-hero.is-plain { height: auto; background: transparent; color: inherit; padding: clamp(50px, 7vw, 90px) 0 10px; }
.cg-artist-hero-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-artist-hero:not(.is-plain)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 45%); pointer-events: none; }
.cg-artist-hero-text { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 2; padding: 0 var(--wp--style--root--padding-right, 20px) 0 var(--wp--style--root--padding-left, 20px); }
.cg-artist-hero.is-plain .cg-artist-hero-text { position: static; padding: 0; }
.cg-artist-name { font-family: var(--wp--preset--font-family--skia); font-weight: 400; line-height: 1.05; letter-spacing: -.02em; font-size: clamp(2.6rem, 6vw, 5rem); margin: 0; }
.cg-artist-tagline { margin: 10px 0 0; font-size: 14px; letter-spacing: .04em; opacity: .9; }
.cg-artist-hero-credit { position: absolute; right: var(--wp--style--root--padding-right, 20px); bottom: 14px; z-index: 2; margin: 0; font-size: 11px; opacity: .7; }
@media (max-width: 600px) { .cg-artist-hero { height: 62vh; } .cg-artist-hero-text { bottom: 36px; } }

.cg-artist-anchors { display: flex; gap: 28px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--wp--preset--color--accent-4); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cg-artist-anchors a { text-decoration: none; color: inherit; }
.cg-artist-anchors a:hover, .cg-artist-anchors a:focus-visible { text-decoration: underline; }
/* Works view: the anchor row holds one link back to the artist page (biography, quote, past presentations live there). */
.cg-artist-back::before { content: "←"; margin-right: 8px; }

.cg-artist-works, .cg-artist-biography, .cg-artist-with-gallery, .cg-artist-cta { padding-top: clamp(40px, 6vw, 80px); }
/* In-page anchors (#works, #biography, #with-crossover-gallery, #series-*) land below the 64px sticky header instead of under it. */
.cg-artist-works, .cg-artist-biography, .cg-artist-with-gallery, .cg-series { scroll-margin-top: 65px; }
.cg-artist-works-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; margin-bottom: clamp(28px, 4vw, 44px); }
.cg-artist-works-head h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.5rem); }
/* "On view at …" sits directly above the works, after the intro: body size, a little weight, no rules
   (owner ruling 2026-09-24: close to the works and slightly accentuated, nothing more). */
.cg-artist-on-view { margin: 0 0 22px; font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.cg-artist-on-view::before { content: "●"; color: #ff0000; margin-right: 8px; font-size: 9px; vertical-align: middle; }

/* Works grid, 3 / 2 / 1 columns. Every image is the whole work at its own proportions, no frame, and each
   work's width is --cg-scale column widths, set per tile by crossovergallery_work_scales() from the work's own
   size alone (each work hangs in a box one column across and 4/3 along its long axis, upright or on its side;
   its longest side takes 30 cm = 0.6 of the box, 200 cm = all of it, log scale between; the other side follows
   the proportions), so a 33 cm work sits small beside a 120 cm one and is the same size on every grid — hung,
   not gridded (owner ruling 2026-09-29, replacing the 2026-09-20 rule that works in a row are the same size).
   The grid runs in quarter-column tracks (12 / 8 / 1): a tile is four tracks (one column); a work more than a
   tenth wider than its column (`.is-wide`, --cg-scale above 1.1) takes six (a column and a half) so two of
   them share a row; a work only slightly wider is trimmed to its column. On two columns a wide work takes
   the whole row. Rows are packed and placed by crossovergallery_work_grid_placements() (--cg-col on three
   columns, --cg-col-t on two): as many works per row as fit, every row centred, so a row with half a column
   left is not left-aligned; on one column tiles just follow each other.
   The figure (image + caption) is --cg-scale columns wide and centred in its tile, so the caption sits
   under the image at the image's width and left edge and the whole work is centred; --cg-gap is the column
   gap the calc needs to find the column inside a wider tile.
   Two layouts of the same markup:
   - Catalogue (default: the works view): the images of a row sit on one baseline and the captions start on
     one line (subgrid), so a long series still scans in rows.
   - Hung (`.is-hung`, the Selected works teaser and the complete "Works" page of an artist with nine works or
     fewer — owner ruling 2026-09-29): rows align at the top and run ragged below, each caption
     follows its own image, and every second work hangs a step lower so nine works read as a wall, not rows. */
.cg-work-grid { --cg-gap: clamp(30px, 4vw, 50px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(30px, 5vw, 70px) var(--cg-gap); align-items: end; }
.cg-work { grid-column: var(--cg-col, span 4); }
@media (max-width: 900px) { .cg-work-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } .cg-work { grid-column: var(--cg-col-t, span 4); } }
@media (max-width: 600px) { .cg-work-grid { grid-template-columns: 1fr; } .cg-work { grid-column: auto; } }
.cg-work-figure { margin: 0 auto; width: min(100%, calc(100% * var(--cg-scale, 1))); }
/* Inside a wide tile the column is (2 × tile − gap) / 3 on six tracks and (tile − gap) / 2 on a whole two-column
   row; on one column the figure never exceeds the tile. */
.cg-work.is-wide .cg-work-figure { width: calc(var(--cg-scale, 1) * (200% - var(--cg-gap)) / 3); }
@media (max-width: 900px) { .cg-work.is-wide .cg-work-figure { width: calc(var(--cg-scale, 1) * (100% - var(--cg-gap)) / 2); } }
@media (max-width: 600px) { .cg-work-figure, .cg-work.is-wide .cg-work-figure { width: min(100%, calc(100% * var(--cg-scale, 1))); } }
.cg-work-figure img { width: 100%; height: auto; display: block; }
/* Caption and Inquire control sit under the image on its left edge: title/meta first, the control on its own line
   below (owner ruling 2026-09-29: a control at the column's right edge floats away from a narrowed image). */
.cg-work-caption { display: block; margin-top: 16px; font-size: 14px; line-height: 1.5; }
.cg-work-inquire { display: inline-block; margin-top: 12px; }
/* Catalogue: each tile spans an image row, a text row and a control row shared across the grid row (subgrid), so
   the images in a row sit on one bottom edge, the captions start on one line and the Inquire controls sit on one
   line however many lines a caption runs to. The caption box dissolves (display: contents) so its text and control
   are the subgrid's items; the image-to-text gap is the row-gap plus 4px, the text-to-control gap the row-gap. */
@supports (grid-template-rows: subgrid) {
	.cg-work-grid:not(.is-hung) { align-items: stretch; }
	.cg-work-grid:not(.is-hung) .cg-work, .cg-work-grid:not(.is-hung) .cg-work-figure { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; }
	.cg-work-grid:not(.is-hung) .cg-work-figure img { align-self: end; }
	.cg-work-grid:not(.is-hung) .cg-work-caption { display: contents; }
	.cg-work-grid:not(.is-hung) .cg-work-text { margin-top: 4px; }
	.cg-work-grid:not(.is-hung) .cg-work-inquire { margin-top: 0; align-self: start; justify-self: start; }
}
/* Hung: top-aligned, and every second work hangs a step lower (rows hold two or three works, so "the middle
   column" no longer exists; the alternation still reads as a wall). */
.cg-work-grid.is-hung { align-items: start; }
@media (min-width: 601px) { .cg-work-grid.is-hung .cg-work:nth-child(2n) { padding-top: clamp(40px, 6vw, 100px); } }
/* The "On view" label sits in a row reserved on every caption text of a grid that has a marked
   work, so marked tiles keep the same height and alignment as the others. */
.has-on-view .cg-work-text { position: relative; padding-top: 24px; }
.cg-work-on-view { position: absolute; top: 0; left: 0; margin: 0; font-size: 11px; line-height: 1.2; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.cg-work-on-view::before { content: "●"; color: #ff0000; margin-right: 6px; font-size: 8px; vertical-align: middle; }
.cg-work-title { margin: 0; }
.cg-work-meta { margin: 2px 0 0; color: var(--wp--preset--color--accent-2); }
/* Inquire controls fill on hover and keyboard focus (a deliberate, explicit call to action). Their focus ring and
   transition follow the header/footer buttons: nothing on mouse focus, a 1px accent-4 ring offset 2px for keyboard
   focus, 180ms colour transitions. */
.cg-work-inquire { border: 1px solid currentColor; padding: 7px 14px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: inherit; transition: background-color 180ms ease, color 180ms ease; }
.cg-work-inquire:hover, .cg-work-inquire:focus-visible { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.cg-work-inquire:focus, .cg-button:focus, .cg-inquiry-close:focus, .cg-inquiry-check input:focus { outline: none; }
.cg-work-inquire:focus-visible, .cg-button:focus-visible, .cg-inquiry-close:focus-visible, .cg-inquiry-check input:focus-visible { outline: 1px solid var(--wp--preset--color--accent-4); outline-offset: 2px; }
.cg-button { display: inline-block; background: var(--wp--preset--color--accent-2); color: var(--wp--preset--color--base); padding: 14px 32px; font-family: inherit; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; border: 0; cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.cg-button:hover, .cg-button:focus-visible { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); }
.cg-artist-credit, .cg-artist-works-empty { text-align: center; margin: 18px 0 0; font-size: 12px; color: var(--wp--preset--color--accent-3); }

/* The short works description (artist_works_intro, or a single series' text on a teaser page). */
.cg-works-intro { margin: 0 0 clamp(30px, 4vw, 44px); }
.cg-works-intro-text { max-width: 720px; }
.cg-works-intro-text p { margin: 0 0 1em; }
.cg-works-intro-text p:last-child { margin-bottom: 0; }
/* Teaser page: the link to the works view under the curated grid. */
.cg-artist-works-switch { text-align: center; margin: clamp(40px, 5vw, 70px) 0 0; }
/* Works view, several series: chips filter the page to one series ("All" = every series, each collapsed
   to its preview). */
.cg-series-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 clamp(30px, 4vw, 44px); padding: 0; scroll-margin-top: 85px; /* "Back to top" lands here: sticky header (65px) plus breathing room */ }
.cg-series-chip { display: block; border: 1px solid var(--wp--preset--color--accent-4); padding: 7px 14px; font-size: 12px; letter-spacing: .04em; text-decoration: none; color: inherit; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.cg-series-chip:hover, .cg-series-chip:focus-visible { border-color: var(--wp--preset--color--contrast); }
.cg-series-chip.is-active { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--contrast); }
.cg-series { margin-bottom: clamp(50px, 7vw, 90px); }
.cg-series.is-hidden { display: none; }
/* "All" state with more than one series (set by artist-inquiry.js, so a no-JS visitor sees every work): each
   series shows its preview — the tiles outside it carry `is-extra`, set by crossovergallery_render_work_grid() —
   and a "View more" button that opens the series' chip. */
.cg-series.is-collapsed .cg-work.is-extra { display: none; }
.cg-series-more { display: none; margin: clamp(30px, 4vw, 50px) 0 0; text-align: center; }
.cg-series.is-collapsed .cg-series-more { display: block; }
/* "Back to top" ends a series shown in full on the works view. With chips that is the single-series state
   (not collapsed, not hidden); the "All" state ends each preview with its button and shows only the last
   block's link, so the whole list ends in one "Back to top" (owner request 2026-09-29). The link scrolls
   to the chip row, not the "All works" title (artist-inquiry.js). Without chips the classes never apply
   and the link simply shows. */
.cg-series-top { display: none; margin: clamp(30px, 4vw, 50px) 0 0; text-align: center; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.cg-series:not(.is-collapsed):not(.is-hidden) .cg-series-top,
.cg-series.is-collapsed:last-of-type .cg-series-top { display: block; }
.cg-series-top a { text-decoration: none; color: inherit; }
.cg-series-top a::before { content: "↑"; margin-right: 8px; }
.cg-series-top a:hover, .cg-series-top a:focus-visible { text-decoration: underline; }
.cg-series-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(30px, 4vw, 50px); margin-bottom: 34px; border-top: 1px solid var(--wp--preset--color--accent-4); padding-top: 22px; }
.cg-series-head h3 { margin: 0; font-size: clamp(1.5rem, 2vw, 2rem); }
.cg-series-years { margin: 6px 0 0; color: var(--wp--preset--color--accent-2); font-size: 14px; }
/* Collective edition of the series (`series_edition` term meta), boxed under the title so it reads apart from the per-print captions. */
.cg-series-edition { margin: 20px 0 0; padding: 14px 16px; max-width: 400px; border: 1px solid var(--wp--preset--color--accent-4); font-size: 14px; line-height: 1.5; }
.cg-series-edition-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--wp--preset--color--accent-2); }
/* Series notice (`series_notice` term meta) and the artist's works notice (`artist_works_notice`): a fair
   premiere or similar. A box in the family of the edition note above — same padding, label and text size —
   but ruled in the contrast colour instead of light grey, its text a step larger, and always labelled (fair or
   series name) with the red dot, so it reads as a note rather than a caption (owner ruling 2026-09-29, replacing the grey field with a red bar).
   Opens the works section labelled with the series name; repeats unlabelled under the series head on the
   works view and on the fair page. */
.cg-series-notice { margin: 0 0 clamp(28px, 4vw, 44px); padding: 14px 16px; max-width: 640px; border: 1px solid var(--wp--preset--color--contrast); }
.cg-series-notice-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.cg-series-notice-label::before { content: "●"; color: #ff0000; margin-right: 8px; font-size: 8px; vertical-align: middle; }
.cg-series-notice p { margin: 0; font-size: 15px; line-height: 1.5; }
.cg-series-head .cg-series-notice { margin: 20px 0 0; max-width: 400px; }
.cg-series-text { max-width: 720px; }
.cg-series-text p { margin: 0 0 1em; }
@media (max-width: 900px) { .cg-series-head { grid-template-columns: 1fr; } }

.cg-artist-quote { background: var(--wp--preset--color--accent-5); margin-top: clamp(50px, 7vw, 90px); padding: clamp(50px, 7vw, 90px) var(--wp--style--root--padding-right, 20px); text-align: center; }
.cg-artist-quote blockquote { margin: 0 auto; max-width: 900px; border: 0; padding: 0; }
/* Opening mark as a typographic ornament; the text itself stays unquoted so it does not double up with the mark. */
.cg-artist-quote blockquote::before { content: "\201C"; display: block; height: .5em; font-family: Georgia, "Times New Roman", serif; font-size: clamp(4.5rem, 9vw, 7.5rem); line-height: 1; color: var(--wp--preset--color--accent-2); margin-bottom: 14px; }
.cg-artist-quote p { font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.3; margin: 0; }
.cg-artist-quote cite { display: block; margin-top: 26px; font-style: normal; font-size: 13px; color: var(--wp--preset--color--accent-2); letter-spacing: .08em; text-transform: uppercase; }
.cg-artist-quote cite::before { content: "\2014\00a0"; }

.cg-artist-biography-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(30px, 4vw, 50px); }
@media (max-width: 900px) { .cg-artist-biography-grid { grid-template-columns: 1fr; } }
.cg-artist-portrait { width: min(200px, 100%); height: auto; filter: grayscale(1); }
.cg-artist-facts { margin: 14px 0 0; font-size: 13px; color: var(--wp--preset--color--accent-2); }
.cg-artist-relationship { width: min(200px, 100%); margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--wp--preset--color--contrast); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; }
.cg-artist-biography-text { max-width: 720px; }
.cg-artist-biography-text > p:first-child { font-size: clamp(1.125rem, 1.4vw, 1.375rem); line-height: 1.5; margin-top: 0; }
.cg-artist-biography-text h3 { font-size: 1.25rem; margin: 38px 0 12px; }
.cg-artist-biography-text ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.cg-artist-biography-text li { padding: 7px 0; border-bottom: 1px solid var(--wp--preset--color--accent-5); }

.cg-artist-with-gallery ul { list-style: none; padding: 0; margin: 0; font-size: 14px; max-width: 720px; }
.cg-artist-with-gallery li { padding: 7px 0; border-bottom: 1px solid var(--wp--preset--color--accent-5); }

/* Rule hierarchy: dividers inside the page are light (accent-4) and stay within the page
   column; only the footer's own top border runs edge to edge. The CTA divider is a full-row
   flex item so it inherits the section's column gutters. Line-to-text distance stays
   clamp(40px, 5vw, 70px) = 30px row gap + this margin. */
.cg-artist-cta { margin-top: clamp(50px, 7vw, 90px); padding: 0 0 clamp(60px, 8vw, 110px); display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cg-artist-cta::before { content: ""; flex-basis: 100%; border-top: 1px solid var(--wp--preset--color--accent-4); margin-bottom: clamp(10px, calc(5vw - 30px), 40px); }
.cg-artist-cta h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.2rem); max-width: 760px; }

/* Inquiry dialog */
.cg-inquiry { border: 0; padding: 0; width: min(560px, calc(100% - 32px)); max-height: 92vh; overflow: auto; box-shadow: 0 10px 60px rgba(0, 0, 0, .18); background: var(--wp--preset--color--base); color: inherit; }
.cg-inquiry::backdrop { background: rgba(255, 255, 255, .88); }
.cg-inquiry-form { position: relative; padding: 34px; }
.cg-inquiry-form h2 { font-size: 1.75rem; margin: 0 0 20px; }
.cg-inquiry-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font: inherit; font-size: 28px; line-height: 1; cursor: pointer; font-weight: 200; color: inherit; }
.cg-inquiry-work { display: flex; gap: 16px; background: var(--wp--preset--color--accent-5); padding: 14px; font-size: 13px; line-height: 1.5; margin-bottom: 22px; }
.cg-inquiry-work:empty { display: none; }
.cg-inquiry-work img { width: 96px; height: auto; align-self: flex-start; }
.cg-inquiry-work p { margin: 0; }
.cg-inquiry-sold-out { margin-top: 6px !important; font-weight: 500; }
.cg-inquiry-form label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--wp--preset--color--accent-2); margin: 14px 0 5px; }
/* Boxed fields with an accent-4 border that darkens to contrast on focus, no ring — the footer's focus treatment
   on a box instead of an underline. */
.cg-inquiry-form input:not([type="checkbox"]), .cg-inquiry-form textarea, .cg-inquiry-form select { box-sizing: border-box; width: 100%; border: 1px solid var(--wp--preset--color--accent-4); border-radius: 0; padding: 11px; font: inherit; font-size: 15px; background: var(--wp--preset--color--base); color: inherit; outline: none; transition: border-color 180ms ease; }
.cg-inquiry-form input:not([type="checkbox"]):focus-visible, .cg-inquiry-form textarea:focus-visible, .cg-inquiry-form select:focus-visible { outline: none; border-color: var(--wp--preset--color--contrast); }
.cg-inquiry-form textarea { resize: vertical; min-height: 120px; }
@media (prefers-reduced-motion: reduce) { .cg-work-inquire, .cg-button, .cg-inquiry-form input, .cg-inquiry-form textarea, .cg-inquiry-form select { transition: none; } }
.cg-inquiry-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; text-transform: none; letter-spacing: 0; color: inherit; margin-top: 16px; }
.cg-inquiry-check input { width: auto; margin-top: 4px; }
.cg-inquiry-fine { font-size: 11px; color: var(--wp--preset--color--accent-3); margin-top: 14px; }
.cg-inquiry-form .cg-button { margin-top: 20px; width: 100%; }
.cg-inquiry-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cg-inquiry-status:empty { display: none; }
.cg-inquiry-status { margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.cg-inquiry-status.is-error { color: #b00020; }

/* Page column. Everything below the hero image sits in the theme's wide column (theme.json
   wideSize), centred, never closer to the viewport edge than the root gutter — the same column
   the archive and the block pages use. The hero image itself stays full-bleed; its text and
   credit align to the column. */
.cg-artist-anchors, .cg-artist-works, .cg-artist-quote, .cg-artist-biography, .cg-artist-with-gallery, .cg-artist-cta, .cg-artist-hero-text, .cg-artist-hero-credit { --cg-gutter: max(var(--wp--style--root--padding-left, 20px), calc((100% - var(--wp--style--global--wide-size, 1400px)) / 2)); }
.cg-artist-anchors, .cg-artist-works, .cg-artist-quote, .cg-artist-biography, .cg-artist-with-gallery, .cg-artist-cta { padding-inline: var(--cg-gutter); }
.cg-artist-hero-text { left: var(--cg-gutter); right: var(--cg-gutter); padding: 0; }
.cg-artist-hero.is-plain .cg-artist-hero-text { padding-inline: var(--cg-gutter); }
.cg-artist-hero-credit { right: var(--cg-gutter); }
