/* Bundled Open Font License fonts (self-hosted, offline-safe) */
@font-face { font-family: 'Karla'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/karla-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Karla'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/karla-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/spectral-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/spectral-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/spectral-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral SC'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/spectral-sc-latin-600-normal.woff2') format('woff2'); }

/* Display faces for the logo and headings, one per theme (see --logo/--head
   below). Both are single-weight, so the weight range is declared as 100-900:
   that tells the browser this one file covers every weight it might be asked
   for, which stops it from faking a bold by smearing the outlines. Headings
   here ask for 600, and a synthesised bold on a marker or pen face looks like
   a printing fault. */
@font-face {
  font-family: 'Lilian Marker'; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('/fonts/lilian-marker.woff2') format('woff2'), url('/fonts/lilian-marker.woff') format('woff');
}
@font-face {
  font-family: 'Roger Pen'; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('/fonts/roger-pen.woff2') format('woff2'), url('/fonts/roger-pen.woff') format('woff');
}
@font-face {
  font-family: 'Todd Slab'; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('/fonts/todd-slab.woff2') format('woff2'), url('/fonts/todd-slab.woff') format('woff');
}

:root {
  /* Each theme only sets --ink + --paper; the rest derive from them. */
  --ink: #301F1E;
  --paper: #FCFBF0;
  --paper-2: color-mix(in srgb, var(--ink) 7%, var(--paper));
  --ink-soft: color-mix(in srgb, var(--ink) 74%, var(--paper));
  --faint: color-mix(in srgb, var(--ink) 48%, var(--paper));
  --line: var(--ink);
  --hair: color-mix(in srgb, var(--ink) 20%, var(--paper));
  --err: #b23a26;
  --err-inverted: #b23a26;
  /* The "yes" green needs the same per-theme treatment --err already gets,
     for the same reason: one fixed green reads fine on near-white paper and
     all but vanishes elsewhere. Measured against Sweet's burnt orange, the
     old hardcoded #2f7a3d came out at 1.04:1 — invisible, not just dim. */
  --ok: #2F7A3D;
  --logo: 'Todd Slab', 'Spectral SC', Georgia, serif;
  --head: 'Todd Slab', 'Spectral', Georgia, 'Times New Roman', serif;
  /* Every font-size set in the display face is multiplied by this, so each
     theme can compensate for how large its face actually renders at a given
     rem. Todd Slab's caps measure 48% of the em against Spectral's 67%, so
     1.4 would be optical parity with the old Spectral sizes — 1.6 is a
     deliberate step past parity, because Todd Slab's hairline typewriter
     strokes read lighter than their cap height and Todd judged parity still
     too small on the live site. The hero takes a smaller boost: Todd Slab is
     also typewriter-wide per glyph, and scaling the headline the full amount
     wraps it to three lines and shoves the Get Started button out of the
     first step's viewport. Russet (and the :root default, which mirrors
     Russet) sets both. */
  --display-scale: 1.6;
  --hero-scale: 1.25;
  --body: 'Spectral', Georgia, 'Times New Roman', serif;
  /* Small captions/tips stay on the old sans body face — a serif at caption
     size reads cramped and fussy where Karla stays clean and out of the way. */
  --caption: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* --ink-inverted/--paper-inverted are the same pair swapped — used by the
   full-screen menu so it always reads as a deliberately distinct "cover"
   over the page, in every theme. --err/--err-inverted follow the same idea:
   a single fixed red (like the original #b23a26) reads fine against a near-
   white paper but is nearly invisible against Sweet's orange (1.1:1!) or
   Yukon's gold (3.4:1) — each needs its own error red tuned against its OWN
   paper, and a second one tuned against its INVERTED paper for the menu. */
/* A theme is a voice, not just a colour: Russet gets Todd Slab (the brand
   face), Sweet a marker, Yukon a pen. Only --logo and --head change — body
   copy stays Spectral and captions stay Karla in every theme, because a
   display face at paragraph size stops being readable. Russet's faces are
   also the :root defaults above, since Russet is the default theme. */
:root[data-theme="russet"] { --ink: #301F1E; --paper: #FCFBF0; --ink-inverted: #FCFBF0; --paper-inverted: #301F1E; --err: #B23A26; --err-inverted: #FF8A75; --ok: #2F7A3D;
  --logo: 'Todd Slab', 'Spectral SC', Georgia, serif;
  --head: 'Todd Slab', 'Spectral', Georgia, serif;
  --display-scale: 1.6;
  --hero-scale: 1.25; }
/* Sweet's original pairing (near-white ink #FBF8F7 on orange paper #E48948)
   was only 2.5:1 — well under WCAG AA's 4.5:1. Restored the light ink and
   darkened the orange instead (a burnt-orange/rust, not just a light tint
   down) to reach 5.2:1 — comfortably AA with real margin. */
:root[data-theme="sweet"]  { --ink: #FBF8F7; --paper: #A85018; --ink-inverted: #A85018; --paper-inverted: #FBF8F7; --err: #FFE6DA; --err-inverted: #B23A26; --ok: #DFF7DA;
  --logo: 'Lilian Marker', 'Spectral SC', Georgia, serif;
  --head: 'Lilian Marker', 'Spectral', Georgia, serif;
  --display-scale: 1;
  --hero-scale: 1; }
:root[data-theme="yukon"]  { --ink: #483C32; --paper: #E4C155; --ink-inverted: #E4C155; --paper-inverted: #483C32; --err: #7A1E14; --err-inverted: #FF8A75; --ok: #1C5426;
  --logo: 'Roger Pen', 'Spectral SC', Georgia, serif;
  --head: 'Roger Pen', 'Spectral', Georgia, serif;
  --display-scale: 1;
  --hero-scale: 1; }

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--ink) 16%, var(--paper)); }
::placeholder { color: var(--faint); opacity: 1; }

/* The whole app is pinned to exactly one screen — only a step's own content
   scrolls internally if it's tall, so the nav arrows never sit a page-scroll
   away. Theme, mailing list, feedback, and credits all live in the full-
   screen menu overlay instead of a footer, so there's nothing below this to
   scroll to either. */
.app-viewport { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.topbar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 40px; border-bottom: 1px solid var(--hair); }
.brand { font-family: var(--logo); font-size: calc(1.3rem * var(--display-scale)); font-weight: 600; letter-spacing: .02em; background: transparent; border: none; padding: 0; color: var(--ink); cursor: pointer; }

/* hamburger button: just the bars, no box. It sits ABOVE the overlay
   (z-index) and morphs into the close X in place when open, rather than a
   separate close button living somewhere else — so "close" is always
   exactly where "open" was. */
.menu-btn { position: relative; z-index: 101; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; cursor: pointer; background: transparent; border: none; padding: 0; color: var(--ink); }
.menu-btn.open { color: var(--ink-inverted); }
.menu-bars { position: relative; display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.menu-bars span { display: block; height: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
.menu-btn:hover .menu-bars span { opacity: .7; }
.menu-btn.open .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open .menu-bars span:nth-child(2) { opacity: 0; }
.menu-btn.open .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-btn.open:hover .menu-bars span { opacity: 1; }
.menu-btn.open:hover .menu-bars span:nth-child(2) { opacity: 0; }

/* full-screen menu overlay: theme, mailing list, feedback, credits. Reveals
   as a circle expanding from the hamburger button (its center is set as
   --menu-origin-x/y by app.js right before opening, so this stays anchored
   correctly at any viewport size) rather than just appearing. Colors are the
   current theme's ink/paper SWAPPED (--ink-inverted/--paper-inverted) — a
   light-on-dark (or dark-on-light) cover, deliberately distinct from the
   page it sits over. */
.menu-overlay {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  /* --ink/--paper alone isn't enough: --line, --faint, --hair etc. are each
     declared exactly once, at :root, as "var(--ink)"-style references — and
     custom-property INHERITANCE passes down the already-resolved value, not
     a live reference. So a descendant re-pointing --ink doesn't retroactively
     change what an ancestor's --line etc. resolved to; every derived token
     has to be redeclared here too, so it re-derives from the swapped pair. */
  --ink: var(--ink-inverted); --paper: var(--paper-inverted); --err: var(--err-inverted);
  --paper-2: color-mix(in srgb, var(--ink) 7%, var(--paper));
  --ink-soft: color-mix(in srgb, var(--ink) 74%, var(--paper));
  --faint: color-mix(in srgb, var(--ink) 48%, var(--paper));
  --line: var(--ink);
  --hair: color-mix(in srgb, var(--ink) 20%, var(--paper));
  background: var(--paper); color: var(--ink);
  --menu-origin-x: 100%; --menu-origin-y: 0px;
  clip-path: circle(0% at var(--menu-origin-x) var(--menu-origin-y));
  transition: clip-path .5s cubic-bezier(.22, .61, .36, 1);
  pointer-events: none;
}
.menu-overlay.open { clip-path: circle(150% at var(--menu-origin-x) var(--menu-origin-y)); pointer-events: auto; }
.menu-panel { position: relative; max-width: 760px; margin: 0 auto; padding: 70px 40px 48px; }
.menu-section { margin-bottom: 32px; }
.menu-section h3 { font-family: var(--head); font-size: calc(.82rem * var(--display-scale)); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 12px; }
.theme-options { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-options button { display: flex; align-items: center; gap: 9px; font-family: var(--body); font-size: .92rem; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 9px 14px; }
.theme-options button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.theme-options button[aria-current="true"] { background: var(--ink); color: var(--paper); }
.sw { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; flex: 0 0 auto; }

/* wizard: 3 steps in a horizontal track that slides left/right. .wizard fills
   whatever's left of the one-screen .app-viewport after the header and nav;
   each .step scrolls internally (overflow-y) if its own content runs tall,
   instead of growing the page and pushing the nav arrows out of view. */
.wizard { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.steps-track { display: flex; width: 300%; height: 100%; transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.step { width: calc(100% / 3); flex: 0 0 calc(100% / 3); min-width: 0; height: 100%; overflow-y: auto; }
.step-inner { max-width: 640px; margin: 0 auto; padding: 18px 40px; }
/* Step 3 (studio) is inputs-left/output-right instead of one long column —
   wider cap so two panels have room, sliders and controls next to the
   preview they affect instead of a page-scroll away from it. Deliberately
   more compact than the other steps (tighter padding below, smaller default
   preview size) so both columns fit one screen without scrolling. */
#step3 .step-inner { max-width: 1120px; padding-top: 14px; }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } }

.hero-title { font-family: var(--head); font-size: calc(1.9rem * var(--hero-scale)); font-weight: 600; line-height: 1.25; margin: 0 0 14px; }
/* Recolored via CSS mask (not an <img>) so it always matches the current
   theme's ink color, including on a live theme switch — a masked element's
   "color" is just its background-color, no SVG markup edits needed. Floated
   as the paragraph's own first child so that SAME paragraph's text wraps
   around it, capped at half the column's width per spec. */
.hero-figure {
  float: right; width: 50%; aspect-ratio: 1356.92 / 729.41; margin: 4px 0 10px 20px;
  background-color: var(--ink);
  -webkit-mask: url('/img/hand-doodle.svg') center / contain no-repeat;
  mask: url('/img/hand-doodle.svg') center / contain no-repeat;
}
.features { clear: right; margin: 0 0 8px; padding-left: 22px; color: var(--ink-soft); }
.features li { margin-bottom: 8px; }
/* 8px, not .btn.wide's 16 (which outranks a bare .step-cta and always has):
   at --display-scale 1.6 the step-1 content ran 5px past the step on a
   720px-tall window, clipping Get Started's bottom edge. The CTA's breathing
   room is the cheapest place to reclaim it — the hero already got trimmed to
   --hero-scale for the same reason. */
.btn.wide.step-cta { margin-top: 8px; }
.step-cta { margin-top: 8px; }

.wizard-nav { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--hair); }
.nav-arrow { font-family: var(--head); font-size: 1.3rem; line-height: 1; cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; padding: 0; color: var(--ink); }
.nav-arrow:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav-arrow:disabled { opacity: .25; cursor: not-allowed; }
.step-dots { display: flex; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hair); }
.dot.reachable { cursor: pointer; background: color-mix(in srgb, var(--ink) 35%, var(--paper)); }
.dot.active { background: var(--ink); }

h2 {
  font-family: var(--head); font-size: calc(.9rem * var(--display-scale)); font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink); margin: 20px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--hair);
}
/* Scoped to each "column" element's OWN first child — .step-inner for
   single-column steps, .studio-col for step 3's two panels — not just ANY
   wrapper's first child, or a heading like "Alternates" nested a div deeper
   would accidentally match :first-child on its own parent and lose its
   spacing (this bit us once already). */
.step-inner > h2:first-child,
.studio-col > h2:first-child { margin-top: 0; }
.lead { font-size: 1.02rem; color: var(--ink-soft); margin: 0 0 16px; }
.fine { font-family: var(--caption); font-size: .84rem; color: var(--faint); line-height: 1.55; }
.link { background: none; border: none; color: var(--ink); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }

/* "Captured" accordion: closed by default so 94 tiny letter chips don't push
   the rest of the studio down — it's just there for the curious or for
   symbol-font makers who need to check which image landed on which key. */
.accordion { margin: 20px 0 0; }
.accordion summary {
  cursor: pointer; list-style: none;
  font-family: var(--head); font-size: calc(.9rem * var(--display-scale)); font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink); padding-bottom: 7px; border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-family: var(--body); font-weight: 400; font-size: 1rem; }
.accordion[open] summary::after { content: '\2212'; }
.accordion[open] summary { margin-bottom: 10px; }
.accordion .fine, .accordion .crop-grid { margin-top: 0; }

/* fields */
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 460px) { .field-row { grid-template-columns: 1fr; } }

/* type=email is styled alongside type=text: an email field gets the @-key
   keyboard on phones, and it should not cost the field its styling to say so. */
input[type=text], input[type=email], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--ink); font-family: var(--body); font-size: 1rem;
}
input[type=text]:focus, input[type=email]:focus, select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }

/* buttons */
.btn { font-family: var(--body); font-size: 1rem; cursor: pointer; border-radius: 2px; padding: 12px 20px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-align: center; text-decoration: none; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.btn:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.btn.wide { display: block; width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* template guides: size / bounds illustrations (hand-drawn, theme-colored via mask) */
.guide-tip { margin: 0 0 14px; }
/* align-items: stretch (the default, stated here because it's load-bearing)
   makes both figures as tall as the taller one; each figure is then a column
   whose label row is pushed to the bottom by margin-top: auto. Without that,
   each label sat a fixed gap under its OWN illustration, and since the two
   drawings have different aspect ratios they end up different heights — so
   the four labels landed on two different lines. */
.guide-row { display: flex; align-items: stretch; gap: 48px; margin: 0 0 20px; max-width: 520px; }
.guide { flex: 1 1 0; margin: 0; display: flex; flex-direction: column; }
.guide-img {
  display: block; width: 100%;
  background-color: var(--ink);
  /* Soaks up the leftover height in the stretched figure, so the shorter
     drawing sits down against the labels instead of leaving a gap between
     the two — the boxes' bottom edges line up as well as the labels. */
  margin-top: auto;
}
/* Ratios must match each file's own viewBox, or `contain` letterboxes the
   art inside a box the wrong shape and the figure drifts off-centre. */
.guide-img-size { aspect-ratio: 1520.72 / 858.17; mask: url('/img/guide-size.svg') center / contain no-repeat; -webkit-mask: url('/img/guide-size.svg') center / contain no-repeat; }
.guide-img-bounds { aspect-ratio: 1511.9 / 716.34; mask: url('/img/guide-bounds.svg') center / contain no-repeat; -webkit-mask: url('/img/guide-bounds.svg') center / contain no-repeat; }
/* No margin-top: auto here — the image above already claimed the free space,
   so the labels sit a fixed gap under it and land on one line. */
.guide-labels { display: flex; margin-top: 6px; }
/* The two display faces, used here regardless of theme — the labels are
   shouting, and a marker and a pen shout better than a book serif does.
   Weight stays 400 because both faces are single-weight; asking for bold
   would only get a synthesised one. Sized up slightly since informal faces
   run small next to Spectral at the same pixel size. */
.guide-labels span { flex: 1; text-align: center; font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
/* Placeholder styling — real yes/no web fonts will replace these once supplied. */
.guide-yes { color: var(--ok); font-family: 'Lilian Marker', var(--head); }
.guide-no { color: var(--err); font-family: 'Roger Pen', var(--head); }
@media (max-width: 560px) { .guide-row { flex-direction: column; max-width: 260px; } }

/* drop zone */
.drop { border: 1px dashed var(--line); border-radius: 2px; padding: 30px; text-align: center; cursor: pointer; transition: background .15s; }
.drop:hover, .drop.drag { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.drop p { margin: 6px 0; }

.alt-slot { margin-top: 14px; }
.alt-slot .drop { padding: 18px; }
.alt-slot .btn { margin-top: 8px; }

/* sliders */
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; margin-top: 4px; }
@media (max-width: 520px) { .sliders { grid-template-columns: 1fr; } }
.ctl { display: block; margin: 10px 0; }
.ctl > span { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 8px; }
.ctl em { font-style: normal; color: var(--ink); font-size: .95rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; height: 22px; accent-color: var(--ink); }

/* status */
.status { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); font-style: italic; }
.status.err { color: var(--err); }

/* letters: small clickable chips — click one for a bigger look (.crop-modal) */
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; margin-top: 10px; }
.crop { border: 1px solid var(--hair); border-radius: 2px; padding: 4px 2px; text-align: center; background: transparent; cursor: pointer; transition: border-color .12s, background .12s; }
.crop:hover { border-color: var(--line); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.crop img { width: 100%; height: 26px; object-fit: contain; display: block; mix-blend-mode: multiply; pointer-events: none; }
.crop .cap { display: block; margin-top: 2px; padding-top: 2px; text-align: center; font-family: var(--body); font-weight: 600; font-size: .68rem; color: var(--ink-soft); border-top: 1px solid var(--hair); pointer-events: none; }

/* bigger look at one captured letter */
.crop-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.crop-modal[hidden] { display: none; }
.crop-modal-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 30px 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 88vw; }
.crop-modal-card img { max-width: 60vw; max-height: 46vh; object-fit: contain; mix-blend-mode: multiply; }
.crop-modal-cap { font-family: var(--head); font-size: calc(1.4rem * var(--display-scale)); font-weight: 600; color: var(--ink); }
.crop-modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.crop-modal-close:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* preview */
.preview-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.preview-tools input[type=text] { flex: 1 1 240px; }
.size { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.size em { font-style: normal; color: var(--ink); font-size: .95rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.size input { width: 130px; }
.preview-box { min-height: 90px; padding: 18px; border: 1px solid var(--line); border-radius: 2px; background: #ffffff; word-break: break-word; overflow-wrap: anywhere; }
#previewSample { font-family: var(--previewFamily, var(--body)); font-size: 30px; line-height: 1.3; color: #241a19; }
#missingNote { margin-top: 12px; }

/* share */
.optin { display: flex; gap: 11px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); line-height: 1.5; margin: 4px 0 0; cursor: pointer; }
.optin input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--ink); flex: 0 0 auto; }
#shareRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
#shareRow input[type=text] { flex: 1 1 220px; }
textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--ink); font-family: var(--body); font-size: 1rem; resize: vertical; margin-top: 8px; }
textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.made-row { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.made-row input[type=text], .made-row input[type=email] { flex: 1 1 240px; }
.btn.attach { display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap; font-size: .95rem; }
.made-actions { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* busy */
/* Analytics consent bar. Sits above the wizard nav (z-index 50, below the
   menu at 100) because it briefly covers the step arrows — it's answered
   once and then gone, and a banner the page can scroll away from is a banner
   that never gets answered. Buttons are equal weight rather than nudging
   toward "yes": a decline that's harder to find than an accept is the thing
   consent rules exist to prevent. */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 16px 22px;
  background: var(--paper); border-top: 1px solid var(--line);
}
/* Required, and not obvious: the browser hides [hidden] elements with a
   `display: none` rule from its own stylesheet, which a class selector like
   the one above outranks. Without this the bar's `hidden` property flips
   correctly in the DOM and the bar stays on screen regardless — which is
   exactly how it shipped, because the test asserted on the property instead
   of on what was actually rendered. */
.cookie-bar[hidden] { display: none; }
.cookie-copy {
  flex: 1 1 320px; margin: 0;
  font-family: var(--caption); font-size: .84rem; line-height: 1.55; color: var(--ink-soft);
}
.cookie-actions { flex: 0 0 auto; display: flex; gap: 10px; margin-left: auto; }
.cookie-actions .btn { padding: 9px 16px; font-size: .92rem; white-space: nowrap; }
@media (max-width: 560px) {
  .cookie-bar { gap: 12px; padding: 14px 16px; }
  .cookie-actions { margin-left: 0; width: 100%; }
  .cookie-actions .btn { flex: 1 1 0; }
}

.busy { position: fixed; inset: 0; background: color-mix(in srgb, var(--paper) 86%, transparent); display: flex; gap: 14px; align-items: center; justify-content: center; color: var(--ink); font-style: italic; z-index: 50; }
.busy[hidden] { display: none; }
.spinner { width: 24px; height: 24px; border: 2px solid rgba(0,0,0,.2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* menu panel: mailing list / feedback grid + byline + credits */
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 { font-family: var(--head); font-size: calc(.82rem * var(--display-scale)); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 8px; }
.inline-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#subscribeStatus { margin-top: 8px; }
.menu-panel .built { font-size: .98rem; color: var(--ink); margin: 24px 0 9px; padding-top: 24px; border-top: 1px solid var(--hair); }
.menu-panel .built a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.menu-panel .credits { font-family: var(--caption); font-size: .82rem; color: var(--faint); line-height: 1.75; margin: 0; max-width: 820px; }
.menu-panel .credits a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.menu-panel a:hover { color: var(--ink); }
