/* Retention Cohorts: "cohort heatmap atlas". Light mode only. */
:root {
  --bg: #ffffff;
  --ink: #1c2430;
  --ink-2: #3c4655;
  --muted: #677283;
  --rule: #e3e6ea;
  --rule-2: #cfd4da;
  --sand: #faf6f0;
  --sand-2: #f3ebdf;
  --plum: #5a2a63;
  --plum-ink: #4a1f52;
  --classic: #1f5f8b;
  --rolling: #d6461f;
  --cumulative: #7b2d74;
  --sel: #1c2430;
  --head: "Sora", system-ui, sans-serif;
  --body: "Albert Sans", system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.62 var(--body); overflow-x: hidden; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rolling); }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 600; margin: 0 0 14px; }
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 19px; font-weight: 600; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
code, pre, .num, .mono { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--sand); padding: 1px 5px; border-radius: 3px; }
pre { background: #f6f7f9; border: 1px solid var(--rule); border-radius: 4px; padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; max-width: 100%; }
pre code { background: none; padding: 0; font-size: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
:focus-visible { outline: 2px solid var(--rolling); outline-offset: 2px; }

/* ---------- header ---------- */
header.top { border-bottom: 1px solid var(--rule); background: #fff; position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 17px var(--head); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
nav.main a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 6px 10px; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--ink); border-bottom-color: var(--rule-2); }
nav.main a[aria-current] { color: var(--ink); border-bottom-color: var(--plum); font-weight: 600; }
@media (max-width: 720px) {
  header.top { position: static; }
  header.top .wrap { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 10px; padding-bottom: 6px; }
  nav.main { justify-content: flex-start; margin-left: -10px; }
  nav.main a { font-size: 14px; padding: 4px 8px; }
  .hide-sm { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 44px 0 28px; border-bottom: 1px solid var(--rule); }
.crumb { font: 13px var(--mono); color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 760px; }
.answer { margin-top: 22px; max-width: 820px; border-left: 3px solid var(--plum); background: var(--sand); padding: 16px 20px; }
.answer .lbl, .kicker { display: block; font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--plum); margin-bottom: 6px; }
.answer p { margin: 0; font-size: 17px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: end; }
.hero-mark { justify-self: end; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-mark { display: none; } }

/* ---------- sections ---------- */
.sec { padding: 40px 0; border-bottom: 1px solid var(--rule); }
.sec:last-of-type { border-bottom: 0; }
.sec > .wrap > h2 { max-width: 820px; }
.sec .sub { color: var(--muted); max-width: 760px; margin-top: -4px; }
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose h2 { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--rule); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose table { margin-bottom: 16px; }
.term { border-top: 1px solid var(--rule); padding: 14px 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- figures ---------- */
.fig { margin: 0; border-top: 2px solid var(--ink); padding-top: 14px; }
.fig-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 6px; }
.fig-no { font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fig-head h2, .fig-head h3 { margin: 0; }
.fig-dek { color: var(--ink-2); max-width: 780px; margin-bottom: 14px; }
.src { font: 12.5px/1.5 var(--mono); color: var(--muted); margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 8px; }
.src b { color: var(--ink-2); font-weight: 600; }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 6px 0 14px; }
.ctl-label { font: 600 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 4px; overflow: hidden; }
.seg button { font: 500 14px var(--body); color: var(--ink-2); background: #fff; border: 0; border-right: 1px solid var(--rule-2); padding: 7px 13px; cursor: pointer; min-height: 36px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--sand); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button[data-kind="classic"][aria-pressed="true"] { background: var(--classic); }
.seg button[data-kind="rolling"][aria-pressed="true"] { background: var(--rolling); }
.seg button[data-kind="cumulative"][aria-pressed="true"] { background: var(--cumulative); }
.rng { display: inline-flex; align-items: center; gap: 10px; }
.rng input { width: 180px; accent-color: var(--plum); }
.rng output { font: 600 14px var(--mono); min-width: 52px; }
.dot-k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.k-classic { color: var(--classic); } .k-rolling { color: var(--rolling); } .k-cumulative { color: var(--cumulative); }
.bg-classic { background: var(--classic); } .bg-rolling { background: var(--rolling); } .bg-cumulative { background: var(--cumulative); }

/* ---------- heatmap (signature) ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
@media (max-width: 980px) { .explorer { grid-template-columns: minmax(0, 1fr); } }
.heat-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--rule); background: #fff; -webkit-overflow-scrolling: touch; }
table.heat { border-collapse: separate; border-spacing: 0; font: 12.5px var(--mono); width: 100%; }
.heat th, .heat td { padding: 0; text-align: center; white-space: nowrap; }
.heat thead th { font-weight: 600; color: var(--muted); padding: 8px 2px 6px; border-bottom: 1px solid var(--rule); background: #fff; font-size: 11.5px; }
.heat tbody th { text-align: left; font-weight: 500; color: var(--ink); padding: 0 12px; background: #fff; }
.heat tr > :first-child { position: sticky; left: 0; z-index: 2; min-width: 124px; box-shadow: 1px 0 0 var(--rule), 8px 0 12px -8px rgba(28,36,48,.18); }
.heat thead tr > :first-child { z-index: 3; text-align: left; padding-left: 12px; }
.heat .csz { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.heat td { height: 40px; min-width: 42px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; }
.heat td.na { background-image: repeating-linear-gradient(135deg, #f4f5f7 0 4px, #fff 4px 8px); }
.heat td button { all: unset; display: block; width: 100%; height: 40px; line-height: 40px; cursor: pointer; box-sizing: border-box; }
.heat td button:focus-visible, .heat td.sel button { outline: 2.5px solid var(--sel); outline-offset: -2.5px; }
.heat td.mark { box-shadow: inset 0 0 0 2px var(--rolling); }
.heat td.dim { opacity: 0.35; }
.heat.small td, .heat.small td button { height: 32px; line-height: 32px; min-width: 36px; }
.ramp { display: flex; align-items: center; gap: 8px; font: 11.5px var(--mono); color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.ramp .bar { width: 180px; height: 10px; border: 1px solid var(--rule); }
.ramp .na-swatch { width: 14px; height: 10px; border: 1px solid var(--rule); background-image: repeating-linear-gradient(135deg, #f4f5f7 0 3px, #fff 3px 6px); }

/* explain panel */
.explain { border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: 16px 18px; background: #fff; position: sticky; top: 76px; }
@media (max-width: 980px) { .explain { position: static; } }
.explain h3 { margin: 0 0 4px; font-size: 16px; }
.explain .big { font: 600 40px/1.1 var(--mono); margin: 6px 0 2px; }
.explain .frac { font: 13px var(--mono); color: var(--muted); margin-bottom: 10px; }
.explain p { font-size: 15px; }
.strip { display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px; margin: 10px 0 4px; }
.strip span { height: 18px; background: #eef0f3; font: 9.5px/18px var(--mono); text-align: center; color: var(--muted); }
.strip span.win { background: var(--plum); color: #fff; }
.strip span.d0 { background: #fff; border: 1px dashed var(--rule-2); }
.strip span.off { background-image: repeating-linear-gradient(135deg, #f4f5f7 0 3px, #fff 3px 6px); }
.strip-note { font: 11px var(--mono); color: var(--muted); }

/* ---------- user dots ---------- */
.dots-wrap { overflow-x: auto; max-width: 100%; }
table.dots { border-collapse: collapse; font: 12px var(--mono); }
.dots th { font-weight: 500; color: var(--muted); padding: 4px 0; min-width: 26px; text-align: center; font-size: 11px; }
.dots tbody th { text-align: left; padding-right: 12px; color: var(--ink); white-space: nowrap; min-width: 70px; }
.dots td { width: 26px; height: 30px; text-align: center; padding: 0; }
.dots td.win { background: #f1e6ef; }
.dots i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--rule-2); background: #fff; vertical-align: middle; }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.dots td.win i.on { background: var(--plum); border-color: var(--plum); box-shadow: 0 0 0 3px rgba(90,42,99,.18); }
.dots i.inst { border-radius: 2px; border-style: dashed; }
.dots td.verdict { width: auto; padding-left: 12px; text-align: left; white-space: nowrap; font-size: 12px; }
.dots .yes { color: var(--plum); font-weight: 700; }
.dots .no { color: var(--muted); }
.tally { font: 600 15px var(--mono); margin-top: 10px; }

/* ---------- tables (content) ---------- */
.tbl-wrap { overflow-x: auto; max-width: 100%; margin-bottom: 16px; border: 1px solid var(--rule); }
table.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); background: #fff; }
.tbl thead th { font: 600 12px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: #fbfbfc; }
.tbl tr:last-child > * { border-bottom: 0; }
.tbl tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 150px; font-weight: 600; box-shadow: 1px 0 0 var(--rule), 8px 0 12px -8px rgba(28,36,48,.14); }
.tbl td.n { font-family: var(--mono); white-space: nowrap; }
@media (max-width: 640px) { .tbl tr > :first-child { min-width: 112px; } .tbl td { min-width: 150px; } }

/* ---------- conclusions boxes ---------- */
.concl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); margin: 14px 0 6px; }
.concl > div { padding: 14px 16px; }
.concl > div + div { border-left: 1px solid var(--rule); }
.concl h4 { margin: 0 0 6px; font: 600 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.concl .can h4 { color: var(--plum); }
.concl .cant h4 { color: var(--rolling); }
.concl ul { margin: 0; padding-left: 18px; font-size: 15px; }
.concl li { margin-bottom: 4px; }
@media (max-width: 640px) { .concl { grid-template-columns: 1fr; } .concl > div + div { border-left: 0; border-top: 1px solid var(--rule); } }
.pattern { padding: 34px 0; border-top: 1px solid var(--rule); }
.pattern:first-child { border-top: 0; padding-top: 0; }

/* ---------- curves ---------- */
.curve svg { width: 100%; height: auto; display: block; max-width: 820px; }
.curve text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.curve .lab { font-size: 12px; font-weight: 600; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 13px var(--mono); margin: 4px 0 8px; }

/* ---------- three definitions strip ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trio > a { display: block; padding: 18px 20px 20px 0; color: var(--ink); text-decoration: none; }
.trio > a + a { border-left: 1px solid var(--rule); padding-left: 20px; }
.trio > a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.trio h3 { margin: 6px 0 6px; }
.trio p { font-size: 15px; color: var(--ink-2); margin: 0; }
.trio .rule { font: 13px var(--mono); color: var(--muted); display: block; margin-top: 8px; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } .trio > a + a { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; } }

/* ---------- lists of pages ---------- */
ul.index { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
ul.index li { border-bottom: 1px solid var(--rule); }
ul.index a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; color: var(--ink); text-decoration: none; }
ul.index a:hover b { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
ul.index .ix { font: 600 13px var(--mono); color: var(--muted); padding-top: 2px; }
ul.index b { font-family: var(--head); font-weight: 600; font-size: 17px; }
ul.index span.d { grid-column: 2; color: var(--ink-2); font-size: 15px; }

/* ---------- formula ---------- */
.formula { font: 15px/1.6 var(--mono); background: var(--sand); border: 1px solid var(--sand-2); padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--rule); padding: 0; max-width: 820px; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 600 17px var(--head); padding: 16px 28px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 22px var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); max-width: 760px; }

/* ---------- footer ---------- */
footer.site { border-top: 2px solid var(--ink); margin-top: 20px; padding: 34px 0 40px; font-size: 15px; background: #fbfbfc; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer h4 { font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 6px; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--plum); text-decoration: underline; }
footer p { color: var(--muted); }
@media (max-width: 860px) { footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer .cols { grid-template-columns: 1fr; } }
.note { font-size: 14px; color: var(--muted); }

/* ---------- Linkrunner credit (credited site, 26 Oct 2026) ---------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.lockup .by { font: 500 12px var(--mono); color: var(--muted); text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; padding-left: 10px; border-left: 1px solid var(--rule-2); line-height: 18px; }
.lockup .by:hover { color: var(--plum); text-decoration: underline; }
footer .credit { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
footer .credit p { margin: 0; color: var(--ink-2); font-size: 14px; }
footer .credit p a { color: var(--plum); text-decoration: underline; }
footer .lr-row { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 13px var(--mono); }
footer .lr-row li { margin: 0; }
footer .lr-row .cta { color: var(--plum); font-weight: 600; }
.lr-panel { max-width: 820px; border: 1px solid var(--rule-2); border-radius: 4px; padding: 18px 22px; background: #fff; }
.lr-panel .kicker { color: var(--plum); }
.lr-panel p { margin: 0 0 10px; color: var(--ink-2); }
.lr-panel ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.lr-panel li::before { content: "\2192\00a0"; color: var(--muted); font-family: var(--mono); }
.lr-line { margin: 12px 0 0; font-size: 14px; }
.lr-line a::after { content: "\00a0\2192"; }
.prose .lr-links { columns: 2; max-width: 560px; }
@media (max-width: 520px) { .prose .lr-links { columns: 1; } }
