/* Visual preview of the leading concept. Not the production build. */
:root {
  --bg: #0A0F1A; --raised: #0E1524; --line: #1E2A3E; --line-strong: #33425C;
  --text: #E8EEF6; --muted: #A7B4C8; --faint: #8392A8; --accent: #4FD1C5; --on-accent: #04201D;
  --tag: #16213A; --shadow: 0 1px 2px rgba(0,0,0,.25), 0 14px 36px rgba(0,0,0,.35);
  --s-active-bg: #123A37; --s-active-fg: #8FF0E5; --s-plan-bg: #3A2A10; --s-plan-fg: #FFC777; --s-est-bg: #1C2638; --s-est-fg: #C3CEDD;
}
:root[data-theme="light"] {
  --bg: #F7F9FB; --raised: #FFFFFF; --line: #DDE4EC; --line-strong: #B8C3D1;
  --text: #0B1320; --muted: #475467; --faint: #5D6A7C; --accent: #0F766E; --on-accent: #FFFFFF;
  --tag: #EEF2F6; --shadow: 0 1px 2px rgba(15,23,42,.08), 0 14px 36px rgba(15,23,42,.12);
  --s-active-bg: #DDF3EF; --s-active-fg: #0B5A53; --s-plan-bg: #FDF0DA; --s-plan-fg: #7A4A00; --s-est-bg: #EEF2F6; --s-est-fg: #334155;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Inter, system-ui, sans-serif; transition: background .2s, color .2s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; font-weight: 600; }
.eyebrow { margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; font-weight: 600; line-height: 1.15; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
section { border-top: 1px solid var(--line); }
section.raised { background: var(--raised); }
.pad { padding-top: 88px; padding-bottom: 88px; }
.stack { display: flex; flex-direction: column; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-family: inherit; font-size: 15px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn:hover { filter: brightness(1.08); }
sup a { color: var(--accent); }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--raised); }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }
.grid-auto { display: grid; gap: 16px; }

/* top bar + header */
.utility { background: var(--raised); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.utility .wrap { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.utility .right { display: flex; align-items: center; gap: 18px; }
.theme-btn { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
header.main { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.main .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 104px; width: auto; align-self: flex-start; }
@media (max-width: 640px) { .logo img { height: 76px; } }
footer .logo img { height: 52px; }
.logo .on-light { display: none; }
:root[data-theme="light"] .logo .on-dark { display: none; }
:root[data-theme="light"] .logo .on-light { display: block; }
nav.primary { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 -14px; font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 640px) { nav.primary { font-size: 17px; } }
nav.primary a { min-height: 48px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; color: var(--text); transition: background .15s, color .15s; }
nav.primary a:hover { background: var(--tag); color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 64px; }
.hero h1 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(38px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; }
.hero .lede { margin: 0; font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 34em; }
figure { margin: 0; }
.fig { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--raised); }
.fig .black { background: #000; }
figcaption { padding: 14px 18px; font-size: 13px; line-height: 1.55; color: var(--muted); }
figcaption b { color: var(--text); font-weight: 600; }

/* stats */
.stats { margin: 0 0 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stats > div { background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.stats dt { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; }
.stats .v { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stats .src { font-size: 13px; color: var(--faint); }

/* flagship papers */
.papers { display: grid; grid-template-columns: 1fr; gap: 24px; }
.paper { border: 1px solid var(--line); border-radius: 18px; background: var(--bg); padding: 24px; display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 36px; gap: 24px; align-items: start; }
@media (max-width: 640px) { .paper { grid-template-columns: 1fr; } .paper .page { max-width: 340px; } }
.paper .page { border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: transform .2s; }
.paper .page:hover { transform: translateY(-3px); }
.paper .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--tag); }
.paper h3 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; line-height: 1.3; }
.paper .nums { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper .nums dt { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--faint); }
.paper .nums dd { margin: 2px 0 0; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* questions */
.questions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.questions li { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.questions .q { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 600; line-height: 1.3; }
.questions .ap { margin: 0; font-size: 14px; color: var(--muted); }
.questions a { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); }

/* table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 15px; }
thead th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); font-weight: 500; padding: 14px 20px; border-bottom: 1px solid var(--line); }
tbody th, tbody td { padding: 18px 20px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
tbody td { color: var(--muted); }
.pname { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; }
.psub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); padding-left: 20px; }
.stage { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.stage.active { background: var(--s-active-bg); color: var(--s-active-fg); }
.stage.plan { background: var(--s-plan-bg); color: var(--s-plan-fg); }
.stage.est { background: var(--s-est-bg); color: var(--s-est-fg); }

/* two col */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.steps .n { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.white-plate { background: #fff; padding: 12px; }

/* publications */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
.pubs .t { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; line-height: 1.35; }
.pubs .t:hover { color: var(--accent); }
.pubs .ids { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.id { font-family: 'JetBrains Mono', monospace; font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }

/* software */
.soft { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.soft a { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; transition: border-color .2s; }
.soft a:hover { border-color: var(--accent); }
.soft .top { display: flex; justify-content: space-between; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.soft .kind { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
.soft b { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 500; }

/* partners */
.logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plate { height: 108px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 18px 22px; }
.plate img { max-height: 64px; width: auto; }

/* updates */
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
.video { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0A0F1A; }
.video img { width: 40%; opacity: .35; }
.video .play { position: absolute; width: 64px; height: 64px; border-radius: 999px; background: var(--accent); display: grid; place-items: center; }
.video .lbl { position: absolute; left: 16px; bottom: 12px; font-size: 13px; color: #A3B1C6; }

.refs { padding-top: 48px; padding-bottom: 48px; }
.refs ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.55; }
footer { border-top: 1px solid var(--line); background: var(--raised); }
footer .wrap { padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; font-size: 14px; color: var(--muted); }
footer b { color: var(--text); font-weight: 600; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.preview-flag { position: fixed; right: 12px; bottom: 12px; font: 11px 'JetBrains Mono', monospace; color: var(--faint); background: var(--raised); border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; }
