:root {
  color-scheme: dark;
  --background: #0b1018;
  --surface: #111925;
  --surface-deep: #0e1520;
  --line: #253446;
  --text: #edf4fc;
  --muted: #a3b1c4;
  --accent: #70e4ed;
  --amber: #f2c484;
  --mono: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--background);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
body { min-width: 0; line-height: 1.55; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a, button, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: fixed; z-index: 5; top: .5rem; left: .5rem; background: var(--surface); padding: .5rem 1rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #0b1018; }
.header-inner, footer .wrap { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; font-weight: 760; letter-spacing: -.045em; font-size: 1.25rem; white-space: nowrap; }
.brand > span:last-child { color: var(--accent); }
.brand-mark { margin-right: .55rem; border: 1px solid #3c7986; border-radius: 7px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); background: #122a34; font-size: .85rem; }
nav { display: flex; gap: 2.05rem; }
nav a, .repository, footer a:last-child { color: var(--muted); font-size: .875rem; }
nav a:hover, .repository:hover, footer a:last-child:hover { color: var(--accent); }
.repository { border: 1px solid var(--line); border-radius: 7px; padding: .35rem .7rem; white-space: nowrap; }
.hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 78% 28%, #132b3a 0%, transparent 52%),
    linear-gradient(90deg, #111a27 1px, transparent 1px),
    linear-gradient(#111a27 1px, transparent 1px) 0 0 / 52px 52px;
  background-size: auto, 52px 52px, 52px 52px;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); align-items: center; gap: clamp(2rem, 6vw, 5.5rem); padding-block: clamp(3rem, 7vw, 6.5rem); }
.eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--accent); font: 650 .78rem/1.4 var(--mono); letter-spacing: .10em; }
.eyebrow span { width: 17px; height: 1px; background: var(--accent); }
h1 { margin-top: 1.05rem; font-size: clamp(2.85rem, 6vw, 5.05rem); line-height: 1.03; font-weight: 750; letter-spacing: -.07em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 34rem; margin-top: 1.35rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.hero-actions, .run-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }
.button { min-height: 42px; padding: .55rem .95rem; display: inline-flex; gap: .45rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; font-size: .9rem; font-weight: 690; transition: background .18s, border-color .18s; }
.primary { background: var(--accent); color: #0a1e25; }
.primary:hover { background: #adf4f8; }
.secondary { border-color: #35475d; background: #111b28; color: var(--text); }
.secondary:hover { border-color: var(--accent); }
.flow { border: 1px solid #304558; border-radius: 13px; background: #0d1621; padding: .95rem; box-shadow: 0 20px 50px #0005; }
.flow figcaption { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem .2rem .85rem; color: var(--muted); font: .76rem var(--mono); letter-spacing: .07em; }
.flow figcaption i { display: inline-block; width: 7px; height: 7px; border: 1px solid var(--accent); background: #255362; border-radius: 50%; margin-right: .4rem; }
.flow figcaption > :last-child { color: var(--accent); }
.flow-line { display: flex; gap: .65rem; align-items: center; padding: .48rem .58rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); margin-bottom: .4rem; font-size: .9rem; font-weight: 620; }
.flow-icon { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; background: #19293b; color: #9cb7d3; border-radius: 5px; }
.flow-line small, .flow-branch, .flow-models { font: .74rem var(--mono); color: var(--muted); }
.flow-line small { margin-left: auto; text-align: right; }
.flow-line.hot { border-color: #367381; background: #102630; }
.flow-line.hot .flow-icon, .flow-line.hot small { color: var(--accent); }
.flow-branch { padding: .18rem .45rem .18rem .7rem; margin: .15rem 0 .44rem 1.3rem; border-left: 1px solid #426379; }
.flow-models { display: flex; gap: .45rem; }
.flow-models span { flex: 1; text-align: center; padding: .32rem; border: 1px solid #34475d; border-radius: 5px; }
.flow p { font-size: .8rem; color: var(--muted); margin: .65rem .15rem .05rem; }
.section { padding-block: clamp(2.8rem, 6vw, 5rem); scroll-margin-top: 1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.45rem; }
.section-heading > p { max-width: 28rem; color: var(--muted); }
h2 { font-size: clamp(1.95rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.12; margin-top: .45rem; }
h3 { font-size: 1.05rem; line-height: 1.3; }
.console { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.console-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .45rem 1rem; border-bottom: 1px solid var(--line); padding: .7rem 1.15rem; background: #141f2d; }
.console-label { font-weight: 650; }
.console-label span, .trace-panel h3 span { font: 750 1rem var(--mono); color: var(--accent); margin-right: .35rem; }
.connection { color: var(--muted); font-size: .875rem; }
.connection::before { content: ''; display: inline-block; vertical-align: .09em; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: .43rem; }
.connection[data-state=online] { color: var(--accent); }
.connection[data-state=offline] { color: var(--amber); }
.console-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.console-main, .trace-panel { padding: clamp(1rem, 3vw, 1.55rem); }
.form-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .55rem; font-size: .9rem; font-weight: 620; }
.mode-label { display: flex; gap: .45rem; align-items: center; color: var(--muted); font-weight: 450; }
select { color: var(--text); background-color: #121e2d; border: 1px solid #3d4f64; border-radius: 5px; padding: .1rem .3rem; max-width: 100%; }
textarea { display: block; width: 100%; min-height: 82px; resize: vertical; border: 1px solid #3b5065; background: #0a111a; color: var(--text); padding: .7rem .8rem; border-radius: 7px; }
textarea::placeholder { color: #8ea0b5; }
.suggestions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.suggestions button { color: #bbcbdf; background: #172434; border: 1px solid #34475c; border-radius: 5px; padding: .26rem .55rem; font-size: .875rem; }
.suggestions button:hover { color: var(--accent); border-color: #538891; }
.run-actions { margin-top: 1rem; }
.form-note, .feedback { font-size: .875rem; margin-top: .7rem; color: var(--muted); }
.feedback[data-error=true] { color: var(--amber); }
.trace-panel { border-left: 1px solid var(--line); background: var(--surface-deep); }
.trace-panel p { color: var(--muted); margin-top: .65rem; font-size: .9rem; overflow-wrap: anywhere; }
.trace-panel ol { list-style: none; padding: 0; margin: .8rem 0 0; }
.trace-panel li { position: relative; border-left: 1px solid #375068; padding: 0 0 .8rem .8rem; margin-left: .22rem; animation: appear .2s ease-out; }
.trace-panel li::before { position: absolute; content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); left: -4px; top: .42rem; }
.trace-panel li:last-child { padding-bottom: 0; }
.trace-panel li[data-stage=error]::before { background: var(--amber); }
.trace-title { display: flex; flex-wrap: wrap; gap: .25rem .7rem; justify-content: space-between; line-height: 1.4; font-size: .9rem; }
.trace-title time { color: var(--muted); font: .76rem var(--mono); }
.trace-panel li p { margin-top: .18rem; }
.result, .source-panel { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; animation: appear .2s ease-out; }
#answer, .source-panel details { margin-top: .55rem; overflow-wrap: anywhere; }
#answer { white-space: pre-wrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .55rem; margin: .8rem 0 0; }
.metrics div { padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 6px; }
.metrics dt { color: var(--muted); font-size: .8rem; }
.metrics dd { margin: 0; font: .83rem/1.5 var(--mono); overflow-wrap: anywhere; }
details summary { color: var(--accent); cursor: pointer; font-size: .9rem; }
details p { color: var(--muted); font-size: .9rem; margin: .35rem 0; }
.benchmark-section { background: #0e1520; border-block: 1px solid var(--line); }
.charts, .architecture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.chart, .architecture-grid article { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 1rem; }
.chart strong { display: block; font-size: 1.65rem; line-height: 1.2; color: var(--accent); letter-spacing: -.04em; margin: .45rem 0 .8rem; }
.chart strong[data-direction=worse] { color: var(--amber); }
.chart-row { margin-top: .5rem; }
.chart-row > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .15rem .65rem; color: var(--muted); font-size: .85rem; }
.chart-row b { font: .8rem/1.6 var(--mono); color: var(--text); }
.bar { height: 6px; margin-top: .25rem; background: #1b293b; border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: #7891ad; transform-origin: left; animation: expand .45s ease-out; }
.chart-row:last-child .bar span { background: var(--accent); }
.benchmark-details { display: grid; grid-template-columns: 1.45fr 1fr; gap: .85rem; margin-top: .85rem; }
.table-wrap, .benchmark-details aside { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: .52rem .78rem; border-bottom: 1px solid var(--line); }
thead th, tbody th { font-weight: 550; }
tbody th { color: var(--muted); }
tbody tr:last-child > * { border-bottom: 0; }
.benchmark-details aside { padding: 1rem; }
.benchmark-details aside p { color: var(--muted); margin: .5rem 0 .65rem; }
.benchmark-details a { color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
#benchmark-status { margin-top: .75rem; color: var(--muted); }
.architecture-icon { width: 36px; height: 36px; margin-bottom: .7rem; display: grid; place-items: center; background: #102630; color: var(--accent); border-radius: 7px; font-size: 1.25rem; }
.architecture-grid p { color: var(--muted); margin-top: .55rem; }
footer { border-top: 1px solid var(--line); }
@keyframes appear { from { opacity: 0; transform: translateY(3px); } }
@keyframes expand { from { transform: scaleX(0); } }
@media (max-width: 850px) {
  .hero-inner { gap: 1.8rem; }
  .section-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 690px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; padding-block: .65rem; gap: .45rem 1rem; }
  nav { order: 3; width: 100%; justify-content: space-between; gap: .5rem; }
  .hero-inner, .console-grid, .charts, .architecture-grid, .benchmark-details { grid-template-columns: minmax(0, 1fr); }
  .console-main { display: contents; }
  .console-main > * { padding: 1rem; }
  .trace-panel { grid-row: 2; border-left: 0; border-top: 1px solid var(--line); }
  .result, .source-panel { margin-top: 0; }
}
@media (max-width: 360px) {
  .mode-label > span { display: none; }
  th, td { padding-inline: .48rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
