/* Hallmark · shape: Bento Grid · genre: playful · theme: Sticker (deal 3/3, seed percentages-one-place-five-2c09·f1e6647f·2026-12-05·r1) · job: try · draw: manual
 * hero: the head beside the pink lead card, whose two bars swing from A to B as you type · nav: edge-aligned, the wordmark and two chips · footer: a dashed rule over the credit lines · imagery: none, the answers and the bars are the pictures · signature: five stuck-on cards in pink, white, lime and ink, each with a disc on its corner, working its sum out as you type · sticker: sheet
 * axes: light/display-heavy/chromatic-magenta · posture: full-palette · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, five calculators could read as a uniform grid; the lead card stands beside the head with the loudest figure, and the other four cross in widths and fills */
/* Hallmark · dismissed 23 · the calculators · the lime band under the cards is the theme's one lime field with ink type, under the declared full-palette posture */
/* Hallmark · waive 77 · every page · five calculators and one page on their sums, not a landing strip */
/* Hallmark · waive 44c · the formulas page · a reading page: its head stands over the first worked sum, which starts on the first screen */
:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.5625rem; --text-2xl: 1.953rem; --text-3xl: 2.441rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 3.75rem); --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.5rem); --text-title: clamp(1.25rem, 0.75vw + 0.875rem, 1.625rem); --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.375rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
  --color-paper: oklch(95.7% 0.013 82); --color-paper-2: oklch(92.8% 0.021 79); --color-paper-3: oklch(99.4% 0.007 89);
  --color-ink: oklch(21% 0.011 81); --color-ink-2: oklch(30% 0.013 78); --color-muted: oklch(50% 0.017 64);
  --color-rule: oklch(89.7% 0.02 80); --color-white: oklch(99.5% 0.003 82);
  --color-accent: oklch(56% 0.225 2); --color-accent-deep: oklch(49% 0.205 2); --color-accent-2: oklch(87.6% 0.179 119); --color-slot: oklch(95% 0.021 355);
  --color-accent-ink: oklch(99.5% 0.003 82); --color-focus: oklch(56% 0.225 2);
  --font-display: "Bowlby One SC", "Arial Black", sans-serif; --font-body: "Sofia Sans", ui-sans-serif, system-ui, sans-serif;
  --font-outlier: "Sofia Sans", ui-sans-serif, system-ui, sans-serif;
  --radius-card: 18px; --radius-pill: 999px; --rule-hair: 1px; --rule-bar: 2px;
  --shadow-card: 5px 6px 0 var(--color-ink); --shadow-press: 1px 1px 0 var(--color-ink);
  --tracking-display: 0.005em; --display-weight: 400;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: var(--color-accent-2); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 700); font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { max-width: 20ch; font-size: var(--text-display); } h2 { max-width: 30ch; font-size: var(--text-section); } h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.2; }
.lead { font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
/* photographs: natural vib=15 con=5 */
[data-slot] > img { filter: saturate(1.08) contrast(1.05); }

:root { --shadow-tag: 3px 3px 0 var(--color-ink); }

@font-face { font-family: "Bowlby One SC"; src: url("/fonts/bowlby-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url("/fonts/sofia-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url("/fonts/sofia-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url("/fonts/sofia-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

body { font-variant-numeric: tabular-nums; line-height: 1.5; }
h1, h2, h3 { line-height: 1.02; }
.skip { position: absolute; left: var(--space-md); top: -100px; background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); z-index: var(--z-modal); }
.skip:focus-visible { top: var(--space-md); }
a { color: var(--color-ink); }
a:hover { text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }

/* the bar: the wordmark and two chips */
.bar { border-bottom: var(--rule-bar) dashed var(--color-rule); }
.bar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-xl); padding-block: var(--space-md); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 44px; font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-ink); text-decoration: none; }
.wordmark span { background: var(--color-accent-2); color: var(--color-ink); border-radius: var(--radius-pill); padding: 0 var(--space-xs); font-size: 0.72em; line-height: 1.5; }
.bar__nav { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 2px var(--color-ink); font-weight: 700; text-decoration: none; }
.bar__nav a:hover { background: var(--color-paper-2); }
.bar__nav a[aria-current="page"] { background: var(--color-ink); color: var(--color-paper); }
.bar__nav a:active, .chip input:active + span { translate: 0 2px; }
.bar__nav a:focus-visible, .wordmark:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* the hero: the head beside the lead card */
.hero { padding-block: var(--space-2xl) var(--space-3xl); }
.hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); align-items: center; }
.hero h1 { font-size: min(var(--text-display), 4.25rem); max-width: 12ch; }
.hero .lead { margin-top: var(--space-md); color: var(--color-ink-2); }

/* the cards */
.card { position: relative; min-width: 0; display: flex; flex-direction: column; border: 6px solid var(--color-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-xl) var(--space-lg) var(--space-lg); background: var(--color-paper-3); color: var(--color-ink); }
.card--pink { background: var(--color-accent); color: var(--color-accent-ink); }
.card--lime { background: var(--color-accent-2); }
.card--ink { background: var(--color-ink); color: var(--color-paper); }
.c1 { min-height: 560px; }
.more { padding-block: var(--space-2xl) var(--section-gap-s); }
.more h2 { font-size: min(var(--text-section), 3.25rem); }
.bento { margin-top: var(--space-2xl); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); align-items: start; }
.c2 { grid-column: 1 / span 5; }
.c3 { grid-column: 6 / span 7; }
.c4 { grid-column: 1 / span 7; }
.c5 { grid-column: 8 / span 5; }
.card h2, .card h3 { font-size: var(--text-title); max-width: none; }
.row { margin-top: var(--space-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.w { font-weight: 700; font-size: var(--text-lg); }
.g { display: inline-flex; align-items: center; gap: var(--space-sm); }
.in { width: 6.5em; min-width: 0; height: 52px; padding: 0 var(--space-sm); border: 2px solid var(--color-ink); border-radius: var(--radius-card); background: var(--color-white); color: var(--color-ink); font-family: var(--font-body); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.in--s { width: 4em; }
.in:disabled { opacity: 0.5; cursor: not-allowed; }
.in:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.card--pink .in:focus-visible, .card--pink .chip input:focus-visible + span { outline-color: var(--color-ink); }
.out { margin-top: var(--space-lg); }
.c1 .out { margin-top: 0; }
.c1 .bars { margin-block: auto; padding-block: var(--space-lg); }
.ans { display: block; font-family: var(--font-display); font-size: clamp(2.25rem, 1.5vw + 1.5rem, 3.25rem); line-height: 1; overflow-wrap: anywhere; }
.c1 .ans { font-size: clamp(3rem, 4vw + 1rem, 5.5rem); }
.sum { margin-top: var(--space-sm); font-weight: 600; font-size: var(--text-lg); overflow-wrap: anywhere; }
.is-waiting .sum { font-weight: 700; }

/* the lead card's two bars: from and to, as shares of the larger */
.bars { margin-top: var(--space-xl); display: grid; gap: var(--space-sm); }
.bars span { display: flex; align-items: center; justify-content: flex-end; width: var(--w); min-width: 4em; height: 40px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-ink); font-weight: 700; }
.bars span + span { background: var(--color-accent-2); }

/* add or take off: two chips, the chosen one ink-filled */
.way { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 2px var(--color-ink); font-weight: 700; }
.chip input:checked + span { background: var(--color-ink); color: var(--color-paper); }
.chip input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* the numbered disc stuck on each card's corner */
.disc { position: absolute; top: -22px; left: -16px; width: 52px; height: 52px; display: grid; place-items: center; border: 4px solid var(--color-white); border-radius: 50%; background: var(--color-accent-2); color: var(--color-ink); box-shadow: var(--shadow-tag); font-family: var(--font-display); font-size: var(--text-xl); line-height: 1; rotate: -6deg; }
.card--lime .disc { background: var(--color-ink); color: var(--color-paper); }
.c2 .disc, .c4 .disc, .sumcard:nth-child(even) .disc { rotate: 5deg; }

/* the lime band under the cards */
.band { background: var(--color-accent-2); color: var(--color-ink); padding-block: var(--space-2xl); }
.band__in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-md) var(--space-xl); }
.band h2 { font-size: min(var(--text-section), 3.25rem); }
.band p { font-size: var(--text-lg); font-weight: 600; max-width: 46ch; }

/* the formulas page */
.head { padding-block: var(--space-3xl) var(--space-2xl); }
.head h1 { font-size: min(var(--text-display), 4.5rem); max-width: 16ch; }
.head .lead { margin-top: var(--space-md); color: var(--color-ink-2); }
.sec { padding-block: var(--space-3xl) var(--section-gap-s); }
.sec + .sec { padding-top: var(--space-xl); }
.sec h2 { font-size: min(var(--text-section), 3.25rem); }
.sums { list-style: none; margin: var(--space-2xl) 0 0; padding: 0; display: grid; gap: var(--space-3xl); }
.sumcard { position: relative; max-width: 46rem; border: 6px solid var(--color-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); background: var(--color-paper-3); padding: var(--space-xl) var(--space-xl) var(--space-lg); rotate: -0.6deg; }
.sumcard:nth-child(even) { margin-left: auto; rotate: 0.8deg; }
.sumcard h3 { font-size: var(--text-title); max-width: none; }
.sumcard p { margin-top: var(--space-sm); }
.ex { font-weight: 600; font-size: var(--text-lg); background: var(--color-paper-2); border-radius: var(--radius-card); padding: var(--space-xs) var(--space-md); overflow-wrap: anywhere; }
.ex__k { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }

/* the ink band: up 50%, then down 50% */
.swing { background: var(--color-ink); color: var(--color-paper); padding-block: var(--section-gap-s); }
.swing__in { position: relative; display: grid; gap: var(--space-md); justify-items: start; }
.swing h2 { color: var(--color-paper); font-size: min(var(--text-section), 3.25rem); max-width: 14ch; }
.swing p { font-size: var(--text-lg); max-width: 46ch; }
.swing a { color: var(--color-paper); }
.swing a:focus-visible { outline-color: var(--color-accent-2); }
.tag { background: var(--color-accent-2); color: var(--color-ink); border: 4px solid var(--color-white); border-radius: var(--radius-pill); padding: var(--space-xs) var(--space-lg); font-family: var(--font-display); font-size: var(--text-xl); rotate: -3deg; }

.foot { border-top: var(--rule-bar) dashed var(--color-rule); }
.foot__in { padding-block: var(--space-xl); display: grid; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.foot__note, .foot__line { max-width: 72ch; }

@media (prefers-reduced-motion: no-preference) {
  .bar__nav a, .chip span { transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
}
@media (min-width: 60.01rem) {
  .tag { position: absolute; top: 0; right: var(--gutter); rotate: 4deg; }
}
@media (max-width: 60rem) {
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .c1 { min-height: 0; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c2, .c3 { grid-column: auto; }
  .c4, .c5 { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .hero { padding-block: var(--space-xl) var(--space-2xl); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .c2, .c3, .c4, .c5 { grid-column: 1; }
  .card { padding: var(--space-xl) var(--space-md) var(--space-md); }
  .row, .g { gap: var(--space-xs); }
  .in { width: 5em; font-size: 1.25rem; }
  .in--s { width: 3.6em; }
  .head { padding-block: var(--space-xl) var(--space-lg); }
  .sumcard, .sumcard:nth-child(even) { margin-left: 0; rotate: 0deg; padding: var(--space-xl) var(--space-md) var(--space-md); }
}
