/* videoindex.org — tokens and layout.
   Palette from the logo kit (vi_internal/brand): navy ink, blue accent, paper. Same tokens as videoindex.app.
   Type: IBM Plex Sans for reading, IBM Plex Mono for the wordmark and for anything that is an address
   into a video ([hh:mm:ss] timestamps, step numbers), mirroring how the agent cites. Both self-hosted. */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url(/fonts/ibm-plex-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0b0b0b; --ink2: #4d4c48; --muted: #8a8880; --line: #e3e1d8; --line-2: #d3d1c6; --surface: #fffefb; --plane: #f4f3ee;
  --navy: #0a2347; --navy-3: #143766; --paper: #eff6ff;
  --accent: #3186e9; --accent-dark: var(--navy); --accent-soft: #eff6ff; --accent-bright: #5fa7ff; --navy-hover: var(--navy-3);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dots: radial-gradient(rgba(10, 35, 71, 0.085) 1px, transparent 1.2px);
  --shadow-card: 0 30px 70px -30px rgba(10, 35, 71, 0.5), 0 0 0 1px rgba(10, 35, 71, 0.06);
  font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--plane); line-height: 1.5; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.02em; font-weight: 600; }
main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
::selection { background: rgba(49, 134, 233, 0.25); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- header ---------- */
.top { max-width: 1080px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-family: var(--mono); font-weight: 500; font-size: 20px; letter-spacing: -0.035em; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand .mark { flex: none; display: block; }
.top nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.top nav a { color: var(--ink2); }
.top nav a:hover { color: var(--navy); text-decoration: none; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff !important; padding: 12px 20px; border-radius: 999px; font-weight: 500; transition: background 0.15s, transform 0.15s; }
.cta:hover { text-decoration: none; background: var(--navy-3); transform: translateY(-1px); }
.cta.small { padding: 8px 16px; font-size: 14px; }
.play { width: 10px; height: 12px; flex: none; fill: currentColor; }
.cta .play { fill: var(--accent-bright); }
.ghost .play { fill: var(--accent); }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500; transition: border-color 0.15s, transform 0.15s; }
.ghost:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }

/* ---------- demo video: a thumbnail under the facts strip that expands into the player.
   Served from media.videoindex.org (R2); nothing downloads until play. ---------- */
.demo { margin: -28px 0 64px; scroll-margin-top: 24px; }
.demo-card { display: block; }
.demo-card[open] { max-width: 90%; margin: 0 auto; }
summary.demo-thumb { list-style: none; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: center; padding: 12px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
summary.demo-thumb::-webkit-details-marker { display: none; }
summary.demo-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
summary.demo-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-card[open] > summary.demo-thumb { display: none; }
.thumb { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--navy); line-height: 0; }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.thumb .badge { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--navy); box-shadow: 0 8px 24px rgba(10, 35, 71, 0.45); display: grid; place-items: center; }
.thumb .badge .play { width: 14px; height: 17px; margin-left: 3px; fill: var(--accent-bright); }
.thumb-copy { display: block; padding-right: 8px; }
.thumb-copy b { display: block; font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.01em; }
.thumb-copy > span { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.dur { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.demo-player { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); background: var(--navy); line-height: 0; }
.demo-player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--navy); }
.demo-foot { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 10px 0 0; max-width: none; text-align: right; }
.demo-foot a { color: var(--navy); }

/* ---------- hero: copy on the left, a live-looking exchange on the right ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; padding: 56px 0 24px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -80px -24px 0; background-image: var(--dots); background-size: 22px 22px; mask-image: radial-gradient(60% 70% at 70% 40%, #000, transparent 75%); -webkit-mask-image: radial-gradient(60% 70% at 70% 40%, #000, transparent 75%); pointer-events: none; z-index: -1; }
.hero-copy > * { animation: rise 0.6s ease-out both; }
.hero-copy > *:nth-child(2) { animation-delay: 60ms; }
.hero-copy > *:nth-child(3) { animation-delay: 120ms; }
.hero-copy > *:nth-child(4) { animation-delay: 180ms; }
.hero .eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--accent); margin: 0 0 14px; max-width: none; }
.eyebrow::before { content: "["; opacity: 0.5; }
.eyebrow::after { content: "]"; opacity: 0.5; }
.hero h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; margin: 0 0 18px; color: var(--navy); letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .tagline { font-size: 21px; font-weight: 500; color: var(--navy); max-width: 520px; margin: 0 0 12px; letter-spacing: -0.01em; }
.hero p { font-size: 17px; color: var(--ink2); max-width: 540px; margin: 0 0 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.exchange { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); overflow: hidden; animation: rise 0.7s 120ms ease-out both; }
.exchange-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--navy); color: var(--paper); font-family: var(--mono); font-size: 11.5px; }
.exchange-bar .mark { color: var(--paper); --accent: var(--accent-bright); }
.exchange-bar span { opacity: 0.7; }
.exchange-bar b { font-weight: 500; opacity: 1; margin-left: auto; color: var(--accent-bright); }
.exchange-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.q { align-self: flex-end; background: var(--navy); color: var(--paper); border-radius: 16px 16px 4px 16px; padding: 9px 14px; font-size: 14.5px; max-width: 86%; }
.a { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.a .avatar { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--navy); background: var(--surface); }
.a .avatar svg { width: 13px; height: 13px; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tool { font-family: var(--mono); font-size: 10.5px; color: var(--ink2); background: var(--plane); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.tool::before { content: "["; color: var(--accent); }
.tool::after { content: "]"; color: var(--accent); }
.a p { font-size: 14.5px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; }
.cite { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 8px 3px 6px; display: inline-flex; gap: 7px; align-items: center; font-size: 12px; color: var(--ink2); transition: background 0.15s, border-color 0.15s, color 0.15s; }
.cite:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); text-decoration: none; }
.cite-time { font-family: var(--mono); font-size: 11.5px; color: var(--accent); font-variant-numeric: tabular-nums; }
.cite-time::before { content: "["; opacity: 0.55; }
.cite-time::after { content: "]"; opacity: 0.55; }
.cite:hover .cite-time { color: var(--accent-bright); }
.usage { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.exchange-foot { border-top: 1px solid var(--line); padding: 10px 18px; font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.exchange-foot a { color: var(--navy); }

/* ---------- key numbers ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 40px 0 64px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--surface); padding: 22px 22px 20px; }
.facts b { display: block; font-family: var(--mono); font-weight: 500; font-size: 34px; letter-spacing: -0.04em; color: var(--navy); margin-bottom: 6px; line-height: 1; }
.facts b em { font-style: normal; color: var(--accent); }
.facts span { color: var(--ink2); font-size: 14px; line-height: 1.45; display: block; }

/* ---------- how it works ---------- */
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.section-head h2 { font-size: 30px; margin: 0; color: var(--navy); }
.section-head .idx { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.how ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px 20px; position: relative; transition: border-color 0.15s, transform 0.15s; }
.how li:hover { border-color: var(--accent); transform: translateY(-2px); }
.how li::before { content: "[0" counter(step) "]"; font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 14px; }
.how h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.how p { margin: 0; color: var(--ink2); font-size: 14.5px; }
.how .lede { margin-bottom: 20px; }

/* ---------- roadmap ---------- */
.roadmap { margin-top: 64px; }
.roadmap-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 12px; }
.roadmap-grid p { max-width: 720px; }
.roadmap-grid a { color: var(--accent-bright); }
.roadmap-grid div { background: var(--navy); color: var(--paper); border-radius: 14px; padding: 24px 22px 22px; position: relative; overflow: hidden; }
.roadmap-grid div::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(239, 246, 255, 0.09) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9), transparent 70%); -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9), transparent 70%); pointer-events: none; }
.roadmap-grid h3 { margin: 0 0 8px; font-size: 18px; color: var(--paper); position: relative; }
.roadmap-grid h3::before { content: "[next]"; display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent-bright); margin-bottom: 12px; }
.roadmap-grid p { margin: 0; font-size: 15px; opacity: 0.82; position: relative; }

/* ---------- results ---------- */
.results { margin-top: 64px; }
.lede { color: var(--ink2); max-width: 720px; margin: 0 0 18px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); color: var(--muted); font-weight: 500; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--plane); }
td:nth-child(n + 2) { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink2); }
td b { font-weight: 500; color: var(--navy); }
tr:last-child td { border-bottom: 0; }
tr.ours td:first-child { color: var(--navy); font-weight: 500; }
tr.ours td:first-child::before { content: "▶"; color: var(--accent); font-size: 9px; margin-right: 8px; vertical-align: 1px; }
tr.ref td { color: var(--muted); }
.note { color: var(--ink2); font-size: 14px; }
.chart { margin: 28px 0 10px; padding: 18px 18px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .chart-narrow { display: none; }
@media (max-width: 640px) { .chart .chart-wide { display: none; } .chart .chart-narrow { display: block; } }
.chart figcaption { color: var(--ink2); font-size: 14px; margin: 8px 0 10px; }

/* ---------- links ---------- */
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 64px 0 64px; }
@media (max-width: 900px) { .links { grid-template-columns: repeat(2, 1fr); } }
.links div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px 20px; display: flex; flex-direction: column; transition: border-color 0.15s, transform 0.15s; }
.links div:hover { border-color: var(--accent); transform: translateY(-2px); }
.links h3 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.links p { margin: 0 0 14px; color: var(--ink2); font-size: 15px; flex: 1; }
.links a { font-family: var(--mono); font-size: 13px; }

/* ---------- footer: a navy band ---------- */
footer { background: var(--navy); color: var(--paper); margin-top: 24px; }
footer .inner, footer > span { display: block; }
footer .inner { max-width: 1080px; margin: 0 auto; padding: 28px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; }
footer .brand { color: var(--paper); --accent: var(--accent-bright); font-size: 18px; }
footer a { color: var(--paper); }
footer .fine { font-family: var(--mono); font-size: 11px; opacity: 0.6; }
footer .links-row { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; }
footer .links-row a { opacity: 0.8; }
footer .links-row a:hover { opacity: 1; }
/* legal pages still use the two-span footer */
footer > span { max-width: 1080px; margin: 0 auto; padding: 0 24px; font-size: 13px; opacity: 0.85; }
footer > span:first-child { padding-top: 24px; }
footer > span:last-child { padding-bottom: 24px; padding-top: 6px; }

@media (max-width: 1100px) and (min-width: 861px) { .how ol { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .hero h1 { font-size: 34px; }
  .facts, .how ol, .links, .roadmap-grid { grid-template-columns: 1fr; }
  .demo { margin-top: -20px; }
  summary.demo-thumb { grid-template-columns: 1fr; gap: 14px; }
  .demo-card[open] { max-width: 100%; }
  table { font-size: 14px; }
  th, td { padding: 9px 10px; }
  .top nav { gap: 14px; font-size: 14px; }
}

/* ---------- legal pages ---------- */
.legal { max-width: 760px; padding-bottom: 40px; }
.legal h1 { font-size: 34px; margin: 40px 0 6px; color: var(--navy); }
.legal .meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; font-family: var(--mono); }
.legal h2 { font-size: 20px; margin: 32px 0 8px; color: var(--navy); }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal p, .legal li { color: var(--ink2); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal code { font-family: var(--mono); font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--ink); }

/* ---------- focus, motion, anchors ---------- */
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
footer :focus-visible { outline-color: var(--accent-bright); }
h1, h2, h3 { text-wrap: balance; }
[id] { scroll-margin-top: 24px; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--navy); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 50; font-family: var(--mono); font-size: 13px; }
.skip:focus { top: 12px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
