@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display&display=swap");

:root {
  --ink: #09090b;
  --ink-2: #111114;
  --glass: #111114;
  --stroke: #2a2a30;
  --stroke-2: #3a3a42;
  --text: #f5f4f1;
  --text-dim: #aaa8b0;
  --text-faint: #85838b;
  --gold: #ff315c;
  --amber: #ff6482;
  --blue: #62d2ff;
  --violet: #aa8cff;
  --teal: #40d9c2;
  --r-lg: 4px;
  --r-md: 4px;
  --r-sm: 3px;
  --line: #29292f;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #09090b;
  color: var(--text);
  color-scheme: dark;
  font-weight: 400;
}

.aurora,
.grain { display: none; }

.site-header {
  position: static;
  width: min(100% - 40px, 860px);
  max-width: none;
  margin: 0 auto;
  padding: 30px 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
}

.site-header.is-scrolled { box-shadow: none; }
.brand { padding: 0; color: var(--text); font-family: var(--font-display); font-size: 1.15rem; }
.brand-orb,
.brand-mark { display: none; }
.site-nav { margin-left: auto; }
.site-nav a {
  padding: 4px 0 4px 24px;
  border-radius: 0;
  color: #ff315c;
  font-size: .88rem;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: transparent;
  color: #ff6482;
  text-shadow: 0 0 16px rgba(255,49,92,.38);
  transform: none;
}
.nav-toggle { display: none !important; }

.article-shell { padding: 72px 20px 100px; }
.article { max-width: 860px; }
.article-hero {
  gap: 17px;
  margin-bottom: 62px;
  padding: 0 0 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.article-hero::after { display: none; }
.article-hero h1 {
  max-width: 12ch;
  background: none;
  color: var(--text);
  font-size: clamp(3.5rem, 10vw, 6.6rem);
  line-height: .93;
  -webkit-text-fill-color: currentColor;
}
.article-hero p { max-width: 720px; color: var(--text-dim); font-size: clamp(1.05rem, 2.5vw, 1.28rem); line-height: 1.6; }
.back-link { color: #ff315c; opacity: 1; }
.back-link:hover { color: #ff6482; }
.card-meta { gap: 10px; }
.card-meta span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-faint);
  font-size: .72rem;
  text-transform: uppercase;
}
.card-meta span:not(:last-child)::after { margin-left: 10px; color: #48484f; content: "/"; }

.article-body { max-width: 760px; gap: 25px; }
.article-body > p { color: var(--text-dim); font-size: 1.06rem; line-height: 1.8; }
.article-body h2 { margin-top: 38px; color: #ff315c; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.05; }
.article-body h3 { margin-top: 22px; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.article-body a:not(.related-card):not(.source-card) {
  color: #ff315c;
  text-decoration-color: rgba(255,49,92,.5);
}
.article-body a:not(.related-card):not(.source-card):hover { color: #ff6482; }

.article-figure,
.interactive-lab,
.pixel-lab-copy,
.pixel-demo,
.math-callout div,
.scale-grid div,
.format-card,
.codec-pair,
.artifact-card,
.source-card,
.related-card,
.runtime-layer,
.hardware-card {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--ink-2);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.format-card::after { display: none; }
.article-figure { padding: clamp(16px, 3vw, 24px); }
.interactive-lab {
  padding: clamp(18px, 3vw, 26px);
  border-color: #53303a;
  background: #101013;
}
.lab-head h3 { color: var(--text); }
.lab-badge {
  border-color: #63313e;
  border-radius: 2px;
  background: #241218;
  color: #ff6482;
}
.lab-control,
.lab-metric,
.lab-stage,
.lab-canvas-panel canvas {
  border-color: var(--line);
  border-radius: 3px;
  background: #0b0b0e;
}
.lab-control output,
.lab-status,
.sample-result strong { color: #ff6482; }
.lab-control input[type="range"] { accent-color: #ff315c; }

.button { border-radius: 3px; font-weight: 600; }
.button.primary {
  border-color: #ff315c;
  background: #ff315c;
  color: #fff;
}
.button.primary:hover { border-color: #ff6482; background: #ff6482; box-shadow: 0 0 20px rgba(255,49,92,.22); }
.button.secondary { border-color: #3b3b42; background: #17171b; color: var(--text); }
.button.secondary:hover { background: #202025; }

.math-callout strong,
.scale-grid strong,
.codec-pair-flow b,
.equation-strip b,
.transformer-block b,
.memory-stop:not(:last-child)::after { color: #ff6482; }
.article-callout {
  border-color: #53303a;
  border-left-color: #ff315c;
  border-radius: 2px;
  background: #171015;
}
.article-table-wrap { border-color: var(--line); border-radius: 3px; background: var(--ink-2); backdrop-filter: none; }
.data-table th,
.data-table td { border-color: var(--line); }
.source-card,
.related-card { border-left-color: #ff315c; }
.source-card strong,
.related-card strong { color: #ff315c; }
.source-card:hover,
.related-card:hover { border-color: #ff315c; background: #151116; transform: none; }

.site-footer {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  padding: 24px 0 40px;
  border-color: var(--line);
}
.site-footer a { color: #ff315c; border-radius: 0; }
.site-footer a:hover { background: transparent; color: #ff6482; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible { outline: 2px solid #ff315c; outline-offset: 4px; }

@media (max-width: 620px) {
  .site-header { width: min(100% - 32px, 860px); flex-wrap: wrap; gap: 16px; padding-top: 22px; }
  .brand span:last-child { display: inline; }
  .site-nav { display: flex !important; position: static; width: 100%; min-width: 0; justify-content: space-between; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
  .site-nav a { padding: 0; font-size: .78rem; }
  .article-shell { padding: 52px 16px 72px; }
  .article-hero { margin-bottom: 48px; padding-bottom: 38px; }
  .article-hero h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .article-body > p { font-size: 1rem; }
  .site-footer { width: min(100% - 32px, 860px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
