@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/assets/sg-latin.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/assets/jb-latin.woff2) format('woff2'); }
:root {
  --paper: #F4F6F5; --surface: #FFFFFF; --ink: #0F1F1A; --muted: #56655F; --line: #D5DCD9; --soft: #E9EEEC;
  --gold: #9A6F1E; --gold-bright: #D9A441; --teal: #0B7A65; --night: #0F1F1A; --night-line: #263A33; --night-muted: #A3B2AC; --code-bg: #14231E; --code-ink: #D5E4DE;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0C1512; --surface: #131F1B; --ink: #E8EEEB; --muted: #94A39E; --line: #26352F; --soft: #16231F; --gold: #D9A441; --teal: #45BFA3; --night: #08100E; --code-bg: #101B17; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, pre, figure { margin: 0; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .88em; }
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; background: var(--gold-bright); color: #0F1F1A; padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { inset-block-start: 12px; }

.top { position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px; background: var(--night); color: #E8EEEB; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo em { font-style: normal; font-weight: 500; color: var(--gold-bright); }
.top-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top-links a { color: var(--night-muted); text-decoration: none; font-weight: 500; }
.top-links a:hover { color: #fff; }
.top-links .top-cta { background: var(--gold-bright); color: #0F1F1A; padding: 7px 14px; border-radius: 8px; font-weight: 650; }
.top-links .top-cta:hover { color: #0F1F1A; background: #E6B552; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 48px; inline-size: min(1320px, 100% - 56px); margin-inline: auto; align-items: start; }
.side, .toc { position: sticky; inset-block-start: 76px; padding-block: 36px; max-block-size: calc(100vh - 76px); overflow-y: auto; }
.side summary { display: none; }
.side ul, .toc ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.side a:hover { color: var(--ink); background: var(--soft); }
.side a[aria-current] { color: var(--ink); background: var(--soft); font-weight: 650; box-shadow: inset 3px 0 0 var(--gold-bright); }
.toc { font-size: 14px; }
.toc p { font-weight: 650; margin-block-end: 8px; }
.toc a { display: block; padding-block: 4px; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }

.content { padding-block: 40px 80px; max-inline-size: 780px; min-inline-size: 0; }
.content h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin-block-end: 18px; }
.content h2 { font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: -.015em; margin-block: 48px 14px; padding-block-start: 28px; border-block-start: 1px solid var(--line); }
.content h3 { font-size: 18px; font-weight: 650; margin-block: 30px 10px; }
.content p { margin-block: 14px; max-inline-size: 72ch; }
.content .lead { font-size: 19px; color: var(--muted); }
.content ul { padding-inline-start: 22px; margin-block: 14px; display: grid; gap: 8px; max-inline-size: 72ch; }
.content :not(pre) > code { background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.note { border-inline-start: 3px solid var(--gold-bright); background: var(--soft); padding: 12px 16px; border-radius: 0 8px 8px 0; }

.code, .tabs { margin-block: 18px; }
.code figcaption { font-size: 13px; color: var(--muted); margin-block-end: 6px; }
pre { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--night-line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; font: 400 13.5px/1.65 var(--mono); tab-size: 2; }
pre code { font: inherit; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tab-row { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px; background: var(--code-bg); border: 1px solid var(--night-line); border-block-end: 0; border-radius: 10px 10px 0 0; }
.tab-row label { padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--night-muted); }
.tab-row label:hover { color: #fff; }
.tabs pre { display: none; border-start-start-radius: 0; border-start-end-radius: 0; }
.tab-0:checked ~ .tab-panel-0, .tab-1:checked ~ .tab-panel-1, .tab-2:checked ~ .tab-panel-2, .tab-3:checked ~ .tab-panel-3, .tab-4:checked ~ .tab-panel-4, .tab-5:checked ~ .tab-panel-5, .tab-6:checked ~ .tab-panel-6, .tab-7:checked ~ .tab-panel-7 { display: block; }
.tab-0:checked ~ .tab-row .tab-label-0, .tab-1:checked ~ .tab-row .tab-label-1, .tab-2:checked ~ .tab-row .tab-label-2, .tab-3:checked ~ .tab-row .tab-label-3, .tab-4:checked ~ .tab-row .tab-label-4, .tab-5:checked ~ .tab-row .tab-label-5, .tab-6:checked ~ .tab-row .tab-label-6, .tab-7:checked ~ .tab-row .tab-label-7 { background: var(--gold-bright); color: #0F1F1A; }
.tab-0:focus-visible ~ .tab-row .tab-label-0, .tab-1:focus-visible ~ .tab-row .tab-label-1, .tab-2:focus-visible ~ .tab-row .tab-label-2, .tab-3:focus-visible ~ .tab-row .tab-label-3, .tab-4:focus-visible ~ .tab-row .tab-label-4, .tab-5:focus-visible ~ .tab-row .tab-label-5, .tab-6:focus-visible ~ .tab-row .tab-label-6, .tab-7:focus-visible ~ .tab-row .tab-label-7 { outline: 2px solid #fff; outline-offset: 1px; }

.table-wrap { overflow-x: auto; margin-block: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; inline-size: 100%; font-size: 15px; }
th { text-align: start; font-size: 13px; font-weight: 650; color: var(--muted); padding: 10px 14px; border-block-end: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-block-end: 1px solid var(--soft); vertical-align: top; }
tr:last-child td { border-block-end: 0; }
td:nth-child(-n+2) code { white-space: nowrap; }
td:first-child { white-space: nowrap; }
td:first-child:last-child, td:only-child { white-space: normal; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-block-start: 56px; }
.pager a { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 650; background: var(--surface); }
.pager a:hover { border-color: var(--teal); }
.pager span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.pager-next { text-align: end; }
.foot { border-block-start: 1px solid var(--line); padding: 22px 28px; color: var(--muted); font-size: 14px; }

@media (max-width: 1180px) { .layout { grid-template-columns: 230px minmax(0, 1fr); gap: 36px; } .toc { display: none; } }
@media (max-width: 820px) {
  .top { padding: 10px 16px; }
  .top-links a:not(.top-cta) { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); inline-size: calc(100% - 32px); gap: 0; }
  .side { position: static; padding-block: 0 40px; max-block-size: none; order: 2; }
  .side-box { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .side summary { display: block; padding: 11px 14px; font-weight: 650; cursor: pointer; }
  .side ul { padding: 0 6px 8px; }
  .content { padding-block: 24px 56px; }
  table { min-inline-size: 540px; }
}
