/* ReadPoint project page. Colours are those of the paper's figures (slate blue = our decision model, warm grey = the
   point-writing model, ochre = target boxes). */
:root {
  --paper: #FBFAF7; --paper-2: #F3F1EC; --sheet: #FFFFFF;
  --ink: #22262B; --ink-2: #454C55; --muted: #6B7380; --rule: #E2DFD8; --rule-2: #CFCBC2;
  --ours: #4A6FA5; --ours-d: #27456B; --ours-f: #E6ECF4; --writes: #8F8070; --target: #C2922E;
  --code-bg: #F3F1EC;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15171A; --paper-2: #1C1F23; --sheet: #FFFFFF;
    --ink: #E8E6E1; --ink-2: #C9C6BF; --muted: #9AA0A8; --rule: #2B2F35; --rule-2: #3A3F46;
    --ours: #8FB0DD; --ours-d: #B7CDEA; --ours-f: #1E2A3A; --writes: #B9AB9B; --target: #D9AE55;
    --code-bg: #1C1F23; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15171A; --paper-2: #1C1F23; --sheet: #FFFFFF;
  --ink: #E8E6E1; --ink-2: #C9C6BF; --muted: #9AA0A8; --rule: #2B2F35; --rule-2: #3A3F46;
  --ours: #8FB0DD; --ours-d: #B7CDEA; --ours-f: #1E2A3A; --writes: #B9AB9B; --target: #D9AE55;
  --code-bg: #1C1F23; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ours-d); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1000px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap.text { max-width: 760px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule); }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 52px; }
.bar .name { font: 600 15px/1 var(--serif); letter-spacing: 0.01em; color: var(--ink); }
.bar nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.bar nav a { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.bar nav a:hover, .bar nav a.on { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) { .bar nav { display: none; } }

/* title block */
header.title { padding-block: 64px 28px; text-align: center; }
.venue { font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
h1 { font: 600 clamp(28px, 4.2vw, 44px)/1.15 var(--serif); letter-spacing: -0.012em; margin: 0 auto 16px; max-width: 860px; text-wrap: balance; }
.tagline { font: 400 italic 19px/1.5 var(--serif); color: var(--ink-2); max-width: 680px; margin: 0 auto 26px; text-wrap: balance; }
.authors { font-size: 17px; margin: 0; }
.authors a { color: var(--ink); border-bottom: 1px solid var(--rule-2); }
.authors a:hover { text-decoration: none; border-bottom-color: var(--ours); }
.affil { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.logo { height: 20px; width: auto; margin: 18px auto 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--rule-2); border-radius: 999px;
  font-size: 14.5px; font-weight: 500; color: var(--ink); background: var(--sheet); transition: border-color .15s, background .15s; }
:root[data-theme="dark"] .pill { background: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill { background: transparent; } }
.pill:hover { border-color: var(--ours); text-decoration: none; }
.pill svg { width: 16px; height: 16px; fill: currentColor; }
.pill.off { color: var(--muted); pointer-events: none; border-style: dashed; }

/* key numbers */
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  margin: 36px 0 0; }
.keys > div { padding: 18px 18px 16px; }
.keys > div + div { border-left: 1px solid var(--rule); }
.keys .n { font: 600 26px/1.1 var(--serif); color: var(--ours-d); font-variant-numeric: lining-nums tabular-nums; }
.keys .t { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .keys > div:nth-child(3) { border-left: 0; } .keys > div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* sections */
section { padding-block: 56px 8px; }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ours); margin: 0 0 10px; }
h2 { font: 600 clamp(23px, 2.8vw, 29px)/1.25 var(--serif); margin: 0 0 14px; text-wrap: balance; }
h2 .num { color: var(--muted); font-weight: 400; margin-right: 10px; }
p { margin: 0 0 14px; }
.lead { font-size: 17.5px; line-height: 1.7; color: var(--ink-2); }
.lead b, .lead strong { color: var(--ink); font-weight: 600; }
details.abstract { margin-top: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
details.abstract summary { cursor: pointer; padding: 12px 0; font-size: 14.5px; font-weight: 500; color: var(--ink-2); list-style: none; }
details.abstract summary::before { content: "+"; display: inline-block; width: 18px; color: var(--ours); font-weight: 600; }
details.abstract[open] summary::before { content: "\2212"; }
details.abstract p { font: 400 16.5px/1.7 var(--serif); color: var(--ink-2); padding-bottom: 8px; text-align: justify; hyphens: auto; }

/* figures */
figure { margin: 28px 0 8px; }
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px; }
.sheet.mid { max-width: 760px; margin: 0 auto; }
.sheet.sm { max-width: 560px; margin: 0 auto; }
figcaption { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 12px auto 0; max-width: 820px; }
figcaption .fl { font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.video { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #0F1114; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 8 / 3; }

/* citation */
.bib { position: relative; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 6px; margin-top: 16px; }
.bib pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 13px/1.6 var(--mono); color: var(--ink-2); }
.copy { position: absolute; top: 10px; right: 10px; font: 500 12.5px/1 var(--sans); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule-2);
  background: var(--sheet); color: var(--ink); cursor: pointer; }
:root[data-theme="dark"] .copy { background: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .copy { background: var(--paper); } }

footer { margin-top: 64px; border-top: 1px solid var(--rule); padding-block: 26px 40px; color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* teaser animation */
section.teaser { padding-block: 8px 0; }
.anim { margin: 0; }
.anim-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.anim-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.anim-steps button, .anim-play { font: 500 13px/1 var(--sans); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule-2);
  background: transparent; color: var(--muted); cursor: pointer; }
.anim-steps button.on { color: var(--ours-d); border-color: var(--ours); background: var(--ours-f); }
.anim-play { color: var(--ink); }
.anim canvas { display: block; width: 100%; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
.anim-cap { min-height: 3.2em; margin: 12px 0 0; font: 400 17px/1.55 var(--serif); color: var(--ink); }
.anim figcaption { margin: 4px 0 0; max-width: none; }

/* how it works */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps li { counter-increment: st; border-top: 2px solid var(--ours); padding-top: 14px; min-width: 0; }
.steps li::before { content: counter(st); font: 600 13px/1 var(--mono); color: var(--ours); }
.steps h3 { font: 600 19px/1.3 var(--serif); margin: 6px 0 8px; }
.steps p { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin: 0; }
code { font: 0.88em var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* results in brief, under the teaser */
.brief { max-width: 760px; margin: 30px auto 0; border-left: 2px solid var(--ours); padding-left: 18px; }
.brief p { font: 400 17px/1.6 var(--serif); color: var(--ink-2); margin: 0 0 8px; }
.brief p:last-child { margin-bottom: 0; }

/* summary under the teaser */
.summary { max-width: 760px; margin: 30px auto 0; }
.summary > p { font: 400 18px/1.65 var(--serif); color: var(--ink); margin: 0 0 14px; }
