:root {
  --ink: #070707;
  --panel: #130c0d;
  --panel-2: #261012;
  --line: #4b2427;
  --paper: #f7f5f1;
  --muted: #b8aaaa;
  --yellow: #ffd21c;
  --purple: #9b6dff;
  --red: #e21c2a;
  --white: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--paper);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 78% 8%, #4a1017 0, transparent 30rem), var(--ink); }
a { color: inherit; }
.shell { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.speed-lines { position: fixed; inset: 0; pointer-events: none; opacity: .045; background: repeating-linear-gradient(115deg, transparent 0 34px, #fff 35px 36px); mask-image: linear-gradient(to bottom, #000, transparent 70%); }

.site-header { min-height: 106px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; line-height: .85; letter-spacing: -.04em; }
.brand span:last-child { display: flex; align-items: baseline; gap: .32em; min-width: 0; white-space: nowrap; }
.brand b, .brand strong { font-size: clamp(1.15rem, 3.2vw, 1.72rem); }
.brand b { letter-spacing: .04em; color: var(--white); }
.brand strong { font-style: italic; }
.brand-mark { display: block; height: 36px; }
.brand-mark img { display: block; height: 100%; width: auto; }
.status { color: var(--muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .12em; }
.status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-right: 8px; box-shadow: 0 0 0 4px #ffb00018; }

.intro { min-height: 201.09px; padding: 5px 0; }
.intro-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.intro-top h2 { max-width: 800px; }
.eyebrow { color: var(--yellow); font-weight: 800; letter-spacing: .17em; font-size: .78rem; margin: 0 0 18px; }
.eyebrow span { color: var(--paper); padding: 0 .3em; }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.3rem); line-height: .9; letter-spacing: -.065em; text-transform: uppercase; }
h1 em { color: transparent; -webkit-text-stroke: 1px #d7cecc; font-style: italic; }
h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: .9; letter-spacing: -.065em; text-transform: uppercase; }
h2 em { color: transparent; -webkit-text-stroke: 1px #d7cecc; font-style: italic; }
.lede { max-width: 650px; color: var(--muted); font-size: 1.1rem; line-height: 1.65; margin: 28px 0 0; }

.facts { margin-top: 36px; max-width: 420px; }
.facts h3, .links h3 { margin: 0 0 12px; color: var(--yellow); font-size: .78rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; text-shadow: 0 0 6px var(--red), 0 0 14px #e21c2acc, 0 0 22px #e21c2a66; }
.links { margin-top: 48px; }
.facts table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
.facts th, .facts td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 7.2rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--panel-2); }
.facts td { font-size: .95rem; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 1rem; letter-spacing: .13em; text-transform: uppercase; }
.section-heading span { color: var(--muted); font-size: .82rem; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; grid-auto-flow: row dense; }
.link-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 104px; padding: 21px 22px; color: var(--paper); background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); text-decoration: none; overflow: hidden; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
button.link-card { appearance: none; width: 100%; font: inherit; text-align: left; cursor: pointer; }
.link-card--expand.is-open { border-color: #8d3b43; }
.link-card--expand.is-open::before { transform: scaleY(1); }
.link-panel { grid-column: 1 / -1; background: var(--panel); border: 1px solid var(--line); }
.link-panel__inner { padding: 28px 30px 32px; max-width: 760px; }
.link-panel__inner h3 { margin: 0 0 18px; color: var(--paper); font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.04em; text-transform: none; }
.link-panel__inner h3 s { color: var(--muted); }
.link-panel__inner h4 { margin: 28px 0 12px; color: var(--yellow); font-size: .78rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.link-panel__inner p { margin: 0 0 14px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.link-panel__inner p:last-child { margin-bottom: 0; }
.link-panel__inner a { color: var(--yellow); }
.panel-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.panel-table th, .panel-table td { padding: 9px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel-table tr:last-child th, .panel-table tr:last-child td { border-bottom: 0; }
.panel-table th { width: 7.5rem; color: var(--yellow); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel-table td { color: var(--paper); font-size: .95rem; line-height: 1.45; }
.link-card::before { content: ""; position: absolute; left: 0; inset-block: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform .18s ease; }
.link-card:hover, .link-card:focus-visible { transform: translateY(-2px); border-color: #8d3b43; outline: none; }
.link-card:hover::before, .link-card:focus-visible::before { transform: scaleY(1); }
.link-card--featured { border-color: #8d721d; background: linear-gradient(145deg, #2c2710, #18130a); }
.link-card--featured::before { background: var(--yellow); transform: scaleY(1); }
.link-card--purple { border-color: #6d4a9a; background: linear-gradient(145deg, #241833, #140f1c); }
.link-card--purple::before { background: var(--purple); transform: scaleY(1); }
.link-card.is-placeholder { cursor: default; opacity: .72; }
.link-card.is-placeholder .link-card__arrow { visibility: hidden; }
.link-card__icon { width: 44px; height: 44px; display: grid; place-items: center; background: #080606; border: 1px solid var(--line); color: var(--red); }
.link-card--featured .link-card__icon { color: var(--yellow); border-color: #6d5918; }
.link-card--purple .link-card__icon { color: var(--purple); border-color: #5a3d82; }
.link-card__icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.link-card__icon:has(.link-card__logo) { overflow: hidden; padding: 0; background: #000; }
.link-card__logo { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.link-card__copy { display: grid; gap: 7px; }
.link-card__copy strong { font-size: 1.05rem; }
.link-card__copy small { color: var(--muted); font-size: .87rem; line-height: 1.35; }
.link-card__arrow { color: var(--muted); font-size: 1.2rem; }

footer { display: flex; justify-content: space-between; gap: 20px; color: #71849b; font-size: .77rem; text-transform: uppercase; letter-spacing: .1em; padding-block: 64px 32px; }

.join-bug { flex: 0 0 auto; margin-left: auto; display: grid; gap: 7px; width: 232px; padding: 16px 18px 17px; color: var(--ink); background: var(--yellow); text-decoration: none; box-shadow: 0 18px 40px #0007, 6px 6px 0 var(--red); transform: skewX(-8deg); transition: transform .18s ease, box-shadow .18s ease; }
.join-bug__mark { display: grid; gap: 3px; width: 28px; }
.join-bug__mark i { display: block; height: 3px; background: var(--ink); }
.join-bug__mark i:nth-child(2) { width: 78%; background: var(--red); }
.join-bug__mark i:nth-child(3) { width: 55%; }
.join-bug strong { font-size: 2rem; line-height: .8; letter-spacing: -.06em; text-transform: uppercase; }
.join-bug small { display: block; max-width: 12em; font-size: .8rem; line-height: 1.3; color: #3d3208; }
.join-bug__short { display: none; text-transform: uppercase;}
.join-bug:hover, .join-bug:focus-visible { transform: skewX(-8deg) translate(-2px, -3px); box-shadow: 0 22px 48px #0008, 8px 8px 0 var(--red); outline: none; }

.document-page { background: var(--ink); }
.back-link, .open-doc { color: var(--paper); font-size: .86rem; text-decoration: none; padding: 11px 14px; border: 1px solid var(--line); background: var(--panel); }
.back-link:hover, .open-doc:hover { border-color: var(--yellow); }
.document-main { padding-top: 56px; }
.document-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.document-heading h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.document-heading p:last-child { color: var(--muted); margin-bottom: 0; }
.back-to-top { display: none; }
@media (min-width: 721px) {
  .back-to-top.is-visible { position: fixed; z-index: 6; right: 28px; bottom: 28px; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; color: var(--paper); background: var(--panel); border: 1px solid var(--line); font: inherit; font-size: .82rem; font-weight: 800; letter-spacing: .04em; cursor: pointer; box-shadow: 0 16px 40px #000a; }
  .back-to-top span { color: var(--yellow); font-size: 1.15rem; line-height: 1; }
  .back-to-top:hover, .back-to-top:focus-visible { border-color: var(--yellow); outline: none; }
}
.document-frame { min-height: 70vh; background: #fff; border: 1px solid var(--line); }
.document-frame iframe { display: block; width: 100%; height: 78vh; border: 0; }
.document-empty { min-height: 520px; display: grid; place-items: center; align-content: center; padding: 32px; color: #334155; text-align: center; }
.document-empty svg { width: 54px; height: 54px; fill: none; stroke: var(--red); stroke-width: 1.4; }
.document-empty h2 { margin: 18px 0 8px; }
.document-empty p { max-width: 520px; margin: 0; line-height: 1.6; }
.document-empty code { color: #0f172a; font-weight: 700; }

.code-searchbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 0; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(10px); }
.code-search { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); }
.code-search:focus-within { border-color: var(--yellow); }
.code-search span { color: var(--yellow); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.code-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--paper); font: inherit; font-size: 1rem; padding: 12px 0; color-scheme: dark; }
.code-search input:focus { outline: none; }
.code-search input::placeholder { color: var(--muted); }
.code-search__status { margin: 0; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.code-search__status:empty { display: none; }
.code-search__nav { display: flex; gap: 6px; }
.code-search__nav button { min-width: 64px; height: 40px; padding: 0 12px; color: var(--paper); background: var(--panel); border: 1px solid var(--line); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.code-search__nav button:hover, .code-search__nav button:focus-visible { border-color: var(--yellow); outline: none; }
.code-search__nav button:disabled { opacity: .35; cursor: default; }
.code-doc { max-width: 820px; padding-bottom: 48px; }
.code-doc__lede { margin: 0 0 10px; color: var(--paper); font-size: 1.15rem; }
.code-doc__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.code-doc__links a { color: var(--paper); font-size: .78rem; font-weight: 700; line-height: 1.3; text-decoration: none; padding: 7px 10px; background: var(--panel); border: 1px solid var(--line); }
.code-doc__links a:hover, .code-doc__links a:focus-visible { border-color: var(--yellow); color: var(--yellow); outline: none; }
.code-doc__links a[hidden] { display: none; }
.code-doc h2 { margin: 48px 0 14px; color: var(--yellow); font-size: .82rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 0 6px var(--red), 0 0 14px #e21c2acc, 0 0 22px #e21c2a66; scroll-margin-top: 88px; }
.code-doc mark.code-hit { background: #ffd21c40; color: var(--paper); padding: 0 .12em; scroll-margin-top: 96px; }
.code-doc mark.code-hit--current { background: var(--yellow); color: var(--ink); }
.code-doc h3 { margin: 28px 0 10px; color: var(--paper); font-size: 1.05rem; }
.code-doc p, .code-doc li { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.code-doc p { margin: 0 0 14px; }
.code-doc ul { margin: 0 0 18px; padding-left: 1.15rem; }
.code-doc li + li { margin-top: 8px; }
.code-doc a { color: var(--yellow); text-underline-offset: 3px; }
.code-doc strong { color: var(--paper); }
.code-kicker { color: var(--paper) !important; font-weight: 700; }
.code-note { font-size: .86rem !important; }
.code-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 28px; }
.code-panel { padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); }
.code-panel h3 { margin-top: 0; color: var(--yellow); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.code-officials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 28px; }
.code-officials > div { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); }
.code-officials h3 { margin: 0 0 10px; color: var(--yellow); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.code-officials p { margin: 0; color: var(--paper); line-height: 1.7; }
.code-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 24px; }
.code-cats > div { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); }
.code-cats strong { display: block; color: var(--yellow); letter-spacing: .08em; }
.code-cats small { display: block; margin: 6px 0 10px; color: var(--paper); font-size: .88rem; }
.code-cats p { margin: 0; font-size: .9rem; }
.code-log { border-top: 1px solid var(--line); padding-top: 8px; }
.code-log h3 { color: var(--muted); font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; }
.code-log li { font-size: .92rem; }

.broadcast-main { padding-top: 56px; }
.broadcast-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.broadcast-heading h1 { font-size: clamp(3rem, 7vw, 6.3rem); }
.broadcast-heading p:last-child { max-width: 650px; color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.broadcast-stage { border: 1px solid var(--line); background: #030303; box-shadow: 0 28px 80px #0008; }
.broadcast-bar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .11em; }
.broadcast-bar span:first-child { color: var(--paper); font-weight: 800; }
.broadcast-bar i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #e21c2a24; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe, .video-frame > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.history-section { margin-top: 52px; }
.broadcast-history { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.history-card { appearance: none; padding: 0; color: var(--paper); background: var(--panel); border: 1px solid var(--line); text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.history-card:hover, .history-card:focus-visible { transform: translateY(-2px); border-color: #8d3b43; outline: none; }
.history-card.is-active { border-color: var(--yellow); }
.history-card__image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.history-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.history-card__image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #0008, transparent 55%); }
.history-card__image i { position: absolute; z-index: 1; left: 14px; bottom: 12px; display: grid; place-items: center; width: 35px; height: 28px; color: #fff; background: var(--red); border-radius: 5px; font-style: normal; font-size: .75rem; }
.history-card__copy { display: grid; gap: 6px; min-height: 84px; padding: 15px; }
.history-card__copy small { color: var(--yellow); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.history-card__copy strong { font-size: .9rem; line-height: 1.35; }
.history-loading, .history-empty { grid-column: 1 / -1; min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: var(--muted); border: 1px solid var(--line); }
.history-loading i { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px #ffd21c18; animation: history-pulse 1s ease-in-out infinite alternate; }
.history-empty { display: grid; text-align: center; }
.history-empty a { color: var(--yellow); }
@keyframes history-pulse { to { opacity: .35; transform: scale(.75); } }
.broadcast-notes { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 52px; border: 1px solid var(--line); }
.broadcast-notes > div { padding: 24px; border-right: 1px solid var(--line); }
.broadcast-notes > div:last-child { border-right: 0; }
.broadcast-notes strong { display: block; margin: 10px 0 7px; }
.broadcast-notes p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.broadcast-notes a { color: var(--paper); text-underline-offset: 3px; }
.note-number { color: var(--yellow); font: 800 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 620px); }
  .site-header { position: relative; min-height: 88px; padding-right: 7.4rem; }
  .status { display: none; }
  .brand-mark { height: 28px; }
  h1 { font-size: clamp(2.75rem, 14vw, 4.4rem); }
  .lede { font-size: 1rem; }
  .section-heading { display: block; }
  .section-heading span { display: block; margin-top: 7px; }
  .link-grid { grid-template-columns: 1fr; }
  .link-card { min-height: 92px; padding: 18px; }
  .link-panel__inner { padding: 22px 18px 26px; }
  footer { display: grid; padding-top: 48px; }
  .intro-top { display: block; }
  .join-bug { position: absolute; top: 14px; right: 12px; z-index: 4; width: auto; margin: 0; padding: 10px 12px 11px; }
  .join-bug__mark { display: none; }
  .join-bug__full { display: none; }
  .join-bug__short { display: inline; }
  .join-bug strong { font-size: 1.35rem; }
  .join-bug small { max-width: none; font-size: .72rem; }
  .document-heading { display: grid; align-items: start; }
  .code-searchbar { flex-wrap: wrap; }
  .code-search { flex: 1 1 100%; }
  .code-split, .code-officials, .code-cats { grid-template-columns: 1fr; }
  .broadcast-heading { display: grid; align-items: start; }
  .open-doc { justify-self: start; }
  .document-frame { width: calc(100% + 24px); margin-left: -12px; border-inline: 0; }
  .broadcast-stage { width: calc(100% + 24px); margin-left: -12px; border-inline: 0; }
  .broadcast-bar span:last-child { display: none; }
  .broadcast-history { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .history-card__copy { min-height: 76px; padding: 12px; }
  .history-card__copy strong { font-size: .82rem; }
  .broadcast-notes { grid-template-columns: 1fr; border-inline: 0; }
  .broadcast-notes > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .broadcast-notes > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
