:root {
  color-scheme: dark;
  --scroll-thumb: rgba(178, 195, 214, .22);
  --scroll-thumb-hover: rgba(178, 195, 214, .40);
  --bg: #081320;
  --panel: #0C1A2E;
  --panel2: #16293E;
  --code-bg: #060F1A;
  --line: #28435C;
  --line-hi: #547FB0;
  --focus: #D9A441;
  --line-soft: #1B3048;
  --ink: #F4F1E8;
  --body: #D2DBE6;
  --dim: #B2C3D6;
  --faint: #8A9DB3;
  --gold: #D9A441;
  --gold-ink: #D9A441;
  --gold-rule: rgba(217, 164, 65, .45);
  --on-gold: #0C1A2E;
  --green: #2FC274;
  --green-ink: #2FC274;
  --red: #F0563F;
  --hover: rgba(255, 255, 255, .05);
  --nav-bg: rgba(12, 26, 46, .88);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .40);
  --glow-a: rgba(217, 164, 65, .16);
  --glow-b: rgba(75, 211, 154, .07);
  --mono: 'IBM Plex Mono', 'Consolas', monospace;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --nav-h: 60px;
  --lead: 20px;
  --radius: 8px;
  --t: 200ms cubic-bezier(.08, .52, .52, 1);
}
:root[data-theme='light'] {
  color-scheme: light;
  --scroll-thumb: rgba(43, 53, 66, .20);
  --scroll-thumb-hover: rgba(43, 53, 66, .38);
  --bg: #F2EEE4;
  --panel: #FCF9F2;
  --panel2: #FFFDF8;
  --code-bg: #EDE6D6;
  --line: #BDAE8A;
  --line-hi: #8C7B52;
  --focus: #8A6210;
  --line-soft: #D3C7AB;
  --ink: #07090D;
  --body: #14181F;
  --dim: #2B3542;
  --faint: #4A5666;
  --gold-ink: #8A6210;
  --gold-rule: rgba(138, 98, 16, .55);
  --green: #0F9150;
  --green-ink: #0C7A43;
  --red: #D2382C;
  --hover: rgba(12, 26, 46, .06);
  --nav-bg: rgba(242, 238, 228, .90);
  --shadow-sm: 0 1px 2px rgba(12, 26, 46, .10);
  --shadow-md: 0 10px 30px rgba(12, 26, 46, .14);
  --glow-a: rgba(217, 164, 65, .22);
  --glow-b: rgba(47, 174, 107, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
code, kbd, pre, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; border: 0; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb); border-radius: 10px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-button, ::-webkit-scrollbar-corner { display: none; background: transparent; }

.skip {
  position: fixed; top: 16px; left: 100%; z-index: 201;
  padding: 8px 16px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--gold); border-radius: var(--radius); text-decoration: none;
}
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.goldrule { height: 3px; background: linear-gradient(90deg, #D9A441, #C8952F); }

.nav {
  position: sticky; top: 0; z-index: 200; height: var(--nav-h);
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.nav-in {
  height: 100%; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; max-width: 1720px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; font-weight: 600;
  color: var(--gold-ink); border: 1px solid var(--line); border-radius: 4px;
  padding: 3px 7px; text-transform: uppercase; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--dim); text-decoration: none;
  padding: 6px 10px; border-radius: 6px; transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-link:hover { color: var(--gold-ink); background: var(--hover); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid transparent; background: transparent;
  color: var(--dim); cursor: pointer; transition: background var(--t), color var(--t);
  flex-shrink: 0; padding: 0;
}
.icon-btn:hover { background: var(--hover); color: var(--gold-ink); }
.icon-btn svg { width: 17px; height: 17px; }
.sun { display: none; }
:root[data-theme='light'] .sun { display: block; }
:root[data-theme='light'] .moon { display: none; }

.cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 7px;
  font-weight: 700; font-size: 12.5px; text-decoration: none; color: var(--on-gold);
  background: linear-gradient(115deg, #C8952F 0%, #D9A441 35%, #F2D488 50%, #D9A441 65%, #C8952F 100%);
  background-size: 250% 100%; animation: sheen 5.5s linear infinite;
  transition: transform .15s; white-space: nowrap; flex-shrink: 0;
}
.cta:hover { transform: translateY(-1px); }
.cta .arw { display: inline-block; animation: arw 1.5s ease-in-out infinite; }
@keyframes sheen { to { background-position: -250% 0; } }
@keyframes arw { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

.main { position: relative; }
.main::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 460px; pointer-events: none;
  background:
    radial-gradient(640px 320px at 74% 0%, var(--glow-a), transparent 70%),
    radial-gradient(520px 280px at 4% 22%, var(--glow-b), transparent 72%);
}
.wrap { max-width: 880px; margin: 0 auto; padding: 26px 16px 56px; position: relative; }

.crumbs {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px; color: var(--faint);
  text-transform: uppercase; margin-bottom: 14px;
}
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--gold-ink); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px; font-weight: 600;
  color: var(--gold-ink); text-transform: uppercase; margin-bottom: 10px;
}
h1 {
  font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.15;
  letter-spacing: -.6px; color: var(--ink); margin: 0 0 16px;
}
.lede { font-size: 17px; line-height: 1.72; color: var(--body); margin: 0 0 26px; max-width: 68ch; }
.lede a, .prose p a, .prose li a, .prose td a {
  color: var(--gold-ink); text-decoration: underline; text-decoration-color: var(--gold-rule);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.lede a:hover, .prose p a:hover, .prose li a:hover, .prose td a:hover {
  text-decoration-color: currentColor; text-decoration-thickness: 2px;
}

#prose { scroll-margin-top: 76px; outline: none; }
.prose h2 {
  font-size: 27px; font-weight: 600; line-height: 1.25; letter-spacing: -.4px; color: var(--ink);
  margin: 52px 0 6px; padding-top: 4px; scroll-margin-top: 76px;
}
.prose p { margin: 0 0 var(--lead); }
.prose ul, .prose ol { margin: 0 0 var(--lead); padding-left: 24px; }
.prose li + li { margin-top: 5px; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--ink); font-weight: 600; }
.sub { font-size: 14.5px; color: var(--faint); margin: -2px 0 18px; max-width: 66ch; }
.prose :not(pre) > code {
  font-size: 88%; padding: 1px 5px; border-radius: 5px;
  background: var(--panel2); border: 1px solid var(--line-soft); color: var(--gold-ink);
}

.code {
  position: relative; background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 0 0 var(--lead); overflow: hidden;
}
.code-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--faint);
  padding: 8px 14px; border-bottom: 1px solid var(--line-soft); text-transform: uppercase;
}
.code pre {
  margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6;
  color: var(--ink); font-family: var(--mono);
}
.code-title + pre { padding-top: 12px; }
.copy {
  position: absolute; top: 8px; right: 8px; opacity: 0; padding: 5px 9px; font-size: 11px;
  font-family: var(--mono); letter-spacing: .6px; color: var(--dim); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-hi); border-radius: 6px;
  transition: opacity var(--t), color var(--t), border-color var(--t);
}
.code:hover .copy { opacity: .75; }
@media (hover: none) { .code .copy { opacity: .8; } }
.copy:hover, .copy:focus-visible { opacity: 1; color: var(--gold-ink); border-color: var(--gold); }
.copy.done { opacity: 1; color: var(--green-ink); border-color: var(--green); }

.tablewrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 var(--lead); background: var(--panel);
}
.tablewrap table { width: 100%; border-collapse: collapse; min-width: 440px; }
.tablewrap th {
  text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.2px;
  font-weight: 600; color: var(--faint); text-transform: uppercase; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tablewrap td {
  padding: 11px 14px; font-size: 14px; line-height: 1.55; border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.tablewrap tr:last-child td { border-bottom: 0; }
.tablewrap td b, .tablewrap td strong { color: var(--ink); font-weight: 600; }
.num { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap; }

.note {
  border-left: 5px solid var(--gold); border-radius: var(--radius);
  background: var(--panel); padding: 14px 16px; margin: 0 0 var(--lead);
  box-shadow: var(--shadow-sm);
}
.note-t {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold-ink); margin-bottom: 4px;
}
.note p { margin: 0; font-size: 14.5px; }
.note p + p { margin-top: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; margin: 0 0 var(--lead); }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; text-decoration: none; display: block; color: inherit;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
a.tile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tile-k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px; font-weight: 600;
  color: var(--gold-ink); text-transform: uppercase; margin-bottom: 7px;
}
.tile-t { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.tile-d { font-size: 13.5px; line-height: 1.6; color: var(--dim); }

.foot {
  border-top: 1px solid var(--line-soft); padding: 22px 20px 30px; text-align: center;
  font-size: 12.5px; color: var(--faint); position: relative;
}
.foot a { color: var(--gold-ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 996px) {
  .nav-links { display: none; }
  .brand-tag { display: none; }
  h1 { font-size: 32px; }
  .prose h2 { font-size: 23px; margin-top: 42px; }
}
@media (max-width: 640px) {
  .cta { display: none; }
  body { font-size: 14.5px; }
  h1 { font-size: 27px; }
  .lede { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .cta .arw { animation: none; }
  * { transition-duration: 1ms !important; }
}
