/* Revzy — "pencil case, grown up" (SPEC §0.5).
   One sticker (white die-cut edge, peeled bottom-right corner, tilted −3°) at reward moments: the wordmark, scores, the pass.
   Everything else sits straight and calm on paper or ink.
   Type: Bricolage Grotesque 800 for the wordmark, headings and big numbers; Onest for reading.
   Token names are shared with pricing/parents/terms/privacy and the parent-confirm function page, so those restyle too. */

:root {
  /* brand constants (same in every theme) */
  --brand-ink: #1E2A44; --brand-ink2: #2A3756; --brand-paper: #F4F4F1; --white: #FFFFFF; --peel: #E4E1D8;
  --butter: #F6D94E; --sage: #92D7B5; --pink: #EE97B8; --sky: #8FC6EE;
  --subject: var(--butter);   /* Revzy Business; later subjects swap this */

  /* light theme (default) */
  --paper: #F4F4F1;            /* page */
  --card: #FFFFFF;
  --field: #F4F4F1;            /* soft fill inside cards: letter tiles, case studies */
  --input: #FFFFFF;
  --ink: #1E2A44;              /* text */
  --line: #E2E1DA;             /* rules and borders */
  --track: #EEEDE7;            /* empty bar track */
  --muted: #59627A;
  --ok: #2C6B4F;               /* sage as text (sage itself is a fill colour) */
  --mark: #A8466F;             /* weak / wrong text */
  --amber: #7A5C00;            /* warning text */
  --green: var(--sage);        /* legacy alias: fills */
  --focus: #1E2A44;
  --inkcard: #1E2A44;          /* the dark "ink" cards (Today's 10, feedback, pass) */
  --inkcard2: #2A3756;

  --fh: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --fb: 'Onest', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --base: 17px;
  --r-btn: 14px; --r-card: 18px; --r-lg: 22px;
}
html[data-theme="dark"] {
  --paper: #1E2A44; --card: #2A3756; --field: #34426A; --input: #2A3756; --ink: #FFFFFF; --line: #3A4766; --track: #3A4766;
  --muted: #A9B3CC; --ok: #92D7B5; --mark: #F2AECA; --amber: #F6D94E; --focus: #F6D94E; --inkcard: #16203A; --inkcard2: #24304E;
}
html[data-theme="mono"] {
  --paper: #FFFFFF; --card: #FFFFFF; --field: #FFFFFF; --input: #FFFFFF; --ink: #000000; --line: #000000; --track: #DDDDDD;
  --muted: #222222; --ok: #0B5A2A; --mark: #9E1B4F; --amber: #5C4300; --focus: #000000; --inkcard: #000000; --inkcard2: #222222;
}
html[data-size="lg"] { --base: 19px; }
html[data-size="xl"] { --base: 22px; }
html[data-font="hyper"] { --fb: 'Atkinson Hyperlegible', 'Onest', sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--fb); font-size: var(--base); line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
.page { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }

h1, h2, h3 { font-family: var(--fh); font-weight: 800; line-height: 1.08; margin: 0 0 12px; letter-spacing: -0.03em; }
h1 { font-size: 2em; }
h2 { font-size: 1.45em; }
h3 { font-size: 1.12em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.86em; color: var(--muted); }
a { color: var(--ink); text-underline-offset: 2px; }

/* ---------- the sticker ---------- */
.sticker { position: relative; display: inline-block; transform: rotate(-3deg); filter: drop-shadow(0 .08em .12em rgba(30,42,68,.28)); line-height: 1; vertical-align: middle; }
.sticker > b {
  --cut: calc(.3em + 4px);
  display: inline-flex; align-items: baseline; gap: .04em;
  background: var(--s, var(--subject)); color: var(--brand-ink);
  border: clamp(3px, .065em, 8px) solid var(--white); border-radius: calc(.25em + 4px);
  padding: .08em .5em .16em .36em;
  font-family: var(--fh); font-weight: 800; letter-spacing: -0.05em; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.sticker::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: calc(.3em + 4px); height: calc(.3em + 4px);
  background: linear-gradient(315deg, transparent 50%, var(--peel) 50%); border-top-left-radius: .1em;
}
.sticker small { font-size: .4em; color: inherit; letter-spacing: -0.03em; }
.sticker.tilt4 { transform: rotate(-4deg); }
.sticker.sm { font-size: 22px; }
.sticker.md { font-size: 58px; }
.sticker.lg { font-size: 112px; }
.sticker.label { font-size: 22px; }
.sticker.label > b { letter-spacing: -0.03em; }

/* ---------- header and navigation ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); cursor: pointer; background: none; border: 0; padding: 4px 0; font: inherit; }
.brand .subject { font-weight: 700; font-size: 15px; color: var(--muted); letter-spacing: 0; }
.top-right { display: flex; align-items: center; gap: 8px; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 12px; border-radius: 12px; min-height: 44px; }
.nav a:hover { color: var(--ink); background: var(--card); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.nav svg { width: 20px; height: 20px; flex: none; }
.tabbar { display: none; }
@media (max-width: 800px) {
  .page.app { padding-bottom: 104px; }
  .top .nav { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(10px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; border-radius: 12px; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
  .tabbar svg { width: 24px; height: 24px; }
}

/* ---------- controls ---------- */
button, .btn {
  font: inherit; font-weight: 700; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--r-btn);
  padding: 11px 18px; min-height: 48px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
button:hover, .btn:hover { border-color: var(--ink); }
button:active, .btn:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--butter); color: var(--brand-ink); border-color: var(--butter); }
button.primary:hover, .btn.primary:hover { filter: brightness(.96); border-color: var(--butter); }
button.block, .btn.block { width: 100%; min-height: 54px; font-size: 1.02em; }
button.pill, .btn.pill { border-radius: 999px; padding: 6px 14px; min-height: 40px; font-size: 14px; }
button.quiet { border-color: transparent; background: none; padding: 6px 4px; min-height: 44px; color: var(--muted); font-weight: 600; }
button.quiet:hover { color: var(--ink); border-color: transparent; }
button.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.iconbtn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; border-width: 1px; }
.iconbtn svg { width: 20px; height: 20px; }

input[type="text"], input[type="email"], input[type="date"], input[type="number"], textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--input); color: var(--ink); min-height: 48px;
}
/* iPhone Safari draws date fields its own way: it ignores width/padding, centres the value and collapses an empty field
   to a sliver. Strip its styling so the date box matches the other fields. */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 1.4; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .7; cursor: pointer; }
input:focus, textarea:focus { border-color: var(--ink); outline: none; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
label { display: block; font-weight: 700; margin: 16px 0 6px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; margin: 0 0 14px; }
.card.tint { background: var(--card); border: 2px solid var(--subject); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.grid .card { margin: 0; }
.card.action { cursor: pointer; transition: transform .12s ease, border-color .15s ease; }
.card.action:hover { transform: translateY(-2px); border-color: var(--ink); }
.card.action h3 { margin-bottom: 6px; }
.card.action p { margin-bottom: 0; }
.card.locked h3 { color: var(--muted); }

/* ink cards: the dark surfaces. Tokens are redefined inside, so anything placed in them adapts. */
.ink {
  --card: var(--inkcard2); --field: var(--inkcard2); --input: var(--inkcard2); --ink: #FFFFFF; --line: #3A4766; --track: #3A4766;
  --muted: #B9C2D8; --ok: #92D7B5; --mark: #F2AECA; --amber: #F6D94E; --focus: #F6D94E;
  background: var(--inkcard); color: #FFFFFF; border: 0; border-radius: var(--r-lg); padding: 22px;
}
.ink p, .ink li { color: #D3D9E8; }
.ink a { color: #FFFFFF; }
.ink button:not(.primary), .ink .btn:not(.primary) { background: transparent; color: #FFFFFF; border: 2px solid #3A4766; }
.ink button:not(.primary):hover { border-color: #FFFFFF; }
.ink .card { border: 0; }

/* row cards (weak topic, mock) */
.rowcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.rowcard .tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--brand-ink); }
.rowcard .tile svg { width: 22px; height: 22px; }
.rowcard .txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rowcard .txt b { font-size: 15px; }
.rowcard .txt span { font-size: 13px; color: var(--muted); }
.rowcard .go { font-weight: 700; font-size: 14px; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }
.tile.butter { background: var(--butter); } .tile.sage { background: var(--sage); } .tile.pink { background: var(--pink); } .tile.sky { background: var(--sky); }

/* ---------- badges and text helpers ---------- */
.marks, .badge, .chip { display: inline-block; font-family: var(--fb); font-size: 12px; font-weight: 700; letter-spacing: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; vertical-align: middle; color: var(--muted); background: var(--card); line-height: 1.5; }
.marks { margin-left: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 6px 12px; }
.badge.paid { background: var(--butter); color: var(--brand-ink); border-color: var(--butter); }
.badge.free { color: var(--muted); }
.pillstat { font-weight: 700; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; white-space: nowrap; }
.red { color: var(--mark); }
.ok { color: var(--ok); }
.amber { color: var(--amber); }
.mono { font-variant-numeric: tabular-nums; }
.hl { background: color-mix(in srgb, var(--butter) 55%, transparent); color: var(--ink); padding: 0 6px; border-radius: 6px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.big { font-family: var(--fh); font-size: 2.2em; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- home ---------- */
.hello { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 2px 0 16px; }
.hello h1 { font-size: 2em; margin: 0; }
.today-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.today-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.today-card .head h2 { margin: 0; font-size: 1.45em; color: #FFFFFF; }
.today-card .count { font-size: 15px; color: #B9C2D8; font-variant-numeric: tabular-nums; }
.dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.dots i { height: 26px; border-radius: 6px; border: 2px solid #3A4766; }
.dots i.on { background: var(--butter); border-color: var(--butter); }
.today-card p { margin: 0; font-size: 14px; }
.meta-line { font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
.section-h { font-size: 1.1em; margin: 22px 0 10px; }

/* ---------- quiz ---------- */
.qtop { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.segs i { height: 8px; border-radius: 4px; background: var(--line); }
.segs i.on { background: var(--ink); }
.qtop .count { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.question { font-size: 1.55em; line-height: 1.18; letter-spacing: -0.02em; margin: 14px 0 18px; }
.options { display: grid; gap: 10px; margin: 16px 0; }
.option {
  text-align: left; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 10px 16px; min-height: 56px;
  font-weight: 500; font-size: 1em; border-radius: 16px; background: var(--card); border: 2px solid var(--line); color: var(--ink);
}
.option:hover:not(:disabled) { border-color: var(--ink); }
.option:disabled { opacity: 1; cursor: default; }
.option .letter { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--field); display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; }
.option .letter svg { width: 18px; height: 18px; }
.option .tag { margin-left: auto; font-size: 13px; font-weight: 700; white-space: nowrap; padding-left: 8px; }
.options.answered .option { color: var(--muted); }
.option.chosen { border-color: var(--ink); }
.option.chosen .letter { background: var(--ink); color: var(--paper); }
.options.answered .option.correct { background: var(--sage); border-color: var(--brand-ink); color: var(--brand-ink); font-weight: 700; }
.option.correct .letter { background: var(--brand-ink); color: var(--sage); }
.options.answered .option.wrong { border-color: var(--mark); color: var(--ink); font-weight: 700; }
.option.wrong .letter { background: var(--pink); color: var(--brand-ink); }
.option.wrong .tag { color: var(--mark); }
.feedback { margin: 4px 0 12px; }
.feedback h3 { color: #FFFFFF; font-size: 1.35em; margin: 0 0 6px; }
.feedback p { margin: 0; font-size: 15px; line-height: 1.5; }
.explain { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; margin: 0 0 12px; }

/* ---------- set done / scores ---------- */
.done { text-align: center; padding: 30px 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.done .eyebrow { color: #B9C2D8; text-align: left; }
.done h1 { color: #FFFFFF; font-size: 2.4em; letter-spacing: -0.04em; margin: 0; line-height: 1; }
.done .sticker { margin: 6px auto 0; }
.done .card { text-align: left; padding: 16px 18px; margin: 0; }
.done .card b { color: #FFFFFF; }
.done .actions { display: flex; flex-direction: column; gap: 10px; }
/* marked answers history (Marked tab) */
.past-section { margin: 18px 0 8px; }
.past-section h2 { margin: 0; }
.past-section .row.spread { margin-bottom: 10px; align-items: baseline; }
.past-list { display: grid; gap: 10px; margin-bottom: 14px; }
.card.past { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card.past .sticker { flex: none; }
.past-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.past-text b { line-height: 1.25; }
.past-text small { font-size: 12.5px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.casefold { padding: 14px 16px; }
details.casefold summary { cursor: pointer; font-weight: 700; min-height: 24px; list-style-position: outside; margin-left: 1.1em; }
.scoreline { display: flex; align-items: center; gap: 18px; margin: 4px 0 16px; }
.scoreline h2 { margin: 0 0 2px; font-size: 1.5em; }
.scoreline p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* marked answer feedback rows */
.fb-row { display: flex; gap: 12px; }
.fb-row + .fb-row { margin-top: 14px; }
.fb-row .tile { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--brand-ink); }
.fb-row .tile svg { width: 18px; height: 18px; }
.fb-row b { display: block; font-size: 15px; margin-bottom: 3px; }
.fb-row p, .fb-row li { font-size: 14px; line-height: 1.45; margin: 0; }
.fb-row ul { margin: 0; padding-left: 1.1em; }

/* ---------- progress ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat .big { font-size: 1.6em; }
.stat small { font-size: 12px; }
.stat.hot { background: var(--butter); border-color: var(--butter); color: var(--brand-ink); }
.stat.hot small { color: var(--brand-ink); font-weight: 600; }
.topics { padding: 6px 16px; }
.topic-row { padding: 11px 0; border-bottom: 1px solid var(--track); display: flex; flex-direction: column; gap: 7px; }
.topic-row:last-child { border-bottom: 0; }
.topic-row .lab { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.topic-row .lab span:first-child { font-weight: 600; }
.topic-row .score { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topic-row.weak .score { color: var(--mark); }
.topic-row .score a, .topic-row .score button { color: var(--mark); font: inherit; font-weight: 700; background: none; border: 0; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--track); position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0; right: auto; background: var(--sage); border-radius: 4px; transition: width .4s ease; }
.bar.weak > i, .weak .bar > i { background: var(--pink); }
.progress-row { display: grid; grid-template-columns: 4.6em 1fr 3.5em; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mate { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; }
.mate .txt { flex: 1 1 180px; }
.mate .txt b { display: block; color: #FFFFFF; }
.mate .txt span { font-size: 13px; color: #D3D9E8; }

/* ---------- pass ---------- */
.pass-hero { display: flex; flex-direction: column; gap: 16px; padding: 24px 22px 22px; }
.pass-hero .sticker { align-self: flex-start; }
.pass-price { display: flex; align-items: baseline; gap: 12px; }
.pass-price .big { font-size: 3.2em; color: #FFFFFF; letter-spacing: -0.04em; }
.pass-price s { font-size: 1.05em; color: #B9C2D8; }
.pass-hero p { margin: 0; font-size: 14px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { padding: 11px 6px; border-bottom: 1px solid var(--track); text-align: center; vertical-align: middle; }
table.compare th:first-child, table.compare td:first-child { text-align: left; padding-left: 0; }
table.compare thead th { color: var(--muted); font-weight: 700; }
table.compare tr:last-child td { border-bottom: 0; }
table.compare td.pass b { display: inline-block; background: color-mix(in srgb, var(--butter) 40%, var(--card)); border-radius: 8px; padding: 3px 8px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.center { text-align: center; }

/* ---------- notices, lists, forms ---------- */
.notice { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); margin: 0 0 14px; }
.notice::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--butter); margin-right: 8px; vertical-align: 1px; }
.notice.ok::before, .notice.tint::before { background: var(--sage); }
.banner { border-radius: var(--r-card); padding: 14px 16px; margin: 0 0 14px; background: var(--butter); color: var(--brand-ink); }
.banner button.primary { background: var(--brand-ink); color: #FFFFFF; border-color: var(--brand-ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: center; margin: 0; font-weight: 500; cursor: pointer; padding: 10px 12px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.checks input, .checkline input { width: 1.25em; height: 1.25em; accent-color: var(--brand-ink); flex: none; }
html[data-theme="dark"] .checks input, html[data-theme="dark"] .checkline input, .ink .checkline input { accent-color: var(--butter); }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 14px 0 10px; }
.checkline input { margin-top: .2em; }
.footer { margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85em; color: var(--muted); }
.footer a { color: var(--muted); }
.a11y { display: grid; gap: 12px; }
.swatch { width: 18px; height: 18px; border-radius: 999px; display: inline-block; border: 1px solid var(--line); vertical-align: middle; margin-right: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea { resize: vertical; line-height: 1.55; min-height: 12em; }
.card ul { margin: 6px 0 12px; padding-left: 1.2em; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share input { flex: 1 1 220px; }
.price { font-family: var(--fh); font-weight: 800; font-size: 2.2em; letter-spacing: -0.04em; line-height: 1.1; }
.price s { color: var(--muted); font-size: .5em; margin-left: 8px; font-weight: 500; font-family: var(--fb); letter-spacing: 0; }
canvas.card-preview { width: 100%; max-width: 360px; height: auto; border-radius: 16px; display: block; margin: 10px 0; }
.pre { white-space: pre-wrap; }
.card.item { background: var(--field); border-color: transparent; }
.card.guide p { margin-bottom: .6em; }
.card.term { padding: 14px 16px; margin-bottom: 10px; }
.card.flash { min-height: 9em; display: grid; align-content: center; text-align: center; cursor: pointer; }
.marks.ok { color: var(--ok); border-color: var(--sage); }
.back { margin: -4px 0 6px -4px; }

/* ---------- landing ---------- */
.hero { display: flex; flex-direction: column; gap: 18px; padding: 30px 24px 26px; margin-bottom: 14px; }
.hero .sticker.lg { font-size: clamp(52px, 16vw, 112px); align-self: flex-start; margin: 4px 0 6px 2px; }
.hero h1 { color: #FFFFFF; font-size: 2.1em; margin: 0; }
.hero p { margin: 0; font-size: 1.02em; }

/* ---------- break-even charts ---------- */
.be-figure { margin: 0; }
.be-chart { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.be-grid { stroke: var(--line); stroke-width: 1; }
.be-axis { stroke: var(--ink); stroke-width: 1.5; }
.be-tick { fill: var(--muted); font: 11px var(--fb); font-variant-numeric: tabular-nums; }
.be-label { fill: var(--muted); font: 12px var(--fb); }
.be-tr { stroke: #2C8A62; stroke-width: 3; }
.be-tc { stroke: #B4507C; stroke-width: 3; }
.be-fc { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 8 6; }
.be-mark { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 5; }
html[data-theme="dark"] .be-tr { stroke: var(--sage); } html[data-theme="dark"] .be-tc { stroke: var(--pink); }
.be-key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: .86em; color: var(--muted); }
.be-key i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.be-key .k-tr { border-color: #2C8A62; } .be-key .k-tc { border-color: #B4507C; } .be-key .k-fc { border-color: var(--ink); border-top-style: dashed; }
html[data-theme="dark"] .be-key .k-tr { border-color: var(--sage); } html[data-theme="dark"] .be-key .k-tc { border-color: var(--pink); }

@media (max-width: 560px) {
  h1, .hello h1 { font-size: 1.85em; }
  .question { font-size: 1.4em; }
  .be-tick { font-size: 18px; }
  .be-tick.be-odd { display: none; }
  .be-label { font-size: 19px; }
  .be-tr, .be-tc { stroke-width: 4.5; }
  .be-fc { stroke-width: 3.5; }
  .sticker.lg { font-size: 96px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
