/* Layout: the fact pages' look (Xibit Digital's charcoal, white and red). A split hero, copy left and a live fact
   stream right that filters by role; then quiet bands with generous spacing. Dark by default, light when asked. */
:root {
  --bg: #161616; --surface: #1f1f1f; --raised: #262626; --line: #2c2c2c; --edge: #3a3a3a;
  --text: #ececec; --strong: #ffffff; --muted: #b0b0b0; --faint: #9a9a9a;
  --accent: #ea0026; --link: #ff5a6e;
  --ok-bg: #0f3b2e; --ok: #7ee2b8; --ok-line: #1d5c47;
  --warn-bg: #3d2c0b; --warn: #f6c768; --warn-line: #6b4d12;
  --display: Montserrat, "Arial Black", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #fafafa; --surface: #ffffff; --raised: #f0f0f0; --line: #e4e4e4; --edge: #dedede;
  --text: #1f1f1f; --strong: #141414; --muted: #5c5c5c; --faint: #6a6a6a;
  --link: #c4001f;
  --ok-bg: #e3f6ee; --ok: #0d6b47; --ok-line: #b9e6d2;
  --warn-bg: #fff4dc; --warn: #7a4b00; --warn-line: #f0d69a;
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: #fafafa; --surface: #ffffff; --raised: #f0f0f0; --line: #e4e4e4; --edge: #dedede;
  --text: #1f1f1f; --strong: #141414; --muted: #5c5c5c; --faint: #6a6a6a;
  --link: #c4001f;
  --ok-bg: #e3f6ee; --ok: #0d6b47; --ok-line: #b9e6d2;
  --warn-bg: #fff4dc; --warn: #7a4b00; --warn-line: #f0d69a;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.7 var(--body); border-top: 4px solid var(--accent); }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--strong); text-wrap: balance; }

.wrap { max-width: 72rem; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

.draft { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.draft .wrap { padding-block: 8px; }

.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; font: 800 17px/1 var(--display); letter-spacing: .02em; color: var(--strong); }
.brand svg { flex: none; color: var(--strong); }
nav { display: flex; gap: 28px; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--strong); }

.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-block: 72px 88px; }
.crumbs { font-size: 14px; color: var(--muted); letter-spacing: .02em; margin: 0; }
.crumbs span { color: var(--accent); margin-inline: 6px; }
h1 { font-size: clamp(36px, 1.6rem + 2.6vw, 58px); line-height: 1.12; letter-spacing: -.015em; margin: 20px 0 24px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 32em; margin: 0 0 32px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.4; background: var(--raised); color: var(--text); border: 1px solid var(--edge); }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { font: 600 15px/1 var(--body); padding: 15px 22px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #ffffff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--strong); border-color: var(--edge); }
.btn:hover { filter: brightness(1.08); }

.stream { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.stream canvas { display: block; width: 100%; height: 460px; }
.stream .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.stream .head b { font: 700 12px/1.4 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--strong); }
.stream .foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); }
.roles { display: flex; gap: 8px; flex-wrap: wrap; }
.roles button { font: 600 14px/1 var(--body); color: var(--muted); background: transparent; border: 1px solid var(--edge); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.roles button[aria-pressed="true"] { color: #ffffff; background: var(--accent); border-color: var(--accent); }
.legend { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); min-width: 0; }
.legend b { color: var(--strong); font-weight: 600; }
.legend .count { font: 800 22px/1 var(--display); color: var(--strong); }
.legend .count small { font: 600 13px/1 var(--body); color: var(--muted); }

section.band { border-top: 1px solid var(--line); }
section.band .wrap { padding-block: 96px; }
.kicker { font: 700 13px/1.4 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
h2 { font-size: clamp(28px, 1.2rem + 1.8vw, 40px); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 18px; max-width: 22em; }
.sub { color: var(--muted); font-size: 18px; max-width: 38em; margin: 0 0 48px; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; min-width: 0; }
.pillar h3 { font-size: 18px; line-height: 1.3; margin: 0 0 12px; }
.pillar p { margin: 0; color: var(--muted); font-size: 16px; }

.fact { margin-top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; max-width: 46rem; }
.fact .path { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.fact .path span { color: var(--accent); margin-inline: 6px; }
.fact h3 { font-size: 24px; margin: 0 0 8px; }
.fact p { margin: 0 0 18px; color: var(--muted); }
.badges.flat { margin: 0; }
.missing .wrap { min-height: 50vh; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 28px 28px 30px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.feature h3 { font-size: 17px; line-height: 1.35; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.feature h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.golden { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.score { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; min-width: 0; }
.score .n { font: 800 44px/1 var(--display); color: var(--strong); font-variant-numeric: tabular-nums; }
.score .n small { font-size: 20px; color: var(--faint); font-weight: 700; margin-left: 2px; }
.score { display: flex; flex-direction: column; }
.score .l { flex: 1; font-size: 15px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.meter { display: block; width: 100%; height: 6px; margin-top: 18px; overflow: visible; }
.meter .track { fill: var(--raised); }
.meter .fill { fill: var(--ok); filter: drop-shadow(0 0 4px var(--ok)); }
.rule { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 28px 30px; }
.rule h3 { font-size: 18px; margin: 0 0 12px; }
.rule p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.rule p:last-child { margin-bottom: 0; }
.rule code { font-family: var(--mono); font-size: 14px; background: var(--raised); border: 1px solid var(--edge); border-radius: 4px; padding: 1px 6px; color: var(--strong); }
.note { font-size: 14px; color: var(--faint); margin: 28px 0 0; }

.signin { display: flex; gap: 12px; flex-wrap: wrap; }

.foot-site .wrap { padding-block: 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 14px; border-top: 1px solid var(--line); }
.foot-site a { color: inherit; text-decoration: none; }
.foot-site a:hover { color: var(--strong); }

/* Effects: a drifting grid and a red glow behind the hero, a scan line over the stream, a spotlight that follows the
   pointer on features, a light running down the golden rule, and a shine on buttons. All off for reduced motion. */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -48px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 65%); animation: grid-drift 24s linear infinite; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 76% 46%, rgba(234, 0, 38, .22), transparent 46%); animation: glow 6s ease-in-out infinite alternate; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes grid-drift { to { transform: translate(48px, 48px); } }
@keyframes glow { from { opacity: .65; } to { opacity: 1; } }
.stream { box-shadow: 0 40px 100px -40px rgba(234, 0, 38, .55), 0 0 0 1px rgba(234, 0, 38, .08); }
.screen { position: relative; }
.screen::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(transparent, rgba(234, 0, 38, .10), transparent); animation: scan 5s linear infinite; pointer-events: none; }
.screen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 3px, rgba(0, 0, 0, .12) 3px 4px); pointer-events: none; z-index: 1; }
@keyframes scan { from { transform: translateY(-90px); } to { transform: translateY(460px); } }
h1 em { position: relative; display: inline-block; text-shadow: 0 0 28px rgba(234, 0, 38, .45); }
.feature { position: relative; padding-left: 16px; margin-left: -16px; transition: background .25s; }
.feature::after { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), rgba(234, 0, 38, .13), transparent 62%); pointer-events: none; }
.feature h3::before { transition: box-shadow .25s, transform .25s; }
.feature:hover h3::before { box-shadow: 0 0 14px var(--accent); transform: rotate(45deg); }
.pillar, .score { transition: transform .25s, border-color .25s, box-shadow .25s; }
.pillar:hover, .score:hover { transform: translateY(-4px); border-color: rgba(234, 0, 38, .5); box-shadow: 0 20px 50px -30px rgba(234, 0, 38, .6); }
.rule { position: relative; overflow: hidden; }
.rule::before { content: ""; position: absolute; left: -4px; top: 0; width: 4px; height: 40%; background: linear-gradient(transparent, #ffffff, transparent); animation: run 3.2s ease-in-out infinite; opacity: .7; }
@keyframes run { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn:hover::after { left: 120%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 48px 64px; }
  .stream canvas { height: 320px; }
  .pillars, .golden { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section.band .wrap { padding-block: 64px; }
  nav { display: none; }
}
@media (max-width: 560px) { .features, .scores { grid-template-columns: minmax(0, 1fr); } .feature { padding-right: 0; } }
