/* WishLink: "Storybook". Warm cream paper, chunky ink outlines with offset
   shadows, rounded display type and a few bright accents (tomato, sunshine,
   teal, sky, pink). Shared by every page; the landing page adds its own
   illustrated sections at the end of this file. */
@font-face { font-family: "Fredoka Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/static/fonts/fredoka/fredoka-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/static/fonts/fredoka/fredoka-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Variable"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/static/fonts/nunito/nunito-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Variable"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/static/fonts/nunito/nunito-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Brand brights (same in light and dark) */
  --tomato: #ff6b4a; --sun: #ffc93c; --teal: #2bb3a3; --sky: #bfe6ff; --pink: #ffc6d3;
  /* Surfaces and type */
  --bg: #fff8ec;
  --surface: #fffdf8;
  --soft: #f7eedc;
  --text: #2d2240;
  --muted: #5e5470;
  --line: #e6d9c2;
  --edge: #2d2240;          /* outlines and offset shadows */
  --link: #b8381b;
  --btn: #d6411f;           /* tomato deep enough for white text */
  --btn-ink: #ffffff;
  /* Soft tints for chips, placeholders and callouts */
  --peach: #ffd9c9;
  --lilac: #e6dcff;
  --aqua: #cdeef5;
  --mint: #cdf0e4;
  --butter: #ffeaa8;
  --ok: #0f6b5f;
  --ok-soft: #cdf0e4;
  --ring: #2bb3a3;
  --warn: #7a4f08;
  --warn-soft: #ffeaa8;
  --danger: #b42318;
  --scrim: rgba(45, 34, 64, .5);
  --shadow: 4px 5px 0 var(--edge);
  --shadow-sm: 3px 4px 0 var(--edge);
  --radius: 24px;
  --font: "Nunito Variable", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Fredoka Variable", "Nunito Variable", ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1630; --surface: #2a2142; --soft: #352a52; --text: #fff4e4; --muted: #d4c8e6; --line: #4a3d6b;
    --edge: #0c0817; --link: #ffb39e; --btn: #ff7a5c; --btn-ink: #1d1630;
    --peach: #5a3328; --lilac: #3d3266; --aqua: #1d4752; --mint: #1d4a40; --butter: #4f4018;
    --ok: #8de8d6; --ok-soft: #1d4a40; --ring: #4fd1bf; --warn: #ffd37a; --warn-soft: #4f4018; --danger: #ff9b8a;
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 17px/1.55 var(--font); font-weight: 500; background: var(--bg); min-height: 100vh; }
a { color: var(--link); font-weight: 700; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0 0 .35em; text-wrap: balance; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.45rem; }
.h3, h3 { font-size: 1.18rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--sun); } }

/* Header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px max(16px, env(safe-area-inset-left, 0px)) 10px; max-width: 1100px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; font-size: 1.45rem; text-decoration: none; color: var(--text); }
.brand svg { transform: rotate(-8deg); flex: none; }
.top nav { display: flex; gap: 18px; align-items: center; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.top nav a, .top nav button.link { color: var(--text); text-decoration: none; }
.top nav a:hover, .top nav button.link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--tomato); text-underline-offset: 6px; }
main { max-width: 620px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; align-content: start; }
main.wide { max-width: 1100px; }
main > * { margin: 0; min-width: 0; }
.foot { text-align: center; color: var(--muted); font-size: .9rem; font-weight: 700; padding: 24px 16px 40px; border-top: 3px dashed var(--line); max-width: 1100px; margin: 0 auto; }

.hero { padding: 12px 0 4px; }
.hero.big { padding: 32px 0 12px; }
.hero.big h1 { font-size: clamp(2.2rem, 6.5vw, 3.3rem); line-height: 1.05; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.pre { white-space: pre-line; }

/* Kid header + counters (giver page) */
.kidhead { display: flex; align-items: center; gap: 14px; padding-top: 10px; }
.kidhead h1 { margin: 2px 0; }
.kidrow { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.kidrow h2 { margin: 0; }
.avatar { width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--head); font-size: 1.7rem; font-weight: 700; color: #2d2240; border: 3px solid var(--edge); box-shadow: var(--shadow-sm); }
.kidrow .avatar { width: 46px; height: 46px; font-size: 1.3rem; border-width: 2.5px; box-shadow: 2px 3px 0 var(--edge); }
.av0 { background: var(--sun); }
.av1 { background: var(--sky); }
.av2 { background: var(--pink); }
.av3 { background: var(--teal); }
.av4 { background: var(--tomato); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 2.5px solid var(--edge); border-radius: 20px; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--head); font-size: 2rem; line-height: 1.05; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: .9rem; color: var(--muted); font-weight: 700; }
.note { background: var(--butter); border: 2.5px solid var(--edge); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.note b { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }

/* Surfaces */
.card { background: var(--surface); border: 3px solid var(--edge); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: var(--soft); border-width: 2.5px; box-shadow: none; }
.card.narrow { max-width: 460px; width: 100%; margin: 28px auto; }
.card.callout { background: var(--butter); }
.card.mine { background: var(--mint); }
.banner { background: var(--warn-soft); color: var(--text); border: 2.5px solid var(--edge); border-radius: 18px; padding: 12px 16px; font-weight: 700; }
.flash { border: 2.5px solid var(--edge); border-radius: 16px; padding: 12px 16px; background: var(--ok-soft); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.flash.error { background: var(--peach); }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 28px 16px; border: 3px dashed var(--line); border-radius: var(--radius); }
.how { margin: 2px 4px; }

.cols { display: grid; gap: 22px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; } }
.cols > div, .cols > aside { display: grid; gap: 20px; align-content: start; min-width: 0; }
.grid3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid3 .card p { margin: 0; color: var(--muted); }
.two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: grid; gap: 14px; margin-top: 10px; }
form.inline { display: inline; }
hr { border: 0; border-top: 3px dashed var(--line); margin: 18px 0; }

/* Forms */
label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 6px; font-weight: 800; font-size: .95rem; }
label > input, label > textarea, label > select { flex: 1 1 100%; }
label .muted { font-weight: 600; }
input, textarea, select { font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--text); background: var(--surface); border: 2.5px solid var(--edge); border-radius: 14px; padding: 11px 14px; width: 100%; min-height: 50px; }
@media (prefers-color-scheme: dark) { input, textarea, select { border-color: var(--line); } }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--edge); box-shadow: 0 0 0 4px var(--sun); }
input[type=radio], input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--btn); flex: none; box-shadow: none; }
label.check { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; font-weight: 700; }
.checks { display: grid; gap: 10px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 800; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.types { display: flex; flex-wrap: wrap; gap: 8px; }
.typechip, .seg label { display: inline-flex; position: relative; }
.typechip input, .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.typechip span { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 2.5px solid var(--edge); font-weight: 700; font-size: .95rem; }
.typechip input:checked + span { background: var(--sun); color: #2d2240; box-shadow: 2px 3px 0 var(--edge); }
.typechip input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--edge); outline-offset: 2px; }
.segrow { display: flex; gap: 4px; background: var(--soft); border: 2.5px solid var(--edge); border-radius: 16px; padding: 4px; }
.seg label { flex: 1; }
.seg span { flex: 1; text-align: center; padding: 10px 6px; border-radius: 11px; font-weight: 800; color: var(--muted); }
.seg input:checked + span { background: var(--sun); color: #2d2240; }
.urlrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

/* Buttons: outlined, with an offset shadow that presses in */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 9px 18px; border-radius: 14px; border: 2.5px solid var(--edge); background: var(--surface); color: var(--text); font-family: var(--head); font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 3px 0 var(--edge); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--edge); }
.btn.primary { background: var(--btn); color: var(--btn-ink); }
.btn.big { width: 100%; min-height: 56px; font-size: 1.15rem; border-radius: 16px; box-shadow: var(--shadow); }
.btn.big:hover { box-shadow: 3px 4px 0 var(--edge); }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); transform: none; }
.btn.small { min-height: 38px; padding: 5px 14px; font-size: .95rem; border-radius: 12px; box-shadow: 2px 3px 0 var(--edge); }
.btn.block { display: flex; width: 100%; justify-content: space-between; }
.btn.danger, .danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
button.link { background: none; border: 0; color: var(--link); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary.btn:not(.big) { margin-bottom: 6px; }
details.menu[open] { flex-basis: 100%; }

/* Gift cards: one per row */
.items { display: grid; gap: 16px; }
.item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--surface); border: 3px solid var(--edge); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.item.dim { opacity: .65; box-shadow: none; border-style: dashed; }
.thumb { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; background: var(--soft); border: 2.5px solid var(--edge); }
.thumb.ph { display: grid; place-items: center; font-size: 2.6rem; }
.ph-item { background: var(--peach); } .ph-vague { background: var(--lilac); } .ph-experience { background: var(--aqua); }
.ph-membership { background: var(--butter); } .ph-activity { background: var(--mint); } .ph-fund { background: var(--pink); }
.ibody { display: grid; gap: 3px; min-width: 0; }
.ibody h3 { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.22; }
.ibody h3 a { color: var(--text); text-decoration-color: var(--line); text-decoration-thickness: 2px; }
.price { font-weight: 900; font-size: 1.05rem; }
.note-text, .ibody .note { color: var(--muted); background: none; box-shadow: none; padding: 0; border: 0; border-radius: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--text); border: 2px solid var(--edge); font-weight: 800; }
.tag.star { background: var(--sun); color: #2d2240; }
.tag.group { background: var(--teal); color: #fff; }
@media (prefers-color-scheme: dark) { .tag { border-color: var(--line); } .tag.group { color: #12302b; } }
.iactions { grid-column: 1 / -1; display: grid; gap: 10px; }
.iactions:empty { display: none; }
.chip { justify-self: start; font-size: .88rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: var(--soft); border: 2px solid var(--edge); }
.chip.ok { background: var(--mint); color: var(--ok); }
.chip.warn { background: var(--butter); color: var(--warn); }
.chip.done { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .chip { border-color: var(--line); } }
.progress { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.ring { flex: none; }
.ring-track { fill: none; stroke: var(--soft); stroke-width: 5; }
.ring-fill { fill: none; stroke: var(--ring); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .6s; }
@media (min-width: 560px) {
  .item { grid-template-columns: 112px minmax(0, 1fr); }
  .thumb { width: 112px; height: 112px; }
}

/* Claim form as a bottom sheet (pure CSS via <details>; JS adds Cancel/Escape) */
.claim > summary { width: 100%; }
/* A transform on the summary would trap its fixed-position scrim, so the press effect is off while open. */
.claim[open] > summary, .claim[open] > summary:hover, .claim[open] > summary:active { transform: none; }
.claim[open] > summary::before { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 40; cursor: default; animation: fade .2s ease-out; }
.sheet { background: var(--surface); color: var(--text); }
.claim[open] > .sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border: 3px solid var(--edge); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 12px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  animation: slideup .32s cubic-bezier(.2, .9, .25, 1.05);
}
.sheet .grab { width: 48px; height: 6px; border-radius: 9px; background: var(--edge); margin: 0 auto; }
@media (prefers-color-scheme: dark) { .sheet .grab { background: var(--line); } }
.sheet h2 { margin: 0; }
@keyframes slideup { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.just-claimed { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { 40% { transform: scale(1.02) rotate(-.5deg); } }

ul.plain { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.claims li { padding: 8px 12px; background: var(--soft); border-radius: 12px; }
.lists .listlink > .small { display: block; }
.lists .listlink { display: block; padding: 12px 14px; border-radius: 16px; background: var(--soft); border: 2.5px solid var(--edge); text-decoration: none; color: var(--text); font-weight: 600; transition: transform .08s, box-shadow .08s; }
.lists .listlink:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-sm); background: var(--surface); }
.lists .listlink.archived { opacity: .6; border-style: dashed; }
.hh { padding: 8px 0; border-bottom: 2px dashed var(--line); }
.hh:last-of-type { border-bottom: 0; }
.myclaim { display: grid; gap: 10px; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.myclaim:last-child { border-bottom: 0; }
.howto { margin-top: 6px; padding: 10px 12px; background: var(--mint); border-radius: 12px; }
.offlist summary { line-height: 1.4; }

.share { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; }
.qr { width: 116px; height: 116px; background: #fff; border: 2.5px solid var(--edge); border-radius: 14px; padding: 6px; }
.sharebody { display: grid; gap: 6px; min-width: 0; }
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.copyrow input { min-height: 38px; padding: 6px 10px; font-size: .85rem; }

.thank li { align-items: center; padding: 4px 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .btn:hover, .btn:active, .lists .listlink:hover { transform: none; } }
@media print {
  .top, .foot, .noprint, .thank form { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .item { box-shadow: none; break-inside: avoid; }
}

/* ---------- Landing page: "Storybook" ----------
   Chunky ink outlines, offset shadows and warm brights. The landing page keeps
   its own fixed light palette, since the illustrations are drawn for a light
   page. Fonts and the shared palette are defined at the top of the file. */

main.bare { max-width: none; padding: 0; display: block; }
body:has(main.bare) { background: #fff8ec; }
.sb {
  --sb-cream: #fff8ec; --sb-paper: #fffdf8; --sb-ink: #2d2240; --sb-muted: #5e5470;
  --sb-tomato: #ff6b4a; --sb-sun: #ffc93c; --sb-teal: #2bb3a3; --sb-sky: #bfe6ff; --sb-pink: #ffc6d3;
  --sb-head: "Fredoka Variable", "Nunito Variable", ui-rounded, system-ui, sans-serif;
  color-scheme: light; background: var(--sb-cream); color: var(--sb-ink);
  font-family: "Nunito Variable", ui-rounded, system-ui, sans-serif; font-size: 1.125rem; line-height: 1.55;
  overflow-x: clip;
}
.sb h1, .sb h2, .sb h3 { font-family: var(--sb-head); font-weight: 600; letter-spacing: -.01em; line-height: 1.08; margin: 0; color: var(--sb-ink); }
.sb p { margin: 0; }
.sb a { color: inherit; }
.sb :focus-visible { outline: 3px solid var(--sb-ink); outline-offset: 3px; border-radius: 8px; }
.sb-wrap { max-width: 1180px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

.sb-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 18px; border: 3px solid var(--sb-ink); background: #d6411f; color: #fff !important; font-family: var(--sb-head); font-weight: 600; font-size: 1.2rem; text-decoration: none; box-shadow: 4px 5px 0 var(--sb-ink); transition: transform .12s, box-shadow .12s; }
.sb-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 3px 0 var(--sb-ink); }
.sb-btn:active { transform: translate(4px, 5px); box-shadow: 0 0 0 var(--sb-ink); }
.sb-btn.ghost { background: var(--sb-paper); color: var(--sb-ink) !important; }
.sb-btn.sun { background: var(--sb-sun); color: var(--sb-ink) !important; }
.sb-btn.sm { min-height: 44px; padding: 0 18px; font-size: 1.05rem; border-radius: 14px; box-shadow: 3px 4px 0 var(--sb-ink); }

.sb-top { position: sticky; top: 0; z-index: 30; background: var(--sb-cream); border-bottom: 3px solid transparent; transition: border-color .2s, box-shadow .2s; }
.sb-top.stuck { border-bottom-color: var(--sb-ink); box-shadow: 0 4px 0 rgba(45, 34, 64, .08); }
.sb [id] { scroll-margin-top: 96px; }
.sb-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.sb-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sb-head); font-weight: 700; font-size: 1.65rem; }
.sb-logo svg { transform: rotate(-8deg); }
.sb-nav nav { display: flex; align-items: center; gap: 22px; font-weight: 700; white-space: nowrap; }
.sb-nav nav a:not(.sb-btn) { text-decoration: none; }
.sb-nav nav a:not(.sb-btn):hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--sb-tomato); text-underline-offset: 6px; }

.sb-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 40px; }
.sb-hero-copy { display: grid; gap: 22px; justify-items: start; }
.sb-sticker { display: inline-block; padding: 8px 16px; border: 2.5px solid var(--sb-ink); border-radius: 999px; background: var(--sb-sun); font-weight: 800; font-size: .95rem; transform: rotate(-2deg); box-shadow: 2px 3px 0 var(--sb-ink); }
.sb-hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.25rem); }
.sb-mark { position: relative; white-space: nowrap; }
.sb-squiggle { position: absolute; left: -4px; bottom: -.18em; width: calc(100% + 8px); height: .3em; }
.sb-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--sb-muted); max-width: 32em; }
.sb-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.sb-fine { font-weight: 700; color: var(--sb-muted); font-size: 1rem; }

.sb-scene { position: relative; }
.sb-scene-art { display: block; width: 100%; height: auto; }

.sb-wave { display: block; width: 100%; height: 60px; }
.sb-wave.w-sky { fill: var(--sb-sky); }
.sb-wave.w-tomato { fill: var(--sb-tomato); margin-top: -1px; }
.sb-wave.flip { transform: scaleY(-1); }
.sb-how { background: var(--sb-sky); padding: 48px 0 72px; margin: -1px 0; }
.sb-how h2, .sb-fam h2 { font-size: clamp(2.1rem, 4.6vw, 3rem); text-align: center; }
.sb-sub { text-align: center; color: var(--sb-muted); font-size: 1.2rem; margin: 12px auto 48px !important; max-width: 38em; }
.sb-how .sb-sub { color: #2f4a5c; }
.sb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sb-step { position: relative; padding: 26px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 26px; box-shadow: 5px 6px 0 var(--sb-ink); }
.sb-step:nth-child(1) { transform: rotate(-1.2deg); }
.sb-step:nth-child(3) { transform: rotate(1.2deg); }
.sb-step svg { display: block; margin: 14px auto 10px; }
.sb-step h3 { font-size: 1.55rem; margin-bottom: 8px; }
.sb-step p { color: var(--sb-muted); }
.sb-num { position: absolute; top: -22px; left: 22px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--sb-ink); display: grid; place-items: center; font-family: var(--sb-head); font-weight: 700; font-size: 1.35rem; }

.sb-fam { padding-top: 72px; padding-bottom: 40px; }

.sb .sun { background: var(--sb-sun); }
.sb .tomato { background: var(--sb-tomato); color: #fff; }
.sb .teal { background: var(--sb-teal); color: #fff; }
.sb .sky { background: var(--sb-sky); }
.sb .pink { background: var(--sb-pink); }
.sb .cream { background: var(--sb-cream); }

.sb-gran { padding-top: 56px; padding-bottom: 80px; }
.sb-gran-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: clamp(28px, 5vw, 48px); background: var(--sb-pink); border: 3px solid var(--sb-ink); border-radius: 36px; box-shadow: 7px 8px 0 var(--sb-ink); }
.sb-gran-card h2 { font-size: clamp(2rem, 4.2vw, 2.75rem); margin-bottom: 14px; }
.sb-gran-card p { font-size: 1.2rem; color: #5a3442; margin-bottom: 18px; }
.sb-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-weight: 800; }
.sb-ticks li { display: flex; align-items: center; gap: 10px; }
.sb-tick { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2.5px solid var(--sb-ink); background: var(--sb-teal); color: #fff; display: grid; place-items: center; }
.sb-phone { justify-self: center; width: min(290px, 100%); padding: 18px 16px 24px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 38px; box-shadow: 6px 7px 0 var(--sb-ink); }
.sb-phone-bar { width: 80px; height: 8px; margin: 0 auto 16px; border-radius: 9px; background: var(--sb-ink); }
.sb-bub { margin-bottom: 10px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #efe8f7; font-size: .95rem; font-weight: 600; }
.sb-bub.me { margin-left: 40px; border-radius: 18px 18px 6px 18px; background: var(--sb-teal); color: #fff; }
.sb-mini { margin-bottom: 10px; border: 2.5px solid var(--sb-ink); border-radius: 16px; overflow: hidden; }
.sb-mini-top { height: 70px; background: var(--sb-sun); display: grid; place-items: center; }
.sb-mini-bot { padding: 8px 12px; font-size: .9rem; font-weight: 800; }
.sb-mini-bot small { display: block; font-weight: 600; color: var(--sb-muted); }

.sb-cta { background: var(--sb-tomato); color: #fff; padding: 20px 0 88px; }
.sb-cta .sb-wrap { display: grid; justify-items: center; text-align: center; gap: 18px; }
.sb-cta h2 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 3.5rem); max-width: 14em; text-wrap: balance; }
.sb-cta p { font-size: 1.25rem; max-width: 32em; color: #fff1ea; }
.sb-cta .sb-small { font-size: 1rem; }
.sb-cta .sb-small a { font-weight: 800; color: #fff; }
.sb-foot { background: var(--sb-tomato); color: #fff; border-top: 3px dashed rgba(255, 255, 255, .45); padding: 22px 0 32px; font-weight: 700; }
.sb-foot .sb-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 900px) {
  .sb-hero, .sb-gran-card { grid-template-columns: 1fr; }
  .sb-steps,   .sb-steps { gap: 40px; }
  .sb-step:nth-child(n) { transform: none; }
  .sb-scene { max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .sb-nav nav a[href^="#"] { display: none; }
  .sb-nav { flex-wrap: nowrap; }
  .sb-nav nav { gap: 14px; }
  .sb-logo { font-size: 1.35rem; gap: 8px; }
  .sb-logo svg { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .sb-btn:hover, .sb-btn:active { transform: none; } }

/* Rotating hero headline. The first phrase is server-rendered; app.js cycles the rest. */
.sb-rotor { display: block; min-height: 3.3em; }
.sb-rotor-lead, .sb-mark { display: inline-block; transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.sb-mark { transition-delay: .06s; }
.sb-rotor.out .sb-rotor-lead, .sb-rotor.out .sb-mark { opacity: 0; transform: translateY(-.35em) rotate(-2deg); }
.sb-rotor.pre .sb-rotor-lead, .sb-rotor.pre .sb-mark { opacity: 0; transform: translateY(.45em) rotate(2deg); transition: none; }
.sb-mark { white-space: normal; }
.sb-squiggle path { stroke-dasharray: 320; stroke-dashoffset: 0; }
.sb-rotor.draw .sb-squiggle path { animation: sb-draw .7s .25s ease-out both; }
@keyframes sb-draw { from { stroke-dashoffset: 320; } }

/* Demo list card over the hero art */
.sb-scene { position: relative; }
.sb-demo { position: absolute; left: 7%; right: 9%; top: 24%; padding: 16px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 24px; box-shadow: 6px 7px 0 var(--sb-ink); transform: rotate(-2deg); display: grid; gap: 10px; }
.sb-demo-head { display: flex; align-items: center; gap: 10px; }
.sb-demo-head b { display: block; font-family: var(--sb-head); font-weight: 600; font-size: 1.15rem; line-height: 1.15; }
.sb-demo-head small, .sb-demo-row small { display: block; color: var(--sb-muted); font-size: .82rem; font-weight: 600; line-height: 1.3; }
.sb-av { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2.5px solid var(--sb-ink); display: grid; place-items: center; font-family: var(--sb-head); font-weight: 700; }
.sb-demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sb-demo-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 2.5px solid var(--sb-ink); border-radius: 16px; background: #fff; font-size: .95rem; line-height: 1.25; transition: background .25s; }
.sb-demo-row b { display: block; font-weight: 800; }
.sb-demo-row.is-taken { background: #f3ece0; border-style: dashed; }
.sb-demo-row.is-taken b { color: var(--sb-muted); }
.sb-demo-row.is-claimed { background: #d7f3ee; }
.sb-demo-thumb { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--sb-ink); display: grid; place-items: center; color: var(--sb-ink); }
.sb-demo-chip { padding: 3px 10px; border: 2px solid var(--sb-ink); border-radius: 999px; background: #e8dfd0; font-size: .8rem; font-weight: 800; }
.sb-demo-btn { position: relative; padding: 7px 12px; border: 2.5px solid var(--sb-ink); border-radius: 12px; background: #d6411f; color: #fff; font: 600 .92rem var(--sb-head); text-decoration: none; white-space: nowrap; box-shadow: 2px 3px 0 var(--sb-ink); cursor: pointer; transition: transform .1s, box-shadow .1s, background .2s; }
.sb-demo-btn:hover { transform: translate(1px, 1px); box-shadow: 1px 2px 0 var(--sb-ink); }
.sb-demo-btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--sb-ink); }
.sb-demo-btn[aria-pressed="true"] { background: var(--sb-teal); color: var(--sb-ink); }
.sb-demo-bar { display: block; height: 8px; margin-top: 5px; border: 2px solid var(--sb-ink); border-radius: 999px; background: #fff; overflow: hidden; }
.sb-demo-bar > span { display: block; width: 40%; height: 100%; background: var(--sb-teal); }
.sb-demo-toast { position: absolute; left: 50%; bottom: -22px; translate: -50% 0; padding: 8px 14px; border: 2.5px solid var(--sb-ink); border-radius: 14px; background: var(--sb-sun); font-weight: 800; font-size: .9rem; white-space: nowrap; box-shadow: 3px 4px 0 var(--sb-ink); opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.sb-demo-toast.show { opacity: 1; transform: none; }
.sb-demo-toast:empty { visibility: hidden; }
.sb .sb-demo-cap { display: none; margin: 10px 0 0; text-align: center; font-weight: 800; color: var(--sb-muted); font-size: .95rem; }
.js .sb .sb-demo-cap { display: block; }
.sb-confetti { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: 2px solid var(--sb-ink); border-radius: 3px; pointer-events: none; animation: sb-pop .8s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes sb-pop { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); opacity: 0; } }

/* "Who it's for" tabs. Without JS every panel shows, stacked. */
.sb-aud { display: grid; gap: 18px; }
.sb-tablist { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; }
.js .sb-tablist { display: flex; }
.sb-tab { min-height: 48px; padding: 0 20px; border: 3px solid var(--sb-ink); border-radius: 999px; background: var(--sb-paper); color: var(--sb-ink); font: 600 1.1rem var(--sb-head); cursor: pointer; transition: transform .1s, box-shadow .1s, background .2s; }
.sb-tab:hover { transform: translateY(-2px); }
.sb .sb-tab[aria-selected="false"] { background: var(--sb-paper); color: var(--sb-ink); }
.sb-tab[aria-selected="true"] { box-shadow: 3px 4px 0 var(--sb-ink); transform: translateY(-2px); }
.sb .sb-tab.tomato[aria-selected="true"], .sb .sb-tab.teal[aria-selected="true"] { color: var(--sb-ink); }
.sb-panel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(22px, 4vw, 40px); background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 30px; box-shadow: 6px 7px 0 var(--sb-ink); }
.sb-panel:focus-visible { outline-offset: 4px; }
.js .sb-panel { animation: sb-in .35s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes sb-in { from { opacity: 0; transform: translateY(10px); } }
.sb-panel-art { width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--sb-ink); display: grid; place-items: center; color: var(--sb-ink); box-shadow: 4px 5px 0 var(--sb-ink); }
.sb .sb-panel-art.teal { color: var(--sb-ink); }
.sb-panel-art svg { width: 64px; height: 64px; }
.sb-panel-for { display: inline-block; margin-bottom: 6px; font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-muted); }
.js .sb-panel-for { display: none; }
.sb-panel h3 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.sb-panel p { color: var(--sb-muted); font-size: 1.1rem; margin-bottom: 16px; max-width: 38em; }

/* Scroll-in. Only hidden once app.js has marked the page, so nothing is lost without JS. */
.js .sb [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity .5s ease var(--d, 0s), translate .6s cubic-bezier(.3, 1.2, .5, 1) var(--d, 0s); }
.js .sb [data-reveal].in { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .sb-panel { grid-template-columns: 1fr; gap: 18px; justify-items: start; }
  .sb-panel-art { width: 96px; height: 96px; }
  .sb-panel-art svg { width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  .sb .sb-demo-cap { margin-top: 34px; }
  .sb-demo { position: relative; left: auto; right: auto; top: auto; margin: -62% 4% 0; }
  .sb-demo-row { grid-template-columns: 32px minmax(0, 1fr); }
  .sb-demo-row > :last-child:not(div) { grid-column: 2; justify-self: start; }
  .sb-demo-thumb { width: 32px; height: 32px; }
  .sb-tab { padding: 0 14px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .js .sb [data-reveal] { opacity: 1; translate: none; transition: none; }
  .sb-confetti { display: none; }
}
