/* Tfash catalog site
   Design system is NOT defined here — it is transcribed from context/Style_Guide.md §2.
   Locked palette: Tfash Orange #FF7911 · Ink #121211 · Paper #FCFBF8
   Locked type:    Changa (display, used sparingly) + Tajawal (body)
   §2.1 rules honoured: one orange emphasis per layout, no gradients, no drop
   shadows, no neon, flat and geometric. Sub-brand accents (Nejma red, Collabs
   blue, Baydaq brown) belong only to their own category: they are declared on
   the page's <html data-cat> and on the spool that carries them, nowhere else. */

@font-face {
  font-family: 'Changa';
  src: url('fonts/Changa-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/Tajawal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  /* Added 2026-09-17 for the locked workshop diagram, whose caption is
     Tajawal 500. Same locked family, same OFL — not a new typeface. */
  src: url('fonts/Tajawal-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/Tajawal-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  /* Added 2026-09-20 for the Blaka best-seller plates drawn on charms.html, at the
     weight the generator offers (800). Same locked family, same OFL — a weight, not
     a new typeface, exactly as with the 500 above. A browser fetches a face only
     when something rendered uses it, so this costs the other pages nothing. */
  src: url('fonts/Tajawal-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --orange: #FF7911;
  --ink: #121211;
  --paper: #FCFBF8;
  --rule: #D3CEC4;   /* Ink mixed into Paper — warm, never cold grey (§2.1). Darkened from
                        #E6E3DC (owner, 2026-09-18): the lines were barely visible on a desktop. */
  --plate: #F4F1EA;  /* the same mix, lighter: a ground for a frame or a hub */
  --muted: #6E6B64;
  --faint: #9A968D;
  --max: 1040px;
  --display: 'Changa', system-ui, sans-serif;
  --body: 'Tajawal', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* The open category's colour. Only one accent is ever on a page (§2.1). */
html                    { --accent: var(--orange); --on-accent: var(--ink); }
/* Every page takes Tfash Orange since 2026-11-11 (owner: "Baydaq and Collabs pages are still with
   their colours and I don't like that"): the site is Ink, Paper and Orange. The sub-brand colours
   survive only as the selected filter's underline on home (.shopline), and in the logos. */

/* Per-spool colours, used only while that spool is the picked one. */
.b-charms  { --a: var(--orange); --on: var(--ink); }
.b-nejma   { --a: #D80000;       --on: var(--paper); }
.b-collabs { --a: #5F7ED7;       --on: var(--ink); }
.b-baydaq  { --a: #7E4E38;       --on: var(--paper); }   /* Games: Printed Clay since 2026-11-15 (owner; Style_Guide §2.1; was the filament hex #995F11) */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* One colour block past the closing band (owner, 2026-09-22, redone 2026-09-24).
   When a phone bounces past either end of a page, Safari paints the gap with the
   BODY's background laid over the root's, so the body carries none: Paper sits on
   <main> (and the header), and the root alone decides. The root is Paper, the colour
   of the bar at the top (Ink until 2026-10-29, under the free-delivery line); once the closing band fills the bottom of
   the screen, site.js adds .at-end and the root takes the band's colour, so band,
   bounce and toolbar read as one block. */
html { background: var(--paper); }
html.at-end { background: var(--ink); }   /* Ink on every page, like the band (owner, 2026-11-11) */
main { background: var(--paper); display: flow-root; padding-bottom: 48px; }
/* The strip Safari (iOS 26) reads to colour its toolbar area; site.js shows it only
   while the closing band fills the bottom of the screen (2026-09-24). */
.end-tint { position: fixed; left: 0; right: 0; bottom: 0; height: 32px; z-index: 1;
  background: var(--ink); pointer-events: none; }
/* Its twin at the top (owner, 2026-09-25). With nothing fixed at the top edge, Safari
   guessed: black on Nejma, Paper on Charms, the band's brown on Baydaq (short enough
   to be .at-end from the start). This strip is Paper and stays, lying over the pinned
   Paper bar, so it is invisible and Safari reads Paper on every page (2026-10-29: it
   was Ink, over the free-delivery line, and hid once that line scrolled away). */
.top-tint { position: fixed; left: 0; right: 0; top: 0; height: 6px; z-index: 40;
  background: var(--paper); pointer-events: none; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
/* Every :hover rule on this site sits inside @media (hover: hover) (2026-09-24, phone
   audit): on a phone a tap used to leave the hover style stuck on (a tapped button
   stayed Ink until the next tap elsewhere). A mouse sees exactly what it did before. */

/* The bar that stays on screen (owner, 2026-09-18): the logo (home) on the left,
   the workshop icon and the Instagram logo on the right, and on the four
   category pages the category tabs in between. On a phone the tabs take a
   second row of the same bar. --bar-h is its height; anything else that pins
   (the Charms chapter tabs) sits under it. */
body { --bar-h: 56px; --tabs-h: 50px; }
header.site {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
header.site .wrap {
  height: 100%; display: grid; grid-template-columns: auto 1fr auto;
  grid-template-areas: "home cats icons"; align-items: center; column-gap: 20px;
}
header.site .home { grid-area: home; display: block; line-height: 0; }
header.site .home img { height: 24px; width: auto; display: block; }
header.site .cats { grid-area: cats; justify-self: start; }
header.site .icons { grid-area: icons; display: flex; align-items: center; gap: 4px; margin-right: -8px; }
header.site .icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); }
header.site .icon svg { width: 24px; height: 24px; }
@media (hover: hover) { header.site .icon:hover { color: var(--accent); } }
/* The language switch (2026-09-27): the other language's code, set like the tabs, in
   the icons' place and size, so it reads as one more control and not as a link. */
header.site .icon.lang { width: auto; padding: 0 6px; grid-auto-flow: column; gap: 4px;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-decoration: none; }
header.site .icon.lang svg { width: 22px; height: 22px; }
/* The code shares the globe's centre, capitals to baseline, as on the band's buttons:
   centring the line box put it 1px above the globe, more on an iPhone. */
header.site .icon.lang span { text-box: trim-both cap alphabetic; }
nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* The category tabs on inner pages. The current one alone takes the page's
   accent; the others stand in Ink on Paper, like empty spools. */
.tab {
  display: inline-block; padding: 7px 14px 6px;
  font: 700 15px/1 var(--display); text-decoration: none;
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink);
  transition: background-color .25s, color .25s;
}
.tab[aria-current="page"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (hover: hover) { .tab:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }

/* ---------- home: the offer and the rack ---------- */

.front {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px 48px; align-items: end; padding-top: 52px;
}
/* The highlights (owner, 2026-09-17): four offers in a sideways strip that
   snaps one at a time — native swipe on a phone, no JavaScript needed to
   scroll it. site.js adds the 3 s rotation, the pause and the time bars.
   Each highlight carries its category's .b-* class, so its <em> takes that
   one accent (§2.1) and nothing else on the page changes colour. */
.highlights { --hl-ms: 3000ms;   /* 3 s like the Collabs photos (owner, 2026-09-24; was 5 s) */
  min-width: 0; container-type: inline-size; }
.slides {
  position: relative;   /* so each slide's offsetLeft is measured from the strip, not the page */
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
/* One layout for every highlight (owner, 2026-09-18): the title at the top,
   the specs and button at the bottom, the space in between. The strip is as
   tall as the tallest highlight (Emoji's three-line title), so a shorter title
   leaves a gap — in the middle, not under the header — and the button and
   the bars stay put while the highlights rotate. */
.offer { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column;
  align-items: flex-start; gap: 22px; padding-bottom: 30px; }
.offer h1, .offer h2 { margin-bottom: auto; }
/* A fractional column width can leave half a pixel of the next highlight's
   button border showing at the edge; two pixels of padding keep it off-screen. */
.offer + .offer { padding-left: 2px; }
/* Sized to the highlight's own width, not the screen's (owner, 2026-09-24): on a phone
   the title was stuck at its 36px floor and "hang it or stick it." covered only about
   two thirds of the line. 12.5cqi makes that line, the longest two-line title, fill
   the width on any phone. On a desktop the box is the left column, so it scales with
   that. The rem floor keeps browser zoom working (the mobile-web skill: pure width
   units ignore zoom); the cap (92px) is reached only on a wide tablet. */
.offer h1, .offer h2 { font-size: clamp(2.25rem, 12.5cqi, 5.75rem); line-height: 1.03; letter-spacing: -.01em; max-width: 13ch; }
/* The coloured phrase always takes the second line (owner, 2026-09-18): every
   title is two lines — "Nejma," then "the blood." — so the four highlights
   share one height and one shape. */
.offer h1 em, .offer h2 em { font-style: normal; color: var(--a, var(--orange)); display: block; }
/* A title whose second line is a little too long for the shared size takes a --fit factor
   (set on the element), so it stays on two lines like the rest (owner, 2026-10-28). */
.offer h1.t-fit, .offer h2.t-fit { font-size: calc(clamp(2.25rem, 12.5cqi, 5.75rem) * var(--fit, 1)); max-width: none; }
.offer .lede { font-size: 19px; color: var(--muted); max-width: 32ch; }

/* The time bars: one per highlight, the current one filling over --hl-ms.
   Ink on the rule colour — the bars never take an accent. Hover or touch
   pauses the fill; once the visitor swipes or taps, the bars stop animating
   and simply mark the current highlight. */
.hl-nav { display: flex; gap: 8px; padding: 0 0 30px; }
/* The four bars share the full width (owner, 2026-09-24): at 56px each they covered
   only the left half, and the right half under the highlight read as empty. */
.hl-nav .dot {
  flex: 1 1 0; height: 4px; padding: 0; border: 0; border-radius: 2px;
  background: var(--rule); position: relative; cursor: pointer;
}
.hl-nav .dot::before { content: ""; position: absolute; inset: -12px 0; }   /* a finger-sized target on a 4px bar */
.hl-nav .dot i { position: absolute; inset: 0; background: var(--ink); border-radius: 2px; transform: scaleX(0); transform-origin: left; }
.hl-nav .dot[aria-current="true"] i { animation: hl-fill var(--hl-ms) linear forwards; }
.highlights.paused .dot i { animation-play-state: paused; }
.highlights.manual .dot i { animation: none; }
.highlights.manual .dot[aria-current="true"] i { transform: scaleX(1); }
.hl-nav .dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@keyframes hl-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* The rack the spools stand on, and one line under it. */
.board { height: 12px; background: var(--ink); border-radius: 3px; }
.rack-note { font-size: 15px; color: var(--muted); padding: 12px 0 40px; }

/* --spool never makes the four spools wider than their row (2026-10-29): 104px of spool
   needs 456px with the gaps, and a narrower row pushed the last spool off the page.
   88px = the .wrap padding 48 + the rack's 10 + three 10px gaps. */
.rack {
  --spool: min(104px, (100vw - 88px) / 4); --gap: 10px;
  list-style: none; margin: 0; padding: 0 0 0 10px;
  display: flex; align-items: flex-end; gap: var(--gap); min-height: 250px;
}
.rack li { line-height: 0; }

/* A filament spool. The palette is "orange is the filament" (§2.1), and Baydaq's
   brown came from a real PLA Wood spool. Empty spools stand neutral; the one
   you pick winds on its colour and turns a full revolution, so the name set
   around the winding ends upright. */
.spool {
  display: block; width: var(--spool); text-decoration: none; color: inherit;
  transition: transform .45s var(--ease);
}
.spool svg { display: block; width: 100%; height: auto; overflow: visible; transition: transform .8s var(--ease); }
.spool .flange { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
.spool .wound { fill: none; stroke: var(--rule); stroke-width: 29; }
.spool .load {
  fill: none; stroke: var(--a); stroke-width: 29;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dashoffset .7s var(--ease);
}
.spool .turns circle { fill: none; stroke: var(--ink); stroke-opacity: .22; stroke-width: 1.2; }
.spool .spool-name {
  font: 700 17px var(--display); letter-spacing: .6px;
  fill: var(--ink); transition: fill .3s .35s;
}
.spool .core { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.spool .hub { fill: var(--plate); stroke: var(--ink); stroke-width: 2; }
@media (hover: hover) { .spool:hover { transform: translateY(-5px); } }
.spool.open { transform: translateY(-16px); }
.spool.open .load, .spool.lit .load { stroke-dashoffset: 0; }
.spool.open .spool-name, .spool.lit .spool-name { fill: var(--on); }
.spool.open svg { transform: rotate(360deg); }
/* .lit: wound on its colour because its highlight is showing — no lift, no turn.
   That is the one accent on screen while that highlight is up (§2.1). */

/* ---------- home: the closing band ---------- */

/* The closing band: the page's accent as the ground, its on-colour on it.
   On home that is Orange with Ink, the packaging treatment (§2.2); on a
   category page it is that category's colour (owner, 2026-09-15). */
.closing { background: var(--accent); color: var(--on-accent); }   /* the 48px above it is main's padding */
/* Home closes on Ink, not orange (owner, 2026-09-17): the rack above it is
   where the colour lives, and orange would repeat the Charms accent under
   every highlight. Pages that take the home accent (the workshop) follow. */
/* Every page closes on Ink since 2026-11-11 (owner: the pages in black, white and orange,
   as agreed; the sub-brand colour only on small marks, never the bottom of the page). */
.closing { --accent: var(--ink); --on-accent: var(--paper); }
.closing > .wrap { display: grid; gap: 22px; justify-items: start; padding: 52px 24px 44px; }
.closing .line { font: 700 clamp(32px, 5vw, 52px)/1.06 var(--display); max-width: 17ch; }
.closing .sub { max-width: 56ch; margin-top: -8px; opacity: .9; }
.closing .btn.solid { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); margin-top: 0; }
@media (hover: hover) { .closing .btn.solid:hover { background: transparent; color: var(--on-accent); } }
.closing .btn.hollow { background: transparent; color: var(--on-accent); border-color: var(--on-accent); margin-top: 0; }
@media (hover: hover) { .closing .btn.hollow:hover { background: var(--on-accent); color: var(--accent); } }
.closing .btn:focus-visible { outline-color: var(--on-accent); }
/* The band's two buttons carry their app's glyph (owner, 2026-09-24). */
.closing .actions .btn { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; }
/* Icon and label share one centre on every platform (2026-09-24). Tajawal's line box
   comes from different metrics on Windows (win: 1065/411) and on Apple (hhea:
   643/357), so centring the line box put the label ~2.7px above the icon on an
   iPhone. Trimmed to cap height and baseline, the label's box is the letters
   themselves, the same everywhere. min-height keeps the button its old 54px. */
.closing .actions .btn span { text-box: trim-both cap alphabetic; }
.closing .actions .btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- hero ---------- */

.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.04; letter-spacing: -0.015em; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 56ch; margin-top: 22px; }
.hero .ar { font: 700 30px/1.2 var(--display); text-align: left; margin-top: 4px; }
.hero .specs { margin-top: 26px; }

/* The logo system's diagonal (§2.2), used as a section marker in the page's
   accent. Never a stand-in for the wordmark itself. */
.diag {
  display: block; width: 44px; height: 8px; background: var(--accent);
  border-radius: 4px; transform: rotate(-32deg); transform-origin: left center;
  margin: 0 0 26px 8px;
}

/* The Charms chapters, as tabs (owner, 2026-09-18). They pin under the header
   bar as the visitor scrolls, so switching chapter is one tap from anywhere.
   The current one is underlined in the page's accent. */
.chapter-tabs {
  position: sticky; top: var(--bar-h); z-index: 20; height: var(--tabs-h);
  display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.chapter-tabs::-webkit-scrollbar { display: none; }
.chapter-tabs a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px; }   /* equal thirds, the full width (owner, 2026-09-24) */
.chapter-tabs .t { font: 700 18px var(--display); color: var(--muted); }
@media (hover: hover) { .chapter-tabs a:hover .t { color: var(--ink); } }
.chapter-tabs a[aria-current="true"] { border-bottom-color: var(--accent); }
.chapter-tabs a[aria-current="true"] .t { color: var(--ink); }

/* ---------- blocks ---------- */

section.block { padding: 64px 0; border-bottom: 1px solid var(--rule); }
section.block:last-of-type { border-bottom: 0; }
.block h2 { font-size: clamp(25px, 3.2vw, 33px); line-height: 1.15; }
.block .sub { color: var(--muted); max-width: 62ch; margin-top: 12px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 34px; margin-top: 40px; }
.col h3 { font-size: 18px; margin-bottom: 8px; }
.col p { color: var(--muted); font-size: 15.5px; }

/* ---------- the workshop diagram (about.html) ----------
   The locked "filament" graphic — .claude/skills/designer/SKILL.md → Recurring
   Brand Graphics. Two drawings of the same thing: the wide one on laptops, the
   tall one on phones, swapped at 700px. Colours live in the SVG, not here, so
   the drawing is identical wherever it is pasted; only type and the swap are
   CSS. The type is the brand's: Changa for the steps, Tajawal for the caption. */
.diagram { margin-top: 38px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .lbl { font: 700 24px var(--display); fill: var(--ink); }
.diagram .cap { font: 500 16px var(--body); fill: var(--ink); }
.diagram .tall { display: none; max-width: 400px; }
@media (max-width: 700px) {
  .diagram .wide { display: none; }
  .diagram .tall { display: block; }
}

/* Baydaq, until it opens. */
.soon { min-height: 280px; }
.soon-mark { font: 700 clamp(38px, 5.4vw, 60px)/1 var(--display); color: var(--accent); }

/* ---------- catalog ---------- */

.chapter { padding: 28px 0 56px; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--bar-h) + var(--tabs-h)); }
.chapter:last-of-type { border-bottom: 0; }
/* The chapters as a swipe strip (owner, 2026-09-24), set up by site.js: one chapter
   wide, snapping a whole chapter at a time, its height the shown chapter's. */
.chapters.swipe { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  transition: height .25s var(--ease); scroll-margin-top: calc(var(--bar-h) + var(--tabs-h)); }
.chapters.swipe::-webkit-scrollbar { display: none; }
.chapters.swipe > .chapter { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; border-bottom: 0; }

/* Five to a row on a desktop, three on a tablet, two on a phone — most visitors
   arrive from Instagram on a phone (owner, 2026-09-15). */
.grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 32px;
}
.card {
  background: var(--paper); padding: 16px 14px 14px;
  display: flex; flex-direction: column; gap: 8px; min-height: 148px; min-width: 0;
}
/* The badge sits beside a short name and drops under a long one — a name
   never breaks mid-word to make room for it. */
/* The name and its "n sold" or badge share one centre, as with the specs above
   (owner, 2026-09-24): both texts trimmed to capitals and baseline, then centred.
   This replaces a 2px nudge that was only right on one platform. */
.card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 8px; }
.card h3, .card .sold { text-box: trim-both cap alphabetic; }
.card h3 { font-size: 16px; line-height: 1.2; }
.card .desc { font-size: 13.5px; line-height: 1.5; color: var(--muted); flex: 1; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; }
.card .price { font-family: var(--display); font-weight: 700; font-size: 17px; }
.card .colour { font-size: 12px; color: var(--faint); text-transform: lowercase; }
.card .sold { font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; }

/* The way to the generator, inside the Emoji grid while the row has room. */
.card.cta { display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; min-height: 220px; }
.card.cta .cta-line { font: 700 22px/1.2 var(--display); max-width: 14ch; }
.card.cta .btn { margin-top: 0; }
.card.cta[data-span="1"] { grid-column: span 1; }
.card.cta[data-span="2"] { grid-column: span 2; }
.card.cta[data-span="3"] { grid-column: span 3; }
.card.cta[data-span="4"] { grid-column: span 4; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; padding: 32px 0 0; text-align: center; }
.cta-row .cta-line { font: 700 22px/1.2 var(--display); }
.cta-row .btn { margin-top: 0; }
/* Leading the chapter (Emoji, owner 2026-10-01): the offer first, then the pieces. */
.cta-row.cta-first { padding: 4px 0 12px; }
/* The partner credit under a chapter (Blaka, owner 2026-09-18). */
.chapter .credit { margin-top: 22px; font-size: 15px; color: var(--muted); text-align: center; }
.chapter .credit a { color: var(--ink); font-weight: 700; text-underline-offset: 4px; }

/* Colourful: show only one colour, or the best sellers. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.filters button {
  appearance: none; cursor: pointer; padding: 7px 14px 6px;
  font: 700 14px/1 var(--display); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule);
}
@media (hover: hover) { .filters button:hover { border-color: var(--ink); } }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 3px 7px; border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; flex: none;
}
/* Both states are buyable — the badge only signals the wait, never a barrier.
   "Printed to order" is on-brand, not a caveat: the workshop is the trust
   mechanism (Style_Guide.md §2.4), so saying a piece is made for you is a
   selling point. Keep it quiet, never alarming. */
.badge.delivery, .badge.stock { border-color: var(--accent); color: var(--accent); }
.badge.to-order { border-color: var(--rule); color: var(--muted); }

/* ---------- product images ---------- */

/* Square, flat, no shadow — §2.1 forbids gradients and drop shadows, and the
   ground stays Paper so a cut-out render sits on brand rather than on white. */
.shot {
  position: relative; margin: -16px -14px 4px;
  aspect-ratio: 1 / 1; background: var(--paper);
  border-bottom: 1px solid var(--rule); overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.empty { background: repeating-linear-gradient(
    -45deg, var(--paper), var(--paper) 7px, var(--plate) 7px, var(--plate) 14px); }
/* A Blaka best seller's card DRAWS its plate instead of photographing it (owner,
   2026-09-20) — the phrase is the product, and one shared photo showed none of the
   six. Same drawing as the generator, so the card and the page it opens agree. */
.shot.plate { display: grid; place-items: center; padding: 16px; background: var(--plate); }
.shot.plate svg { width: 100%; height: auto; display: block; }

/* The visualisation marker. Deliberately legible, not hidden in small print —
   it is a disclosure, and a disclosure nobody reads is not one. It sits in the
   corner of the image it describes so it can never drift from its subject. */
.viz {
  position: absolute; left: 0; bottom: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 8px; background: var(--ink); color: var(--paper);
}

.viz-note {
  font-size: 14.5px; color: var(--muted); max-width: 68ch;
  padding: 16px 0 0; margin-bottom: -16px;
}
.viz-note strong { color: var(--ink); font-weight: 700; }

/* ---------- buttons and calls to action ---------- */

.cta { padding: 60px 0; }
.cta h2 { font-size: clamp(24px, 3.2vw, 34px); max-width: 20ch; }
.cta p { color: var(--muted); max-width: 56ch; margin-top: 14px; }

/* One button, in the page's accent. Ink and Paper variants for the home page,
   whose only accent is the picked spool. */
.btn {
  display: inline-block; margin-top: 26px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 16px; text-decoration: none; padding: 13px 26px;
  border: 1.5px solid var(--accent); transition: background-color .2s, color .2s, border-color .2s;
}
@media (hover: hover) { .btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
@media (hover: hover) { .btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }
.btn.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); margin-top: 0; }
@media (hover: hover) { .btn.ink:hover { background: var(--paper); color: var(--ink); } }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------- notes & footer ---------- */

.note {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 18px;
  color: var(--muted); font-size: 15.5px; margin-top: 32px; max-width: 62ch;
}

/* The footer lives inside the closing band, under a thin line, on every page
   (owner rule, 2026-09-15). */
/* No line above it since the band lost its closing line and buttons (owner, 2026-11-11). */
.closing footer.site { padding: 32px 0 96px; }   /* 96: room for "back to top" (2026-09-24) */
/* Desktop (2026-09-30 audit): from 1200px the floating buttons sit in the margin beside the
   column, so the 96px kept for them under the text was only empty band. */
@media (min-width: 1200px) { .closing footer.site { padding-bottom: 44px; } }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 20px 56px; justify-content: space-between; }
footer.site p, footer.site a { font-size: 13.5px; color: var(--on-accent); opacity: .82; }
footer.site strong { font-weight: 700; }
.credits { max-width: 46ch; }

/* ---------- Nejma: the one piece ---------- */

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--rule); margin-top: 36px;
}
.feature .shot { margin: 0; border-bottom: 0; border-right: 1px solid var(--rule); }
.feature .info { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; }
.feature h3 { font-size: 24px; }
.feature .line { color: var(--muted); }
/* Label and value on one centre (owner, 2026-09-24): "MATERIAL" and "PLA" used to sit
   top-aligned, and Tajawal's line box differs between Apple (hhea) and Windows (win),
   so the smaller label drifted off the value's centre, most on an iPhone. Each text is
   trimmed to its capitals and baseline (text-box), then the two are centred: the same
   on every platform. The row gap makes up for the trimmed line space. */
.specs { --dt: 13px; --dd: 15.5px; display: grid; grid-template-columns: auto 1fr; gap: 1.05em 18px; margin: 6px 0 0; align-items: start; }
/* Centred on the first line (2026-09-24): with both texts trimmed to capitals, the label
   drops by half the difference of the two cap heights (Tajawal's is 0.633 em, from the
   font file). A one-line value is then exactly centred on its label, the same on every
   platform, and a value that wraps keeps its label beside its first line. */
.specs dt { margin-top: calc((var(--dd) - var(--dt)) * 0.3165); }
.specs dt, .specs dd { text-box: trim-both cap alphabetic; }
/* Collabs' specs as a lined list (owner, 2026-09-24): hairlines in the site's rule grey,
   one above, one between rows, one below, nothing vertical (a boxed 3px blue table was
   too heavy, then 1px blue too loud). 0.5px is a true hairline on any 2x/3x phone
   screen; a 1x monitor rounds it to its thinnest line, 1px. The cells stretch to the row so each line runs straight across; the label
   keeps its first-line alignment through its top padding instead of a margin. */
.collab-specs { margin-top: 26px; gap: 0; align-items: stretch; border-top: 0.5px solid var(--rule); }
.collab-specs dt, .collab-specs dd { padding: 13px 0; border-bottom: 0.5px solid var(--rule); }
.collab-specs dt { margin-top: 0; padding-top: calc(13px + (var(--dd) - var(--dt)) * 0.3165); padding-right: 16px; }
.collab-specs dd { color: var(--ink); }
.specs dt { font-size: var(--dt); font-weight: 700; color: var(--faint);
  letter-spacing: 0.04em; text-transform: uppercase; }
.specs dd { margin: 0; font-size: var(--dd); color: var(--muted); }
.specs dd.delivery { color: var(--accent); font-weight: 700; }
/* The specs, one step up with the title (owner, 2026-09-24): 16px on a small phone,
   about 19px on a large one. */
.offer .specs { --dd: clamp(1rem, 0.5rem + 2.8cqi, 1.375rem); --dt: clamp(13px, 0.35rem + 1.6cqi, 15px); }
.offer .specs dd { color: var(--ink); }
/* A category page's top on a phone (owner, 2026-10-05): the headline and four spec rows
   filled about two thirds of the first screen, so the tabs, the pieces and the order
   button started below it. The rows become one line of values, labels hidden, joined by
   a dot; delivery keeps its orange and stays at the top (Products.md §4.1).
   At every width since 2026-11-02 (owner: "description cards eating at least 4 lines in
   every page are avoidable"), and on Baydaq's spec line too. */
.hero > .wrap > .specs, .bay-specs { display: block; line-height: 1.5; }
.hero > .wrap > .specs dt, .bay-specs dt { display: none; }
.hero > .wrap > .specs dd, .bay-specs dd { display: inline; text-box: none; }
.hero > .wrap > .specs dd + dt + dd::before,
.bay-specs dd + dt + dd::before { content: " · "; color: var(--faint); font-weight: 400; }
@media (max-width: 600px) {
  .hero { padding: 26px 0 22px; }
  .hero h1 { font-size: 32px; }
  .hero > .wrap > .specs { margin-top: 12px; }
  /* Nejma: the paragraph's first sentence only (owner, 2026-10-05). */
  .hero .lede .more { display: none; }
}
.feature .price { font-family: var(--display); font-weight: 700; font-size: 26px; margin-top: auto; padding-top: 12px; }

/* What the club gets, beside the photo. */
.feature .share { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 6px; }
.feature .share h4 { font: 700 16px/1.3 var(--display); margin: 0; }
.feature .share p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-top: 8px; max-width: 46ch; }

/* The club counter, under the page's description. Figures are owner-attested,
   not sheet-derived (Products.md §1.3) — and the handover rule sits under
   them on purpose: an accrued total with no payout rule reads as money
   collected and kept. */
.contrib { margin-top: 30px; max-width: 640px; }
.contrib .figures { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.contrib .fig { font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1.1; }
.contrib .fig span { display: block; font-family: var(--body); font-weight: 400;
  font-size: 13px; color: var(--faint); letter-spacing: 0.03em; }
.contrib .bar { height: 8px; background: var(--rule); margin-top: 18px; }
.contrib .bar i { display: block; height: 100%; background: var(--accent); }
.contrib .rule { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Collabs: proof, then the request ---------- */

/* The jobs: photos only, no captions (owner, 2026-09-17). A row that scrolls
   sideways once there are more than fit: three to a view on a desktop, one and
   a bit on a phone so the next one shows. The arrows sit INSIDE the strip,
   over its left and right edges, on a slightly transparent Paper (owner) —
   hidden by site.js until the row actually overflows. */
.row-wrap { position: relative; margin-top: 34px; }
.row-nav { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 0 10px; pointer-events: none; }
.row-nav button {
  appearance: none; cursor: pointer; pointer-events: auto; width: 52px; height: 52px;   /* bigger (owner, 2026-09-18) */
  font: 700 24px/1 var(--body); color: var(--ink); background: rgba(252, 251, 248, .78); border: 1.5px solid var(--ink);
}
.row-nav button { display: grid; place-items: center; padding: 0; }
.row-nav button svg { width: 24px; height: 24px; }
/* A finger swipes the strip (owner, 2026-09-24): no arrows on touch screens. */
@media (pointer: coarse) { .row-nav { display: none !important; } }
@media (hover: hover) { .row-nav button:hover { background: var(--ink); color: var(--paper); } }
.jobs { --per-view: 3; display: flex; gap: 1px; background: var(--rule); border: 1px solid var(--rule);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.jobs::-webkit-scrollbar { display: none; }
.job { margin: 0; background: var(--paper); flex: 0 0 calc((100% - (var(--per-view) - 1) * 1px) / var(--per-view)); min-width: 0; scroll-snap-align: start; }
section.block:has(#send), #send { scroll-margin-top: calc(var(--bar-h) + 16px); }
.job .shot { margin: 0; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px 26px; margin-top: 32px; }
.form .wide { grid-column: 1 / -1; }
.form label, .form legend, .preview-col legend { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; padding: 0; }
.form fieldset, .preview-col fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }   /* the Style switch sits in the preview column (2026-09-24) */
.input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); padding: 11px 13px;
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
/* Keychain [switch] Magnet (owner, 2026-09-24). On iPhone the switch is WebKit's own,
   tinted with the page's accent, and ticks under the thumb. Elsewhere
   (.no-native-switch, set in base.html) the same shape is drawn here, flat, with no
   shadow (§2.1). The chosen word is Ink, the other muted; both words are tap targets. */
.as-switch { display: flex; align-items: center; gap: 10px; }
.as-word { appearance: none; background: none; border: 0; padding: 12px 2px; min-height: 44px; cursor: pointer;
  font: 700 16px/1 var(--display); color: var(--muted); }
.as-word[aria-pressed="true"] { color: var(--ink); }
input[switch] { accent-color: var(--accent); margin: 0; cursor: pointer; flex: none; }
.no-native-switch input[switch] { appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 52px; height: 30px; border-radius: 15px; background: var(--rule); transition: background-color .2s; }
.no-native-switch input[switch]::before { content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper); transition: transform .2s var(--ease); }
.no-native-switch input[switch]:checked { background: var(--accent); }
.no-native-switch input[switch]:checked::before { transform: translateX(22px); }
input[switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The Collabs rights check (owner, 2026-09-24): the sentence and its switch on one line,
   the whole line a tap target. */
.form .rights { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px;
  padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer;
  font-size: 15px; font-weight: 700; margin: 0; }
.as-switch input[switch]:disabled, .as-switch input[switch]:disabled ~ .as-word { opacity: .45; cursor: default; }
/* "Send to a friend" (owner, 2026-09-24). */
.share { display: grid; gap: 8px; justify-items: start; }
.share .btn { margin-top: 0; }
.choice { font-weight: 400; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block; border: 1px solid var(--rule); padding: 9px 14px;
  font-size: 15px; color: var(--muted); cursor: pointer;
}
.choice input:checked + span { border-color: var(--accent); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 15.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }

/* The message the customer is about to send, shown before they send it —
   nothing leaves this page that they have not read first. */
.msg {
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace; font-size: 13.5px;
  line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  background: var(--plate); border: 1px solid var(--rule); padding: 16px; margin: 0;
  color: var(--muted); min-height: 96px;
}
.msg.empty { color: var(--faint); font-family: var(--body); font-size: 15px; }
.err { color: #B3261E; font-size: 14.5px; font-weight: 700; }
/* The same line, but for the demo plate that shows before anything is written
   (blaka.html, owner 2026-09-20). Nothing is wrong yet, so it must not read as
   an error — it only says why the buttons are still off. */
.err.hint { color: var(--muted); font-weight: 400; }
/* An emoji the Emoji chapter already sells (emoji.html, owner 2026-09-25): not an
   error, a pointer to the charm. */
.have { margin-top: 14px; padding: 14px 16px; background: var(--plate); border: 1px solid var(--rule); }
.have p { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
.have .btn { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions .btn { margin-top: 0; }
.fine { font-size: 14px; color: var(--faint); max-width: 60ch; }
/* The one line that says the design comes second, in the same chat (owner, 2026-09-18).
   Ink, not faint: the visitor has to see it before sending, not after. */
.attach { font-size: 15.5px; color: var(--ink); max-width: 60ch; margin: 0; }
.fine.after { margin-top: 34px; }
.sign-off { font: 600 21px/1.35 var(--display); max-width: 36ch; margin-top: 14px; }

/* ---------- the emoji generator ---------- */

/* The licensed artwork, whatever the customer's phone drew in the box. */
.maker { --licensed: 'Noto Color Emoji', sans-serif; display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 32px; }
.preview-col { display: grid; gap: 10px; }
.preview { display: grid; place-items: center; aspect-ratio: 1; max-width: 100%; background: var(--plate); border: 1px solid var(--rule); }
.preview .big { font: 400 118px/1 var(--licensed); }
.preview .twe-big { width: 118px; height: 118px; display: block; }
/* The two licensed sets, side by side under the preview (owner, 2026-09-18).
   The picked one takes an Ink border, like the example picks. */
.sets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.set { cursor: pointer; }
.set input { position: absolute; opacity: 0; pointer-events: none; }
.set .tile { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; border: 1px solid var(--rule); background: var(--paper); }
.set input:checked + .tile { border-color: var(--ink); }
.set input:focus-visible + .tile { outline: 2px solid var(--accent); outline-offset: 2px; }
.set input:disabled + .tile { opacity: .5; cursor: default; }
.set .glyph { font: 400 40px/1 var(--licensed); height: 40px; display: grid; place-items: center; }
.set .glyph img { width: 40px; height: 40px; display: block; }
.set .glyph.missing { font: 400 13px/1.2 var(--body); color: var(--faint); }
.set .name { font-size: 13px; font-weight: 700; color: var(--muted); }
.maker .form { margin-top: 0; }
.emoji-input { max-width: 240px; font-size: 28px; line-height: 1.2; padding: 8px 14px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pick {
  appearance: none; cursor: pointer; padding: 7px 9px;
  font: 400 24px/1 var(--body); background: var(--paper);
  border: 1px solid var(--rule);
}
.pick[aria-pressed="true"] { border-color: var(--ink); }

/* ---------- accessibility & motion ---------- */

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 959px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jobs { --per-view: 2; }
  .card.cta[data-span] { grid-column: 1 / -1; min-height: 160px; }
}
@media (max-width: 780px) {
  .front { grid-template-columns: 1fr; padding-top: 32px; gap: 6px; }
  .offer { padding-bottom: 14px; }
  .hl-nav { padding-bottom: 18px; }
  .maker { grid-template-columns: 1fr; margin-top: 0; }
  /* Tablets too (device tests, 2026-09-24): in one column the rack no longer lines up
     with the highlights beside it, so its 250px floor was only empty space. */
  .rack { min-height: 0; }
  .preview-col { max-width: 240px; }
  /* The generators on a phone (owner, 2026-09-22): what you type sits right under
     what it prints as. Stacked in source order, the style tiles, the Preview button
     and the notes came between them and pushed the box a screen below the preview.
     The two columns dissolve into one list: preview, the fields marked .typed, then
     the rest of the preview column, then the rest of the form. */
  .maker > .preview-col, .maker > .form { display: contents; }
  .maker > .preview-col > *, .maker > .form > * { order: 4; }
  .maker > .preview-col > * { order: 3; max-width: var(--col, 240px); }
  .maker > .preview-col > :first-child { order: 1; }
  .maker > .form > .typed { order: 2; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 40px; }
  section.block { padding: 44px 0; }
  .chapter { padding: 20px 0 44px; }
  /* The bar's second row on a phone: the four category tabs, equal widths. */
  body:has(header.site .cats) { --bar-h: 104px; }
  header.site .wrap { grid-template-columns: 1fr auto; grid-template-areas: "home icons" "cats cats";
    grid-template-rows: 56px 48px; }
  header.site .cats { justify-self: stretch; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; align-self: start; }   /* Shop · Collabs (owner, 2026-11-12) */
  header.site .cats .tab { text-align: center; padding: 8px 0 7px; font-size: 14.5px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobs { --per-view: 1.2; }
  .feature { grid-template-columns: 1fr; }
  .feature .shot { border-right: 0; border-bottom: 1px solid var(--rule); }
  /* Blank-space review at phone width (owner, 2026-09-24): no stretch of empty Paper
     longer than a section's own padding. The band follows the last section directly
     (that section's padding is the gap; it was that plus 48px), Baydaq's "Coming
     soon" no longer holds a 280px box open, the Charms CTA card drops the 60px it
     took from .cta, and the emoji preview starts at the section's padding. */
  main { padding-bottom: 0; }
  .soon { min-height: 0; }
  .card.cta { padding: 28px 16px; }
  .card.cta[data-span] { min-height: 0; }
}
@media (max-width: 460px) {
  .wrap { padding: 0 16px; }
  .closing .wrap { padding-inline: 16px; }
  /* No min-height (2026-09-24): the spools are 76px here, and a 150px floor left an
     empty stretch between the highlights' bars and the rack. */
  .rack { --spool: min(76px, (100vw - 60px) / 4); --gap: 8px; min-height: 0; padding-left: 4px; }   /* 60 = .wrap 32 + 4 + three 8px gaps */
  .spool .spool-name { font-size: 15px; }
}

/* ---------- corners ---------- */
/* Every box on the site has rounded corners (owner, 2026-09-18), in the spirit of
   the logotype, whose letters are drawn with round stroke ends. Two sizes: --r
   on controls (buttons, tabs, fields, chips, badges), --r-lg on the big panels
   (the product grid, the photo strip, the previews). A panel made of joined
   cells (the grid, the strip) is rounded as a whole, its cells stay square. */
:root { --r: 8px; --r-lg: 12px; }
.btn, .tab, .filters button, .row-nav button, .input, .choice span, .pick, .msg, .set .tile, .totop { border-radius: var(--r); }
.badge { border-radius: 5px; }
.grid, .jobs, .feature, .preview { border-radius: var(--r-lg); overflow: hidden; }
.jobs { overflow-x: auto; }
.contrib .bar, .contrib .bar i { border-radius: 4px; }

/* Page-to-page swipes (owner, 2026-09-24): the swiped area follows the finger (site.js),
   then the next page slides in with a cross-document view transition (Safari 18.2+,
   Chrome 126+; elsewhere it simply opens). Only swipes animate: every other navigation
   skips the transition (site.js pageswap, base.html pagereveal). The header stays put.
   pan-y + pinch-zoom: the browser keeps vertical scrolling and zoom, and the
   sideways move is left to the swipe. */
@view-transition { navigation: auto; }
header.site { view-transition-name: site-header; }
[data-swipe] { touch-action: pan-y pinch-zoom; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; animation-timing-function: var(--ease); }
html:active-view-transition-type(swipe-next)::view-transition-old(root) { animation-name: vt-out-left; }
html:active-view-transition-type(swipe-next)::view-transition-new(root) { animation-name: vt-in-right; }
html:active-view-transition-type(swipe-prev)::view-transition-old(root) { animation-name: vt-out-right; }
html:active-view-transition-type(swipe-prev)::view-transition-new(root) { animation-name: vt-in-left; }
@keyframes vt-out-left { to { transform: translateX(-30%); opacity: 0; } }
@keyframes vt-in-right { from { transform: translateX(100%); } }
@keyframes vt-out-right { to { transform: translateX(30%); opacity: 0; } }
@keyframes vt-in-left { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* The order bar on the generators (owner, 2026-09-24): phones and tablets only, so a
   desktop never sees it. Paper like the page, with a rule on top; the summary takes the
   room left, the button keeps its size. Back to top moves up above it. */
.order-bar { display: none; }
@media (max-width: 780px) {
  .order-bar:not([hidden]) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rule);
  }
  .ob-sum { flex: 1; min-width: 0; display: grid; gap: 3px; }
  .ob-sum strong, .ob-sum small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ob-sum strong { font: 700 17px/1.2 var(--display); }
  .ob-sum small { font-size: 13.5px; color: var(--muted); }
  .order-bar .btn { margin: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; flex: none; }
  .order-bar .btn svg { width: 20px; height: 20px; }
  html.order-bar-on .totop { bottom: 86px; }
}

/* Back to top (owner 2026-09-18 on Collabs; every page since 2026-09-24, base.html). */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 25; width: 48px; height: 48px;
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink);
}
.totop svg { width: 22px; height: 22px; }
/* WhatsApp, floating (owner, 2026-09-24): bottom-right, in the page's own colour
   (Charms orange, Nejma red, Collabs blue, Baydaq brown; orange on the workshop
   page), the size of "back to top". Where both show (Collabs), WhatsApp keeps the
   corner and "back to top" sits right above it. Hidden while the closing band is on
   screen (html.at-end, site.js): the band has its own WhatsApp button, and this one
   would sit on the footer text. It is too small for Safari to sample for the toolbar
   tint (that needs full width). */
.fab-wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 25; width: 48px; height: 48px;
  /* Ink like the closing band it hands over to (owner, 2026-11-11: black, white and orange). */
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink); border-radius: var(--r);
  transition: opacity .2s, visibility .2s;
}
.fab-wa svg { width: 24px; height: 24px; }
@media (hover: hover) { .fab-wa:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }
body:has(.fab-wa) .totop { bottom: calc(18px + 48px + 10px); }
html.band-in-view .fab-wa, html.own-wa-in-view .fab-wa { opacity: 0; visibility: hidden; }
@media (hover: hover) { .totop:hover { background: var(--paper); color: var(--ink); } }

/* The workshop's title, pinned under the bar (owner, 2026-09-18). Full size at the top
   of the page; once the page scrolls, site.js adds .stuck and it shrinks to a strip. */
.hero.pinned { position: sticky; top: var(--bar-h); z-index: 20; background: var(--paper);
  transition: padding .25s var(--ease); }
.hero.pinned h1, .hero.pinned .lede { transition: font-size .25s var(--ease), margin .25s var(--ease); }
.hero.pinned.stuck { padding: 12px 0 11px; }
.hero.pinned.stuck h1 { font-size: 26px; }
.hero.pinned.stuck .lede { font-size: 14.5px; margin-top: 3px; }

/* ---------- the Blaka generator (blaka.html, owner 2026-09-18) ---------- */

/* A best seller's card is one link into the generator, filled (no order button). */
.card:has(.go) { position: relative; }
.card .go { color: inherit; text-decoration: none; }
.card .go::after { content: ""; position: absolute; inset: 0; }
@media (hover: hover) { .card:has(.go):hover h3 { text-decoration: underline; text-underline-offset: 3px; } }

.blaka-maker { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.plate-stage { display: grid; place-items: center; padding: 22px 18px; background: var(--plate);
  border: 1px solid var(--rule); border-radius: var(--r-lg); }
.plate-stage svg, .view-stage svg { display: block; width: 100%; height: auto; }
.preview-col > .btn { margin-top: 0; justify-self: start; }
.fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
button.btn { font-family: var(--body); cursor: pointer; }
.fonts .tile { grid-template-columns: minmax(0, 1fr) auto; justify-items: start; align-items: center;
  gap: 2px 10px; padding: 9px 12px; }
.fonts .glyph.line { grid-column: 1 / -1; font-size: 19px; height: auto; line-height: 1.35; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fonts .name { font-size: 12.5px; }
.fonts .fit { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fonts .fit.no { color: #B3261E; }
/* On a phone each font takes a row (owner, 2026-09-24): the line in that font on the
   left, then the font's name and whether it fits. Three abreast, "IBM Plex Sans
   Arabic" wrapped over three lines. */
@media (max-width: 600px) {
  .fonts { grid-template-columns: 1fr; }
  .fonts .tile { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; padding: 10px 12px; min-height: 52px; }
  .fonts .glyph.line { grid-column: auto; }
}
/* Two columns, but a narrow form (2026-10-29: an upright iPad gives it 436px, a 900px
   window 526px). Sized to the form, not the screen: three fonts abreast wrapped again
   under 480px, and two colour menus side by side shrank the swatches to 32px, under the
   42px target. Seven at 42 + six 4px gaps = 318px each, so side by side needs 662px. */
.blaka-maker .form { container-type: inline-size; }
@container (max-width: 480px) {
  .fonts { grid-template-columns: 1fr; }
  .fonts .tile { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; padding: 10px 12px; min-height: 52px; }
  .fonts .glyph.line { grid-column: auto; }
}
@container (max-width: 661px) {
  .form > .field:has(.swatch-menu) { grid-column: 1 / -1; }
}
.form .lbl { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.form .opt { font-weight: 400; color: var(--faint); }

/* The colour swatches (owner, 2026-09-24): every colour visible, one tap each, in the
   real filament colours. 44px targets (43px on a 360px phone, so seven fit one row);
   the chosen one is ringed in Ink. */
.sw { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid rgba(18,18,17,.25); display: inline-block; }
.sw-row { display: grid; grid-template-columns: repeat(7, minmax(0, 44px)); gap: 4px; }
.sw-pick { appearance: none; aspect-ratio: 1; width: 100%; padding: 0; background: none; cursor: pointer;
  border: 2px solid transparent; border-radius: 50%; display: grid; place-items: center; }
.sw-pick .sw { width: 70%; height: 70%; }
.sw-pick[aria-checked="true"] { border-color: var(--ink); }
.sw-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-name { font-weight: 400; color: var(--muted); }

/* Touch screens: every control at least 44 px (2026-09-24, phone audit). Only where the
   pointer is a finger (pointer: coarse), so a desktop keeps its exact look. */
@media (pointer: coarse) {
  .tab { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
  header.site .icon { width: 44px; height: 44px; }
  .pick { min-height: 44px; min-width: 44px; }
}
/* On a phone the tabs have their own row in the bar: it grows to fit them (56 + 56). */
@media (pointer: coarse) and (max-width: 600px) {
  body:has(header.site .cats) { --bar-h: 112px; }
  header.site .wrap { grid-template-rows: 56px 56px; }
}

/* The contact and WhatsApp sheets (owner, 2026-09-24). A centred dialog on wider
   screens; on a phone a sheet from the bottom edge, lifted above the keyboard by
   site.js (--kb). While one is open the page behind doesn't scroll. */
html.dialog-open { overflow: hidden; }
.sheet { border: 0; padding: 4px 20px 20px; width: min(460px, calc(100vw - 32px)); max-height: 90dvh; overflow: auto;
  border-radius: var(--r-lg); background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(18,18,17,.5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 8px; }
.sheet-head h2 { font-size: 20px; line-height: 1.2; }
.sheet-head h2:focus { outline: none; }   /* the sheet opens with focus on its title, so the close button shows no ring */
.sheet-x { appearance: none; background: none; border: 0; width: 44px; height: 44px; margin-right: -10px;
  display: grid; place-items: center; color: var(--ink); cursor: pointer; }
.sheet-x svg { width: 22px; height: 22px; }
.sheet-lbl { display: block; font-size: 14px; font-weight: 700; margin: 16px 0 7px; }
.sheet textarea.input { width: 100%; font: 16px/1.45 var(--body); padding: 12px 13px; resize: vertical; min-height: 110px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { appearance: none; min-height: 44px; padding: 0 14px; font: 700 14.5px/1 var(--display); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--r); cursor: pointer; }
.topic[aria-pressed="true"] { border-color: var(--ink); }
.wa-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 14px; }
.wa-go svg { width: 20px; height: 20px; }
.sheet .fine { margin-top: 10px; }
.contact-list { list-style: none; margin: 4px 0 0; padding: 0; }
.contact-list li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--rule); }
.contact-list a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 60px; text-decoration: none; color: var(--ink); }
.contact-list a svg { width: 24px; height: 24px; flex: none; }
.contact-list strong { display: block; font: 700 13px/1.2 var(--display); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.contact-list span { overflow-wrap: anywhere; }
.copy { appearance: none; min-height: 44px; padding: 0 14px; background: none; border: 1.5px solid var(--rule); border-radius: var(--r);
  font: 700 14px/1 var(--display); color: var(--ink); cursor: pointer; }
@media (max-width: 600px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 var(--kb, 0px); border-radius: 18px 18px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* The big view. */
.plate-view { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 18px 20px 20px;
  width: min(720px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); }
.plate-view::backdrop { background: rgba(18,18,17,.55); }
.view-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.view-title { font: 700 20px var(--display); margin: 0; }
.view-close { appearance: none; border: 1px solid var(--rule); background: var(--paper); border-radius: var(--r);
  width: 40px; height: 40px; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
.view-stage { padding: 28px; background: var(--plate); border-radius: var(--r-lg); }
.plate-view .fine { margin-top: 12px; }
.block > .credit { margin-top: 10px; font-size: 15px; color: var(--muted); }
@media (max-width: 780px) { .blaka-maker { grid-template-columns: 1fr; --col: 420px; } .blaka-maker .preview-col { max-width: 420px; } }

/* ---------- desktop audit, 2026-09-30 ---------- */

/* One focus ring for everything a keyboard can land on: the page's accent, 3px off the
   control. :where() keeps it at zero specificity, so the rings above (inputs at 1px,
   swatches at 2px, the closing band's on-accent ring) still win where they were set.
   Before this, buttons without their own rule showed the browser's thin default ring. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.jobs:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
/* Inside their box: the chapter tabs sit in a clipping strip, and the sheet's Close
   button has a negative margin, so a ring outside would lose its left and bottom edges. */
.chapter-tabs a:focus-visible { outline-offset: -4px; }
.sheet-x:focus-visible { outline-offset: -6px; }

/* Skip to content: first Tab stop, visible only while it has focus. */
.skip { position: absolute; left: 8px; top: -80px; z-index: 60; padding: 10px 16px; background: var(--ink); color: var(--paper);
  font: 700 15px/1.2 var(--display); text-decoration: none; border-radius: var(--r); }
.skip:focus { top: 8px; }
main { scroll-margin-top: var(--bar-h); }
main:focus { outline: none; }

/* A mouse answers a hover on every control that shows the pointer cursor (audit: the emoji
   picks, the two-sided words, the swatches, the chips, the rights row, both sheets and the
   footer links did nothing). Inside (hover: hover), like every hover rule on this site. */
@media (hover: hover) {
  header.site .home:hover img { opacity: .7; }
  .hl-nav .dot:hover { background: var(--faint); }
  .pick:hover { border-color: var(--ink); }
  .as-word:hover { color: var(--ink); }
  .sw-pick:hover { border-color: rgba(18,18,17,.4); }
  .set:hover .tile, .fonts .tile:hover { border-color: var(--ink); }
  .choice:hover span { border-color: var(--ink); color: var(--ink); }
  .form .rights:hover, .input:hover { border-color: var(--muted); }
  .topic:hover, .copy:hover { border-color: var(--ink); }
  .sheet-x:hover { color: var(--accent); }
  .contact-list a:hover span { text-decoration: underline; text-underline-offset: 3px; }
  footer.site a:hover { opacity: 1; text-decoration-thickness: 2px; }
  main p a:hover, .note a:hover { color: var(--accent); }
}

/* Windows has no flag emoji: 🇹🇳 is drawn as the letters "TN". emoji.html tests the
   device once and, where flags are missing, sets .no-flag-font so the picks, the box
   and the message use Noto Color Emoji (already loaded there, and the set the big
   preview uses). Devices that draw flags keep their own emoji. */
.no-flag-font .pick, .no-flag-font .emoji-input { font-family: 'Noto Color Emoji', var(--body); }
.no-flag-font .msg .em { font-family: 'Noto Color Emoji', sans-serif; }

/* Running text stays readable in French, where lines run longer (measured 2026-09-30 at
   15.5px and 14px: English 556px and 429px, French 601px and 501px): the Collabs material
   row wraps past 37em (574px) and the Nejma handover rule past 62ch (479px), so the French
   sits on two lines and the English, which fits, is left alone. The hairline under a
   Collabs row keeps its full width; the padding does the wrapping. */
.contrib .rule { max-width: 62ch; }
.collab-specs dd { padding-right: calc(100% - 37em); }

/* Collabs, desktop: the attachments field spans two columns so its three chips stay on
   one row in French ("Anneaux porte-clés" is wider than a third of the form). From 600px,
   where the form has two columns or more: in one column, span 2 would add a second. */
@media (min-width: 600px) { .form .field.span2 { grid-column: span 2; } }
/* The order buttons carry the WhatsApp icon, sized like the closing band's (otherwise the bare svg fills the button). */
.feature .info .btn, .pieces .btn, #sizes > .btn { display: inline-flex; align-items: center; gap: 10px; }
.feature .info .btn svg, .pieces .btn svg, #sizes > .btn svg { width: 20px; height: 20px; flex: none; }
/* Baydaq, continued (2026-10-19): the single pieces under the set, and the CC-BY credit. */
.feature .info .btn { align-self: flex-start; }
.pieces { margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.pieces h2 { font-size: 24px; }
.pieces .line { color: var(--muted); max-width: 52ch; }
.pieces .specs { max-width: 360px; }
.pieces .btn { align-self: flex-start; }
.credit { margin: 40px 0 8px; font-size: 13.5px; color: var(--faint); max-width: 60ch; }
.credit a { color: inherit; text-decoration: underline; }

/* ---------- Baydaq: the price table and the size chart (2026-10-28) ---------- */

/* Phone first (Style_Guide.md §2.5): both tables fit a 390px phone with no sideways
   scroll, so the set prices on the right are never off-screen. Headers wrap word by
   word; the size chart's units sit in one line under it. The scroll box stays as a
   guard for the narrowest screens. */
.table-scroll { overflow-x: auto; margin-top: 22px; -webkit-overflow-scrolling: touch; }
.bay-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.bay-table th, .bay-table td { padding: 11px 4px; text-align: center; border-bottom: 0.5px solid var(--rule); }
.bay-table thead th { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: 0.02em;
  text-transform: uppercase; vertical-align: bottom; line-height: 1.25; }
.bay-table tbody th { text-align: left; font-weight: 700; white-space: nowrap; padding-right: 8px; }
.bay-table tbody th span { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.bay-table td.set { font-weight: 700; color: var(--ink); }   /* prices in Ink: orange is for actions (owner, 2026-11-16) */
/* The shapes-and-dots table (owner, 2026-10-29, the carousel's slide 7): silhouettes head
   the piece columns, a row reads "3 ●○". .sr keeps the words for screen readers. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bay-table th.pc img { display: block; margin: 0 auto; height: 40px; width: auto; }
.bay-table thead th:first-child { text-align: left; }
@media (min-width: 700px) { .bay-table th.pc img { height: 50px; } }
html.dark .bay-table th.pc img { filter: invert(1); }   /* Ink drawings on the dark ground */
.bay-dims thead th.pc { vertical-align: bottom; }
.bay-table tbody th b { font-family: var(--display); font-size: 20px; margin-right: 8px; vertical-align: -2px; }
.bt-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #8d8a83;
  margin-right: 4px; vertical-align: -2px; }
.bay-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.bay-key .bt-dot { margin-right: 6px; }
@media (min-width: 700px) { .bay-table { font-size: 17px; } .bay-table thead th { font-size: 12.5px; }
  .bay-table th, .bay-table td { padding: 13px 10px; } }
.bay-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.bay-shots .shot { margin: 0; }
/* The board (2026-11-10): the photo in the flow, not bled like a card's; capped on desktop. */
.bay-board .shot { margin: 0; max-width: 560px; }
.bay-board .bc-note { margin-top: 10px; }   /* was -6px: it touched the photo (owner, 2026-11-12) */
/* The first screen's pointer to the board (owner, 2026-11-10): a 44 px tap target in the accent. */
.bay-jump { display: inline-flex; align-self: flex-start; width: fit-content; align-items: center; gap: 6px; min-height: 44px; margin-top: 14px; padding: 0 16px;
  border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .bay-jump:hover { background: var(--accent); color: var(--on-accent); } }
/* The offer as a sale: the price of buying both, struck through, then the offer (owner, 2026-11-11). */
.bay-boards s { color: var(--faint); font-weight: 400; margin-right: 5px; }
.bay-boards thead .unit { display: block; font-weight: 400; }
/* The piece picker (2026-10-28): two radio groups, pieces then colours, kept focusable
   but out of sight; the checked pair shows its picture and rings its two buttons. The
   pair rules below are generated (one per piece x colour), not hand-typed. */
.bc-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bc-row label { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 15px;
  border: 1px solid var(--rule); border-radius: 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.bc-colours label { padding-left: 10px; }
.bc-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #8d8a83; }
.bc-views { margin-top: 16px; }
.bc-view { display: none; }
.bc-view .shot { margin: 0; aspect-ratio: 1600 / 736; }
.bc-note { font-size: 14px; margin-top: 10px; }
/* The light page (2026-11-02): three size cards, all in view; one box for every number. */
.bc-views { margin-top: 0; }
.bay-colours .bc-colours { margin-top: 12px; }
.bay-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bay-cards li { border: 1px solid var(--rule); border-radius: 14px; text-align: center; }
.bay-cards h3 { font-size: 20px; margin: 0 0 6px; }
.bay-cards p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.bay-cards .price { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); margin-top: 8px; }
.bay-cards .wood { font-size: 13px; }
.bay-cards .nw, .bay-table .nw { white-space: nowrap; }
.bay-specs { margin: 22px 0 18px; max-width: 520px; }
@media (min-width: 700px) { .bay-cards { gap: 14px; } .bay-cards label { padding: 20px 14px 18px; }
  .bay-dims thead th { font-size: 12px; }
  .bay-cards h3 { font-size: 24px; } .bay-cards p { font-size: 15.5px; } .bay-cards .price { font-size: 26px; } }
/* The cards pick the size (2026-11-02): the checked card is ringed, its panel opens, the hint goes. */
.bay-cards label { display: block; cursor: pointer; padding: 14px 10px 12px; border-radius: 13px; }
.bay-cards li { padding: 0; }
#bs-3:checked ~ .bay-cards .ls-3, #bs-4:checked ~ .bay-cards .ls-4,
#bs-5:checked ~ .bay-cards .ls-5 { box-shadow: 0 0 0 2px var(--accent); }
#bs-3:focus-visible ~ .bay-cards .ls-3, #bs-4:focus-visible ~ .bay-cards .ls-4,
#bs-5:focus-visible ~ .bay-cards .ls-5 { outline: 2px solid var(--accent); outline-offset: 3px; }
.bs-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.bc-input:checked ~ .bs-hint { display: none; }
.bs-panel { display: none; margin-top: 6px; }
#bs-3:checked ~ .p-3, #bs-4:checked ~ .p-4, #bs-5:checked ~ .p-5 { display: block; }
.bs-panel .table-scroll { margin-top: 14px; }
.bs-panel .bay-table tbody th .bt-dot { margin-right: 2px; }
.bay-dims th, .bay-dims td { padding-left: 2px; padding-right: 2px; }
.bay-dims thead th { font-size: 10px; letter-spacing: 0; }
.bs-panel > .line { font-size: 14px; margin-top: 10px; }
#bc-oak:checked ~ .bc-views .v-oak, #bc-walnut:checked ~ .bc-views .v-walnut,
#bc-black:checked ~ .bc-views .v-black, #bc-white:checked ~ .bc-views .v-white { display: block; }
#bc-oak:checked ~ .bc-colours .lc-oak, #bc-walnut:checked ~ .bc-colours .lc-walnut,
#bc-black:checked ~ .bc-colours .lc-black,
#bc-white:checked ~ .bc-colours .lc-white { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#bc-oak:focus-visible ~ .bc-colours .lc-oak, #bc-walnut:focus-visible ~ .bc-colours .lc-walnut,
#bc-black:focus-visible ~ .bc-colours .lc-black,
#bc-white:focus-visible ~ .bc-colours .lc-white { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Baydaq shortcuts and the three ways to buy (owner, 2026-10-28: sizes and sets easier
   to find). The jumps land below the sticky header. */
.bay-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.bay-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; }
#sets, #sizes, #pieces { scroll-margin-top: 150px; }
.bay-buy { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 17px; }
.bay-buy li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 0.5px solid var(--rule); padding: 4px 0 8px; }
.bay-buy a { color: var(--ink); text-underline-offset: 4px; }
.bay-buy .price { display: inline; font-size: 17px; line-height: inherit; margin: 0; padding: 0; }
/* mobile-at-best (2026-10-28): every pill's label trimmed to its capitals, so dot + label
   and text-only pills centre the same on an iPhone as on Windows; the card's set links
   get a 44px tap height. */
.bc-row label .t, .bay-jump a .t { text-box: trim-both cap alphabetic; }
.bay-buy a { display: inline-flex; align-items: center; min-height: 44px; }
.bay-buy li { padding: 0; }

/* Every highlight's photo on a phone (owner, 2026-10-28): full width between the title and
   the specs, one shape for all three, so the slides keep one height. Desktop shows it in
   the right column instead (.hl-photo). */
.hl-pic { width: 100%; margin: 0; aspect-ratio: 1.62; flex: 1 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); }
/* The slides share one height and are never exactly equal (a title scaled to fit, a spec
   line that wraps on a small phone). The leftover used to fall under the title, which read
   as a blank (owner, 2026-10-28). Now the title sits a fixed gap above what follows, and the
   leftover goes where it doesn't show: into the photo on a phone (it grows a few px, cropped),
   between the specs and the button on desktop. The button and the bars still stay put. */
.offer h1, .offer h2 { margin-bottom: 0; }
@media (min-width: 781px) { .offer .specs { margin-bottom: auto; } }
.hl-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Desktop (owner, 2026-10-28): a highlight's photo fills the right column, from the top
   of the front down to just above the spools, while that highlight shows. The spools
   stay where they are and stay clickable; the photo fades with the 3 s rotation. The
   photo and the rack share the right cell, the rack at its foot. Phones (one column)
   keep the small square inside the highlight instead. */
.hl-photo { display: none; }
@media (min-width: 781px) {
  .front > .highlights { grid-column: 1; grid-row: 1; }
  .front > .rack { grid-column: 2; grid-row: 1; align-self: end; }
  /* In two columns the rack has the right column only: .95 of the 1.95fr left after the
     48px gap (an upright iPad gives it 339px). The photo reads the same --spool to end
     just above the spools. */
  .front > .rack, .front > .hl-photo { --spool: min(104px, ((min(100vw, var(--max)) - 96px) * .475 - 40px) / 4); }
  /* contain: size — the photo takes the cell the highlights and the rack already make; on
     its own size it pushed the front ~100px taller and widened a 820px tablet. */
  .hl-photo { display: block; contain: size; grid-column: 2; grid-row: 1; align-self: stretch; margin: 0 0 calc(var(--spool, 104px) + 22px);
    border-radius: 16px; overflow: hidden; border: 1px solid var(--rule); opacity: 0; pointer-events: none;
    transition: opacity .35s ease; }
  .hl-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
  .front:has(.hl-nav .dot[data-index="0"][aria-current="true"]) .p-0,
  .front:has(.hl-nav .dot[data-index="1"][aria-current="true"]) .p-1,
  .front:has(.hl-nav .dot[data-index="2"][aria-current="true"]) .p-2 { opacity: 1; }
  .offer .hl-pic { display: none; }
  /* The title's capitals start where the photo starts (owner, 2026-10-28): trimmed to the
     cap height, the line box no longer adds its space above the letters. */
  .offer h1, .offer h2 { text-box: trim-start cap alphabetic; }
}
@media (min-width: 781px) and (prefers-reduced-motion: reduce) { .hl-photo { transition: none; } }

/* ==========================================================================
   HOME: the shop (shop rework phase 1, Task 3; mockup v9, prototypes/).
   Two doors, then the sticky catalog line, then the grid. Phone first (390 px).
   ========================================================================== */
.shop-home { max-width: 1120px; margin: 0 auto; padding-bottom: 32px; }

/* The doors: photo on top, the text on an Ink panel below it, never over it. */
.doors { display: grid; gap: 14px; padding: 14px 16px 0; }
.door { background: var(--ink); color: var(--paper); border-radius: 16px; overflow: hidden; }
.door img { display: block; width: 100%; height: 230px; object-fit: cover; background: var(--plate); }
.door-text { padding: 16px 18px 18px; }
.door-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin: 0; }
.door h2 { font: 700 30px/1.05 var(--display); margin: 4px 0 6px; color: var(--paper); }
.door-line { margin: 0; opacity: .92; }
.door .btn.paper { margin-top: 14px; background: var(--paper); color: var(--ink); border-color: var(--paper);
  border-radius: 999px; padding: 11px 20px; font-family: var(--display); min-height: 44px; }
@media (hover: hover) { .door .btn.paper:hover { background: transparent; color: var(--paper); } }

/* The shop block: one sticky block on two lines, under the bar. No count, no "All". */
.shopline { position: sticky; top: var(--bar-h); z-index: 15; background: var(--paper);
  margin-top: 26px; padding-top: 12px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.shopline .lead { display: block; padding: 0 16px; font: 700 22px/1.1 var(--display); white-space: nowrap; }
.shopline .row { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; }
.shopline .row::-webkit-scrollbar { display: none; }
/* Each name has a line under it: grey at rest; its own colour when selected (Task 4). */
.shopline .f { flex: none; display: inline-flex; align-items: flex-end; min-height: 44px; padding-bottom: 6px;
  font: 500 16px/1 var(--display); color: var(--muted); text-decoration: none;
  border-bottom: 3px solid var(--rule); margin-bottom: 8px; }
.shopline .f.next { font-style: italic; border-bottom-style: dashed; }
/* The tfash colours live on these bars only, and only the selected one is lit (owner,
   2026-11-10: fewer colours). Inside the page everything is Ink. */
.shopline .f[data-cat="baydaq"] { --c: #7E4E38; }   /* Games, Printed Clay (2026-11-15) */
.shopline .f[data-cat="collabs"] { --c: #5F7ED7; }
.shopline .f[data-cat="charms"] { --c: var(--orange); }
.shopline .f[data-cat="nejma"] { --c: #D80000; }
.shopline .f[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--c); }
.shop-home[data-filtered] .shop-sec:not(.on) { display: none; }
/* With a filter on, the name above already says where you are: no heading repeating it (owner, 2026-11-11). */
.shop-home[data-filtered] .shop-sec > h2 { display: none; }
/* "You are here": the heading of the section under the catalog line, in Ink. */
.shop-sec.cur h2 { border-bottom-color: var(--ink); }

/* The grid. Headings are names only; their line is grey (Task 4 colours the one in view). */
.shop-sec { padding: 22px 16px 6px; scroll-margin-top: calc(var(--bar-h) + 104px); }
.shop-sec h2 { display: inline-block; margin: 0; font: 700 22px/1.2 var(--display); padding-bottom: 4px;
  border-bottom: 3px solid var(--rule); }
.shop-sec .meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.shop-card { position: relative; display: flex; flex-direction: column; background: var(--plate);
  border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; }
.shop-card .shot { margin: 0; border-bottom: 0; }
.shop-name { padding: 9px 10px 0; font: 700 15px/1.2 var(--display); }
.shop-card .price { padding: 3px 10px 10px; font-size: 14px; }
/* "9 dinars off": right under the price, its label centred in the pill (owner, 2026-11-11). */
.shop-card:has(.save) .price { padding-bottom: 4px; }
.shop-card .save { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  margin: 0 10px 10px; padding: 3px 9px; border-radius: 999px; line-height: 1;
  background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
/* New: Orange with Ink, the packaging pairing (owner, 2026-11-11: "New on orange"). */
.tag-new { position: absolute; left: 8px; top: 8px; z-index: 1; background: var(--orange); color: var(--ink);
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
/* The "next tfash" card and "Start a Collab": no photo, a dashed outline. */
.shop-card.soon { justify-content: center; align-items: center; gap: 8px; text-align: center; min-height: 160px;
  padding: 16px 12px; background: transparent; border: 1.5px dashed var(--rule); }
.shop-card.soon .shop-name { padding: 0; }
/* The emoji card (owner, 2026-11-11): a solid Orange outline, so it reads as a thing to make, not a "coming soon". */
.shop-card.emoji-card { border: 1.5px solid var(--orange); color: var(--ink); text-decoration: none; }
.emoji-card .emoji-big { font-size: 40px; line-height: 1; }
.shop-card.soon a, .shop-card.start span:last-child { font-size: 14px; color: var(--muted); }
.shop-card.job .shot img { aspect-ratio: 1; object-fit: cover; }

@media (min-width: 800px) {
  .doors { grid-template-columns: 1fr 1fr; }
  .door img { height: 300px; }
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}

/* ==========================================================================
   THE CART (shop rework phase 1, Task 5). A bar at the bottom once something is in
   it, a sheet with the lines, one WhatsApp message for everything. Ink, not a tfash
   colour (owner, 2026-11-10: one colour inside the page).
   ========================================================================== */
.cart-bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 8px 8px 14px;
  background: var(--ink); color: var(--paper); border-radius: 14px; }
.cart-bar[hidden] { display: none; }
.cart-sum { flex: 1; min-width: 0; min-height: 44px; text-align: left; background: none; border: 0; padding: 0; font-family: inherit;
  color: inherit; font: 500 15px/1.2 var(--body, inherit); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-sum strong { font-family: var(--display); }
.cart-bar .btn { margin: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: var(--orange); color: var(--ink); border-color: var(--orange); border-radius: 999px; font-family: var(--display); }
.cart-bar .btn svg, .cart-lines + .sums svg { width: 20px; height: 20px; }
.cart-bar .btn[aria-disabled="true"], #cartDialog .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.cart-long { flex-basis: 100%; margin: 0; font-size: 13px; }
/* Out of the bar's way: the floating WhatsApp (the bar carries WhatsApp), the generators'
   own order bar (the cart's message is the order), and back to top sits above the bar. */
html.has-cart .fab-wa, html.has-cart .order-bar { display: none !important; }
html.has-cart .totop { bottom: calc(86px + env(safe-area-inset-bottom)); }
html.has-cart body { padding-bottom: 76px; }

#cartDialog .wa-go { display: flex; align-items: center; justify-content: center; gap: 8px; }
#cartDialog .wa-go svg { width: 20px; height: 20px; }
#cartDialog .btn.ghost { display: block; text-align: center; margin-top: 10px; }
.cart-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center;
  padding: 12px 0; border-bottom: 0.5px solid var(--rule); }
.cl-what strong { display: block; font-family: var(--display); font-size: 15px; }
.cl-what small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cl-price { font-weight: 700; justify-self: end; }
.cl-qty { display: inline-flex; align-items: center; gap: 4px; }
.cl-btn { width: 44px; height: 44px; border: 1px solid var(--rule); background: var(--paper); border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.cl-n { min-width: 24px; text-align: center; font-weight: 700; }
.cl-x { justify-self: end; min-height: 44px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.cart-sums { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 14px 0 0; }
.cart-sums dt { margin: 0; color: var(--muted); }
.cart-sums dd { margin: 0; text-align: right; font-weight: 700; }
.cart-sums dt:nth-last-of-type(1), .cart-sums dd:last-child { color: var(--ink); font-size: 17px; }

/* The + on a home card: a button beside the card's link, never inside it. */
.shop-card .go { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.shop-card .add { position: absolute; right: 8px; top: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--ink); font: 700 24px/1 var(--display); cursor: pointer;
  box-shadow: 0 1px 3px rgba(18, 18, 17, .25); }
.shop-card .add.done { background: var(--ink); color: var(--paper); }
/* "Add to cart" on the catalog cards, the Baydaq panels and the generators. */
.btn.add-line { margin: 10px 0 0; background: var(--ink); color: var(--paper); border-color: var(--ink); min-height: 44px;
  font-family: inherit; cursor: pointer; }
.card-foot .btn.add-line { margin: 0 0 0 auto; padding: 6px 14px; font-size: 14px; }
.bay-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bay-add .btn.add-line { margin: 0; }
.actions .btn[data-add][aria-disabled="true"] { opacity: .45; }
/* The board (owner, 2026-11-11, draft A): the size as one switch, the set as a tick box, one
   button. Radio buttons, a checkbox and CSS: of the six buttons, the one for the size and the tick shows. */
.bb-seg { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.bb-seg label { display: flex; align-items: center; justify-content: center; min-height: 48px; font: 700 16px var(--display); cursor: pointer; }
.bb-seg label + label { border-left: 1.5px solid var(--ink); }
.bb-s3:checked ~ .bb-seg .lb-3, .bb-s4:checked ~ .bb-seg .lb-4, .bb-s5:checked ~ .bb-seg .lb-5 { background: var(--ink); color: var(--paper); }
.bb-s3:focus-visible ~ .bb-seg .lb-3, .bb-s4:focus-visible ~ .bb-seg .lb-4,
.bb-s5:focus-visible ~ .bb-seg .lb-5 { outline: 2px solid var(--orange); outline-offset: -4px; }
/* Two kinds of board (classic, puzzle): a switch, one kind shown (owner, 2026-11-11). */
.bb-types { grid-template-columns: repeat(2, 1fr); }
#bt-classic:not(:checked) ~ .bb-type-classic, #bt-puzzle:not(:checked) ~ .bb-type-puzzle { display: none; }   /* hides the other kind, so the open one keeps its grid on desktop */
#bt-classic:checked ~ .bb-types .lt-classic, #bt-puzzle:checked ~ .bb-types .lt-puzzle { background: var(--ink); color: var(--paper); }
.bp-pick .btn.bb-go { display: block; width: 100%; margin-top: 12px; min-height: 52px; text-align: center; border-radius: var(--r); }

/* Home's Charms chapters (Task 4b, 2026-11-11): a small heading over each chapter's cards. */
.shop-sec .chap { margin: 20px 0 0; font: 700 16px/1.2 var(--display); color: var(--muted); }
.shop-sec .contrib { margin-top: 14px; }
.shop-sec .contrib .fig { font-size: 22px; }

/* The order page (owner, 2026-11-11): the cart's lines, three fields, one button. */
.order-page .wrap { max-width: 560px; }
.order-sum { margin-top: 8px; }
.order-sum .cart-line { grid-template-columns: 1fr auto; }
.order-form { display: grid; gap: 14px; margin-top: 24px; }
.order-form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.order-form input, .order-form textarea { font: 400 16px/1.4 var(--body); padding: 12px; border: 1.5px solid var(--rule);
  border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
.order-form input:focus, .order-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.order-form [aria-invalid="true"] { border-color: var(--orange); border-width: 2px; }
.order-form .field-err { font-weight: 700; font-size: 15px; color: var(--ink); padding-left: 10px; border-left: 3px solid var(--orange); }
#orderStatus:not(:empty) { color: var(--ink); font-weight: 700; }
.order-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-form .btn.solid { min-height: 52px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.order-done { margin-top: 24px; }
.order-done h2 { font: 700 26px/1.2 var(--display); margin: 0 0 8px; }
.order-or { margin-top: 28px; color: var(--muted); }
#cartDialog .order-go { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px;
  margin-top: 14px; background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* The order page shows the cart itself: no cart bar over its form (owner, 2026-11-11, UX review). */
html[data-page="order"] #cartBar { display: none !important; }
/* Home's Nejma counter in one line (owner, 2026-11-11, UX review). */
.shop-sec .contrib.one .line1 { font: 700 18px/1.3 var(--display); margin: 0; }
.shop-sec .contrib.one .bar { margin-top: 10px; }
/* The Nejma counter's bar keeps Nejma Red, the one tfash colour inside a page (owner, 2026-11-11). */
.contrib .bar i { background: #D80000; }
/* A sale price on a home card: the price of buying both, struck through (owner, 2026-11-11, UX review). */
.shop-card .price s { color: var(--faint); margin-right: 4px; }

/* The pieces picker (owner, 2026-11-11): under each size, the colour and full set / half set /
   one piece as switches, the piece and the side as chips, one button. */
.bp-pick { max-width: 480px; margin: 14px 0 26px; }
.bp-seg { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 10px; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.bp-seg.three { grid-template-columns: repeat(3, 1fr); }
.bp-seg button { min-height: 48px; padding: 0 6px; border: 0; background: transparent; color: var(--ink); font: 700 15px var(--display); cursor: pointer; }
.bp-seg button + button { border-left: 1.5px solid var(--ink); }
.bp-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bp-seg button:focus-visible { outline: 2px solid var(--orange); outline-offset: -4px; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bp-chips[hidden], .bp-chips button[hidden] { display: none; }
.bp-chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 22px;
  background: transparent; color: var(--ink); font: 700 15px var(--body); cursor: pointer; }
.bp-chips button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bp-chips button b { font-weight: 700; margin-left: -4px; }

.bp-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--rule); flex: none; }

/* The shop page (owner, 2026-11-12): unfiltered, each tfash shows its first four cards and "See all". */
.shop-home:not([data-filtered]) .shop-sec .more { display: none; }
.shop-home[data-filtered] .see-all { display: none; }
.see-all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px;
  font: 700 16px var(--display); color: var(--ink); }
.shop-page .shopline { margin-top: 0; border-top: 0; }
/* Home's strip of the shop, then the way in (owner, 2026-11-12). */
.home-strip .shop-grid { margin-top: 12px; }
.home-strip .btn.strip-go { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; max-width: 480px;
  margin-top: 16px; min-height: 52px; border-radius: var(--r); background: var(--ink); color: var(--paper); border-color: var(--ink);
  font-family: var(--display); }

/* ------------------------------------------------------------------------------------
   Dark mode (owner, 2026-11-12): follows the visitor's phone or computer, no switch.
   The locked palette stays: Ink and Paper trade places, Orange stays Orange. The four
   tints below are mixed from Ink and Paper like the light ones, approved by the owner
   on the preview 2026-11-12 (Style_Guide.md §2.1). Auto follows the phone; the
   menu's Look setting (2026-11-12) can force Light or Dark.
   Everything that reads var(--ink) as "the text colour" and var(--paper) as "the
   ground" follows by itself; the rules after :root are the few that mean the literal
   colour: text on Orange, the closing band, the workshop drawings.
   ------------------------------------------------------------------------------------ */
/* The look: html.dark is set by base.html's head script (Auto = the phone's setting; the
   menu's Light or Dark wins). */
html.dark {
    color-scheme: dark;
    --ink: #FCFBF8;
    --paper: #121211;
    --rule: #3B3934;    /* approved 2026-11-12: Paper mixed into Ink, warm like the light --rule */
    --plate: #1D1C1A;   /* approved 2026-11-12: a ground for a frame, a hub, the closing band */
    --muted: #A9A59C;   /* approved 2026-11-12: secondary text, 8:1 on the ground */
    --faint: #7D7970;   /* approved 2026-11-12: fine print, 4.5:1 on the ground */
  }
/* Ink text on Orange stays Ink: Paper on Orange is 2.6:1. */
html.dark .tag-new, html.dark .cart-bar .btn { color: #121211; }
/* The closing band and the bottom bounce: a lifted ground, not a Paper slab. */
html.dark .closing { --accent: var(--plate); --on-accent: var(--ink); border-top: 1px solid var(--rule); }
html.dark.at-end, html.dark .end-tint { background: var(--plate); }
/* The home doors: lifted panels rather than two white blocks. */
html.dark .door { background: var(--plate); color: var(--ink); border: 1px solid var(--rule); }
html.dark .door h2 { color: var(--ink); }
html.dark .door .btn.paper { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* The workshop drawings carry their colours as attributes. */
html.dark .diagram [fill="#121211"] { fill: var(--ink); }
html.dark .diagram [stroke="#121211"] { stroke: var(--ink); }
html.dark .diagram [fill="#FCFBF8"] { fill: var(--paper); }
html.dark .row-nav button { background: rgba(18, 18, 17, .78); }
html.dark .sw, html.dark .sw-pick:hover { border-color: var(--rule); }
html.dark .err, html.dark .fonts .fit.no { color: #FF8A7A; }

/* The logo: two images, the look picks one (a <picture> can't follow the menu's choice). */
.logo-d { display: none !important; }
html.dark .logo-l { display: none !important; }
html.dark .logo-d { display: block !important; }

/* The burger (owner, 2026-11-12, option D). */
header.site .icon.burger svg { width: 26px; height: 26px; }

/* The menu: full screen, the three places in big Changa type, Orange under the current
   one; the language and the look at the bottom. */
.sheet.menu { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0;
  padding: 0 20px calc(24px + env(safe-area-inset-bottom)); display: none; flex-direction: column;
  background: var(--paper); color: var(--ink); }
.sheet.menu[open] { display: flex; }
.menu-top { display: flex; justify-content: space-between; align-items: center; height: 56px; flex: none; }
.menu-top .home { line-height: 0; }
.menu-top img { height: 24px; width: auto; }
.sheet.menu h2.sr:focus { outline: none; }
/* A list, not a poster (owner, 2026-11-12: "the text is so big" on the phone): full-width
   rows, the whole row the tap target (64px+), an arrow at the end, a line between rows;
   the page you are on carries an Orange bar at its start. */
.menu-nav { display: grid; margin-top: 12px; align-content: start; border-top: 1px solid var(--rule); }
.menu-nav a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
  min-height: 68px; padding: 12px 0; border-bottom: 1px solid var(--rule);
  font: 700 24px/1.15 var(--display); color: var(--ink); text-decoration: none; position: relative; }
.menu-nav a::after { content: "→"; grid-column: 2; grid-row: 1 / span 2; font: 400 20px var(--body); color: var(--muted); }
.menu-nav a small { grid-column: 1; display: block; font: 400 14px/1.35 var(--body); color: var(--muted); margin-top: 3px; }
.menu-nav a[aria-current] { padding-left: 14px; }
.menu-nav a[aria-current]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--orange); }
@media (hover: hover) { .menu-nav a:hover { color: var(--orange); } }
.menu-sets { margin-top: auto; padding-top: 24px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.set-lbl { font: 700 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pills { display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.pills > * { appearance: none; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer;
  min-height: 40px; padding: 0 16px; display: grid; place-items: center; font: 700 14px/1 var(--display); }
.pills > .on, .pills > [aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* The menu on a wider screen (owner, 2026-11-12: "so big for a menu on a desktop"): a panel
   on the right, the page dimmed behind it; phones keep the full screen. */
@media (min-width: 700px) {
  .sheet.menu { width: 400px; margin: 0 0 0 auto; border-left: 1px solid var(--rule);
    box-shadow: -12px 0 40px rgba(18, 18, 17, .18); padding-inline: 28px; }
  .menu-nav { margin-top: 20px; }
}

/* Orange is the action colour (owner, 2026-11-16, "B + D"): every Add to cart is Orange with Ink
   text (#121211 in both looks: Paper on Orange is 2.6:1); prices are Ink. Until a picker's choice
   is complete the button is a muted Ink, and it turns Orange once it can add. */
.btn[data-add], .btn.add-line, .shop-card .add { background: var(--orange); color: #121211; border-color: var(--orange); }
.btn[data-add][disabled], .btn[data-add][aria-disabled="true"] { background: var(--rule); color: var(--muted); border-color: var(--rule); opacity: 1; cursor: default; }
.shop-card .add.done { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .btn[data-add]:not([disabled]):not([aria-disabled="true"]):hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }
/* DRAFT (2026-11-16): the board that fits, under the sets picker. Outlined: one orange action per box. */
.bp-board { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--r); }
.bp-board img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.bp-board p { margin: 0; flex: 1; font-size: 14px; line-height: 1.35; }
.bp-board p b { display: block; font-family: var(--display); font-size: 15px; }
.bp-board p span { color: var(--muted); display: block; }
.bp-board p .bp-deal { color: var(--ink); font-weight: 700; font-size: 13px; }
.btn.bp-board-go, .btn[data-add].bp-board-go { margin: 0; flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; background: transparent; color: var(--ink); border-color: var(--ink); cursor: pointer; font-family: inherit; }
.bb-pick2 { margin-top: 16px; }
.bp-chips button .pa s { color: var(--faint); font-weight: 500; margin-right: 2px; }
/* The board block (owner, 2026-11-16): picker before the table; on desktop the photo beside them. */
.bb-side .table-scroll { margin-top: 22px; }
@media (min-width: 960px) {
  .bb-type { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .bb-type .bb-photo .shot { margin-top: 0; }
  .bb-pick2 { margin-top: 0; max-width: none; }
}

/* The emoji add-on (owner, 2026-11-16, option C): a light bordered card under the set buttons,
   no fill and no button colour, so it reads as an offer without shouting. In the cart, the old
   price struck through before the new one, and the note under the line. */
.add-on { margin: 20px 0 0; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: 14px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.add-on p { margin: 0 0 4px; }
.add-on .ao-head { color: var(--ink); font-weight: 700; margin-bottom: 6px; }
.add-on .ao-emoji { font-size: 1.25em; margin-right: 4px; vertical-align: -0.1em; }
.add-on p a { display: inline; margin: 0; }
/* The cart's cross-sell row (owner, 2026-11-17): one quiet line under the pieces, a link. */
.cart-xs { margin: 10px 0 0; font-size: 15px; line-height: 1.45; }
.cart-xs a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.add-on a { display: inline-block; margin-top: 6px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cl-was { color: var(--faint); font-weight: 400; margin-right: 2px; }
