/* ═══════════════════════════════════════════════════════════════════════════
   B&M VELURE STUDIO — the operator's bench.

   THE PALETTE AND THE GRAMMAR ARE THE SHOP'S OWN.
   Every value below was read out of the live theme at
   bathandmore.gr/wp-content/themes/bathmore/assets/dist/main.min.css
   rather than invented. The first version of this file invented a palette and
   built a dashboard; this one reads the brand's and builds a room.

   What the theme said, and what it changes here:

   · The greens are structural, not decorative. #1a1e1a is a green-black and
     #5c7a63 is used as a BACKGROUND as often as a text colour. Nothing in this
     interface is a neutral grey.
   · Radii are round. `9999px` appears 44 times in the theme, then 40/32/28/24.
     The first build used 8-11px, and that one number is most of why it read as
     a dashboard rather than a boutique.
   · Weights are 400 and 300. The theme confirms it independently of the brief.
   · Shadows are almost invisible: 0 2px 12px rgba(26,30,26,.06).
   · The focus ring is a signature: inset 0 0 0 1px #fff, 0 0 0 2px #1a1e1a.

   OTHER DECISIONS THAT ARE DECISIONS

   · Top navigation, not a sidebar. A fixed rail plus a centred page leaves a
     dead column on any wide screen, and it made the logo shout. Nav goes up
     top; on a phone it becomes a bottom tab bar, which is thumb-reachable and
     removes the hamburger entirely.
   · Packshot wells stay WHITE in both themes. Every product is photographed on
     white, so a dark card behind one draws a hard bright rectangle.
   · One easing curve, one duration scale, and all of it collapses under
     prefers-reduced-motion.

   Layers: tokens · reset · type · shell · controls · components · mobile
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('/static/fonts/fonts.css');

/* ─────────────────────────────────────────────────────────────── tokens ── */

:root {
  /* The shop's own. Names match the role the theme actually gives them. */
  --ink:        #1a1e1a;   /* text, dark fills, borders — a green-black       */
  --sage:       #5c7a63;   /* THE accent: background and text both            */
  --sage-mute:  #8ca193;   /* secondary and muted text                        */
  --line:       #e1e2df;   /* hairlines                                       */
  --cream:      #f4f1ec;   /* the page ground                                 */
  --surface:    #fbf9f5;   /* cards and raised surfaces                       */
  --beige:      #f0ede5;   /* wells and alternate grounds                     */
  --amber:      #ae6b29;   /* warnings                                        */
  --wine:       #7a1418;   /* errors and sale prices                          */
  --coral:      #da6e62;   /* soft accent                                     */

  /* Working aliases, so a theme swap touches one block. */
  --bg:         var(--cream);
  --bg-sunk:    #ece8e0;
  --surf:       var(--surface);
  --surf-2:     var(--beige);
  --surf-3:     #e8e4da;

  --tx:         var(--ink);
  --tx-2:       #5c6459;
  --tx-3:       var(--sage-mute);
  --tx-4:       #adb5aa;

  --hair:       var(--line);
  --hair-soft:  #eceae4;

  --accent:     var(--sage);
  --accent-2:   #486452;
  --accent-wash:#e8eee9;
  --accent-ring: rgba(92, 122, 99, .22);

  --ok:         var(--sage);
  --ok-wash:    var(--accent-wash);
  --warn:       var(--amber);
  --warn-wash:  #f6eee2;
  --bad:        var(--wine);
  --bad-wash:   #f6e9e8;

  --on-ink:     var(--cream);
  --on-accent:  #f7faf7;

  /* Constant, not themed — see the file header. */
  --shot:       #ffffff;

  /* The theme's own three, verbatim. */
  --sh-1: 0 2px 12px rgba(26, 30, 26, .06);
  --sh-2: 0 8px 30px rgba(26, 30, 26, .10);
  --sh-3: 0 18px 56px -12px rgba(26, 30, 26, .20);
  --ring: inset 0 0 0 1px var(--surf), 0 0 0 2px var(--ink);

  /* Round. The single most brand-defining number in this file. */
  --r-xs:  8px;
  --r-sm:  14px;
  --r-md:  20px;
  --r-lg:  28px;
  --r-xl:  36px;
  --r-pill: 9999px;

  --page:  1400px;
  --gutter: clamp(18px, 4vw, 48px);
  --topbar: 72px;
  --tabbar: 74px;

  --ease:     cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-1: .16s;
  --t-2: .25s;
  --t-3: .4s;

  --serif: 'EB Garamond', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans:  'Commissioner', ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono:  ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  color-scheme: light;
}

/* Dark: the SAME hues rotated, not an inversion. The brand's ink becomes the
   card and its muted sage needs no change at all — which is the test of whether
   a dark theme belongs to a brand or was bolted onto it. */
:root[data-theme="dark"] {
  --bg:         #131612;
  --bg-sunk:    #0f120e;
  --surf:       #1a1e1a;
  --surf-2:     #222722;
  --surf-3:     #2b322b;

  --tx:         #f4f1ec;
  --tx-2:       #b9c2b9;
  --tx-3:       #8ca193;
  --tx-4:       #6b766c;

  --hair:       #2c322c;
  --hair-soft:  #232823;

  --accent:     #8fb397;
  --accent-2:   #6d9077;
  --accent-wash:#1e2620;
  --accent-ring: rgba(143, 179, 151, .24);

  --ok:         #8fb397;
  --ok-wash:    #1e2620;
  --warn:       #d29a54;
  --warn-wash:  #292115;
  --bad:        #d68278;
  --bad-wash:   #2a1917;

  --on-ink:     #131612;
  --on-accent:  #10130f;

  --sh-1: 0 2px 12px rgba(0, 0, 0, .45);
  --sh-2: 0 8px 30px rgba(0, 0, 0, .55);
  --sh-3: 0 18px 56px -12px rgba(0, 0, 0, .7);
  --ring: inset 0 0 0 1px var(--surf), 0 0 0 2px var(--tx);

  color-scheme: dark;
}

/* ──────────────────────────────────────────────────────────────── reset ── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--tx);
  font: 300 15px/1.62 var(--sans);
  font-synthesis-weight: none;           /* never let a browser fake a bold */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;               /* a long Greek name must not push out */
}
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; font-family: var(--sans); }
button { cursor: pointer; background: none; border: 0; padding: 0; }

[hidden], .hidden { display: none !important; }

/* Every icon, everywhere. Sizing these only from context rules is what let one
   fall back to the SVG intrinsic 300x150 and swallow the command palette. */
.ico { width: 17px; height: 17px; flex: none; }
.ico-sm { width: 14px; height: 14px; }

/* The theme's own focus ring, verbatim. */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--accent-ring); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--hair); border: 3px solid var(--bg); border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--tx-4); }

/* ──────────────────────────────────────────────────────────────── type ── */

.display {
  font-family: var(--serif);
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -.025em;
}
/* The shop's own hero move: the second line drops and turns sage italic. */
.display em {
  display: block; font-style: italic; color: var(--accent); letter-spacing: -.02em;
}
.h-lg { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.16; }
.h-md { font-family: var(--serif); font-size: 20px; line-height: 1.28; }

.eyebrow {
  display: block;
  font-size: 10.5px; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tx-3);
  margin-bottom: 18px;
}
.lede { font-size: clamp(15px, 1.5vw, 17px); color: var(--tx-2); max-width: 60ch; line-height: 1.6; }
.sub { color: var(--tx-2); font-size: 14px; }
.dim { color: var(--tx-3); }
.num { font-variant-numeric: tabular-nums; }
.caps { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-3); }

code, .mono { font-family: var(--mono); font-size: .88em; }

/* ─────────────────────────────────────────────────────────────── shell ── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  min-height: var(--topbar);
  /* Three columns, not a flex row. The outer two are equal fractions, so the
     nav sits at the TRUE centre of the bar no matter how wide the logo or the
     actions grow — with `margin-left:auto` it would only ever be centred
     between them, which drifts as the counts change. */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(16px) saturate(1.35);
  border-bottom: 1px solid var(--hair);
}

.brandmark {
  justify-self: start;
  display: flex; align-items: center;
  padding: 10px 0;
  transition: opacity var(--t-1) var(--ease);
}
.brandmark:hover { opacity: .7; }
/* The FULL lockup — the monogram alone drops "LOVE YOUR HOME", which is half
   the mark. It needs real height to stay legible, which is why the bar is 84px
   rather than 72. */
.brandmark img { width: 60px; height: auto; }
/* Two files, one shown. The supplied artwork is white-on-transparent, which
   vanishes on cream, so a true-black twin was generated from the same alpha
   channel. Swapped by file rather than filter: invert(), which would flip the
   antialiased edges to the wrong side and leave a halo. */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark  { display: block; }

.topnav {
  justify-self: center;
  display: flex; align-items: center; gap: 4px;
}
.topnav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-pill);
  font-size: 14px; color: var(--tx-2); white-space: nowrap;
  transition: color var(--t-1) var(--ease), background var(--t-1) var(--ease);
}
.topnav a:hover { color: var(--tx); background: var(--surf-3); }
.topnav a.on { color: var(--on-ink); background: var(--ink); }
:root[data-theme="dark"] .topnav a.on { background: var(--tx); }
.topnav .count { font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; }

.topacts { justify-self: end; display: flex; align-items: center; gap: 8px; }

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) var(--gutter) 90px;
}

/* View transition. A hash change swaps two sections instantly, which reads as a
   flash rather than a move — most obviously after Create, where the form is
   replaced by a whole campaign page. A short rise-and-fade gives the change a
   direction. Applied per-view rather than to a wrapper, so a re-render inside a
   view (choosing a colour, toggling a panel) does not re-animate the page. */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.page.enter { animation: page-in var(--t-3) var(--ease-out); }

.head { margin-bottom: clamp(24px, 3.4vw, 40px); }
.head .lede { margin-top: 18px; }

/* A short view must end deliberately rather than trail into empty space. */
.pagefoot {
  border-top: 1px solid var(--hair);
  padding: 22px var(--gutter) 40px;
  max-width: var(--page); margin: 0 auto;
  display: flex; gap: 12px 26px; flex-wrap: wrap; align-items: baseline;
  font-size: 11.5px; color: var(--tx-4);
}
.pagefoot .sp { margin-left: auto; }

.back {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--tx-3); font-size: 13px; margin-bottom: 20px;
  transition: color var(--t-1) var(--ease), gap var(--t-1) var(--ease);
}
.back:hover { color: var(--accent); gap: 11px; }

/* Phones get a real tab bar rather than a hamburger: four destinations, all
   thumb-reachable, nothing to slide open and get wrong. Hidden above 760px. */
.tabbar { display: none; }

/* ──────────────────────────────────────────────────────────── controls ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 22px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--surf); color: var(--tx);
  font-size: 13.5px; font-weight: 400;
  transition: background var(--t-1) var(--ease), border-color var(--t-1) var(--ease),
              color var(--t-1) var(--ease), transform var(--t-1) var(--ease);
}
.btn:hover { border-color: var(--tx-4); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
:root[data-theme="dark"] .btn.primary { background: var(--tx); color: var(--on-ink); border-color: var(--tx); }
:root[data-theme="dark"] .btn.primary:hover { background: var(--accent); border-color: var(--accent); }

.btn.ghost { background: none; border-color: transparent; color: var(--tx-2); }
.btn.ghost:hover { background: var(--surf-3); color: var(--tx); }

.btn.icon { padding: 0; width: 40px; height: 40px; }
.btn.sm { padding: 8px 15px; font-size: 12.5px; }
.btn.lg { padding: 14px 30px; font-size: 15px; }

/* The spinner takes the button's own text slot, so a 20-second phase never
   makes the button change width halfway through. */
.btn.busy { pointer-events: none; color: transparent; position: relative; }
.btn.busy::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--on-ink); border-top-color: transparent;
  animation: spin .7s linear infinite;
}
.btn:not(.primary).busy::after { border-color: var(--tx-3); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.field {
  width: 100%;
  padding: 12px 18px;
  background: var(--surf);
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 300;
  transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}
.field::placeholder { color: var(--tx-4); }
.field:hover { border-color: var(--tx-4); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea.field {
  resize: vertical; min-height: 88px; line-height: 1.6;
  border-radius: var(--r-md);            /* a pill cannot hold two lines */
}

input[type=number].field { appearance: textfield; -moz-appearance: textfield; }
input[type=number].field::-webkit-outer-spin-button,
input[type=number].field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* The number stepper.
   Three round parts, not one segmented block. The first version filled the whole
   button cell on hover, which cut the pill into visible thirds and read as a
   split control rather than one value with two nudges. Here the buttons are
   transparent and only a small disc appears under the cursor, so the pill stays
   one object and the number keeps the middle. */
.stepper {
  /* `flex`, not `inline-flex`, and the value grows: inside a form column the
     pill stretches to the field width, and with the parts packed left the
     number sat off-centre with dead space to its right. Now the controls hold
     the two ends and the value keeps the middle at any width. */
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: var(--surf);
  transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}
.stepper:hover { border-color: var(--tx-4); }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.stepper .val {
  flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 3px;
  min-width: 60px; padding: 0 4px;
}
.stepper .unit { color: var(--tx-4); font-size: 13px; flex: none; }
.stepper input {
  /* Fills its centred slot and centres its own text — rather than relying on
     `field-sizing: content`, which only Chrome 123+ understands and which would
     leave the default ~20ch input width everywhere else. */
  width: 100%; min-width: 0;
  border: 0; background: none; padding: 6px 0;
  text-align: center; font-size: 16px; font-variant-numeric: tabular-nums;
  appearance: textfield; -moz-appearance: textfield;
}
.stepper input:focus { outline: none; box-shadow: none; }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input::placeholder { color: var(--tx-4); font-size: 13.5px; }

/* A circle, inset from the pill edge — never a full-height slab. */
.stepper button {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--tx-3); font-size: 17px; line-height: 1;
  transition: background var(--t-1) var(--ease), color var(--t-1) var(--ease);
}
.stepper button:hover { background: var(--surf-3); color: var(--tx); }
.stepper button:active { background: var(--accent); color: var(--on-accent); }
/* At the end of the range the control goes quiet rather than staying inviting —
   an unexplained dead button reads as a bug. */
.stepper button[disabled] { opacity: .25; pointer-events: none; }

.stepper.sm { padding: 3px; }
.stepper.sm button { width: 30px; height: 30px; font-size: 15px; }
.stepper.sm input { padding: 5px 0; font-size: 14px; }
.stepper.sm .val { min-width: 46px; }
/* Where a stepper sits beside a button rather than filling a form column. */
.stepper.auto { display: inline-flex; }
.stepper.auto .val { flex: 0 0 auto; min-width: 62px; }

.search { position: relative; flex: 1 1 300px; min-width: 200px; }
.search > .ico {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--tx-4); pointer-events: none;
}
.search .field { padding-left: 47px; padding-right: 76px; }
.search kbd {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font: 400 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--tx-4); border: 1px solid var(--hair); border-radius: var(--r-xs);
  padding: 5px 8px; background: var(--bg); pointer-events: none;
}

/* ── listbox ─────────────────────────────────────────────────────────────
   A native <select> cannot carry a description line per option and cannot be
   styled past its border — the drop-down itself is drawn by the OS. This is a
   real listbox: roving focus, type-ahead, Home/End, Escape, click-outside. */

.lb { position: relative; }
.lb-btn {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 12px 18px; border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: var(--surf); text-align: left; font-size: 14px; font-weight: 300;
  transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}
.lb-btn:hover { border-color: var(--tx-4); }
.lb-btn .lb-val { flex: 1; min-width: 0; overflow: hidden;
                  text-overflow: ellipsis; white-space: nowrap; }
.lb-btn .lb-val.placeholder { color: var(--tx-4); }
.chev { width: 15px; height: 15px; flex: none; color: var(--tx-3);
        transition: transform var(--t-2) var(--ease); }
.lb.open .lb-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.lb.open .chev { transform: rotate(180deg); }

.lb-pop {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 8px);
  min-width: 236px;
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-md); box-shadow: var(--sh-3);
  padding: 7px; max-height: 340px; overflow-y: auto;
  transform-origin: top center;
  animation: pop var(--t-2) var(--ease-out);
}
.lb-pop.up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom center; }
@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.lb-opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm); text-align: left;
  transition: background var(--t-1) var(--ease);
}
.lb-opt:hover, .lb-opt.active { background: var(--surf-3); }
.lb-opt .lb-txt { flex: 1; min-width: 0; }
.lb-opt .lb-lab { font-size: 13.5px; color: var(--tx); }
.lb-opt .lb-note { display: block; font-size: 11.5px; color: var(--tx-3);
                   line-height: 1.45; margin-top: 3px; }
.lb-opt .tick { width: 15px; height: 15px; flex: none; color: var(--accent);
                opacity: 0; margin-top: 2px; }
.lb-opt[aria-selected="true"] .tick { opacity: 1; }
.lb-opt[aria-selected="true"] .lb-lab { color: var(--accent); }

.seg {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--surf-3); border-radius: var(--r-pill); border: 1px solid var(--hair);
}
.seg button {
  padding: 8px 17px; border-radius: var(--r-pill); font-size: 13px; color: var(--tx-2);
  transition: background var(--t-1) var(--ease), color var(--t-1) var(--ease);
}
.seg button:hover { color: var(--tx); }
.seg button.on { background: var(--surf); color: var(--tx); box-shadow: var(--sh-1); }

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch .track {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: var(--surf-3); border: 1px solid var(--hair);
  transition: background var(--t-2) var(--ease), border-color var(--t-2) var(--ease);
}
.switch .knob {
  position: absolute; top: 4px; left: 4px; width: 18px; height: 18px;
  border-radius: var(--r-pill); background: var(--tx-4);
  transition: left var(--t-2) var(--ease), background var(--t-2) var(--ease);
}
.switch input:checked ~ .track { background: var(--accent-wash); border-color: var(--accent); }
.switch input:checked ~ .knob  { left: 22px; background: var(--accent); }

.check {
  width: 19px; height: 19px; flex: none; border-radius: var(--r-xs);
  border: 1px solid var(--hair); background: var(--surf);
  display: grid; place-items: center; color: transparent;
  transition: background var(--t-1) var(--ease), border-color var(--t-1) var(--ease),
              color var(--t-1) var(--ease);
}
.check svg { width: 11px; height: 11px; }
[aria-checked="true"] > .check, .on > .check {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

/* ────────────────────────────────────────────────────────── components ── */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--surf-3); color: var(--tx-2);
  font-size: 11px; letter-spacing: .02em; white-space: nowrap;
}
.chip.accent { background: var(--accent-wash); color: var(--accent); }
.chip.warn   { background: var(--warn-wash);   color: var(--warn); }
.chip.bad    { background: var(--bad-wash);    color: var(--bad); }
.chip.line   { background: none; border: 1px solid var(--hair); }

.panel {
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px); margin-bottom: 18px;
}
.panel > h2 { font-size: clamp(19px, 2.2vw, 24px); margin-bottom: 6px; }
.panel > .why { font-size: 14px; color: var(--tx-2); margin-bottom: 20px; max-width: 66ch; }

.note {
  background: var(--surf-2); border: 1px solid var(--hair);
  border-radius: var(--r-md); padding: 16px 20px;
}
.note h3 { font-family: var(--sans); font-size: 12.5px; font-weight: 400; margin-bottom: 6px; }
.note p { font-size: 13px; color: var(--tx-2); line-height: 1.55; }
.note.warn { background: var(--warn-wash); border-color: transparent; }
.note.warn h3, .note.warn p { color: var(--warn); }

.kv { display: grid; grid-template-columns: minmax(104px, auto) 1fr; gap: 11px 24px; font-size: 14px; }
.kv dt { color: var(--tx-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.divider { height: 1px; background: var(--hair); border: 0; margin: 26px 0; }

/* A strip of counted facts. Gives a page a floor and says the data is real. */
.stats { display: flex; flex-wrap: wrap; gap: 9px; }
.stat {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 17px; border-radius: var(--r-pill);
  background: var(--surf); border: 1px solid var(--hair);
}
.stat b { font-weight: 400; font-size: 15px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--tx-3); }

.swatch {
  width: 13px; height: 13px; border-radius: var(--r-pill); flex: none;
  border: 1px solid rgba(120, 130, 120, .5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.swatches { display: flex; gap: 5px; align-items: center; }
.swatches .more { font-size: 10.5px; color: var(--tx-4); margin-left: 3px; }

.sk { background: var(--surf-3); border-radius: var(--r-xs); position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent,
              color-mix(in srgb, var(--surf) 75%, transparent), transparent);
  animation: sweep 1.4s var(--ease) infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.toasts {
  position: fixed; z-index: 90; right: var(--gutter); bottom: 24px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  max-width: min(400px, calc(100vw - 2 * var(--gutter)));
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-md); box-shadow: var(--sh-3);
  padding: 14px 16px; font-size: 13px; line-height: 1.5;
  animation: toast-in var(--t-3) var(--ease-out);
}
.toast.out { animation: toast-out var(--t-2) var(--ease) forwards; }
.toast .ico { margin-top: 1px; color: var(--accent); }
.toast.warn .ico { color: var(--warn); }
.toast.bad  .ico { color: var(--bad); }
.toast .x { margin-left: auto; color: var(--tx-4); flex: none; }
.toast .x:hover { color: var(--tx); }
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to   { opacity: 0; transform: translateX(20px); } }

.busy-veil {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  animation: fade var(--t-2) var(--ease);
}
.busy-veil .box { display: grid; justify-items: center; gap: 20px; text-align: center;
                  padding: 0 var(--gutter); max-width: 460px; }
@keyframes fade { from { opacity: 0; } }

/* A sweeping hairline, not a percentage. These phases have no measurable
   progress, and a fake bar that stalls at 90% is worse than an honest one. */
.bar { width: 200px; height: 2px; background: var(--hair); border-radius: var(--r-pill); overflow: hidden; }
.bar i { display: block; width: 38%; height: 100%; background: var(--accent);
         border-radius: var(--r-pill); animation: slide 1.3s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(370%); } }

.empty {
  text-align: center; padding: clamp(48px, 8vw, 84px) var(--gutter);
  color: var(--tx-3); font-size: 14px;
  border: 1px dashed var(--hair); border-radius: var(--r-lg); background: var(--surf-2);
}
.empty .h-md { color: var(--tx); margin-bottom: 9px; }
.empty p { max-width: 46ch; margin: 0 auto; line-height: 1.6; }
.empty code { background: var(--surf-3); padding: 3px 8px; border-radius: var(--r-xs); color: var(--tx); }

/* ── command palette ─────────────────────────────────────────────────────── */
.cmdk-veil {
  position: fixed; inset: 0; z-index: 85;
  background: color-mix(in srgb, var(--bg-sunk) 66%, transparent);
  backdrop-filter: blur(6px); animation: fade var(--t-2) var(--ease);
  padding: 10vh var(--gutter) var(--gutter);
}
.cmdk {
  max-width: 640px; margin: 0 auto;
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden;
  animation: pop var(--t-2) var(--ease-out);
}
.cmdk .top-row {
  display: flex; align-items: center; gap: 13px; padding: 17px 20px;
  border-bottom: 1px solid var(--hair-soft);
}
.cmdk .top-row > .ico { color: var(--tx-4); }
.cmdk input { flex: 1; border: 0; background: none; outline: none;
              font-size: 16px; font-weight: 300; min-width: 0; }
.cmdk input:focus { box-shadow: none; }
.cmdk input::placeholder { color: var(--tx-4); }
.cmdk-list { max-height: min(46vh, 420px); overflow-y: auto; padding: 8px; }
.cmdk-row {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); text-align: left;
  transition: background var(--t-1) var(--ease);
}
.cmdk-row:hover, .cmdk-row.active { background: var(--surf-3); }
.cmdk-row .thumb-xs {
  width: 38px; height: 38px; border-radius: var(--r-xs); background: var(--shot);
  border: 1px solid var(--hair-soft); flex: none; padding: 4px;
  display: grid; place-items: center;
}
.cmdk-row .thumb-xs img { width: 100%; height: 100%; object-fit: contain; }
.cmdk-row .thumb-xs .ico { color: #8ca193; }
.cmdk-row .t { display: block; font-size: 13.5px; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.cmdk-row .m { display: block; font-size: 11.5px; color: var(--tx-3); margin-top: 1px; }
.cmdk-row .go { margin-left: auto; font-size: 10px; color: var(--tx-4);
                flex: none; letter-spacing: .12em; text-transform: uppercase; }
.cmdk-foot {
  display: flex; gap: 18px; padding: 11px 20px; border-top: 1px solid var(--hair-soft);
  font-size: 11px; color: var(--tx-4); background: var(--surf-2);
}
.cmdk-foot kbd {
  font: 400 10px/1 var(--sans); border: 1px solid var(--hair); border-radius: 5px;
  padding: 4px 6px; margin-right: 6px; background: var(--surf);
}

/* ─────────────────────────────────────────────────────────────── mobile ── */

@media (max-width: 760px) {
  :root { --topbar: 60px; }
  /* No nav in the middle on a phone, so the bar collapses to logo + actions. */
  .topbar { grid-template-columns: auto 1fr; }
  .topacts { grid-column: 2; }
  .brandmark img { width: 50px; }
  .brandmark { padding: 9px 0; }

  /* Nav leaves the top bar and becomes a tab bar at the bottom of the screen. */
  .topnav { display: none; }
  .topbar { gap: 12px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
    /* Horizontal padding so the first and last pills stand off the screen edge
       by the same amount as the gap between the inner ones — without it the
       outer two read as pushed against the bezel. */
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(18px) saturate(1.3);
    border-top: 1px solid var(--hair);
  }
  .tabbar a {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; font-size: 10px; letter-spacing: .03em; line-height: 1;
    color: var(--tx-3);
    min-height: 44px;                      /* the tap-target floor */
    transition: color var(--t-2) var(--ease);
  }

  /* A SOLID pill behind the WHOLE item — icon and label together.
     Wrapping only the icon left the label hanging outside it, which read as
     lopsided: the pill was centred on the icon while the item's visual mass sat
     lower. Enclosing both makes the active state symmetrical about the cell.
     Drawn as a pseudo-element rather than a wrapper so the markup stays four
     plain links, and animated on transform and opacity only — both compositor
     properties, so it stays smooth on a phone where animating width would not. */
  .tabbar a::before {
    content: ''; position: absolute; z-index: 0;
    inset: 6px 5px;
    border-radius: var(--r-pill);
    background: var(--accent);
    transform: scale(.82);
    opacity: 0;
    transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease-out);
  }
  .tabbar a .ico, .tabbar a span { position: relative; z-index: 1; }
  .tabbar a .ico {
    width: 20px; height: 20px;
    transition: transform var(--t-2) var(--ease-out), color var(--t-2) var(--ease);
  }

  .tabbar a.on::before { opacity: 1; transform: none; }
  .tabbar a.on, .tabbar a.on .ico, .tabbar a.on span { color: var(--on-accent); }

  /* Touch feedback: the icon dips on press. There is no hover on a phone, so
     without this a tap goes unacknowledged until the whole view swaps. */
  .tabbar a:active .ico { transform: scale(.86); }

  .tabbar .count { display: none; }

  /* Clear the tab bar, and keep the toasts above it. */
  .page { padding-bottom: calc(var(--tabbar) + 42px); }
  .pagefoot { padding-bottom: calc(var(--tabbar) + 26px); }
  .toasts { right: 14px; left: 14px; bottom: calc(var(--tabbar) + 14px); max-width: none; }

  .kv { grid-template-columns: 1fr; gap: 3px; }
  .kv dt { font-size: 11.5px; }
  .kv dd { margin-bottom: 12px; }

  .search kbd { display: none; }
  .search .field { padding-right: 20px; }
  .cmdk-veil { padding-top: 6vh; }
}

@media (max-width: 480px) {
  .btn { padding: 11px 18px; }
  .panel { border-radius: var(--r-md); }
  /* Five tabs on a narrow phone: the labels shrink rather than truncate, because
     a clipped "Campaig…" is worse than a smaller readable word. */
  .tabbar a { font-size: 9px; letter-spacing: 0; }
  .tabbar a .ico { width: 19px; height: 19px; }
  .tabbar a::before { inset: 6px 3px; }
}

/* ───────────────────────────────────────────────────────────── motion off ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .sk::after, .bar i { animation: none; }
  .bar i { width: 100%; opacity: .5; }
}

/* ───────────────────────────────────────────────────────── weight guard ── */
/* Commissioner is capped at 400. `strong`, `b` and `th` default to 700 in every
   browser, so generated markup would quietly break the rule. Pulled back here
   rather than policed at every call site. */
strong, b, th, optgroup { font-weight: 400; }

/* ═══════════════════════════════════════════════════════════ catalogue ══ */

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 4px;
}
.toolbar .lb { width: 210px; }

.result-line {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 4px 20px; min-height: 20px;
  font-size: 12.5px; color: var(--tx-3);
}
.result-line .sp { margin-left: auto; }

.grid {
  display: grid; gap: clamp(12px, 1.4vw, 20px);
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
}

.card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-2) var(--ease), box-shadow var(--t-2) var(--ease),
              border-color var(--t-2) var(--ease);
}
.card:hover {
  transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--tx-4);
}
.card:hover .thumb img { transform: scale(1.04); }

/* The packshot well. Stays white in BOTH themes — every product is shot on
   white, so a dark card behind one draws a hard bright rectangle. Inset from
   the card edge and rounded on its own, so the white never touches the border. */
.thumb {
  position: relative; margin: 10px 10px 0;
  aspect-ratio: 1; border-radius: var(--r-md);
  background: var(--shot); overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%; object-fit: contain; padding: 14px;
  opacity: 0; transition: opacity var(--t-3) var(--ease), transform var(--t-3) var(--ease);
}
.thumb img.in { opacity: 1; }
.thumb .sk { position: absolute; inset: 0; border-radius: inherit; }
.thumb .flag {
  position: absolute; top: 9px; right: 9px;
  width: 20px; height: 20px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--warn-wash); color: var(--warn); font-size: 11px;
}
.thumb .noshot {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; color: #adb5aa;
}

.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card .t {
  font-size: 14px; line-height: 1.32; color: var(--tx);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .m {
  font-size: 11.5px; color: var(--tx-3);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
}
.card .foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.card .p { font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }
.card .foot .swatches { margin-left: auto; }

/* A range has no single photograph, so its card is typographic instead. */
.card.series .thumb {
  display: grid; place-items: center; padding: 20px; text-align: center;
  background: linear-gradient(155deg, var(--surf-2), var(--surf-3));
}
.card.series .thumb .nm {
  font-family: var(--serif); font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: .01em; color: var(--accent); line-height: 1.1;
  overflow-wrap: anywhere;
}
.card.series .thumb .ct { font-size: 11px; color: var(--tx-3); margin-top: 9px; }

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .toolbar .lb { width: 100%; }
  .card { border-radius: var(--r-md); }
  .thumb { margin: 7px 7px 0; border-radius: var(--r-sm); }
  .card .body { padding: 11px 13px 13px; gap: 5px; }
  .card .t { font-size: 13px; }
}

/* ═════════════════════════════════════════════════ product · range · form ══ */

/* The hero. Deliberately compact: the first version gave the display size of a
   page headline to a product name and set nine facts as a wide two-column list,
   which pushed the form — the thing you actually came to fill in — a full screen
   down. The packshot is smaller, the name is a heading rather than a hero, and
   the specs are a dense hairline-ruled grid.
   The shot stays sticky on a wide screen: losing sight of the object you are
   configuring a shoot for is the wrong thing to lose sight of. */
.hero {
  display: grid; gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: start;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.hero .shotwrap { position: sticky; top: calc(var(--topbar) + 20px); }
.hero .shot {
  position: relative; aspect-ratio: 1;
  background: var(--shot); border: 1px solid var(--hair);
  border-radius: var(--r-lg); overflow: hidden;
}
.hero .shot img {
  width: 100%; height: 100%; object-fit: contain; padding: clamp(16px, 2.2vw, 28px);
  opacity: 0; transition: opacity var(--t-3) var(--ease);
}
.hero .shot img.in { opacity: 1; }
.hero .shot .sk { position: absolute; inset: 0; border-radius: inherit; }

.hero .facts { min-width: 0; }
.hero .facts .eyebrow { margin-bottom: 10px; }
.hero .facts h1 {
  font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -.02em;
}
/* The Greek name under the English one, in the brand's sage italic. Both are
   real names from the shop; neither is derived from the other. */
.hero .name-el {
  font-family: var(--serif); font-style: italic; font-size: clamp(16px, 1.8vw, 20px);
  color: var(--accent); line-height: 1.25; margin-top: 4px;
}
.hero .facts .lede { font-size: 14px; margin: 14px 0 20px; max-width: 58ch; }

/* The spec grid. Two columns on a wide screen, hairline-ruled, tight leading —
   a reference table, not prose. */
.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--hair);
}
.specs .row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--hair-soft);
  background: none; border-radius: 0; transform: none; box-shadow: none;
  border-left: 0; border-right: 0; border-top: 0;
}
.specs .row:hover { transform: none; box-shadow: none; border-color: var(--hair-soft); }
.specs .row dt {
  flex: none; width: 84px; font-size: 11.5px; color: var(--tx-3);
  letter-spacing: .01em;
}
.specs .row dd {
  margin: 0; flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere;
}
.specs .row dd.soft { color: var(--tx-3); font-size: 12.5px; }
/* An odd number of specs would leave a dangling cell; the last row spans. */
.specs .row.wide { grid-column: 1 / -1; }

@media (max-width: 620px) {
  .specs { grid-template-columns: minmax(0, 1fr); }
}

/* ── colour picker ──────────────────────────────────────────────────────
   New with the rebuilt shop and genuinely load-bearing: a variable product's
   parent image is one finish out of several, and the Product Extract has to
   start from the colour actually being advertised. */
.picker { margin: 24px 0; }
.picker > .eyebrow { margin-bottom: 12px; }
.picker-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
/* The selected colour, carried in the label itself. */
.picker > .eyebrow b { color: var(--accent); font-weight: 400; }
.picker > .eyebrow b::before { content: '— '; color: var(--tx-4); }
.picker-note { font-size: 11.5px; color: var(--tx-3); margin-top: 12px; }

.colour-btn {
  position: relative; width: 38px; height: 38px; padding: 0;
  border-radius: var(--r-pill);
  border: 1px solid rgba(120, 130, 120, .45);
  transition: transform var(--t-1) var(--ease-out), box-shadow var(--t-1) var(--ease);
}
.colour-btn:hover { transform: scale(1.08); }
/* The theme's own ring: a white keyline, then the ink. It reads on a white
   swatch and a black one alike, which a plain outline does not. */
.colour-btn.on { box-shadow: var(--ring); }
.colour-btn.nophoto { opacity: .45; }
.colour-btn.nophoto::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(45deg, transparent 0 3px,
              color-mix(in srgb, var(--ink) 34%, transparent) 3px 4.5px);
}
/* "As listed" — the product's own photograph, whatever finish that happens to
   be. Drawn as an empty ring rather than a swatch with a dash in it, because it
   is the absence of a colour choice, not a colour. */
.colour-btn.as-listed {
  background: none; border-style: dashed; border-color: var(--tx-4);
}
.colour-btn.as-listed.on { border-style: solid; }


/* ── the series piece picker ────────────────────────────────────────────
   A range is not automatically a set shot: several are the same product at
   different sizes, and no styled vignette holds fourteen objects. So the pieces
   are shown and chosen, never silently taken whole. */
.picker-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px;
}
.picker-head .count { margin-left: auto; font-size: 12.5px; color: var(--tx-3); }

.pieces { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.piece {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--hair); border-radius: var(--r-md);
  padding: 10px 14px 10px 11px; background: var(--surf);
  transition: border-color var(--t-1) var(--ease), background var(--t-1) var(--ease),
              transform var(--t-1) var(--ease);
}
.piece:hover { border-color: var(--tx-4); }
.piece:active { transform: scale(.99); }
.piece.on { border-color: var(--accent); background: var(--accent-wash); }
/* A row the default selection skipped because another piece already covers its
   product type. Still choosable — dimmed, not hidden. */
.piece.dupe { opacity: .5; }
.piece.dupe.on { opacity: 1; }
.piece .pshot {
  width: 42px; height: 42px; flex: none; background: var(--shot);
  border: 1px solid var(--hair-soft); border-radius: var(--r-sm); padding: 3px;
}
.piece .pshot img { width: 100%; height: 100%; object-fit: contain; }
.piece .pt { min-width: 0; flex: 1; }
.piece .pn {
  display: block; font-size: 13px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.piece .pd { display: block; font-size: 11.5px; color: var(--tx-3); margin-top: 3px; }

/* ── the campaign form ──────────────────────────────────────────────────── */

.form {
  display: grid; gap: clamp(18px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px);
}
.form .f { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.form .f.wide { grid-column: 1 / -1; }
.form .f > .lab { font-size: 13px; color: var(--tx); }
.form .f > .lab small { color: var(--tx-4); margin-left: 4px; }
.form .f > .hint { font-size: 11.5px; color: var(--tx-3); line-height: 1.55; }

.actions {
  display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap;
}
.actions .msg { font-size: 13px; color: var(--tx-2); }
.actions .msg.bad { color: var(--bad); }
.actions .msg.ok  { color: var(--accent); }

/* ── the campaigns list ─────────────────────────────────────────────────── */

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-md); padding: 17px 22px;
  transition: border-color var(--t-1) var(--ease), transform var(--t-1) var(--ease),
              box-shadow var(--t-1) var(--ease);
}
.row:hover { border-color: var(--tx-4); transform: translateX(3px); box-shadow: var(--sh-1); }
.row .t { display: block; font-size: 15px; }
.row .m { display: block; font-size: 12px; color: var(--tx-3); margin-top: 3px; }
.row .sp { margin-left: auto; flex: none; display: flex; align-items: center; gap: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero .shotwrap { position: static; max-width: 340px; }
}
@media (max-width: 760px) {
  .hero .shot { border-radius: var(--r-lg); }
  .form { padding: 18px 16px; border-radius: var(--r-md); }
  .pieces { grid-template-columns: 1fr; }
  .row { padding: 14px 16px; gap: 12px; }
  .row .sp { flex-direction: column; align-items: flex-end; gap: 5px; }
  .actions .btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════ campaign ══ */

/* The progress rail. Five stages with the joins filling sage as they complete —
   a rail rather than a row of pills, because the operator needs to see how far a
   campaign has got, not only which stage is current. */
.rail-steps {
  display: flex; align-items: flex-start;
  margin-bottom: clamp(26px, 3.4vw, 38px);
  /* The current dot's halo is drawn OUTSIDE its border box; without room inside
     the container it gets clipped to a flat edge. */
  padding: 8px 2px 10px;
}
.step { display: flex; align-items: flex-start; flex: 1; min-width: 0; }
.step .body {
  display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 0 6px; flex: 1; min-width: 0;
}
.step .dot {
  width: 30px; height: 30px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--surf);
  display: grid; place-items: center; color: var(--tx-4);
  font-size: 12px; font-variant-numeric: tabular-nums;
  transition: background var(--t-2) var(--ease), border-color var(--t-2) var(--ease),
              color var(--t-2) var(--ease), box-shadow var(--t-2) var(--ease);
}
.step .nm { font-size: 11.5px; color: var(--tx-3); line-height: 1.3; }
.step .tick-ico { width: 13px; height: 13px; }
.step .join {
  flex: 1; height: 1px; min-width: 10px; margin-top: 15px;
  background: var(--hair);
  transition: background var(--t-2) var(--ease);
}

.step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.done .nm  { color: var(--tx-2); }
.step.done .join { background: var(--accent); }
.step.now .dot {
  background: var(--ink); border-color: var(--ink); color: var(--on-ink);
  box-shadow: 0 0 0 5px var(--accent-ring);
}
:root[data-theme="dark"] .step.now .dot { background: var(--tx); color: var(--on-ink); }
.step.now .nm { color: var(--tx); }

/* A five-stage horizontal scroller is unusable on a phone, so the rail turns
   vertical and the joins become a spine down its left edge. */
@media (max-width: 560px) {
  .rail-steps { flex-direction: column; padding: 4px 0 8px; }
  .step { width: 100%; flex: none; flex-direction: column; align-items: flex-start; }
  .step .body {
    grid-auto-flow: column; grid-template-columns: auto 1fr;
    justify-items: start; text-align: left; gap: 12px; padding: 0;
    align-items: center; width: 100%;
  }
  .step .nm { font-size: 13px; }
  .step .join { width: 1px; height: 16px; min-width: 0; margin: 2px 0 2px 15px; flex: none; }
}

/* ── collapsible panel headers ─────────────────────────────────────────── */
[data-collapse] {
  display: flex; width: 100%; align-items: center; gap: 14px; text-align: left;
}
[data-collapse] .h-md { transition: color var(--t-1) var(--ease); }
[data-collapse]:hover .h-md { color: var(--accent); }

/* ── concepts ──────────────────────────────────────────────────────────── */
.concept {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--hair); border-radius: var(--r-md);
  padding: 20px 24px; margin-bottom: 11px; background: var(--surf);
  transition: border-color var(--t-1) var(--ease), background var(--t-1) var(--ease),
              transform var(--t-1) var(--ease);
}
.concept:hover { border-color: var(--tx-4); transform: translateY(-2px); }
.concept.on { border-color: var(--accent); background: var(--accent-wash); }
.concept h3 { font-size: 21px; margin-bottom: 8px; }
.concept p { font-size: 14px; color: var(--tx-2); margin-bottom: 11px; line-height: 1.55; }
.concept .k { font-size: 12px; color: var(--tx-3); }

/* ── prompt cards ──────────────────────────────────────────────────────── */

.pc {
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  margin-bottom: 14px; overflow: hidden; background: var(--surf);
  transition: border-color var(--t-1) var(--ease);
}
.pc:hover { border-color: var(--tx-4); }

.pc-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--hair-soft);
}
/* DIRECT child only. The meter's character count is also `.n`, nested inside
   `.r` — an unscoped `.pc-head .n` matched it too and forced it into this 30px
   grid box, so every count rendered clipped to "1999/2". */
.pc-head > .n {
  width: 30px; height: 30px; border-radius: var(--r-pill); flex: none;
  background: var(--surf-3); color: var(--tx-3);
  display: grid; place-items: center; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pc.setup > .pc-head > .n { background: var(--accent-wash); color: var(--accent); }
.pc-head .t { flex: 1; min-width: 0; font-size: 14.5px; }
.pc-head .t small { display: block; color: var(--tx-3); font-size: 12px; margin-top: 3px;
                    line-height: 1.4; }
.pc-head .r { display: flex; align-items: center; gap: 12px; flex: none; }

/* The character budget gauge.
   Google Flow degrades past roughly 2,000 characters: the product lock, the
   scale line and the realism stack stop landing, and what comes back is a
   beautiful photograph of the wrong object. Every card carries its OWN limit
   from the server, so this can never disagree with the fitter that produced the
   prompt it is measuring. */
.meter { display: flex; align-items: center; gap: 9px; flex: none; }
.meter .track {
  width: 62px; height: 4px; border-radius: var(--r-pill);
  background: var(--hair); overflow: hidden;
}
/* `display: block` is load-bearing, not tidiness. The fill is a <span>, so it
   defaults to inline — and an inline box ignores width and height outright, so
   the gauge rendered as an empty grey track at every value. */
.meter .fill {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--accent);
  transition: width var(--t-3) var(--ease), background var(--t-3) var(--ease);
}
.meter .track { display: block; }
.meter.tight .fill { background: var(--warn); }
.meter.full  .fill { background: var(--bad); }
.meter .n {
  font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.meter.tight .n { color: var(--warn); }
.meter.full  .n { color: var(--bad); }

/* What to attach, on its own beige well — the single most-missed instruction in
   the whole pack. */
.pc-attach {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 20px; font-size: 13px; color: var(--tx-2);
  background: var(--surf-2); border-bottom: 1px solid var(--hair-soft);
}
.pc-attach .ico { margin-top: 1px; color: var(--accent); }
.pc-attach b { color: var(--tx); }

.pc pre {
  margin: 0; padding: 18px 20px; background: var(--surf);
  font: 300 12.5px/1.68 var(--mono);
  white-space: pre-wrap; word-break: break-word;
  max-height: 250px; overflow: auto;
  transition: max-height var(--t-3) var(--ease);
}
.pc.expanded pre { max-height: 1600px; }
.pc-more {
  width: 100%; padding: 10px; font-size: 11.5px; color: var(--tx-3);
  border-top: 1px solid var(--hair-soft); background: var(--surf-2);
  transition: color var(--t-1) var(--ease);
}
.pc-more:hover { color: var(--accent); }

.copy {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--surf);
  font-size: 12.5px; color: var(--tx-2);
  transition: border-color var(--t-1) var(--ease), color var(--t-1) var(--ease),
              background var(--t-1) var(--ease);
}
.copy:hover { border-color: var(--tx-4); color: var(--tx); }
.copy.done { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.copy .ico { width: 14px; height: 14px; }

/* ── the copy kit, deliberately walled off ─────────────────────────────────
   The Greek copy is an editing asset and must never be pasted into Flow beside
   a prompt. The architecture enforces that in three independent places; this
   makes it visible at a glance — its own ground, its own type, its own exports. */
.copykit {
  background: var(--surf-2); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px); margin-top: 30px;
}
/* Grid, not flex-wrap. With wrap the export buttons dropped to their own line
   at full desktop width for no visible reason; two explicit columns cannot. */
.kit-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px; align-items: start; margin-bottom: 10px;
}
.kit-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 620px) {
  .kit-head { grid-template-columns: minmax(0, 1fr); }
}
.copykit h2 { font-size: clamp(20px, 2.3vw, 25px); margin-bottom: 6px; }
.copykit .why { font-size: 13.5px; color: var(--tx-2); margin-bottom: 20px; max-width: 66ch; }
.copykit .block { border-top: 1px solid var(--hair); padding: 16px 0; }
.copykit .block:last-child { border-bottom: 1px solid var(--hair); }
.copykit .block .eyebrow { margin-bottom: 9px; }
/* Greek, set in the serif at a reading size — this is copy to be read and
   judged, not a data field. */
.copykit .el { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--tx); }
.copykit .el div + div { margin-top: 7px; }

@media (max-width: 760px) {
  .pc { border-radius: var(--r-md); }
  .pc-head { flex-wrap: wrap; gap: 10px 12px; padding: 14px 16px; }
  .pc-head .t { flex: 1 1 100%; order: 2; }
  .pc-head > .n { order: 1; }
  .pc-head .r { order: 1; margin-left: auto; }
  .pc-attach, .pc pre { padding-left: 16px; padding-right: 16px; }
  .concept { padding: 16px 18px; }
  .copykit { padding: 20px 16px; border-radius: var(--r-md); }
}

/* ══════════════════════════════════════════════════════════════════ usage ══ */

/* Tiles. The account balance is first and largest because it is the number that
   stops work when it runs out — everything else is diagnosis after the fact. */
.tiles {
  display: grid; gap: 12px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.tile {
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: 20px 22px;
}
.tile .lab {
  display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--tx-3); margin-bottom: 12px;
}
.tile .big {
  font-family: var(--serif); font-size: clamp(28px, 3.4vw, 38px); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.tile .sub2 { display: block; font-size: 11.5px; color: var(--tx-3); margin-top: 9px; }
.tile.accent { background: var(--accent-wash); border-color: transparent; }
.tile.accent .big, .tile.accent .lab { color: var(--accent); }
.tile.warn { background: var(--warn-wash); border-color: transparent; }
.tile.warn .big, .tile.warn .lab, .tile.warn .sub2 { color: var(--warn); }
.tile.bad { background: var(--bad-wash); border-color: transparent; }
.tile.bad .big, .tile.bad .lab, .tile.bad .sub2 { color: var(--bad); }

/* Per-user spend rows */
.spender {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--hair);
}
.spender:last-child { border-bottom: 1px solid var(--hair); }
.spender .who { font-size: 15px; }
.spender .who .you {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-left: 8px;
}
.spender .amt { font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.spender .amt small { display: block; font-size: 11px; color: var(--tx-3); margin-top: 3px; }
.spender .bar-wrap { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.spender .gauge {
  flex: 1; height: 6px; border-radius: var(--r-pill);
  background: var(--surf-3); overflow: hidden;
}
.spender .gauge i {
  display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent);
  transition: width var(--t-3) var(--ease), background var(--t-3) var(--ease);
}
.spender.tight .gauge i { background: var(--warn); }
.spender.over  .gauge i { background: var(--bad); }
.spender .capnote { font-size: 11.5px; color: var(--tx-3); flex: none; }

/* The kill switch gets its own weight — it is the control you reach for when
   something is actively wrong. */
.killrow {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: var(--r-lg);
  background: var(--surf-2); border: 1px solid var(--hair);
}
.killrow.on { background: var(--bad-wash); border-color: transparent; }
.killrow .txt { flex: 1; min-width: 220px; }
.killrow .txt b { display: block; font-size: 15px; margin-bottom: 4px; }
.killrow .txt span { font-size: 12.5px; color: var(--tx-2); }
.killrow.on .txt b, .killrow.on .txt span { color: var(--bad); }
.killrow .switch input:checked ~ .track { background: var(--bad); border-color: var(--bad); }
.killrow .switch input:checked ~ .knob { background: #fff; }

/* Recent calls */
.calls { display: flex; flex-direction: column; }
.call {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 16px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--hair-soft);
  font-size: 13px;
}
.call .when { font-size: 11.5px; color: var(--tx-3); font-variant-numeric: tabular-nums;
              white-space: nowrap; }
.call .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call .what .who { color: var(--tx-3); }
.call .cost { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.call .toks { grid-column: 2 / -1; font-size: 11px; color: var(--tx-4); }

.caps-row {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 24px;
}
.caps-row .f { display: flex; flex-direction: column; gap: 9px; }
.caps-row .stepper { align-self: flex-start; }
.caps-row .lab { font-size: 13px; }
.caps-row .lab small { color: var(--tx-4); margin-left: 4px; }

.userrow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--hair);
}
.userrow:last-child { border-bottom: 1px solid var(--hair); }
.userrow .nm { font-size: 15px; flex: 1; min-width: 140px; }
.userrow .acts { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .tile { padding: 16px 18px; border-radius: var(--r-md); }
  .killrow { padding: 16px 18px; border-radius: var(--r-md); }
  .call { grid-template-columns: minmax(0, 1fr) auto; }
  .call .when { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════════════════════════════ login ══ */

.login-wrap {
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: clamp(20px, 6vw, 56px);
  /* A single soft sage bloom behind the card. The shop's own pages open with a
     wash of colour above the fold; this is the smallest honest version of it. */
  background:
    radial-gradient(900px 460px at 50% -10%,
      color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}

.login {
  width: min(420px, 100%);
  background: var(--surf);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 44px) clamp(24px, 5vw, 40px);
  box-shadow: var(--sh-2);
}

.login .brand { text-align: center; margin-bottom: 26px; }
.login .brand img { width: 92px; margin: 0 auto; }

.login h1 {
  font-size: clamp(26px, 5vw, 32px); text-align: center; margin-bottom: 8px;
  letter-spacing: -.02em;
}
.login .sub { text-align: center; margin-bottom: 30px; font-size: 13.5px; }

.login .f { display: grid; gap: 9px; margin-bottom: 18px; }
.login .f .lab { font-size: 12.5px; color: var(--tx-2); }
.login .btn { width: 100%; margin-top: 10px; }

.login .err {
  margin-top: 18px; font-size: 12.5px; line-height: 1.5;
  color: var(--bad); background: var(--bad-wash);
  border-radius: var(--r-md); padding: 13px 15px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: shake .32s var(--ease);
}
.login .err .ico { flex: none; margin-top: 1px; }

/* One short shake on a refused password. Enough to register as a rejection
   without being cute about it — and it goes away entirely under
   prefers-reduced-motion, along with everything else that moves. */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.login .foot { margin-top: 28px; text-align: center; }
.login .foot .btn { width: auto; }

/* ──────────────────────────────────────────────────────── touch targets ── */
/* LAST IN THE FILE ON PURPOSE. A media query adds no specificity, so when this
   block sat mid-file the view styles appended after it — `.colour-btn` among
   them — simply won on source order and the floor silently did nothing.
   Keyed on the POINTER, not the viewport. A compact 36px button is right under
   a mouse and wrong under a thumb, and the two are not the same question — a
   touchscreen laptop needs the large targets at 1400px, and a narrow desktop
   window does not. Anything below the 44px floor is padded up here rather than
   being made permanently chunky for everyone. */
@media (pointer: coarse) {
  /* min-height rather than more padding: padding has to be guessed against the
     line box and lands a pixel or two short, whereas a floor is a floor. */
  .btn.sm, .copy, .pc-more { min-height: 44px; }
  .btn.sm { padding: 10px 18px; }
  .copy { padding: 10px 18px; }
  .btn.icon { width: 46px; height: 46px; }
  /* The back link is bare text. Padded out to a real target, with a matching
     negative margin so nothing below it moves. */
  .back { padding: 12px 6px; margin: -12px 0 10px -6px; }
  .colour-btn { width: 46px; height: 46px; }
  /* The switch keeps its 26px look but gets a 44px hit area: the track and knob
     are re-centred inside a taller box rather than the control being made
     visually chunky. */
  .switch { height: 44px; }
  .switch .track { top: 9px; bottom: 9px; }
  .switch .knob { top: 13px; }
  .stepper button { width: 42px; height: 42px; }
  .stepper.sm button { width: 40px; height: 40px; }
  .stepper input, .stepper.sm input { padding: 9px 0; }
  .lb-opt { padding: 13px 12px; }
  .lb-btn, .field { padding-top: 14px; padding-bottom: 14px; }
  .piece { padding: 13px 14px 13px 12px; }
  .cmdk-row { padding: 12px 11px; }
  .toast .x { width: 32px; height: 32px; display: grid; place-items: center; }
  .pc-more { padding: 14px; }
}
