/* Digital edition of the paper: reading chrome in the style of a paper site with a contents rail. */
:root {
  --bg: #ffffff;
  --bg-panel: #f7f6f3;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #8a8a8a;
  --line: #e4e3df;
  --accent: #1f6fd1;
  --accent-soft: #e8f0fb;
  --orange: #e8871e;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --nav-w: 250px;
  --rail-w: 290px;
  --text-w: 680px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-serif); font-size: 18px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.ui { font-family: var(--font-ui); }

/* header */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); height: 60px; display: flex; align-items: center; padding: 0 28px; gap: 14px; font-family: var(--font-ui); }
.site-header .brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header .brand .lab { color: var(--ink-soft); padding-right: 12px; border-right: 1px solid var(--line); font-weight: 600; }
.site-header .brand:hover { text-decoration: none; }
.site-header .links { margin-left: auto; display: flex; gap: 18px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.site-header .links a { color: var(--muted); }
.site-header .links a:hover { color: var(--accent); text-decoration: none; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); width: 100%; }

/* shell */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--rail-w); max-width: 1600px; margin: 0 auto; min-height: calc(100vh - 60px); }
.col-nav { border-right: 1px solid transparent; padding: 36px 28px; }
.col-nav .sticky { position: sticky; top: 90px; }
.col-main { padding: 40px 48px 80px; min-width: 0; }
.col-rail { border-left: 1px solid var(--line); background: var(--bg-panel); padding: 32px 24px; }
.col-rail .sticky { position: sticky; top: 90px; }
@media (max-width: 1180px) { .shell { grid-template-columns: var(--nav-w) minmax(0, 1fr); } .col-rail { display: none; } }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .col-nav { padding: 12px 16px 0; } .col-nav .sticky { position: static; } .col-main { padding: 20px 16px 60px; } }

/* contents rail */
.section-nav { font-family: var(--font-ui); font-size: 15px; }
.section-nav a { color: var(--ink-soft); display: block; }
.section-nav a:hover { color: var(--accent); text-decoration: none; }
.section-nav a.active { color: var(--accent); font-weight: 600; }
.section-nav .home { font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; color: var(--ink); }
.section-nav .home.active { color: var(--accent); }
.section-nav ol { list-style: none; margin: 0; padding: 0; }
.section-nav ol li a { display: grid; grid-template-columns: 24px 1fr; gap: 2px; padding: 7px 0; line-height: 1.3; }
.section-nav .num { color: var(--muted); font-size: 14px; }
.section-nav a.active .num { color: var(--accent); }
.section-nav .group-label { margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.section-nav ul.extras { list-style: none; margin: 0; padding: 0; }
.section-nav ul.extras li a { padding: 6px 0; line-height: 1.3; }
.mobile-nav-toggle { display: none; font: inherit; font-family: var(--font-ui); font-size: 14px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; cursor: pointer; margin-bottom: 8px; }
@media (max-width: 860px) { .mobile-nav-toggle { display: inline-block; } #section-navigation { display: none; padding: 8px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; } #section-navigation.open { display: block; } }

/* article typography */
article { max-width: var(--text-w); }
.eyebrow { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
article h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 22px; letter-spacing: -.01em; }
article h2 { font-family: var(--font-ui); font-weight: 600; font-size: 1.45rem; line-height: 1.25; margin: 44px 0 14px; }
article h3 { font-family: var(--font-ui); font-weight: 600; font-size: 1.15rem; margin: 32px 0 10px; }
article h4 { font-family: var(--font-ui); font-weight: 600; font-size: 1rem; margin: 24px 0 6px; }
article h2 .secno, article h3 .secno { color: var(--muted); font-weight: 500; margin-right: 10px; }
article p { margin: 0 0 1.1em; }
article p.runin { margin-top: -6px; }
article h4 + p { margin-top: 0; }
article em { font-style: italic; }
article ul, article ol { padding-left: 1.3em; }
article li { margin-bottom: .4em; }
article .citation a { color: var(--accent); }
article .citation a:hover { text-decoration: underline; }
article a[data-reference-type] { color: var(--accent); }
article sup { line-height: 0; }
article .footnote-ref sup { font-family: var(--font-ui); font-size: .72em; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 5px; margin-left: 2px; font-weight: 600; }
article .footnote-ref:hover { text-decoration: none; }
article blockquote { margin: 0 0 1.1em; padding-left: 18px; border-left: 3px solid var(--line); color: var(--ink-soft); }
article .box { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; margin: 0 0 1.2em; }
article .box p:last-child { margin-bottom: 0; }

/* math */
math { font-size: 1.05em; }
math[display="block"] { margin: 0; overflow-x: auto; overflow-y: hidden; }
.eqn { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 10px 0 18px; }
.eqn .eqno { font-family: var(--font-serif); color: var(--ink-soft); white-space: nowrap; }
.eqn-unnumbered { display: block; margin: 10px 0 18px; overflow-x: auto; }
.eqn .eqwrap { display: block; min-width: 0; overflow-x: auto; }
.eqn .eqno.multi { white-space: normal; text-align: right; line-height: 1.9; }
article p { overflow-wrap: anywhere; }
article p math[display="inline"] { max-width: 100%; }
.proof { overflow-x: auto; }
.references .csl-entry { overflow-wrap: anywhere; }
@media (max-width: 700px) { .eqn.wide::after, .eqn-unnumbered.wide::after { content: 'scroll sideways to see the whole equation'; display: block; font-family: var(--font-ui); font-size: 11px; color: var(--muted); } }
.math.display { display: block; overflow-x: auto; font-family: var(--font-mono); font-size: .85em; color: var(--ink-soft); background: var(--bg-panel); padding: 10px 12px; border-radius: 6px; }

/* theorem-like environments */
.assumption, .proposition, .lemma, .corollary, .remark, .example { margin: 0 0 1.1em; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.assumption p, .proposition p, .lemma p, .corollary p, .remark p, .example p { margin-bottom: .5em; }
.assumption p:last-child, .proposition p:last-child, .lemma p:last-child, .corollary p:last-child, .remark p:last-child, .example p:last-child { margin-bottom: 0; }
.proof { margin: 0 0 1.1em; color: var(--ink-soft); }
.proof em:first-child { font-style: italic; }

/* figures and tables */
figure.fig { margin: 28px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
figure.fig .fig-head { font-family: var(--font-ui); font-size: 15px; font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-panel); }
figure.fig .fig-head .fig-label { color: var(--accent); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: 10px; }
figure.fig .fig-body { padding: 16px 18px 4px; }
figure.fig img { display: block; max-width: 100%; height: auto; margin: 0 auto 12px; }
figure.fig .panel-title { font-family: var(--font-ui); font-size: 13px; font-weight: 600; text-align: center; margin: 4px 0 8px; color: var(--ink-soft); }
figure.fig .fig-notes { font-family: var(--font-ui); font-size: 13px; line-height: 1.5; color: var(--ink-soft); padding: 10px 18px 14px; border-top: 1px solid var(--line); }
figure.fig .fig-notes p { margin: 0 0 .5em; }
figure.fig .fig-notes p:last-child { margin-bottom: 0; }
figure.fig .fig-source { font-family: var(--font-ui); font-size: 12px; color: var(--muted); padding: 8px 18px 10px; border-top: 1px solid var(--line); }
figure.fig .fig-source a { color: var(--muted); text-decoration: underline; }
.tbl { margin: 28px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tbl .fig-head { font-family: var(--font-ui); font-size: 15px; font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-panel); }
.tbl .fig-head .fig-label { color: var(--accent); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: 10px; }
.tbl table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; background: #fff; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl caption { display: none; }
.tbl .fig-notes { font-family: var(--font-ui); font-size: 13px; line-height: 1.5; color: var(--ink-soft); padding: 10px 18px 14px; border-top: 1px solid var(--line); }
.tbl .fig-notes p { margin: 0; }

/* footnotes and references */
.notes { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); }
.notes h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.notes ol { padding-left: 1.4em; }
.notes li { margin-bottom: .6em; }
.notes li p { margin: 0; }
.notes .footnote-back { margin-left: 6px; }
.references .csl-entry { font-family: var(--font-serif); font-size: 16px; margin-bottom: .9em; padding-left: 1.6em; text-indent: -1.6em; line-height: 1.5; }
.references .csl-entry:target { background: var(--accent-soft); }

/* title page */
.title-page { max-width: 820px; margin: 0 auto; }
.title-page .edition { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); text-align: center; margin: 10px 0 14px; }
.title-page h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.15; text-align: center; margin: 0 0 10px; letter-spacing: -.01em; }
.title-page .subtitle { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.5rem); color: var(--ink-soft); text-align: center; margin: 0 0 28px; }
.authors { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--font-ui); text-align: center; }
.authors .name { font-weight: 600; font-size: 15px; }
.authors .affil { color: var(--muted); font-size: 14px; margin-top: 2px; }
.abstract { max-width: var(--text-w); margin: 36px auto 0; }
.abstract .label { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.abstract p { font-size: 1.1rem; line-height: 1.65; }
.abstract .keywords { font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--font-ui); font-size: 15px; }
.pager a { display: inline-flex; flex-direction: column; gap: 2px; color: var(--ink); max-width: 48%; }
.pager a .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pager a:hover { color: var(--accent); text-decoration: none; }
.pager a.next { text-align: right; margin-left: auto; }
.pager.center { justify-content: center; }
.pager .btn { background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 6px; font-weight: 600; }
.pager .btn:hover { color: #fff; opacity: .9; }
.credits { max-width: var(--text-w); margin: 40px auto 0; font-family: var(--font-ui); font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }

/* right rail */
.rail-title { font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.rail-list { list-style: none; padding: 0; margin: 0 0 26px; font-family: var(--font-ui); font-size: 14px; }
.rail-list li { margin-bottom: 8px; line-height: 1.35; }
.rail-list li a { color: var(--ink-soft); }
.rail-list li.sub { padding-left: 14px; font-size: 13px; }
.rail-list li a:hover { color: var(--accent); text-decoration: none; }
.rail-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-family: var(--font-ui); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.rail-card .k { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.rail-card a { font-weight: 600; }

/* scrolly tour on the title page */
.scrolly { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr); gap: 32px; max-width: 1100px; margin: 56px auto 0; padding-top: 40px; border-top: 1px solid var(--line); }
.scrolly .steps { padding-bottom: 20vh; }
.scrolly .step { min-height: 62vh; display: flex; align-items: center; opacity: .35; transition: opacity .25s; }
.scrolly .step.active { opacity: 1; }
.scrolly .step .inner { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.6; }
.scrolly .step .k { font-family: var(--font-ui); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 8px; display: block; }
.scrolly .step .inner b { font-family: var(--font-ui); font-size: 1.5rem; color: var(--ink); display: block; margin-bottom: 6px; }
.scrolly .graphic { position: sticky; top: 90px; align-self: start; }
.scrolly .graphic .card { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px 14px 8px; }
.scrolly .graphic svg { width: 100%; height: auto; display: block; font-family: var(--font-ui); }
.scrolly .graphic svg text { font-size: 12px; fill: var(--ink-soft); }
.scrolly .graphic .src { font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 6px; }
.scrolly .graphic .readout { font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); min-height: 22px; margin: 2px 0 6px; }
.scrolly .graphic .readout b { color: var(--accent); font-size: 18px; }
@media (max-width: 860px) { .scrolly { grid-template-columns: 1fr; gap: 12px; } .scrolly .graphic { order: -1; position: sticky; top: 60px; z-index: 5; background: #fff; padding-bottom: 8px; } .scrolly .step { min-height: 50vh; } .scrolly .steps { padding-bottom: 10vh; } }

/* explorer pages: the interactive panels from the companion site, restyled */
.explorer-intro { max-width: var(--text-w); margin-bottom: 20px; }
.explorer-intro p { font-size: 1.05rem; color: var(--ink-soft); }
.panel { font-family: var(--font-ui); font-size: 15px; max-width: 980px; }
.panel .help, .panel .note { font-family: var(--font-ui); }
.panel h3 { font-family: var(--font-serif); margin: 0; }

footer.site-footer { max-width: 1600px; margin: 0 auto; padding: 28px; border-top: 1px solid var(--line); font-family: var(--font-ui); font-size: 13px; color: var(--muted); display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer.site-footer a { color: var(--muted); text-decoration: underline; }
