:root {
  --black: #080a10;
  --ink: #111318;
  --muted: #6e7480;
  --line: #d9dde4;
  --paper: #f7f7f5;
  --panel: #eceef1;
  --blue: #5275ff;
  --green: #16866d;
  --red: #b74d64;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.masthead {
  height: 72px;
  padding: 0 40px;
  background: var(--black);
  color: #f7f8fb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 24px; height: 24px; object-fit: contain; }
.masthead nav { display: flex; align-items: center; gap: 34px; }
.masthead nav a { color: rgba(255,255,255,.65); text-decoration: none; font-size: 13px; }
.masthead nav a:hover { color: #fff; }

.page-shell { width: min(1240px, 100%); margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 700px) 1fr; gap: 54px; padding: 0 32px; }
.toc { grid-column: 1; position: sticky; top: 28px; align-self: start; max-height: calc(100vh - 56px); overflow: auto; padding: 48px 10px 36px 0; }
.toc p { margin: 0 0 12px; font-weight: 700; font-size: 13px; color: var(--ink); }
.toc a { display: block; margin: 7px 0; color: #777d87; text-decoration: none; font-size: 12px; line-height: 1.35; }
.toc a:hover { color: var(--blue); }
.toc a.sub { padding-left: 14px; color: #989da5; }

.article { grid-column: 2; width: 100%; min-width: 0; padding-top: 44px; }
.back { display: inline-block; margin-bottom: 40px; color: var(--muted); text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.back:hover { color: var(--ink); }
.article-header { text-align: center; margin-bottom: 48px; }
.article-label { color: var(--blue); font: 700 10px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.article-header h1 { max-width: 680px; margin: 18px auto 20px; font-family: var(--serif); font-size: clamp(42px, 5.2vw, 58px); line-height: .99; font-weight: 500; letter-spacing: -.045em; }
.dek { max-width: 620px; margin: 0 auto 24px; color: #525866; font-size: 19px; line-height: 1.5; }
.publication-meta { max-width: 610px; margin: 28px auto 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; }
.publication-author { display: flex; align-items: center; gap: 11px; }
.publication-author img { width: 34px; height: 34px; object-fit: contain; }
.publication-author span { display: grid; gap: 1px; }
.publication-author small { color: var(--muted); font: 700 8px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.publication-author strong { font-size: 13px; }
.publication-details { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.publication-details span + span { padding: 4px 7px; border: 1px solid var(--line); color: var(--blue); font: 700 8px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.disclosure { max-width: 610px; margin: 14px auto 16px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #d9dfef; background: #f0f3fb; color: #626975; text-align: left; font-size: 11px; line-height: 1.5; }
.disclosure i { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(82,117,255,.11); }
.disclosure p { margin: 0; }
.disclosure strong { color: #3458df; }
.article-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.article-actions a { padding: 6px 0; color: var(--muted); font-size: 11px; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.article-actions a:hover { color: var(--blue); }

.article section { margin: 72px 0; }
.article h2 { margin: 0 0 24px; font-family: var(--serif); font-size: 36px; line-height: 1.15; font-weight: 500; letter-spacing: -.035em; }
.article h3 { margin: 46px 0 14px; font-family: var(--serif); font-size: 25px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }
.article p { margin: 0 0 20px; }
.article ul { padding-left: 23px; }
.article li { margin: 8px 0; }
.article strong { font-weight: 700; }

.tldr { padding: 28px 32px; background: #e9eaed; border: 1px solid #dfe1e6; }
.tldr h2 { margin-bottom: 12px; font-size: 25px; }
.tldr ul { margin: 0; }
.tldr li { padding-left: 4px; }

figure { margin: 46px 0; }
figcaption { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.lead-figure { margin-top: 56px; }
.wide-figure { width: min(780px, calc(100vw - 44px)); margin-left: 50%; transform: translateX(-50%); }
.wide-figure > a { display: block; }
.wide-figure img { width: 100%; height: auto; background: #eef0f4; border: 1px solid var(--line); }
.legend { display: flex; justify-content: flex-end; gap: 18px; margin-bottom: 10px; color: var(--muted); font: 11px/1 var(--mono); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend .polar { background: var(--blue); }.legend .nope { background: var(--ink); }.legend .rope { background: var(--red); }
.line-chart { background: #fff; border: 1px solid var(--line); padding: 12px; }

.equation { margin: 32px 0; padding: 24px 26px; background: #fff; border: 1px solid var(--line); }
.equation-label { display: block; margin-bottom: 13px; color: var(--blue); font: 700 9px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.equation-formula { padding-bottom: 19px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 29px; line-height: 1.2; letter-spacing: -.02em; text-align: center; }
.equation-formula i { font-style: italic; }.equation-formula em { padding: 0 11px; color: var(--blue); font-style: normal; }
.equation-formula sub, .equation-formula sup { font-family: var(--sans); font-size: .48em; letter-spacing: 0; }
.equation-definitions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 18px; background: var(--line); }
.equation-definitions > div { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; padding: 12px 14px; background: #f7f7f5; }
.equation-definitions b { color: var(--blue); font-family: var(--serif); font-size: 22px; font-weight: 500; }
.equation-definitions span { color: #353a43; font-size: 12px; line-height: 1.25; }
.equation-definitions small { display: block; margin-top: 3px; color: var(--muted); font: 700 8px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.note { display: block; margin: 30px 0; padding: 20px 22px; border-left: 3px solid var(--blue); background: #e9edf9; color: #414652; font-size: 14px; }
.note.warning { border-left-color: #bb8132; background: #f3ecdf; }

.stage-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0; border: 1px solid var(--line); }
.stage-grid > div { padding: 22px; background: #fff; }
.stage-grid > div + div { border-left: 1px solid var(--line); }
.stage-grid span { color: var(--blue); font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .15em; }
.stage-grid h3 { margin: 8px 0 10px; font-size: 21px; }
.stage-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.key-results { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.key-results > div { padding: 24px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.key-results strong { display: block; color: var(--blue); font-family: var(--serif); font-size: 39px; line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.key-results span { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.figure-link { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.figure-link a { color: var(--blue); }

.table-scroll { margin: 36px 0; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 11px; line-height: 1.35; white-space: nowrap; }
th, td { padding: 11px 10px; text-align: right; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font: 700 9px/1.25 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: #eceef1; }
th:first-child, th:nth-child(2), td:first-child, td:nth-child(2) { text-align: left; }
tr:last-child td { border-bottom: 0; }
.separator td { background: #f0f1f3; color: var(--muted); font: 700 9px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; }

.split-figure { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.split-figure > div { padding: 28px; background: #fff; }
.split-figure > div + div { border-left: 1px solid var(--line); background: #f0f1f3; }
.split-figure span { font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.split-figure > div strong { display: block; margin-top: 24px; color: var(--blue); font-family: var(--serif); font-size: 56px; line-height: 1; font-weight: 500; }
.split-figure > div + div strong { color: var(--red); }
.split-figure p { margin: 8px 0 0; font-size: 12px; }.split-figure small { color: var(--muted); }
.split-figure figcaption { grid-column: 1 / -1; margin: 0; padding: 12px 15px; border-top: 1px solid var(--line); background: var(--paper); }

blockquote { margin: 34px 0; padding: 8px 0 8px 26px; border-left: 2px solid var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1.35; letter-spacing: -.02em; }

.artifact { padding: 40px; background: var(--black); color: #f7f8fb; text-align: center; }
.artifact h2 { margin: 10px 0; }.artifact p:not(.article-label) { color: rgba(255,255,255,.58); max-width: 520px; margin: 0 auto 24px; }
.artifact .article-actions a { padding: 9px 13px; border: 1px solid rgba(255,255,255,.25); color: #fff; text-decoration: none; }
.artifact .article-actions a.primary { background: #fff; color: var(--black); border-color: #fff; }

.article-footer { margin-top: 88px; margin-bottom: 0; padding: 34px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.article-footer .brand { color: var(--ink); }
.article-footer p { margin: 8px 0 0; }

@media (max-width: 1050px) {
  .page-shell { grid-template-columns: 190px minmax(0, 680px); gap: 32px; justify-content: center; }
  .toc { grid-column: 1; }
  .article { grid-column: 2; }
}

@media (max-width: 820px) {
  .masthead { padding: 0 20px; }
  .masthead nav { gap: 18px; }
  .page-shell { display: block; padding: 0 22px; }
  .toc { display: none; }
  .article { max-width: 680px; margin: 0 auto; padding-top: 30px; }
  .wide-figure { width: 100%; margin-left: 0; transform: none; }
  .back { margin-bottom: 30px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .masthead { height: 62px; }
  .masthead nav a:first-child { display: none; }
  .masthead nav { gap: 15px; }
  .article-header { text-align: left; }
  .article-header h1 { margin-left: 0; font-size: 39px; line-height: 1.02; }
  .dek { font-size: 17px; }
  .article-actions { justify-content: flex-start; }
  .publication-meta { margin-left: 0; }
  .disclosure { margin-left: 0; }
  .article section { margin: 56px 0; }
  .article h2 { font-size: 31px; }
  .tldr { padding: 22px 20px; }
  .stage-grid, .split-figure { grid-template-columns: 1fr; }
  .stage-grid > div + div, .split-figure > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .key-results > div { padding: 19px; }
  .key-results strong { font-size: 32px; }
  .publication-meta { align-items: flex-start; }
  .publication-details { align-items: flex-end; flex-direction: column; }
  .equation { padding: 20px; }
  .equation-formula { font-size: 25px; }
  .equation-definitions { grid-template-columns: 1fr; }
  .artifact { padding: 30px 22px; }
}
