/* =====================================================================
   Squigglestick — front-end styles
   A calm, warm off-white page with white cards and navy type; the
   children's drawings and the stickers bring the colour. The page is
   off-white rather than pure white so a sticker's white die-cut border
   still shows against it.
   ===================================================================== */

:root {
  /* colour */
  --bg: #FBF8F3;            /* warm off-white page */
  --bg-tint: #F4EFE6;       /* wells, toolbars, quiet fills */
  --surface: #FFFFFF;       /* cards */
  --line: #ECE6DA;          /* hairlines */
  --line-strong: #DCD3C3;
  --ink: #1D2B45;           /* felt-tip navy: text and main buttons */
  --ink-hover: #2B3D60;
  --ink-soft: #56617A;
  --ink-faint: #8790A3;
  --sun: #FFC53D;
  --sky: #86C8F2;
  --pink: #F7B6CF;
  --leaf: #8FCB8B;
  --pop: #E23B2E;           /* pillar-box red */
  --note: #FFF1B8;          /* sticky note */
  --focus: #2F7FD1;

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* shape */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(29, 43, 69, .06), 0 2px 8px rgba(29, 43, 69, .05);
  --shadow-md: 0 2px 4px rgba(29, 43, 69, .05), 0 12px 28px -10px rgba(29, 43, 69, .2);
  --shadow-lg: 0 4px 10px rgba(29, 43, 69, .05), 0 28px 56px -20px rgba(29, 43, 69, .28);
  --space: clamp(18px, 5vw, 40px);

  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--ink);
  font: 500 1.0625rem/1.55 var(--font-text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
p { margin: 0; }
h2, h3 { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- headings ---------------------------------------------- */
.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(2rem, 6.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}
.title:focus { outline: none; }
.title.display { font-size: clamp(2.6rem, 9.5vw, 4.25rem); line-height: 1.02; letter-spacing: -.025em; }

/* a crayon underline behind one word */
.mark { position: relative; isolation: isolate; white-space: nowrap; }
.mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.06em; right: -.08em; bottom: .02em;
  height: .36em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath d='M4 15C42 6 98 5 196 10' stroke='%23FFC53D' stroke-width='12' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* ---------- page frame --------------------------------------------- */
.topbar {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--space) 8px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 12px;
}
.logo-img { display: block; height: 40px; width: auto; transition: transform .2s ease; }
@media (hover: hover) { .logo:hover .logo-img { transform: rotate(-3deg) scale(1.04); } }
@media (max-width: 480px) { .logo-img { height: 34px; } }

main {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px var(--space) 56px;
}

.site-foot {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px var(--space) calc(env(safe-area-inset-bottom, 0px) + 26px);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: .875rem;
  font-weight: 600;
}

.screen { animation: screen-in .24s ease-out both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ------------------------------------------------- */
.btn {
  appearance: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 52px;
  padding: .7em 1.45em;
  font: 800 1.0625rem/1.15 var(--font-text);
  color: var(--ink);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  text-decoration: none;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px var(--ink-faint), var(--shadow-sm); }
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 10px 20px -10px rgba(29, 43, 69, .7);
}
@media (hover: hover) {
  .btn-primary:hover { background: var(--ink-hover); box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 14px 24px -10px rgba(29, 43, 69, .75); }
}

.btn-quiet { background: transparent; box-shadow: none; color: var(--ink-soft); min-height: 48px; padding: .6em 1.1em; font-weight: 700; }
@media (hover: hover) {
  .btn-quiet:hover { background: var(--bg-tint); color: var(--ink); box-shadow: none; transform: none; }
}

.btn[aria-disabled="true"] { cursor: not-allowed; opacity: .5; transform: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn[aria-busy="true"] { cursor: progress; }

/* the two big choices on the home page */
.btn-big {
  width: 100%;
  min-height: 84px;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 22px 12px 12px;
  gap: 16px;
  border-radius: 22px;
}
.btn-icon {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  border-radius: 17px;
  background: var(--sun);
  color: var(--ink);
}
.btn-secondary .btn-icon { background: #E3F1FB; }
.btn-icon .icon { width: 28px; height: 28px; stroke-width: 2; }
.btn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btn-title { font-size: 1.25rem; font-weight: 800; }
.btn-sub { font-size: .9375rem; font-weight: 600; color: var(--ink-soft); }
.btn-primary .btn-sub { color: rgba(255, 255, 255, .72); }
.btn-chev { margin-left: auto; width: 22px; height: 22px; opacity: .55; transition: transform .16s ease, opacity .16s ease; }
@media (hover: hover) { .btn-big:hover .btn-chev { transform: translateX(3px); opacity: .9; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row-centre { justify-content: center; }

.back {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px 8px 6px; margin: 0 0 10px -6px;
  color: var(--ink-soft); font-weight: 700; border-radius: 999px;
  min-height: 44px;
  transition: background-color .15s ease, color .15s ease;
}
.back:hover { color: var(--ink); background: var(--bg-tint); }

.link-btn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- touch vs mouse copy ---------------------------------- */
.only-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .only-touch { display: none; }
  .only-mouse { display: block; }
  .btn-library { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 10px 20px -10px rgba(29, 43, 69, .7); }
  .btn-library:hover { background: var(--ink-hover); }
}

/* ---------- cards ------------------------------------------------- */
.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  padding: clamp(18px, 3vw, 26px);
}

/* ---------- home ------------------------------------------------- */
.hero { display: grid; gap: 40px; padding: 18px 0 8px; }
.hero-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .9375rem; font-weight: 700; color: var(--ink-soft);
}
.eyebrow-dots { display: inline-flex; }
.eyebrow-dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.eyebrow-dots i + i { margin-left: -3px; }
.eyebrow-dots i:nth-child(1) { background: var(--sun); }
.eyebrow-dots i:nth-child(2) { background: var(--pink); }
.eyebrow-dots i:nth-child(3) { background: var(--sky); }

.lede { max-width: 34ch; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-soft); }
.home-actions { display: grid; gap: 14px; width: 100%; max-width: 470px; margin-top: 4px; }

.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9375rem; font-weight: 700; color: var(--ink-soft); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { width: 18px; height: 18px; stroke-width: 3; color: #3E9A55; }

.home-demo { position: relative; margin: 0; justify-self: center; width: min(100%, 470px); }
.demo-card {
  padding: 9%;
  border-radius: 34px;
  background-color: #EAF4FB;
  background-image: radial-gradient(rgba(29, 43, 69, .1) 1.3px, transparent 1.6px);
  background-size: 20px 20px;
  box-shadow: inset 0 0 0 1px rgba(29, 43, 69, .05);
}
.home-demo figcaption { margin-top: 16px; text-align: center; font-size: .9375rem; font-weight: 600; color: var(--ink-soft); }

/* two finished stickers resting on the corners of the demo */
.float-sticker {
  position: absolute;
  width: 27%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(29, 43, 69, .18));
}
.float-a { top: -5%; right: -4%; transform: rotate(9deg); animation: bob 6s ease-in-out infinite; }
.float-b { bottom: 7%; left: -5%; transform: rotate(-10deg); animation: bob 7s ease-in-out -2s infinite; }
@keyframes bob { 50% { translate: 0 -6px; } }

/* the demos take turns: a quick fade while the pictures swap */
.demo-card, .float-sticker, .home-demo figcaption { transition: opacity .26s ease; }
.home-demo.is-swapping .demo-card,
.home-demo.is-swapping .float-sticker,
.home-demo.is-swapping figcaption { opacity: 0; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    column-gap: 64px;
    min-height: min(660px, calc(100dvh - 120px));
  }
  .lede { font-size: 1.25rem; }
}

/* sections under the hero */
.section { padding-top: clamp(48px, 8vw, 80px); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; max-width: 62ch; }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(1.65rem, 4.6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.015em;
}
.section-sub { color: var(--ink-soft); }

/* one drawing in every style (built from /api/options) */
.gallery {
  list-style: none;
  margin: 0 calc(var(--space) * -1);
  padding: 6px var(--space) 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--space);
  scrollbar-width: thin;
}
.gallery-item {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 10px 16px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.gallery-thumb { margin-bottom: 8px; border-radius: 18px; }
.gallery-thumb img { width: 86%; height: 86%; }
.gallery-name { padding: 0 6px; font-weight: 800; font-size: 1.0625rem; }
.gallery-hint { padding: 0 6px; font-size: .875rem; line-height: 1.35; color: var(--ink-soft); }
@media (hover: hover) {
  .gallery-item .gallery-thumb img { transition: transform .25s ease; }
  .gallery-item:hover .gallery-thumb img { transform: rotate(-4deg) scale(1.05); }
}

/* how it works */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-step {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 24px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.how-step p { color: var(--ink-soft); }
.how-num {
  width: 42px; height: 42px; margin-bottom: 8px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--c, var(--sun));
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  transform: rotate(-6deg);
}
.how-step:nth-child(2) .how-num { transform: rotate(5deg); }
.how-title { font-size: 1.1875rem; font-weight: 800; }

/* ---------- style pictures (picker and gallery) ------------------------ */
.style-thumb, .gallery-thumb {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--tint, #FFF4D6);
  overflow: hidden;
}
.style-thumb img, .gallery-thumb img { object-fit: contain; }
.no-img { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: rgba(29, 43, 69, .45); }

/* ---------- peel stage (used by the home demo and the reveal) ------- */
.peel-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; contain: layout; } /* flap overflow is paint-only, never adds scroll */
.peel-back, .peel-front-wrap, .peel-flap-wrap, .peel-front { position: absolute; inset: 0; }
.peel-back img, .peel-front img { width: 100%; height: 100%; object-fit: contain; }
.peel-front-wrap { filter: drop-shadow(0 10px 16px rgba(29, 43, 69, .22)); }
.peel-front { background: #FFFEFB; border-radius: 8px; overflow: hidden; }
.peel-flap-wrap { pointer-events: none; filter: drop-shadow(-3px 6px 6px rgba(29, 43, 69, .2)); }
.peel-flap { inset: -100%; position: absolute; clip-path: polygon(0 0, 0 0, 0 0); background: #EEE9DF; }

/* ---------- screen heads and two-column layout -------------------- */
.screen-head { margin-bottom: 26px; }
.screen-head .hint { margin-top: 10px; max-width: 48ch; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; } /* minmax: the style row scrolls instead of widening the page */
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 40px; align-items: start; }
  .controls { position: sticky; top: 20px; }
}

.controls { display: flex; flex-direction: column; gap: 20px; }
.btn-make { width: 100%; min-height: 60px; font-size: 1.1875rem; }

/* ---------- photo drop zone ------------------------------------- */
.dropzone {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 14px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.is-over { border-color: var(--ink); background: #EAF4FB; }
.dropzone img { width: 100%; height: 100%; object-fit: contain; }
.dropzone-empty { display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--ink-soft); font-weight: 700; }
.dropzone-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: #FFF4D6; color: var(--ink); transform: rotate(-4deg); }
.dropzone-icon .icon { width: 34px; height: 34px; stroke-width: 1.8; }
.dropzone-nopreview, .dropzone-busy { max-width: 30ch; text-align: center; font-weight: 700; color: var(--ink-soft); }
.dropzone-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .88); border-radius: var(--r-lg); }

/* ---------- option controls (built from /api/options) -------------- */
.options { display: flex; flex-direction: column; gap: 22px; }
.options:empty { display: none; }
.opt { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt legend, .opt-toggle-label { padding: 0; margin-bottom: 12px; font-weight: 800; font-size: 1.125rem; color: var(--ink); }
.opt-hint { margin-top: 8px; font-size: .9375rem; color: var(--ink-soft); }
.options-note { font-size: .9375rem; color: var(--ink-soft); }

/* style picker: a grid of pictures, three across, that grows downwards as styles are added */
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.style-tile { position: relative; cursor: pointer; }
.style-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 6px 10px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .16s ease, box-shadow .16s ease;
}
.style-thumb { border-radius: 15px; }
.style-thumb img { width: 90%; height: 90%; transition: transform .2s ease; }
.style-name { font-weight: 800; font-size: clamp(.8125rem, 3.4vw, .9375rem); line-height: 1.2; text-align: center; hyphens: auto; }
.style-tick {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  box-shadow: 0 0 0 2.5px #fff;
  opacity: 0; transform: scale(.5);
  transition: opacity .15s ease, transform .15s ease;
}
.style-tick .icon { width: 16px; height: 16px; stroke-width: 3.2; }
.style-tile input:checked + .style-card { box-shadow: inset 0 0 0 2.5px var(--ink), var(--shadow-md); }
.style-tile input:checked + .style-card .style-tick { opacity: 1; transform: none; }
.style-tile input:checked + .style-card .style-thumb img { transform: rotate(-4deg) scale(1.05); }
.style-tile input:focus-visible + .style-card { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) {
  .style-tile:hover .style-card { transform: translateY(-2px); }
}

.style-desc { margin-top: 10px; font-size: .9375rem; line-height: 1.4; color: var(--ink-soft); min-height: 1.4em; }
.style-desc b { color: var(--ink); font-weight: 800; }

/* any other choice option: a simple list of cards */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px 12px 12px;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .16s ease;
}
.choice-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--dot, var(--sun)); }
.choice-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.choice-label { font-weight: 800; }
.choice-hint { font-size: .9375rem; line-height: 1.3; color: var(--ink-soft); }
.choice-tick {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  opacity: 0; transform: scale(.6);
  transition: opacity .15s ease, transform .15s ease;
}
.choice-tick .icon { width: 16px; height: 16px; stroke-width: 3; }
.choice input:checked + .choice-card { box-shadow: inset 0 0 0 2.5px var(--ink); }
.choice input:checked + .choice-card .choice-tick { opacity: 1; transform: none; }
.choice input:focus-visible + .choice-card { outline: 3px solid var(--focus); outline-offset: 3px; }

.steps { display: flex; gap: 4px; padding: 5px; background: var(--bg-tint); border-radius: 999px; }
.step { flex: 1; position: relative; cursor: pointer; }
.step input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.step span {
  display: block; text-align: center; padding: 10px 6px; min-height: 44px;
  border-radius: 999px; font-weight: 700; color: var(--ink-soft); font-size: 1rem; line-height: 1.5;
}
.step input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.step input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.opt-toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.opt-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  flex: none; width: 54px; height: 32px; border-radius: 999px; position: relative;
  background: var(--line-strong);
  transition: background .15s ease;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s ease;
}
.opt-toggle input:checked + .switch { background: var(--ink); }
.opt-toggle input:checked + .switch::after { transform: translateX(22px); }
.opt-toggle input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 3px; }
.opt-toggle-text { display: flex; flex-direction: column; }
.opt-toggle-text .opt-toggle-label { margin: 0; }

/* ---------- inline messages ------------------------------------ */
.inline-error {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: #FFE7E3;
  color: #7A1D14;
  font-weight: 700;
}

/* ---------- drawing tool --------------------------------------- */
.canvas-wrap {
  position: relative;
  margin-bottom: 16px;
  line-height: 0;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}
#draw-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.toolbar {
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.toolbar fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sizes { display: flex; gap: 6px; }
.tool-actions { display: flex; gap: 8px; }

.swatch, .size { position: relative; cursor: pointer; }
.swatch input, .size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-blob {
  display: block; width: 42px; height: 42px; border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14);
  transition: transform .12s ease, box-shadow .12s ease;
}
.swatch-rubber .swatch-blob {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--pink) 58%, #7FB7E6 58%);
  transform: rotate(-12deg);
}
.swatch input:checked + .swatch-blob {
  transform: scale(1.08);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 0 0 3px #fff, 0 0 0 5.5px var(--ink);
}
.swatch-rubber input:checked + .swatch-blob { transform: rotate(-12deg) scale(1.08); }
.swatch input:focus-visible + .swatch-blob, .size input:focus-visible + .size-dot { outline: 3px solid var(--focus); outline-offset: 7px; }

.size-dot {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--bg-tint);
}
.size-dot::after {
  content: ""; width: var(--d); height: var(--d); border-radius: 50%;
  background: var(--pen, var(--ink)); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-strong);
}
.size input:checked + .size-dot { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }

.tool-btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 46px; padding: 0 14px; border-radius: 14px;
  background: var(--bg-tint); color: var(--ink); font-weight: 700;
}
.tool-btn:hover:not(:disabled) { background: #EAE3D7; }
.tool-btn:disabled { opacity: .45; cursor: default; }
.tool-btn[aria-expanded="true"] { background: var(--ink); color: #fff; }
.tool-btn[aria-expanded="true"]:hover { background: var(--ink-hover); }

/* adding words and shapes */
.toolbar-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar-add .tool-btn { justify-content: center; }
.tool-panel { padding: 10px; background: var(--bg); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }

.shape-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shape-btn {
  appearance: none; border: 0; cursor: pointer;
  display: grid; place-items: center;
  padding: 8px 4px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .15s ease, box-shadow .15s ease;
}
.shape-mini { width: 52px; height: 52px; }
@media (hover: hover) {
  .shape-btn:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ink-faint), var(--shadow-sm); }
}

.text-entry { display: flex; gap: 8px; }
.text-entry input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  font: 700 1.0625rem var(--font-text);
}
.text-entry input::placeholder { color: var(--ink-faint); font-weight: 600; }
.text-entry input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(47, 127, 209, .22); }
.btn-add { min-height: 48px; padding: .6em 1.3em; }

/* the dashed frame around the newest word or shape: drag to move, corner dot to resize */
.stamp-box {
  position: absolute;
  border: 2px dashed var(--focus);
  border-radius: 14px;
  cursor: move;
  touch-action: none;
}
.stamp-box:focus { outline: none; }
.stamp-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.stamp-delete {
  position: absolute; top: -17px; right: -17px;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-sm);
  cursor: pointer;
}
.stamp-delete .icon { width: 16px; height: 16px; stroke-width: 2.8; }
.stamp-resize {
  position: absolute; right: -12px; bottom: -12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--focus);
  box-shadow: 0 0 0 3px #fff, var(--shadow-sm);
  cursor: nwse-resize;
}
.stamp-delete::after, .stamp-resize::after { content: ""; position: absolute; inset: -10px; } /* bigger finger target */
.stamp-hint { margin: -4px 0 14px; text-align: center; font-size: .9375rem; color: var(--ink-soft); }

/* ---------- making (waiting) ----------------------------------- */
.making { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6px; }
.making > .title { margin-bottom: 26px; }
.cutting { position: relative; width: min(76vw, 340px); aspect-ratio: 1 / 1; margin-bottom: 26px; }
.cutting-paper {
  position: absolute; inset: 9%;
  display: grid; place-items: center; padding: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transform: rotate(-1.5deg);
}
.cutting-paper img { width: 100%; height: 100%; object-fit: contain; }
.cut-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#cut-path { fill: none; stroke: var(--ink-faint); stroke-width: .6; stroke-dasharray: 2.4 1.8; stroke-linecap: round; }
.scissors circle { fill: none; stroke: var(--pop); stroke-width: 1.8; }
.scissors .scissors-handle { stroke: var(--pop); stroke-width: 1.8; stroke-linecap: round; }
.scissors .blade { fill: #E6EDF2; stroke: var(--ink); stroke-width: .5; stroke-linejoin: round; }
.scissors .pivot { fill: var(--ink); stroke: none; }

.making-msg {
  min-height: 2.9em;
  max-width: 24ch;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.3;
  transition: opacity .25s ease;
}
.making-msg.is-changing { opacity: 0; }
.stages { list-style: none; display: flex; justify-content: center; gap: 4px; padding: 0; margin: 12px 0 18px; }
.stages li {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 70px; font-size: .9375rem; font-weight: 600; color: var(--ink-faint);
}
.stages li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--line-strong);
}
.stages li.is-done { color: var(--ink-soft); }
.stages li.is-done::before { background: var(--leaf); }
.stages li[aria-current="step"] { color: var(--ink); font-weight: 800; }
.stages li[aria-current="step"]::before { background: var(--sun); box-shadow: 0 0 0 4px #FFF0C2; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.making-note { color: var(--ink-soft); margin-bottom: 22px; max-width: 34ch; }

.sticky-note {
  width: min(100%, 380px);
  margin: 0 0 26px;
  padding: 16px 18px 18px;
  text-align: left;
  background: var(--note);
  color: var(--ink);
  transform: rotate(1.2deg);
  box-shadow: 0 12px 20px -12px rgba(29, 43, 69, .4);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 93% 100%, 0 100%);
}
.sticky-note-title { font-weight: 800; margin-bottom: 4px; }
.sticky-note ul { margin: 0 0 8px; padding-left: 1.1em; }
.sticky-note li { margin-bottom: 4px; }

/* ---------- result --------------------------------------------- */
.result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; grid-template-areas: "head" "stage" "actions"; }
.result-head { grid-area: head; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.result-stage { grid-area: stage; }
.result-actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.result-meta {
  padding: 4px 12px;
  border-radius: 999px;
  background: #FFF4D6;
  font-size: .875rem; font-weight: 800; color: var(--ink);
}

@media (min-width: 900px) {
  .result {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-areas: "stage head" "stage actions";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .result-head { padding-top: 24px; }
}

.compare { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.compare img, .peel-stage img { -webkit-user-drag: none; user-select: none; }
.compare.is-comparing { cursor: ew-resize; }
.tray {
  border-radius: 30px;
  overflow: hidden;
  background-color: #EAF4FB;
  background-image: radial-gradient(rgba(29, 43, 69, .1) 1.3px, transparent 1.6px);
  background-size: 22px 22px;
  box-shadow: inset 0 0 0 1px rgba(29, 43, 69, .05);
}
.tray .peel-back { padding: 6%; }
.tray .peel-front { border-radius: 0; }
.tray .peel-front img { padding: 5%; }
.compare:has(.compare-range:focus-visible) .tray { outline: 3px solid var(--focus); outline-offset: 5px; }

.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 0; pointer-events: none;
}
.compare-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px;
  background: #fff; box-shadow: 0 0 6px rgba(29, 43, 69, .3);
}
.compare-knob {
  position: absolute; top: 50%; left: 0;
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  box-shadow: 0 0 0 4px #fff, var(--shadow-md);
}
.compare-hint { margin-top: 14px; text-align: center; color: var(--ink-soft); font-size: .9375rem; font-weight: 600; }

.restyle-panel { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.order-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.order-note { color: var(--ink-soft); font-size: .9375rem; }

/* ---------- oops ----------------------------------------------- */
.oops { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 24px; }
.oops-art { width: 120px; height: 120px; margin-bottom: 18px; transform: rotate(-6deg); filter: drop-shadow(0 10px 14px rgba(29, 43, 69, .22)); }
.oops-msg { margin: 16px 0 28px; max-width: 38ch; font-size: 1.1875rem; line-height: 1.45; color: var(--ink-soft); }

/* ---------- mock-mode badge ------------------------------------ */
.mock-badge {
  position: fixed; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 50;
  padding: 4px 10px; border-radius: 999px;
  background: var(--pop); color: #fff; font-weight: 800; font-size: .75rem;
  box-shadow: 0 0 0 3px #fff, var(--shadow-sm);
  pointer-events: none;
}

/* ---------- order page (order.html) ------------------------------ */
.order-loading { color: var(--ink-soft); font-weight: 700; padding: 24px 0; }
a.back { text-decoration: none; }

.mode-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .9375rem; font-weight: 800; line-height: 1.35;
}
.mode-sandbox { background: #E3F1FB; color: #17466B; }
.mode-live { background: #FFE7E3; color: #7A1D14; }

.order-placed { margin-top: 10px; color: var(--ink-soft); font-weight: 600; }
.order-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 22px; }
.order-sticker { margin: 0; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 9%; width: min(100%, 470px); justify-self: center; }
.order-sticker img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (min-width: 900px) {
  .order-split { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
  .order-sticker { position: sticky; top: 24px; }
}

.order-form, .order-status { display: flex; flex-direction: column; gap: 24px; }
.order-product { font-weight: 800; font-size: 1.125rem; }
.order-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.order-legend { padding: 0; margin-bottom: 4px; font-weight: 800; font-size: 1.1875rem; }
.order-hint { font-size: .9375rem; color: var(--ink-soft); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: .9375rem; }
.optional { font-weight: 600; color: var(--ink-faint); }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 1.0625rem;
}
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }

.order-cost { padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-tint); font-size: .9375rem; line-height: 1.45; }
.order-cost strong { font-weight: 800; }

.order-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.order-steps li { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-weight: 700; }
.order-step-dot {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong);
}
.order-step-dot .icon { width: 16px; height: 16px; stroke-width: 3; }
.order-steps li.is-done { color: var(--ink); }
.order-steps li.is-done .order-step-dot { background: var(--leaf); box-shadow: none; color: #fff; }
.order-steps li.is-now { color: var(--ink); font-weight: 800; }
.order-steps li.is-now .order-step-dot { background: var(--sun); box-shadow: none; }
.order-now { font-weight: 700; }

.order-problem {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: #FFE7E3;
  color: #7A1D14;
  font-weight: 700;
}
.order-problem a { color: inherit; }
.order-detail { font: 600 .875rem/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.order-tracking { display: flex; flex-wrap: wrap; gap: 10px; }

.order-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.order-facts dt { font-weight: 700; color: var(--ink-soft); }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
.order-shop { padding-top: 14px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-soft); overflow-wrap: anywhere; }

.order-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; max-width: 640px; }
.order-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
}
@media (hover: hover) { .order-row:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint), var(--shadow-sm); } }
.order-row img { width: 64px; height: 64px; flex: none; object-fit: contain; }
.order-row-text { display: flex; flex-direction: column; min-width: 0; }
.order-row-title { font-weight: 800; }
.order-row-meta { font-size: .9375rem; color: var(--ink-soft); }
.order-empty { margin-top: 18px; color: var(--ink-soft); }

/* every design in an order, with how many of each */
.order-stickers { grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 6%; align-content: center; }
.order-stickers:not(.is-single) { padding: 7%; }
.order-thumb { margin: 0; display: grid; justify-items: center; gap: 8px; }
.qty-badge { padding: 2px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: .875rem; }

/* ---------- basket (basket.html, and its link in the header) ------ */
.topbar-shop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.basket-link {
  display: inline-flex; align-items: center; gap: .45em;
  min-height: 44px;
  padding: .45em .55em .45em 1em;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink);
  font-weight: 800; font-size: .9375rem;
  text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .basket-link:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint), var(--shadow-sm); } }
.basket-count {
  min-width: 1.75em; height: 1.75em; padding: 0 .45em;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--sun);
  font-size: .8125rem;
}

.basket-intro { margin-top: 10px; max-width: 60ch; color: var(--ink-soft); }
.basket-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.basket-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.basket-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.basket-thumb { width: 96px; height: 96px; flex: none; padding: 6px; object-fit: contain; border-radius: 14px; background: #EAF4FB; }
.basket-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.basket-name { width: 100%; font-weight: 800; }
.basket-remove { min-height: 44px; color: var(--ink-soft); font-size: .9375rem; }
.basket-total { font-weight: 700; color: var(--ink-soft); }

/* how many of one sticker: - [n] + */
.qty { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg-tint); }
.qty-btn {
  appearance: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.qty-btn .icon { width: 18px; height: 18px; stroke-width: 2.6; }
.qty-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.qty-input {
  width: 3em; height: 40px;
  border: 0; background: transparent;
  text-align: center; font-weight: 800; font-size: 1.0625rem;
  -moz-appearance: textfield; appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-radius: 8px; }

/* =====================================================================
   Help, safety, privacy and terms pages, plus the "made with care" and
   questions sections on the home page.
   ===================================================================== */

/* topbar with a way back to making stickers (info pages) */
.topbar-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-cta { min-height: 44px; padding: .5em 1.15em; font-size: .9375rem; white-space: nowrap; }
.cta-short { display: none; }
@media (max-width: 440px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* footer */
.foot-links { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-bottom: 10px; }
.foot-links a { display: inline-block; padding: 6px 0; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* "made with care" cards on the home page */
.care { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .care { grid-template-columns: repeat(3, 1fr); } }
.care-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 24px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.care-item p { color: var(--ink-soft); }
.care-icon {
  width: 46px; height: 46px; margin-bottom: 8px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--c, var(--leaf));
}
.care-icon .icon { width: 24px; height: 24px; }
.care-title { font-size: 1.1875rem; font-weight: 800; }
.more-link { margin-top: 18px; }
.more-link a { font-weight: 800; color: var(--ink); text-underline-offset: 3px; }

/* a one-line notice under the photo and drawing controls, and in the basket */
.small-print { margin-top: 12px; font-size: .875rem; color: var(--ink-soft); }
.small-print a, .order-hint a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* questions and answers */
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  margin-right: 4px;
  border-right: 2.5px solid var(--ink-soft);
  border-bottom: 2.5px solid var(--ink-soft);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .faq summary:hover { background: var(--bg-tint); } }
.answer { display: grid; gap: 10px; padding: 2px 20px 18px; color: var(--ink-soft); }
.answer ul { margin: 0; padding-left: 1.2em; }
.answer a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* long-form pages */
.doc { max-width: 780px; padding-top: 18px; }
.doc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.doc .lede { max-width: 54ch; }
.doc h2 {
  margin: 48px 0 12px;
  scroll-margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(1.45rem, 3.8vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.doc h3 { margin: 24px 0 8px; font-size: 1.125rem; font-weight: 800; }
.doc p, .doc ul, .doc ol, .doc .table-list { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.doc strong { font-weight: 800; }
.doc .faq { margin-bottom: 8px; }
.part {
  margin: 56px 0 0;
  padding-top: 18px;
  border-top: 2px dashed var(--line-strong);
  font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint);
}
.part + h2 { margin-top: 10px; }

.summary { margin-bottom: 18px; }
.summary h2 { margin-top: 0; font-size: 1.25rem; }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.summary li { position: relative; margin: 0; padding-left: 30px; }
.summary li::before {
  content: "";
  position: absolute; left: 2px; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: #DDF1DC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E9A55' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 13px;
}

.kids-box {
  margin: 0 0 18px;
  padding: clamp(18px, 3vw, 24px);
  border-radius: var(--r-lg);
  background: #FFF4D6;
}
.kids-box h2 { margin: 0 0 8px; font-size: 1.25rem; }
.kids-box p { margin: 0; font-size: 1.125rem; }

.toc { margin-bottom: 8px; }
.toc p { margin: 0 0 10px; font-weight: 800; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2 16ch; column-gap: 28px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }

/* tables that turn into stacked cards on narrow screens */
.table-list { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table-list th, .table-list td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-list th { background: var(--bg-tint); font-weight: 800; }
.table-list td:first-child { font-weight: 700; }
@media (max-width: 640px) {
  .table-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-list, .table-list tbody, .table-list tr, .table-list td { display: block; width: 100%; }
  .table-list tr {
    margin-bottom: 10px; padding: 6px 0;
    background: var(--surface);
    border-radius: var(--r-sm);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .table-list td { padding: 6px 14px; border: 0; }
  .table-list td::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-faint);
  }
}

/* ---------- reduced motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .btn:hover, .style-tile:hover .style-card { transform: none; }
}
