@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  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: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

:root {
  --flamingo: #C2185B;
  --deep: #8A1040;
  --shallows: #F48FB1;
  --ground: #FFF7FA;
  --blush: #FCE8EF;
  --ink: #1E1418;
  --ink-2: #463840;
  --muted: #6A5A61;
  --rule: #EADBE1;
  --white: #FFFFFF;
  --profit: #047857;
  --loss: #B91C1C;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.6 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, video, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--deep); }
:focus-visible { outline: 3px solid var(--flamingo); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); font-weight: 500; font-size: .92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons: one shape everywhere, colour says the weight. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn-primary { background: var(--flamingo); color: var(--white); }
.btn-primary:hover { background: var(--deep); }
.btn-quiet { color: var(--deep); padding: 0 10px; }
.btn-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-outline { border-color: var(--flamingo); color: var(--deep); }
.btn-outline:hover { background: var(--blush); }
.btn-light { background: var(--white); color: var(--deep); }
.btn-light:hover { background: var(--blush); }

/* Header */
.site-head {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.brand .mark { width: 34px; height: 34px; }
.brand-b { color: var(--flamingo); }
.site-head nav { display: flex; gap: 24px; flex: 1; }
.site-head .btn { margin-left: auto; }
.site-head nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 10px 0; }
.site-head nav a:hover { color: var(--deep); }

/* Hero */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero-for { color: var(--deep); font-weight: 600; font-size: 16px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.035em; }
.lede { margin-top: 24px; font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* The live sieve */
.sieve {
  margin: 0; background: var(--white); border-radius: 28px; padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 1px 0 var(--rule), 0 30px 70px -30px rgba(138, 16, 64, .35);
}
.sieve-readout { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 18px; }
.sieve-count { font-size: clamp(48px, 6vw, 68px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--profit); }
.sieve-of { font-size: .42em; font-weight: 600; letter-spacing: -.01em; color: var(--muted); }
.sieve-says { font-size: 17px; font-weight: 600; color: var(--ink); }
#sieve-canvas { width: 100%; height: auto; aspect-ratio: 440 / 453; }
.sieve-control { margin-top: 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.sieve-control label { font-weight: 600; font-size: 15px; }
.sieve-control output { font: 500 16px var(--mono); min-width: 3.2em; text-align: right; color: var(--deep); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--flamingo) var(--fill, 30%), var(--blush) var(--fill, 30%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--blush); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--flamingo); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--white); border: 3px solid var(--flamingo); box-shadow: 0 2px 6px rgba(30, 20, 24, .2); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 3px solid var(--flamingo); }
.sieve-key { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.sieve-key li { display: inline-flex; align-items: center; gap: 7px; }
.sieve-key i { width: 11px; height: 11px; border-radius: 50%; }
.k-clear { background: var(--profit); }
.k-below { background: #8CCBB3; }
.k-loss { background: #EBA3AA; }
.k-none { background: #DCCFD5; }
.sieve figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* How: sheet -> steps -> result */
.how { background: var(--white); border-block: 1px solid var(--rule); padding: clamp(56px, 8vw, 104px) var(--gutter); }
.how > * { max-width: var(--wrap); margin-inline: auto; }
.how h2, .film h2, .pricing h2, .faq h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; }
.how-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sheet, .result { margin: 0; min-width: 0; }
.sheet figcaption, .result figcaption { font-weight: 600; font-size: 15px; margin-bottom: 10px; color: var(--ink-2); }
.sheet-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--rule); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
td, th { padding: 9px 12px; text-align: left; white-space: nowrap; }
.sheet .sheet-scroll { background: #FBFBF9; border-color: #E2E2DC; }
.sheet td, .sheet th { border-bottom: 1px solid #E8E8E2; border-right: 1px solid #E8E8E2; color: #3B3B38; font-weight: 400; }
.sheet .junk td { color: #8B8B85; font-style: italic; }
.sheet .head th { background: #F0F0EA; font-weight: 600; }
.result th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--rule); }
.result td { border-bottom: 1px solid #F5ECF0; }
.result .skip-row td { background: #FFF3F4; }
.result td.pos, .result td.neg { font-weight: 600; }
.steps { list-style: none; counter-reset: step; margin-top: 40px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--flamingo); color: var(--white); font-weight: 700;
}
.steps h3 { font-size: 19px; letter-spacing: -.01em; }
.steps p { margin-top: 6px; font-size: 15.5px; color: var(--ink-2); }
.how-foot { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* Film + facts */
.film {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 112px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center;
}
.facts { margin: 32px 0 0; display: grid; gap: 22px; }
.facts div { border-top: 2px solid var(--blush); padding-top: 14px; }
.facts dt { font-weight: 700; font-size: 18px; }
.facts dd { margin: 6px 0 0; color: var(--ink-2); max-width: 36em; }
.film-video { margin: 0; }
.film-video video { width: 100%; aspect-ratio: 1; border-radius: 24px; background: var(--blush); object-fit: cover; }
.film-video figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Pricing */
.pricing { background: var(--white); border-block: 1px solid var(--rule); padding: clamp(56px, 8vw, 104px) var(--gutter); }
.pricing > * { max-width: var(--wrap); margin-inline: auto; }
.plans { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 400px)); gap: 20px; }
.plan { border: 1px solid var(--rule); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.plan-pro { border: 2px solid var(--flamingo); background: #FFFAFC; }
.plan h3 { font-size: 20px; }
.price { font-size: 42px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.price span { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.plan .btn { margin-top: auto; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2.5px solid var(--flamingo); border-bottom: 2.5px solid var(--flamingo); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }

/* Closing band */
.close {
  max-width: var(--wrap); margin: 0 auto clamp(48px, 6vw, 80px); padding: clamp(40px, 6vw, 72px) var(--gutter);
  background: var(--flamingo); color: var(--white); border-radius: 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
@media (min-width: 1260px) { .close { border-radius: 32px; } }
.close-mark { width: 72px; height: 72px; margin-bottom: 8px; }
.close h2 { color: var(--white); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; line-height: 1.1; }
.close p { color: #FFE0EB; font-size: 18px; margin-bottom: 12px; }

/* Footer */
.site-foot {
  max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--muted);
}
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { color: var(--muted); }
.foot-note { flex: 1 1 320px; text-align: right; }

/* Narrow screens */
@media (max-width: 960px) {
  .hero, .film { grid-template-columns: minmax(0, 1fr); }
  .how-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .foot-note { text-align: left; }
}
@media (max-width: 600px) {
  .site-head nav { order: 3; flex-basis: 100%; gap: 20px; }
  .film-video video { aspect-ratio: 9 / 16; max-height: 80vh; }
  .close { margin-inline: var(--gutter); }
}
@media (max-width: 1240px) {
  .close { margin-inline: var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
