:root { color-scheme: dark; }
:root {
  --canvas: #0b0a08;
  --panel: #15110e;
  --raised: #1d1813;
  --ink: #f3efe6;
  --muted: #c8c2b6;
  --faint: #8d867a;
  --line: rgba(243, 239, 230, 0.10);
  --line-strong: rgba(243, 239, 230, 0.24);
  --brass: #e6b45c;
  --brass-hover: #edc06e;
  --brass-soft: rgba(230, 180, 92, 0.14);
  --claret: #c66478;
  --claret-deep: #7a2f3d;
  --claret-soft: rgba(198, 100, 120, 0.14);
  --verdigris: #7fa897;
  --verdigris-deep: #2f5a4a;
  --verdigris-soft: rgba(127, 168, 151, 0.14);
  --selection: rgba(230, 180, 92, 0.30);
  --serif: "Newsreader", "Newsreader fallback", "Iowan Old Style", Charter, Georgia, serif;
  --sans: "Schibsted Grotesk", "Schibsted Grotesk fallback", -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Mono fallback", "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 4.5rem);
  --section: clamp(4rem, 9svh, 8rem);
  --r-1: 2px; --r-2: 6px;
  --measure: 28em;
}
@media (prefers-contrast: more) {
  :root { --faint: #c8c2b6; --muted: #f3efe6; --line: rgba(243, 239, 230, 0.40); --line-strong: rgba(243, 239, 230, 0.60); }
}
:root[data-theme="light"], [data-theme="light"] {
  --canvas: #f1ece2; --panel: #faf7f1; --raised: #e8e1d3;
  --ink: #1a1510; --muted: #5a5247; --faint: #6b635a;
  --line: rgba(26, 21, 16, 0.12); --line-strong: rgba(26, 21, 16, 0.30);
  --brass: #7f5311; --brass-hover: #6d4710; --brass-soft: rgba(127, 83, 17, 0.12);
  --claret: #7d2f3f; --claret-deep: #5a1f2c; --claret-soft: rgba(125, 47, 63, 0.10);
  --verdigris: #2f6b57; --verdigris-deep: #1f4a3c; --verdigris-soft: rgba(47, 107, 87, 0.10);
  --selection: rgba(127, 83, 17, 0.22);
  color-scheme: light;
}
@media (prefers-contrast: more) {
  :root[data-theme="light"], [data-theme="light"] { --faint: #5a5247; --muted: #1a1510; --line: rgba(26, 21, 16, 0.50); --line-strong: rgba(26, 21, 16, 0.60); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 clamp(1.125rem, 0.95rem + 0.4vw, 1.5rem)/1.6 var(--serif);
  font-optical-sizing: auto; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; }
@media (hover: hover) { a:hover { color: var(--brass); } }
p, ul, ol { margin: 0 0 1.05em; }
p { text-wrap: pretty; }
li { margin-block: 0.35em; }
li::marker { color: var(--faint); }
strong, b { font-style: normal; font-weight: 500; }
:where(em, i, cite, var, dfn, address) { font-weight: 400; }
:where(table, figcaption, .byline, .label, .eyebrow, .kicker, .library, .toc, .formula .where, .pull cite, .provenance, .nav-links, .btn, .textlink, .footer-meta) :is(em, i, cite, var, dfn, address) { font-style: normal; font-weight: 500; }
:where(code, pre, kbd, samp) :is(em, i, strong, b, cite, var, dfn, address) { font-style: normal; font-weight: 400; }
code { font: max(0.75rem, 0.86em)/1 var(--mono); color: var(--verdigris); background: var(--raised); padding: 0.12em 0.38em; border-radius: var(--r-1); }
pre { font: 0.82em/1.55 var(--mono); color: var(--muted); background: var(--raised); padding: 1rem 1.25rem; border-radius: var(--r-2); overflow-x: auto; margin: 1.2em 0 1.4em; }
pre code { background: none; padding: 0; color: inherit; font-size: 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
:where(.eyebrow, .kicker, .label, .fig-label, thead th, .shelf-name, .shelf li span) { font-family: var(--sans); font-weight: 500; font-size: 0.78125rem; line-height: 1.3; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.eyebrow { margin: 0 0 0.875rem; }
.kicker { color: var(--claret); margin: 0 0 1.75rem; }
.byline { font: 0.875rem/1.45 var(--sans); font-variant-numeric: tabular-nums lining-nums; color: var(--faint); margin: 0; }
.nw { white-space: nowrap; }
:is(h1, h2, h3, h4, h5, h6) .nw { display: inline-block; white-space: normal; }
.page { max-width: 125rem; margin: 0 auto; padding-inline: var(--gutter); padding-bottom: 4.5rem; }
.library { padding-block: 1.125rem 0.9375rem; border-bottom: 1px solid var(--line); font: 0.84375rem/1.6 var(--sans); }
.shelf { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1.5rem; row-gap: 1px; }
.shelf + .shelf { margin-top: 0.5rem; }
.shelf ul { display: contents; }
.shelf li { margin: 0; list-style: none; white-space: nowrap; }
.shelf-name { margin: 0; white-space: nowrap; }
.shelf li span { margin-right: 0.9em; }
.shelf a { color: var(--muted); text-decoration: none; padding-bottom: 0.125rem; border-bottom: 0 solid transparent; }
.shelf a + a { margin-left: 0.9em; }
@media (hover: hover) { .shelf a:hover { color: var(--ink); border-bottom-width: 1px; border-bottom-color: var(--line-strong); } }
.shelf a[aria-current="page"] { color: var(--ink); border-bottom-width: 1px; border-bottom-color: var(--brass); }
@media (max-width: 35rem) { .shelf-name { flex-basis: 100%; } .shelf li span { display: none; } .shelf { column-gap: 1.125rem; } }
.masthead { padding-block: 3.5rem 1.75rem; border-bottom: 3px double var(--line-strong); }
.library + .masthead { padding-top: 2.75rem; }
.masthead .eyebrow { color: var(--claret); }
.masthead h1 { font: 500 clamp(1.875rem, 1rem + 2.4vw, 3.375rem)/1.1 var(--serif); letter-spacing: -0.005em; margin: 0 0 0.875rem; text-wrap: balance; }
.toc { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.toc ol { margin: 0; padding-left: 1.6em; font: 0.9375rem/1.5 var(--sans); columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; padding-block: 0.125rem; }
.toc a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); } }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--brass); }
@media (max-width: 35rem) { .toc ol { columns: 1; } }
main { counter-reset: section; min-width: 0; }
@media (min-width: 62.5rem) {
  .page { display: grid; grid-template-columns: clamp(12.5rem, 17vw, 18.75rem) minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 5rem); align-items: start; }
  .masthead { grid-column: 1 / -1; }
  .library { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, max-content); column-gap: 2.25rem; row-gap: 0.3125rem; }
  .shelf { display: contents; }
  .toc { grid-column: 1; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding-block: 1.75rem; border-bottom: 0; }
  .toc ol { columns: 1; font-size: 0.90625rem; padding-left: 2.2em; }
  .toc li { padding-block: 0.25rem; }
  .page > main { grid-column: 2; padding-top: 0.75rem; }
}
section { padding-block: 0.5rem; }
section + section { margin-top: 2.5rem; }
main > section > h2 { font: 500 1.5em/1.2 var(--serif); letter-spacing: -0.005em; margin: 1.75rem 0 1rem; text-wrap: balance; counter-increment: section; }
main > section > h2::before { content: counter(section); font: 500 0.55em/1 var(--sans); color: var(--faint); letter-spacing: 0.04em; font-variant-numeric: tabular-nums lining-nums; vertical-align: 0.32em; margin-right: 0.9em; }
h3 { font: 500 1.15em/1.3 var(--serif); margin: 1.6em 0 0.5em; }
.formula { margin: 1.2em 0 1.4em; padding: 1rem 1.25rem; background: var(--raised); border-left: 3px solid var(--verdigris); border-radius: 0 var(--r-2) var(--r-2) 0; font: 1em/1.7 var(--serif); overflow-x: auto; }
.formula .f { display: block; white-space: nowrap; }
.formula var { font-style: italic; }
.formula .where var { font-style: normal; font-weight: 500; }
.formula sub { font-size: 0.75em; }
.formula .where { display: block; margin-top: 0.4em; font: max(0.8125rem, 0.8em)/1.5 var(--sans); color: var(--faint); }
.formula p.where { margin: 0.6em 0 0; }
.sig { border-collapse: collapse; }
.sig td { padding: 0.125rem 0.375rem 0.125rem 0; white-space: nowrap; vertical-align: baseline; }
.sig td:first-child { text-align: right; }
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); }
table { border-collapse: collapse; width: 100%; min-width: 42.5rem; font: max(0.8125rem, 0.76em)/1.45 var(--sans); font-variant-numeric: tabular-nums lining-nums; }
.matrix table { font-size: max(0.78125rem, 0.7em); min-width: 68em; }
th, td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--raised); position: sticky; top: 0; }
tbody th { font-weight: 500; white-space: normal; min-width: 6em; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
figure { margin: 1.6em 0 2em; max-width: 100%; }
.fig-scroll { overflow-x: auto; }
figcaption { font: max(0.8125rem, 0.74em)/1.5 var(--sans); color: var(--faint); margin-top: 0.5rem; }
.note, .caution, .pull { margin: 1.3em 0 1.5em; padding: 0.875rem 1.25rem; border-left: 1px solid var(--line-strong); background: var(--panel); border-radius: 0 var(--r-2) var(--r-2) 0; }
.note p:last-child, .caution p:last-child { margin: 0; }
.caution { border-left-width: 3px; border-left-color: var(--claret); }
.label { display: block; margin-bottom: 0.375rem; }
.caution .label { color: var(--claret); }
.pull { border-left-width: 3px; border-left-color: var(--claret); background: transparent; padding-block: 0.125rem; font: italic 400 1.25em/1.4 var(--serif); color: var(--ink); }
.pull p { margin: 0; }
.pull cite { display: block; font: 0.875rem/1.4 var(--sans); font-style: normal; color: var(--faint); margin-top: 0.625rem; }
.site {
  --fs-body: clamp(1.125rem, 0.95rem + 0.4vw, 1.5rem);
  --fs-sub: clamp(1.125rem, 0.9rem + 0.6vw, 1.75rem);
  --fs-lead: clamp(1.625rem, 0.9rem + 1.5vw, 2.5rem);
  --fs-display: clamp(2.25rem, 1rem + 3.6vw, 4.5rem);
  --fs-wordmark: clamp(3rem, 1rem + 5.5vw, 6rem);
  --fs-mail: clamp(1.625rem, 1rem + 1.8vw, 2.75rem);
  --fs-brand: clamp(1.25rem, 1.15rem + 0.4vw, 1.5625rem);
  --fs-ui: clamp(0.9375rem, 0.85rem + 0.2vw, 1.0625rem);
  --fs-meta: 0.875rem;
  --after: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --target: 2.75rem;
  position: relative; display: flex; flex-direction: column; min-block-size: 100svh;
  font-size: var(--fs-body);
}
.site > main { flex: 1 0 auto; }
.nav { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1rem; padding-block: 0.5rem; padding-inline: max(var(--gutter), (100% - 75rem) / 2); background: var(--canvas); border-bottom: 1px solid var(--line); }
@media (width < 22.5rem), (height < 28rem) { .nav { position: static; } }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; min-block-size: var(--target); text-decoration: none; color: var(--ink); }
@media (hover: hover) { .brand:hover { color: var(--ink); } }
.brand-dot { flex: none; inline-size: 0.5rem; block-size: 0.5rem; background: var(--brass); border-radius: var(--r-1); }
.brand-name { font: 500 var(--fs-brand)/1 var(--serif); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: clamp(0.75rem, 0.25rem + 2vw, 2.25rem); margin-inline-start: auto; font: 400 var(--fs-ui)/1 var(--sans); }
.nav-links a { display: inline-flex; align-items: center; min-block-size: var(--target); color: var(--muted); text-decoration: none; }
@media (hover: hover) { .nav-links a:hover { color: var(--ink); } }
.nav-links a[aria-current="page"] { color: var(--ink); }
.hero { position: relative; padding: clamp(4.5rem, 12svh, 10rem) var(--gutter) clamp(4rem, 10svh, 8rem); }
.lamp { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(70% 55% at 50% 115%, var(--brass-soft), transparent 65%); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1, .display { font: 500 var(--fs-display)/1.08 var(--serif); letter-spacing: -0.01em; margin: 0; text-wrap: balance; max-inline-size: 14em; }
.hero-sub { font: 400 var(--fs-sub)/1.5 var(--serif); color: var(--muted); margin: 1.3em 0 0; max-inline-size: var(--measure); text-wrap: balance; }
.actions { display: flex; flex-wrap: wrap; gap: 0.875rem 1.5rem; align-items: center; margin-top: 2.5rem; }
.section { position: relative; margin: 0; padding: var(--section) var(--gutter); }
.section--rule { border-top: 1px solid var(--line); }
.wrap { max-inline-size: 75rem; margin-inline: auto; }
.wrap--narrow { max-inline-size: 60rem; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 34em)); column-gap: clamp(2rem, 1rem + 4vw, 5rem); row-gap: 1.25em; align-items: baseline; container: cols / inline-size; }
.cols > * { grid-column: 1 / -1; min-inline-size: 0; }
.cols > :last-child:not(:first-child) { max-inline-size: var(--measure); }
@container cols (width >= 46em) {
  .cols > * { grid-column: auto; }
  .cols > :nth-child(n + 3) { grid-column: 1 / -1; }
}
.lead { font: 500 var(--fs-lead)/1.22 var(--serif); letter-spacing: -0.008em; margin: 0; max-inline-size: 22em; text-wrap: balance; }
.body { color: var(--muted); margin: 0; max-inline-size: var(--measure); text-wrap: pretty; }
.body + .body { margin-top: 1em; }
.accent { font-style: italic; font-weight: 400; color: var(--claret); }
.accent--line { display: block; margin-top: 0.15em; }
:where(* + p).accent--line { margin-top: 1.5em; max-inline-size: var(--measure); }
.wordmark { font: 500 var(--fs-wordmark)/1 var(--serif); letter-spacing: -0.02em; margin: 0 0 1.5rem; }
.cells { --cell-pad: clamp(1.25rem, 3vw, 2.5rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); container: cells / inline-size; }
.cells > * { grid-column: 1 / -1; }
@container cells (width >= 48em) {
  .cells > * { grid-column: auto; }
  .cells > :where(.cell--wide, :last-child:nth-child(odd)) { grid-column: 1 / -1; }
}
.cell { display: flex; flex-direction: column; min-inline-size: 0; background: var(--panel); padding: var(--cell-pad); }
.cell h3 { font: 500 1.2em/1.25 var(--serif); margin: 0 0 0.5em; text-wrap: balance; }
.cell p:not(.label) { font-size: 0.95em; color: var(--muted); margin: 0; max-inline-size: var(--measure); }
.cell .actions { margin-top: auto; padding-top: 1.25em; }
.cell--wide { grid-column: 1 / -1; }
@container cells (width >= 48em) {
  .cells > :where(.cell--wide, :last-child:nth-child(odd)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr auto; column-gap: calc(2 * var(--cell-pad) + 1px); align-content: start; }
}
.cell > .label { grid-area: 2 / 1 / 3 / -1; }
.cell > h3 { grid-area: 3 / 1; align-self: baseline; }
.cell > p:not(.label) { grid-column: 2; grid-row: 3 / 5; align-self: baseline; }
.cell > .actions { grid-column: 2; grid-row: 5; }
.btn { display: inline-flex; align-items: center; gap: 0.625em; min-block-size: var(--target); font: 500 var(--fs-ui)/1.25 var(--sans); text-decoration: none; border: 1px solid transparent; border-radius: var(--r-1); padding: 0.6875em 1.25em; }
.btn--solid { background: var(--brass); color: var(--canvas); }
.btn--ghost { color: var(--ink); }
@media (hover: hover) {
  .btn--solid:hover { background: var(--brass-hover); color: var(--canvas); }
  .btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a, .nav-links a, .shelf a { transition: color 0.2s, border-color 0.2s, text-decoration-color 0.2s; }
  .btn { transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
  .btn .arrow { transition: transform 0.2s; }
  .btn:hover .arrow { transform: translateX(3px); }
}
.textlink { display: inline-flex; align-items: center; gap: 0.5em; min-block-size: var(--target); font: 500 var(--fs-ui)/1.25 var(--sans); }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-block: 2.5rem; padding-inline: max(var(--gutter), (100% - 75rem) / 2); border-top: 3px double var(--line-strong); }
.footer .brand-name { font-size: clamp(1.125rem, 1.05rem + 0.2vw, 1.3125rem); }
.footer-meta { font: 400 var(--fs-meta)/1.4 var(--sans); color: var(--faint); }
a { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.nav-links a[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 0.5em; }
.btn--ghost { border-color: var(--faint); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
@supports (animation-timeline: view()) and (animation-range: entry 0% entry 20svh) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 20svh; }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media print {
  :root { --canvas: #ffffff; --panel: #faf7f1; --raised: #efe9de; --ink: #1a1510; --muted: #5a5247; --faint: #6b635a; --line: rgba(26,21,16,0.14); --line-strong: rgba(26,21,16,0.32); --brass: #7f5311; --brass-soft: rgba(127, 83, 17, 0.12); --claret: #7d2f3f; --claret-soft: rgba(125, 47, 63, 0.10); --verdigris: #2f6b57; --verdigris-soft: rgba(47, 107, 87, 0.10); --selection: rgba(127, 83, 17, 0.22); color-scheme: light; }
  body { font-size: 11pt; }
  :where(.eyebrow, .kicker, .label, .fig-label, thead th, .shelf-name, .shelf li span) { font-size: 8pt; }
  .page { display: block; padding: 0; }
  .toc { position: static; break-after: page; }
  .nav, .lamp, .library { display: none; }
  .table-wrap { border: 0; }
  h2 { break-after: avoid; }
  figure, .formula, tr, .cell { break-inside: avoid; }
}
@media print and (prefers-contrast: more) {
  :root { --faint: #5a5247; --muted: #1a1510; --line: rgba(26, 21, 16, 0.50); --line-strong: rgba(26, 21, 16, 0.60); }
}
@media (forced-colors: active) {
  :root, :root[data-theme="light"], [data-theme="light"] { --canvas: Canvas; --panel: Canvas; --raised: Canvas; --ink: CanvasText; --muted: CanvasText; --faint: CanvasText; --line: GrayText; --line-strong: CanvasText; --brass: CanvasText; --brass-hover: CanvasText; --brass-soft: Canvas; --claret: CanvasText; --claret-deep: CanvasText; --claret-soft: Canvas; --verdigris: CanvasText; --verdigris-deep: CanvasText; --verdigris-soft: Canvas; }
  .lamp { display: none; }
  .brand-dot { forced-color-adjust: none; background: CanvasText; }
  .cells { background: none; overflow-x: clip; }
  .cell { margin: -1px; border: 1px solid GrayText; }
}
.hero h1.wordmark { font-size: var(--fs-wordmark); line-height: 1; letter-spacing: -0.02em; }
.cols--label { --label-track: 12em; --label-gap: clamp(1.5rem, 1rem + 2vw, 4rem); grid-template-columns: minmax(0, var(--label-track)) minmax(0, var(--measure)); column-gap: var(--label-gap); row-gap: 0.75em; }
@container cols (width >= 36em) { .cols--label > * { grid-column: auto; } }
.mail { display: inline-block; font: 500 var(--fs-mail)/1.2 var(--serif); letter-spacing: -0.01em; text-decoration-thickness: 1px; text-underline-offset: 0.12em; overflow-wrap: anywhere; }
.cell .label { margin: 0 0 0.75rem; }
.after { margin-top: var(--after); }
.hero-sub + .hero-sub { margin-top: 0.75em; }
.closing { text-align: center; }
.closing .lead { margin-inline: auto; }
.closing .body { margin: 1.25em auto 0; }
.closing .actions { justify-content: center; margin-top: 2rem; }
.lead + .body { margin-top: 1.25em; }
