:root {
  color-scheme: light;
  --bg: #fff;
  --text: #080808;
  --muted: rgba(0, 0, 0, 0.58);
  --faint: rgba(0, 0, 0, 0.08);
  --line: rgba(0, 0, 0, 0.12);
  --panel: rgba(0, 0, 0, 0.025);
  --accent: #2b50ff;
  --accent-text: #fff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --section-rail: clamp(172px, 18vw, 256px);
  --grid-inset: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); font-kerning: normal; font-synthesis: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.site-nav { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); background: var(--bg); }
.wordmark, .site-nav nav a { min-height: 64px; display: inline-flex; align-items: center; border-left: 1px solid var(--line); padding: 0 18px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .045em; text-transform: uppercase; }
.wordmark { border-left: 0; }
.site-nav nav { display: flex; align-items: stretch; min-width: 0; }
.site-nav nav a { flex: 0 0 136px; width: 136px; justify-content: center; padding: 0 12px; }
.site-nav nav a.active { color: var(--accent); }
.site-nav .nav-cta { background: var(--accent); color: var(--accent-text); }

.context-strip { position: sticky; top: 65px; z-index: 19; border-bottom: 1px solid var(--line); background: var(--bg); }
.context-quote { display: flex; align-items: baseline; gap: .8em; margin: 0; padding: 9px 18px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .035em; text-transform: uppercase; }
.context-quote p { margin: 0; color: var(--accent); white-space: nowrap; }
.context-quote cite { color: var(--muted); font-style: normal; white-space: nowrap; }

.hero { width: 100%; margin: 0; }
.archive { width: 100%; margin: 0; display: grid; grid-template-columns: var(--section-rail) minmax(0, 1fr); }
.article-page, .not-found { width: min(100% - 40px, 1360px); margin: 0 auto; }
.notebook-rail { border-right: 1px solid var(--line); padding: 22px 18px; }
.notebook-rail p { position: sticky; top: 110px; margin: 0; color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .045em; text-transform: uppercase; }
.hero-body { min-width: 0; min-height: calc(100svh - 98px); display: grid; align-content: end; padding: clamp(56px, 8vw, 108px) clamp(18px, 5vw, 72px) clamp(32px, 6vw, 74px); }
.eyebrow, .meta, .section-index { margin: 0; color: var(--muted); font: 400 11px/1.35 var(--mono); letter-spacing: .045em; text-transform: uppercase; }
.hero h1, .article-hero h1, .not-found h1 { max-width: 1080px; margin: 16px 0 28px; font-size: clamp(62px, 10vw, 144px); font-weight: 600; line-height: .9; letter-spacing: -.035em; }
.hero h1 { max-width: 1120px; margin: 18px 0 0; font-size: clamp(56px, 11vw, 124px); line-height: .92; letter-spacing: -.018em; }
.hero h1 span { color: var(--accent); }
.hero-copy { max-width: 620px; margin: clamp(22px, 3vw, 34px) 0 0; color: var(--muted); font-size: clamp(20px, 2vw, 30px); line-height: 1.18; letter-spacing: -.02em; }

.archive { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.archive-body { min-width: 0; padding: clamp(50px, 8vw, 110px) clamp(34px, 6vw, 86px); }
.section-heading { display: grid; grid-template-columns: minmax(180px, .35fr) 1fr; gap: 24px; margin-bottom: 64px; }
.section-heading h2 { max-width: 780px; margin: 0; font-size: clamp(42px, 6vw, 84px); font-weight: 600; line-height: .96; letter-spacing: -.03em; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 8px 11px; font: 400 11px var(--mono); letter-spacing: .045em; text-transform: uppercase; cursor: pointer; }
.filter.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.experiment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.experiment-card { min-height: 330px; display: flex; flex-direction: column; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .16s linear; }
.experiment-card:hover { background: var(--panel); color: var(--text); }
.experiment-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.experiment-card h3 { max-width: 520px; margin: 58px 0 12px; font-size: clamp(30px, 3.6vw, 54px); font-weight: 600; line-height: .98; letter-spacing: -.028em; }
.experiment-card > p:not(.meta) { max-width: 480px; margin: 0; color: var(--muted); }
.card-cta, .text-link, .article-next a, .back-link { display: inline-flex; width: fit-content; margin-top: auto; padding-top: 28px; color: var(--accent); font: 400 11px var(--mono); letter-spacing: .045em; text-transform: uppercase; }
.card-cta span { margin-left: 7px; font-size: 16px; line-height: .6; }

.article-hero { min-height: 0; display: grid; align-content: start; padding: clamp(60px, 9vw, 130px) 0 clamp(48px, 7.2vw, 104px); border-bottom: 0; }
.back-link { margin: 0 0 58px; padding: 0; }
.article-hero h1 { max-width: 1040px; font-size: clamp(56px, 9vw, 132px); }
.article-lede { max-width: 760px; margin: 0; font-size: clamp(22px, 3vw, 40px); line-height: 1.1; letter-spacing: -.024em; }
.article-media { margin: 0; padding: clamp(24px, 4vw, 57.6px) 0 clamp(30px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.article-page[data-slug="trading-the-whistle"] .article-hero { padding-bottom: clamp(36px, 5.4vw, 78px); }
.article-page[data-slug="trading-the-whistle"] .article-media { padding-top: clamp(18px, 3vw, 43.2px); }
.article-media video { display: block; width: 100%; max-height: min(74svh, 820px); background: #080808; object-fit: contain; }
.article-media:not(.article-embed) video { height: auto; max-height: none; }
.article-image img { display: block; width: 100%; height: auto; }
.article-media figcaption { margin-top: 12px; color: var(--muted); font: 400 11px/1.35 var(--mono); letter-spacing: .045em; text-transform: uppercase; }
.prototype-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-bottom: 0; padding: 0 14px; color: var(--muted); font: 400 11px/1.35 var(--mono); letter-spacing: .045em; text-transform: uppercase; }
.prototype-toolbar a { color: var(--accent); }
.article-embed .prototype-frame { overflow: hidden; border: 1px solid var(--line); background: #080808; }
.article-embed iframe { display: block; width: 100%; height: min(92svh, 1100px); min-height: 780px; border: 0; background: #080808; }
.article-page[data-slug="trading-the-whistle"] .article-embed iframe { height: min(125svh, 1280px); min-height: 1040px; }
.article-embed figcaption { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.article-embed figcaption a { color: var(--accent); }
.article-body { border-bottom: 1px solid var(--line); }
.article-section { display: grid; grid-template-columns: minmax(180px, .35fr) 1fr; gap: 24px; padding: clamp(50px, 8vw, 120px) 0; border-bottom: 1px solid var(--line); }
.article-section:last-child { border-bottom: 0; }
.article-section h2 { max-width: 800px; margin: 0 0 28px; font-size: clamp(36px, 5vw, 70px); font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.article-section div > p { max-width: 720px; margin: 0 0 1em; color: var(--muted); font-size: clamp(19px, 2vw, 26px); line-height: 1.35; letter-spacing: -.018em; }
.takeaways { width: min(100% - 40px, 1360px); margin: 0 auto; padding: clamp(50px, 8vw, 110px) 0; }
.takeaways ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.takeaways li { min-height: 160px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: clamp(20px, 2vw, 30px); line-height: 1.1; letter-spacing: -.018em; }
.article-next { width: min(100% - 40px, 1360px); margin: 0 auto; padding: 0 0 100px; }
.not-found { min-height: 70svh; display: grid; align-content: center; }

.particle-experience { overflow: hidden; background: #000; color: #f4f7ff; }
.particle-page { width: 100vw; height: 100svh; }
.particle-stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #f4f7ff; isolation: isolate; }
.particle-stage:fullscreen { width: 100%; height: 100%; border: 0; }
.particle-stage:-webkit-full-screen { width: 100%; height: 100%; border: 0; }
.particle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.particle-overlay { position: relative; z-index: 1; display: flex; height: 100%; flex-direction: column; justify-content: space-between; padding: clamp(18px, 2.4vw, 36px); pointer-events: none; }
.particle-topline { position: relative; display: block; }
.particle-back { width: fit-content; color: rgba(244,247,255,.62); font: 400 10px/1.35 var(--mono); letter-spacing: .045em; text-transform: uppercase; pointer-events: auto; }
.particle-back:hover, .particle-back:focus-visible { color: #fff; outline: 0; }
.particle-title { margin-top: clamp(26px, 4vw, 58px); }
.particle-title h1 { margin: 0; font-size: clamp(40px, 5.2vw, 78px); font-weight: 600; line-height: .86; letter-spacing: -.05em; }
.particle-label { position: absolute; top: 0; right: 0; width: fit-content; max-width: 260px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.14); background: rgba(7,10,18,.76); backdrop-filter: blur(14px); }
.particle-label strong, .particle-label span { display: block; }
.particle-label strong { font: 500 11px/1.35 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.particle-label span { margin-top: 6px; color: rgba(244,247,255,.64); font-size: 12px; line-height: 1.35; }
.particle-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: auto; }
.particle-control { min-height: 38px; border: 1px solid rgba(255,255,255,.18); background: rgba(7,10,18,.76); color: rgba(244,247,255,.8); padding: 0 11px; font: 400 10px var(--mono); letter-spacing: .045em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(14px); }
.particle-control:hover, .particle-control:focus-visible { border-color: #7d93ff; color: #fff; outline: 0; }
.particle-control.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.particle-control.utility { margin-left: auto; }
.particle-control.utility + .particle-control.utility { margin-left: 0; }

footer { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0; padding: 0; border-top: 0; color: var(--muted); font: 400 11px var(--mono); letter-spacing: .045em; text-transform: uppercase; }
footer nav { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
footer a, footer small { min-height: 60px; display: inline-flex; align-items: center; border-right: 1px solid var(--line); padding: 0 18px; font: inherit; }
footer a { color: var(--text); }
footer nav a { min-height: 60px; border-right: 0; padding: 0; }
footer nav span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
footer small { justify-content: end; border-right: 0; color: var(--muted); }

@media (max-width: 1080px) {
  .context-quote { display: block; }
  .context-quote cite { display: block; margin-top: 2px; }
}

@media (max-width: 760px) {
  .site-nav { position: sticky; top: 0; z-index: 20; grid-template-columns: 1fr; }
  .wordmark { min-height: 56px; }
  .site-nav nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; min-width: 0; overflow: visible; }
  .site-nav nav a { min-width: 0; width: auto; min-height: 54px; padding: 0 4px; border-top: 1px solid var(--line); font-size: clamp(8px, 2.3vw, 10px); letter-spacing: .02em; white-space: nowrap; }
  .context-strip { display: none; }
  .archive { grid-template-columns: 1fr; }
  .notebook-rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px; }
  .notebook-rail p { position: static; }
  .article-page, .not-found, .takeaways, .article-next { width: min(100% - 36px, 1360px); }
  .hero-body { min-height: calc(100svh - 110px); padding: clamp(42px, 10vw, 64px) 18px 30px; }
  .hero h1, .not-found h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-copy { font-size: clamp(19px, 5.4vw, 24px); }
  .archive-body { padding: 42px 18px 64px; }
  .filter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .filter { width: 100%; padding: 8px 4px; font-size: clamp(8px, 2.25vw, 9px); }
  .section-heading, .article-section { grid-template-columns: 1fr; gap: 18px; }
  .experiment-list, .takeaways ol { grid-template-columns: 1fr; }
  .experiment-card { min-height: 260px; padding: 18px; }
  .experiment-card h3 { margin-top: 42px; }
  .article-hero { min-height: auto; padding: 72px 0 40px; }
  .article-media { padding-top: 24px; }
  .article-page[data-slug="trading-the-whistle"] .article-hero { padding-bottom: 30px; }
  .article-page[data-slug="trading-the-whistle"] .article-media { padding-top: 18px; }
  .article-hero h1 { font-size: clamp(42px, 12vw, 58px); overflow-wrap: break-word; }
  .article-lede { font-size: clamp(20px, 5.8vw, 28px); }
  .prototype-toolbar { min-height: 50px; padding: 0 12px; }
  .article-embed iframe { height: 85svh; min-height: 640px; }
  .article-page[data-slug="trading-the-whistle"] .article-embed iframe { height: max(100svh, 760px); min-height: 760px; }
  .article-embed figcaption { align-items: flex-start; flex-direction: column; gap: 8px; }
  .article-section { padding: 48px 0; }
  .article-section h2 { margin-bottom: 22px; font-size: clamp(34px, 9vw, 48px); }
  .article-section div > p { font-size: clamp(18px, 5vw, 22px); }
  .back-link { margin-bottom: 40px; }
  .particle-label { max-width: 225px; }
  .particle-title h1 { font-size: clamp(40px, 13vw, 65px); }
  .particle-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .particle-control { width: 100%; padding: 0 5px; font-size: 9px; }
  .particle-control.utility { margin-left: 0; }
  footer { grid-template-columns: 1fr; }
  footer nav { min-width: 0; overflow-x: auto; }
  footer small { justify-content: start; border-top: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .site-nav nav a { font-size: clamp(7.5px, 2.25vw, 9px); letter-spacing: .01em; }
  .hero, .archive { width: 100%; }
  .article-page, .not-found, .takeaways, .article-next { width: calc(100% - 32px); }
  .filter-row { gap: 4px; }
  .particle-overlay { padding: 16px; }
  .particle-title { margin-top: 24px; }
  .particle-label { position: static; max-width: 100%; margin-top: 18px; }
  .particle-control { min-height: 36px; font-size: 8px; }
}
