/* ==========================================================================
   Quenby — shared design system ("Verdant Gallery")
   Linked from index.html, apply.html and the four PHP entry pages.

   1. Tokens          5. Buttons, chips, icons     9. Overlays & toasts
   2. Base            6. Fields                   10. Status panel, auth card
   3. Layout          7. Cards & grids            11. Utilities
   4. Type helpers    8. Header & footer

   Breakpoints (only these): ≤600 phone · ≤900 tablet / small laptop ·
   ≥1440 large · ≥1920 wide. Most components are fluid (clamp) and need none.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Brand palette */
  --green: #28402f; --green-deep: #182920; --sage: #7c8a6e;
  --gold: #a9865a; --gold-deep: #8a6c46;
  --paper: #efece1; --card: #f7f5ec; --ink: #1c2620; --ink-soft: #4c5a4e; --border: #cfc9b6;
  --surface-input: #fdfcf8;                 /* fields; replaces #fff / white */
  --on-dark: #fdfcf8;                       /* text on green / photos */
  --danger: #9b2c2c; --success: #2f6b45;    /* the one red, the one state green */
  --danger-soft: #f6e9e6; --success-soft: #e7efe6;
  --hair: rgba(40, 64, 47, .14);            /* hairline dividers */
  --focus: var(--gold);
  --backdrop: rgba(24, 41, 32, .55);
  --shadow-1: 0 10px 24px rgba(24, 41, 32, .10);   /* card hover */
  --shadow-2: 0 24px 64px rgba(24, 41, 32, .25);   /* drawers, modals */
  --radius: 4px; --radius-pill: 999px;

  /* Layout */
  --gutter: clamp(20px, 4vw, 80px);                       /* the ONLY page side padding */
  --page-max: 1760px;
  --page-w: min(var(--page-max), 100% - 2 * var(--gutter));
  --measure: 68ch;                                        /* running text */
  --card-min: clamp(160px, 42vw, 300px);                  /* 2 columns on phones, ~330px cards at 1760 */
  --grid-gap: clamp(16px, 1.6vw, 28px);

  /* Spacing scale (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section-gap: clamp(48px, 5vw, 96px);
  --header-h: 72px;

  /* Type scale (rem). Fraunces: display, h1–h3. Jost: everything else. */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-display: clamp(2.25rem, 1.2rem + 3vw, 3.75rem);
  --fs-h1: clamp(1.875rem, 1.4rem + 1.2vw, 2.5rem);
  --fs-h2: clamp(1.375rem, 1.15rem + .6vw, 1.75rem);
  --fs-h3: 1.125rem;
  --fs-body: 1rem; --fs-small: .875rem; --fs-caption: .8125rem;
  --fs-eyebrow: .75rem;                                   /* 600, .14em, uppercase */

  /* Controls */
  --control-h: 44px;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Root size grows gently on wide screens: 16px ≤1440, ~17px at 1920, 18px ≥2560. */
html { font-size: clamp(16px, .15vw + 14px, 18px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.6;
  background: var(--paper); color: var(--ink);
  /* Sticky footer: the page is a column and <main> takes the spare height. */
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
h1, h2, h3, .serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--fs-h1); color: var(--green-deep); }
h2 { font-size: var(--fs-h2); color: var(--green-deep); }
h3 { font-size: var(--fs-h3); color: var(--green-deep); }
h4 { font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 600; }
a { color: var(--green); }
img, video { max-width: 100%; height: auto; display: block; }
svg { flex: 0 0 auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: rgba(169, 134, 90, .3); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* 3. Layout primitives ------------------------------------------------------ */
/* .page — the one content column. Header, main and footer content all use it,
   so the logo, headings, grids and footer columns share one left edge. */
.page, .page-wide, .shop-wide { width: var(--page-w); margin-inline: auto; }

/* .band — a background running edge to edge with its content in .page */
.band { width: 100%; }
.band--deep { background: var(--green-deep); color: var(--on-dark); }
.band--card { background: var(--card); }

/* .page-header — breadcrumb, H1, lede and an actions slot on the H1 baseline */
.page-header { padding-top: var(--s-7); padding-bottom: var(--s-7); display: grid; gap: var(--s-3); }
.page-header__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4) var(--s-5); flex-wrap: wrap; }
.page-header__title { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; min-width: 0; }
.page-header__actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.lede { color: var(--ink-soft); max-width: 60ch; font-size: 1.0625rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); list-style: none;
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.breadcrumb a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.breadcrumb li + li::before { content: '/'; margin-right: var(--s-2); color: var(--border); }
.breadcrumb [aria-current] { color: var(--ink); }

/* .section — H2 + muted count + right-aligned action + hairline */
.section { margin-top: var(--section-gap); }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3) var(--s-5); flex-wrap: wrap;
  padding-bottom: var(--s-3); margin-bottom: var(--s-5); border-bottom: 1px solid var(--border); }
.section-head h2, .section-head h3 { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.section-head h3 { font-size: var(--fs-h3); color: var(--ink-soft); }
.section-head--sub { border-bottom: 0; padding-bottom: 0; margin-top: var(--s-6); margin-bottom: var(--s-4); }
.count { font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }

/* .prose — running text at the reading measure, left-aligned on the page edge */
.prose { max-width: var(--measure); color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.8em; margin-bottom: .5em; }
.prose h2 { font-size: var(--fs-h2); }
.prose h3 { font-size: 1.25rem; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .35em; }
.prose a:not(.btn) { color: var(--green); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.prose a:not(.btn):hover { color: var(--gold-deep); }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
.prose blockquote { border-left: 3px solid var(--gold); padding-left: var(--s-4); color: var(--ink-soft); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.prose img { border-radius: var(--radius); }
/* Pictures placed in a biography (artist bio, community description). Each one
   sits in a paragraph of its own, so a small one floats beside the text that
   follows, and two half-width ones in the same paragraph sit side by side. */
.bio-img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.bio-img--full { width: var(--bio-w, 100%); margin-inline: auto; clear: both; }
.bio-img--left, .bio-img--right { width: var(--bio-w, min(42%, 300px)); margin-bottom: var(--s-3); }
.bio-img--left { float: left; clear: left; margin-right: var(--s-5); }
.bio-img--right { float: right; clear: right; margin-left: var(--s-5); }
/* A width chosen in the editor, in % of the text width (steps of 5); without one a picture takes its position's usual width */
.bio-img--w15 { --bio-w: 15%; } .bio-img--w20 { --bio-w: 20%; } .bio-img--w25 { --bio-w: 25%; } .bio-img--w30 { --bio-w: 30%; } .bio-img--w35 { --bio-w: 35%; } .bio-img--w40 { --bio-w: 40%; }
.bio-img--w45 { --bio-w: 45%; } .bio-img--w50 { --bio-w: 50%; } .bio-img--w55 { --bio-w: 55%; } .bio-img--w60 { --bio-w: 60%; } .bio-img--w65 { --bio-w: 65%; } .bio-img--w70 { --bio-w: 70%; }
.bio-img--w75 { --bio-w: 75%; } .bio-img--w80 { --bio-w: 80%; } .bio-img--w85 { --bio-w: 85%; } .bio-img--w90 { --bio-w: 90%; } .bio-img--w95 { --bio-w: 95%; } .bio-img--w100 { --bio-w: 100%; }
/* Half width: cropped to a square, so two side by side always line up */
.bio-img--half { display: inline-block; vertical-align: top; width: calc(50% - var(--s-2)); aspect-ratio: 1 / 1; object-fit: cover; }
.bio-img--half + .bio-img--half { margin-left: var(--s-3); }
/* A row of half-width pictures: two per line, exactly the width of the text (a third one starts a new line) */
.prose p:has(> .bio-img--half), .ql-editor p:has(> .bio-img--half) { display: flex; flex-wrap: wrap; gap: var(--s-3); }
p:has(> .bio-img--half) > .bio-img--half { width: calc(50% - var(--s-3) / 2); margin-left: 0; }
/* Headings and rows of pictures start below a small picture, not beside it */
.prose h2, .prose h3, .ql-editor h2, .prose p:has(> .bio-img--half), .ql-editor p:has(> .bio-img--half) { clear: both; }
.prose::after, .ql-editor::after { content: ''; display: block; clear: both; }
/* The paragraph holding a small picture has no height of its own: the text after it starts level with the picture's top */
@media (min-width: 601px) { .prose p:has(> .bio-img--left, > .bio-img--right) + :not(h2, h3, h4) { margin-top: 0; } }
@media (max-width: 600px) {
  /* Too narrow for text beside a picture: every picture sits on a line of its own,
     full width unless a width was chosen (then centred, and never under 60%) */
  .bio-img--full, .bio-img--left, .bio-img--right { float: none; width: max(var(--bio-w, 100%), 60%); margin-inline: auto; }
}
.prose details { border-bottom: 1px solid var(--border); margin-top: 0; }
.prose details summary { cursor: pointer; padding: var(--s-4) 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.125rem; color: var(--green-deep);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.prose details summary::-webkit-details-marker { display: none; }
.prose details summary::after { content: ''; width: 9px; height: 9px; border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft); transform: rotate(45deg); flex: 0 0 auto; transition: transform .2s; }
.prose details[open] summary::after { transform: rotate(-135deg); }
.prose details > :not(summary) { margin-top: 0; padding-bottom: var(--s-4); }
/* CMS layout with an in-page table of contents on large screens */
.prose-layout { display: grid; gap: var(--s-7); }
.toc { display: none; }
@media (min-width: 1440px) {
  .prose-layout--toc { grid-template-columns: 260px minmax(0, var(--measure)); align-items: start; }
  .prose-layout--toc .toc { display: block; position: sticky; top: calc(var(--header-h) + var(--s-5)); font-size: var(--fs-small); }
  .toc ol { list-style: none; display: grid; gap: var(--s-2); border-left: 1px solid var(--border); padding-left: var(--s-4); }
  .toc a { color: var(--ink-soft); text-decoration: none; }
  .toc a:hover { color: var(--green); }
}

/* .grid-cards — the one card grid for products and artists */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: var(--grid-gap); }
.grid-cards--feature { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); max-width: calc(3 * 520px + 2 * var(--grid-gap)); }
@media (min-width: 901px) { .grid-cards--feature { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* .split — two columns that stack at ≤900px */
.split { display: grid; gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (min-width: 901px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split--media { grid-template-columns: var(--split-media, 240px) minmax(0, 1fr); }
}
@media (min-width: 1440px) { .split--media { --split-media: 320px; } }

/* 4. Type helpers ----------------------------------------------------------- */
.eyebrow { font-family: var(--font-sans); font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.4; }
.display { font-family: var(--font-serif); font-size: var(--fs-display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-small); }
.caption { font-size: var(--fs-caption); color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }

/* 5. Buttons, chips, icons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--control-h); padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--radius); background: transparent;
  font-family: var(--font-sans); font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn--sm { min-height: 36px; padding: 0 var(--s-4); }
.btn--lg { min-height: 52px; padding: 0 var(--s-6); }
.btn--block { display: flex; width: 100%; }
.btn--primary, .btn-primary { background: var(--green); border-color: var(--green); color: var(--on-dark); }
.btn--primary:hover:not([disabled]), .btn-primary:hover:not([disabled]) { background: var(--green-deep); border-color: var(--green-deep); }
.btn--secondary { border-color: var(--green); color: var(--green); }
.btn--secondary:hover:not([disabled]) { background: var(--green); color: var(--on-dark); }
.btn--secondary.on { background: rgba(40, 64, 47, .08); }
.btn--quiet, .btn-secondary { border-color: var(--border); color: var(--ink); background: transparent; }
.btn--quiet:hover:not([disabled]), .btn-secondary:hover:not([disabled]) { border-color: var(--green); color: var(--green); }
.btn--link { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink-soft);
  font-size: var(--fs-eyebrow); letter-spacing: .12em; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; }
.btn--link:hover { color: var(--green); text-decoration-color: var(--green); }
.btn--icon { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--radius); color: var(--ink); background: transparent; border: 0;
  display: inline-flex; align-items: center; justify-content: center; }
.btn--icon:hover { background: rgba(40, 64, 47, .08); color: var(--green); }
.btn--icon svg { width: 20px; height: 20px; }
.btn--on-dark { color: var(--on-dark); }
.btn--on-dark:hover { background: rgba(253, 252, 248, .14); color: var(--on-dark); }

.chip {
  display: inline-flex; align-items: center; gap: var(--s-2); flex: 0 0 auto; height: 32px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--card); color: var(--ink-soft);
  font-family: var(--font-sans); font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-dark); }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius); background: rgba(169, 134, 90, .16); color: var(--gold-deep);
  font-family: var(--font-sans); font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6; white-space: nowrap; }
.badge--outline { background: transparent; border: 1px solid var(--gold); }
.badge--soldout { background: var(--green-deep); color: var(--on-dark); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Touch: every control gets a comfortable hit area */
@media (max-width: 900px) {
  .btn--sm { min-height: 44px; }
  .chip { height: 44px; padding: 0 16px; }
  .btn--link { min-height: 44px; }
}

/* 6. Fields ------------------------------------------------------------------ */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field__label { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-soft); }
.field .req { color: var(--gold-deep); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .input {
  width: 100%; min-width: 0; min-height: var(--control-h); padding: 0 var(--s-3);
  background: var(--surface-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink);
  transition: border-color .15s;
}
.field textarea { padding: var(--s-3); min-height: 96px; }
.field select, select.input {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234c5a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--green); }
.field__help { font-size: var(--fs-caption); color: var(--ink-soft); }
.field__error { font-size: var(--fs-caption); color: var(--danger); }
.field-grid { display: grid; gap: var(--s-4); }
.field-row { display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 420px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; font-size: var(--fs-small); color: var(--ink); min-height: 28px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: 0 0 auto; cursor: pointer; }
.honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.msg { padding: var(--s-3) var(--s-4); border-radius: var(--radius); border: 1px solid transparent; font-size: var(--fs-small); line-height: 1.45; }
.msg:empty { display: none; }
.msg--error, .msg.err { background: var(--danger-soft); color: var(--danger); border-color: rgba(155, 44, 44, .25); }
.msg--ok, .msg.ok { background: var(--success-soft); color: var(--success); border-color: rgba(47, 107, 69, .25); }
@media (max-width: 900px) {
  /* 16px stops iOS zooming into a focused control */
  input, select, textarea { font-size: 16px; }
  .check { min-height: 44px; align-items: center; }
  .check input { margin-top: 0; }
}

/* 7. Cards & grids ----------------------------------------------------------- */
/* One card shell for products and artists. Products: the whole artwork on a
   mat (contain). Artists: a full-bleed portrait (cover). */
.card { position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card:hover, .card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--sage); }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--card); display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: 7%; border-bottom: 1px solid var(--hair); }
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__media--cover { padding: 0; }
.card__media--cover img { object-fit: cover; }
.card__badge { position: absolute; left: var(--s-3); top: var(--s-3); z-index: 2; }
.card__body { display: flex; flex-direction: column; gap: var(--s-1); flex: 1; padding: var(--s-4); min-width: 0; }
.card__title { font-size: var(--fs-h3); color: var(--green-deep); overflow-wrap: anywhere; }
.card__sub { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--ink-soft); }
.card__meta { font-size: var(--fs-caption); color: var(--ink-soft); }
.card__price { font-weight: 700; font-size: 1.125rem; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.card__foot { margin-top: auto; padding-top: var(--s-3); display: grid; gap: var(--s-2); }
@media (max-width: 600px) {
  .card__body { padding: var(--s-3); }
  .card__title { font-size: 1rem; }
  .card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 8. Header & footer --------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--card); border-bottom: 1px solid var(--border); }
.site-header__inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.logo { display: inline-flex; align-items: center; gap: var(--s-3); flex: 0 0 auto; font-family: var(--font-serif); font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--green); text-decoration: none; line-height: 1; }
.logo img { border-radius: var(--radius); }
.site-nav { display: flex; align-items: center; justify-content: center; gap: clamp(2px, .6vw, 10px); flex: 1 1 auto; min-width: 0; }
.site-nav a, .nav-more-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 clamp(8px, .9vw, 14px);
  color: var(--ink-soft); font-weight: 500; text-decoration: none; white-space: nowrap; background: none; border: 0; transition: color .2s; }
.site-nav a:hover, .nav-more-btn:hover, .nav-more.open .nav-more-btn { color: var(--green); }
.site-nav > a::after { content: ''; position: absolute; left: clamp(8px, .9vw, 14px); right: clamp(8px, .9vw, 14px); bottom: 4px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.site-nav > a:hover::after, .site-nav > a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a.nav-hidden { display: none; }
.nav-more { position: relative; flex: 0 0 auto; }
.nav-more-btn svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-more-menu { display: none; position: absolute; top: calc(100% + 12px); right: 0; z-index: 120; min-width: 220px; padding: 6px 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.nav-more.open .nav-more-menu { display: block; }
.nav-more-menu a { display: flex; padding: 0 var(--s-5); min-height: 44px; }
.nav-more-menu a:hover { background: var(--paper); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); flex: 0 0 auto; }
/* Language: globe + code, the native <select> laid invisibly on top */
.lang-wrap { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); cursor: pointer; }
.lang-wrap:hover { border-color: var(--green); color: var(--green); }
.lang-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.lang-code { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em; }
/* Covers the whole control, border included, so the hit area is the full 44px */
.lang-select { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); opacity: 0; border: 0; cursor: pointer; }
.header-btn { min-height: 44px; padding: 0 var(--s-4); }
.header-btn .label { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--on-dark); color: var(--green); font-size: .75rem; font-weight: 700; letter-spacing: 0; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .logo { font-size: 1.4rem; }
  .header-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .header-btn .label { display: none; }
  .header-btn .cart-count { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; font-size: .6875rem; padding: 0 4px; background: var(--gold); color: var(--on-dark); }
  .header-btn { position: relative; }
  .header-actions { gap: var(--s-1); }
}
@media (max-width: 400px) { .lang-code { display: none; } .lang-wrap { width: 44px; padding: 0; justify-content: center; } }
@media (min-width: 901px) { .header-btn .icon { display: none; } }

.site-footer { background: var(--green-deep); color: var(--on-dark); padding-block: var(--s-8) var(--s-5); margin-top: var(--section-gap); font-size: var(--fs-small); }
.site-footer .footer-content { width: var(--page-w); margin-inline: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-6);
  padding-bottom: var(--s-6); border-bottom: 1px solid rgba(253, 252, 248, .15); }
.site-footer h4 { color: var(--gold); margin-bottom: var(--s-3); font-size: var(--fs-eyebrow); letter-spacing: .14em; text-transform: uppercase; }
.site-footer a { display: flex; align-items: center; min-height: 32px; color: var(--on-dark); opacity: .85; text-decoration: none; }
.site-footer a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-brand h3, .site-footer .footer-brand h4, .site-footer .footer-brand strong { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--on-dark); }
.site-footer .footer-brand p { opacity: .75; margin-top: var(--s-2); max-width: 44ch; }
.site-footer p { opacity: .85; }
.site-footer .footer-copyright { width: var(--page-w); margin-inline: auto; padding-top: var(--s-4); font-size: var(--fs-caption); opacity: .7; }
.site-footer--slim { padding-block: var(--s-5); margin-top: var(--s-8); }
.site-footer--slim .footer-copyright { padding-top: 0; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
@media (max-width: 900px) {
  .site-footer .footer-content { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-brand { grid-column: 1 / -1; }
  .site-footer a { min-height: 44px; }
}
@media (max-width: 420px) { .site-footer .footer-content { grid-template-columns: 1fr; } }

/* 9. Overlays & toasts -------------------------------------------------------- */
/* One system: a dimmed backdrop, a --card surface, a header with title and an
   icon close button, a scrolling body and a sticky footer for actions. */
.overlay { position: fixed; inset: 0; z-index: 2000; display: none; background: var(--backdrop); }
.overlay.is-open { display: flex; }
.overlay--modal { align-items: center; justify-content: center; padding: var(--s-5); }
.overlay--drawer { justify-content: flex-end; }
.overlay--drawer-left { justify-content: flex-start; }
.surface { display: flex; flex-direction: column; min-height: 0; background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-2); max-width: 100%; }
.surface--sm { width: 480px; } .surface--md { width: 640px; } .surface--lg { width: 880px; }
.overlay--modal .surface { max-height: 90vh; max-height: 90dvh; }
.overlay--drawer .surface, .overlay--drawer-left .surface { width: 400px; height: 100%; border-radius: 0; }
@media (min-width: 1440px) { .overlay--drawer .surface { width: 440px; } }
.surface__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.surface__head h2 { font-size: var(--fs-h2); }
.surface__body { padding: var(--s-6); overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.surface__foot { padding: var(--s-5) var(--s-6); border-top: 1px solid var(--border); display: grid; gap: var(--s-3); flex: 0 0 auto; background: var(--card); }
@media (max-width: 600px) {
  .overlay--modal { padding: 0; align-items: flex-end; }
  .overlay--modal .surface { width: 100%; max-height: 100dvh; border-radius: 0; }
  .overlay--modal .surface--lg { height: 100dvh; }
  .overlay--drawer .surface, .overlay--drawer-left .surface { width: 100%; }
  .surface__head { padding: var(--s-4) var(--s-5); }
  .surface__body { padding: var(--s-5); }
  .surface__foot { padding: var(--s-4) var(--s-5) calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); }
}
body.has-overlay { overflow: hidden; }

/* Lightbox */
.overlay--lightbox { align-items: center; justify-content: center; background: rgba(12, 20, 16, .92); }
.lightbox__media { position: relative; display: flex; align-items: center; justify-content: center; max-width: 92vw; max-height: 92vh; }
.lightbox__media img, .lightbox__media video { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: var(--radius); background: var(--green-deep); }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: var(--s-4); text-align: center; color: var(--on-dark); font-size: var(--fs-small); padding-inline: var(--s-8); pointer-events: none; }
.lightbox__caption em { font-family: var(--font-serif); }
.lightbox__btn { position: absolute; top: 50%; transform: translateY(-50%); border-radius: 50%; background: rgba(253, 252, 248, .12); }
.lightbox__btn:hover { background: rgba(253, 252, 248, .24); }
.lightbox__btn--prev { left: var(--s-5); } .lightbox__btn--next { right: var(--s-5); }
.lightbox__close { position: absolute; top: var(--s-4); right: var(--s-4); }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(207, 201, 182, .5); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner--on-dark { border-color: rgba(253, 252, 248, .25); border-top-color: var(--on-dark); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts: top-centre, just under the header — never over drawer or modal actions */
.toast { position: fixed; top: calc(var(--header-h) + var(--s-3)); left: 50%; transform: translateX(-50%); z-index: 3000; display: none;
  max-width: min(560px, calc(100vw - 32px)); padding: var(--s-3) var(--s-5); border-radius: var(--radius);
  background: var(--green-deep); color: var(--on-dark); font-weight: 500; text-align: center; white-space: pre-line; box-shadow: var(--shadow-2); }
.toast.error { background: var(--danger); cursor: pointer; }

/* 10. Status panel, auth card -------------------------------------------------- */
.status { max-width: 640px; margin: var(--s-7) auto var(--s-8); padding: clamp(28px, 4vw, 56px); text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: var(--s-4); justify-items: center; }
.status__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.status__icon--neutral { background: rgba(169, 134, 90, .16); color: var(--gold-deep); }
.status__icon--danger { background: var(--danger-soft); color: var(--danger); }
.status__icon svg { width: 26px; height: 26px; }
.status h1 { font-size: var(--fs-h1); }
.status p { color: var(--ink-soft); max-width: 52ch; }
.status__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; margin-top: var(--s-2); }
.status .deflist { text-align: left; width: 100%; }
.deflist { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-2) var(--s-5); font-size: var(--fs-small); align-items: baseline; }
.deflist dt { color: var(--ink-soft); }
.deflist dd { min-width: 0; overflow-wrap: anywhere; }
.deflist a { color: var(--green); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.deflist a:hover { text-decoration-color: var(--gold); }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }

.auth-card { width: min(440px, 100%); margin: var(--s-7) auto var(--s-8); background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: var(--s-5); }
.auth-card h1 { font-size: var(--fs-h1); }
.auth-card form { display: grid; gap: var(--s-4); }
.auth-links { display: grid; gap: var(--s-2); justify-items: center; font-size: var(--fs-small); }
.auth-links a, .auth-link { color: var(--green); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; font-size: var(--fs-small); min-height: 28px; }
.tabs { display: flex; gap: var(--s-4); border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 var(--s-1); min-height: 44px;
  font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; }
.tab.active, .tab[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }

/* 11. Utilities ----------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.stack { display: grid; gap: var(--s-4); }
.stack--sm { gap: var(--s-2); } .stack--lg { gap: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.center { text-align: center; }
.mt-section, .section.mt-section { margin-top: var(--section-gap); }

/* Small spacing helpers used by the page templates */
.mt-block { margin-top: var(--s-5); }
.mt-section-sm { margin-top: var(--s-5); }
.site-nav--tight { gap: 0; }
.site-nav--tight a, .site-nav--tight .nav-more-btn { padding-inline: 8px; }
.status--plain { border: 0; background: none; padding: var(--s-5) 0; margin: var(--s-6) auto; }
.status h2, .status h3 { font-size: var(--fs-h2); }
.status__image { max-width: 240px; max-height: 300px; width: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.status form { width: 100%; max-width: 420px; text-align: left; }
.copy-btn { width: 28px; min-width: 28px; height: 28px; min-height: 28px; vertical-align: middle; }
.copy-btn svg { width: 16px; height: 16px; }

/* Standalone pages (log in, join): a text button in the header keeps its label */
.header-btn--text { text-decoration: none; }
@media (max-width: 900px) { .header-btn.header-btn--text { width: auto; padding: 0 var(--s-3); } }
a.tab { display: inline-flex; align-items: center; text-decoration: none; }

/* Touch targets: every link and control is at least 44 x 44 on phones and tablets */
@media (max-width: 768px) {
  .logo { min-height: 44px; }
  .breadcrumb a, .deflist a, .product-by a, .artist-community a, .auth-links a, .auth-link, .footer-copyright a {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .deflist { row-gap: 0; align-items: center; }
  .auth-links { gap: 0; }
  .copy-btn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
