@font-face { font-family: Instrument; src: url('/fonts/instrument-sans.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: InstrumentSerif; src: url('/fonts/instrument-serif-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: PlexMono; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #141417;
  --muted: #67676c;
  --paper: #f4f2ec;
  --surface: #fffef9;
  --surface-2: #ebe8df;
  --line: #cfccc3;
  --line-strong: #a9a69f;
  --accent: #3152ff;
  --accent-soft: #e1e5ff;
  --signal: #c8ff4b;
  --success: #1f7148;
  --warning: #a15818;
  --danger: #a43b42;
  --shadow: 0 24px 70px rgba(29, 28, 35, .09);
  --radius: 22px;
}

:root[data-theme="dark"] {
  --ink: #f1f0eb;
  --muted: #aaaab2;
  --paper: #0b0b10;
  --surface: #121218;
  --surface-2: #1a1a22;
  --line: #30303a;
  --line-strong: #52525e;
  --accent: #8191ff;
  --accent-soft: #20284f;
  --signal: #b8f33e;
  --success: #68d49a;
  --warning: #f2b56c;
  --danger: #ff8f96;
  --shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Instrument, Arial, sans-serif; font-size: 16px; line-height: 1.5; transition: background .2s ease, color .2s ease; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { width: min(1400px, calc(100% - 48px)); height: 82px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.product-identity { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.product-identity > span:last-child { display: grid; line-height: 1.1; }
.product-identity b { font-size: 14px; letter-spacing: -.02em; }
.product-identity small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.gateway-mark { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; position: relative; display: block; }
.gateway-mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); position: absolute; }
.gateway-mark i:nth-child(1) { top: 6px; left: 13px; }
.gateway-mark i:nth-child(2) { bottom: 7px; left: 6px; background: var(--signal); }
.gateway-mark i:nth-child(3) { bottom: 7px; right: 6px; }
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a { text-decoration: none; color: var(--muted); font-size: 13px; }
.header-nav a:hover { color: var(--ink); }

main { overflow: hidden; }
.hero { width: min(1400px, calc(100% - 48px)); margin: 0 auto; min-height: 620px; padding: 88px 0 74px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 90px; align-items: center; }
.eyebrow, .section-label { margin: 0 0 20px; font-family: PlexMono, monospace; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.eyebrow span { color: var(--accent); margin-right: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 28px; font-size: clamp(58px, 7.2vw, 112px); line-height: .9; letter-spacing: -.065em; font-weight: 560; max-width: 960px; }
h1 em, h2 em { font-family: InstrumentSerif, Georgia, serif; font-weight: 400; color: var(--accent); }
.hero-copy > p:not(.eyebrow) { max-width: 700px; font-size: clamp(18px, 1.6vw, 23px); color: var(--muted); line-height: 1.45; }
.hero-actions { display: flex; gap: 22px; align-items: center; margin-top: 38px; }
.primary-link { display: inline-flex; gap: 28px; align-items: center; padding: 15px 18px; background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 10px; font-weight: 650; }
.primary-link span { color: var(--signal); }
.text-link { color: var(--muted); text-underline-offset: 4px; }
.hero-proof { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); box-shadow: var(--shadow); }
.hero-proof div { min-height: 152px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-proof div:nth-child(2n) { border-right: 0; }
.hero-proof div:nth-child(n+3) { border-bottom: 0; }
.hero-proof strong { font-size: 48px; line-height: 1; letter-spacing: -.055em; }
.hero-proof span { color: var(--muted); font-size: 12px; }

.sandbox-section {
  --ink: #141417;
  --paper: #f4f2ec;
  padding: 110px max(24px, calc((100vw - 1400px) / 2));
  background: var(--ink);
  color: var(--paper);
}
:root[data-theme="dark"] .sandbox-section {
  --ink: #050507;
  --paper: #f1f0eb;
}
.section-intro { max-width: 760px; margin-bottom: 48px; }
.section-intro h2, .section-heading h2, .evaluation-copy h2 { font-size: clamp(40px, 5vw, 72px); line-height: .98; letter-spacing: -.05em; margin-bottom: 22px; }
.section-intro > p:last-child { font-size: 19px; color: color-mix(in srgb, var(--paper), transparent 35%); max-width: 650px; }
.sandbox-shell { display: grid; grid-template-columns: 460px minmax(0, 1fr); min-height: 720px; border: 1px solid color-mix(in srgb, var(--paper), transparent 76%); border-radius: 26px; overflow: hidden; background: color-mix(in srgb, var(--ink), white 4%); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.control-panel { padding: 30px; border-right: 1px solid color-mix(in srgb, var(--paper), transparent 78%); }
.panel-heading, .response-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; font-family: PlexMono, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.status-chip { display: flex; gap: 7px; align-items: center; color: color-mix(in srgb, var(--paper), transparent 35%); font-size: 10px; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal), transparent 82%); }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span { font-size: 12px; color: color-mix(in srgb, var(--paper), transparent 30%); }
.field select, .field input, .field textarea { width: 100%; color: var(--paper); background: color-mix(in srgb, var(--paper), transparent 94%); border: 1px solid color-mix(in srgb, var(--paper), transparent 78%); border-radius: 10px; padding: 12px 13px; outline: none; }
.field textarea { resize: vertical; min-height: 148px; line-height: 1.45; }
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal), transparent 86%); }
.field select option { background: #17171c; color: #fff; }
.field small { color: color-mix(in srgb, var(--paper), transparent 52%); font-size: 10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.key-field { padding: 14px; border: 1px solid color-mix(in srgb, var(--signal), transparent 65%); border-radius: 12px; background: color-mix(in srgb, var(--signal), transparent 94%); }
.run-button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 15px; border: 0; border-radius: 10px; background: var(--signal); color: #111; cursor: pointer; font-weight: 700; }
.run-button:hover { filter: brightness(.94); }
.run-button:disabled { opacity: .55; cursor: wait; }
.boundary-note { margin-top: 18px; padding: 15px; border-left: 2px solid color-mix(in srgb, var(--paper), transparent 62%); background: color-mix(in srgb, var(--paper), transparent 96%); }
.boundary-note span { color: var(--signal); font-family: PlexMono, monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.boundary-note p { margin: 5px 0 0; font-size: 11px; color: color-mix(in srgb, var(--paper), transparent 42%); }

.response-room { min-width: 0; padding: 30px; display: flex; flex-direction: column; background: radial-gradient(circle at 75% 20%, rgba(49, 82, 255, .18), transparent 36%); }
.response-toolbar small { display: block; margin-top: 4px; color: color-mix(in srgb, var(--paper), transparent 58%); text-transform: none; letter-spacing: 0; }
.run-state { padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--paper), transparent 75%); border-radius: 100px; color: color-mix(in srgb, var(--paper), transparent 30%); }
.run-state[data-state="running"] { color: var(--signal); border-color: var(--signal); }
.run-state[data-state="done"] { color: #7de8ab; border-color: #377552; }
.run-state[data-state="error"] { color: #ff9da4; border-color: #7f363b; }
.empty-state { margin: auto; max-width: 460px; text-align: center; }
.empty-state h3 { font-size: 32px; letter-spacing: -.035em; margin-bottom: 12px; }
.empty-state p { color: color-mix(in srgb, var(--paper), transparent 48%); }
.empty-orbit { position: relative; width: 72px; height: 72px; display: inline-block; border: 1px solid color-mix(in srgb, var(--paper), transparent 72%); border-radius: 50%; margin-bottom: 25px; }
.empty-orbit i { width: 8px; height: 8px; border-radius: 50%; position: absolute; background: var(--accent); }
.empty-orbit i:nth-child(1) { left: 31px; top: -4px; }
.empty-orbit i:nth-child(2) { left: 1px; bottom: 9px; background: var(--signal); }
.empty-orbit i:nth-child(3) { right: 1px; bottom: 9px; }
.response-content { display: grid; gap: 18px; }
.disclosure { padding: 10px 12px; border: 1px solid #3e7557; background: rgba(60, 146, 96, .12); color: #98e3b5; border-radius: 9px; font-size: 11px; }
.output-card { min-height: 250px; padding: 30px; border: 1px solid color-mix(in srgb, var(--paper), transparent 76%); border-radius: 18px; background: color-mix(in srgb, var(--paper), transparent 95%); }
.output-card #model-output { font-size: clamp(18px, 2vw, 26px); line-height: 1.48; letter-spacing: -.015em; white-space: pre-wrap; }
.receipt-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid color-mix(in srgb, var(--paper), transparent 78%); border-radius: 14px; overflow: hidden; }
.receipt-grid article { min-width: 0; padding: 15px; border-right: 1px solid color-mix(in srgb, var(--paper), transparent 78%); }
.receipt-grid article:last-child { border-right: 0; }
.receipt-grid span, .receipt-line span { display: block; color: color-mix(in srgb, var(--paper), transparent 52%); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.receipt-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; font-size: 12px; white-space: nowrap; }
.receipt-line { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--paper), transparent 78%); border-radius: 12px; }
.receipt-line > div { min-width: 0; }
.receipt-line code { display: block; max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: color-mix(in srgb, var(--paper), transparent 30%); margin-top: 4px; font-size: 10px; }
.receipt-line button { background: transparent; color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper), transparent 65%); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.error-panel { margin: auto; max-width: 560px; padding: 28px; border: 1px solid #73353b; border-radius: 16px; background: rgba(128, 45, 52, .15); }
.error-panel span { color: #ff9da4; font-family: PlexMono, monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.error-panel strong { display: block; margin-top: 10px; font-size: 24px; }
.error-panel p { color: color-mix(in srgb, var(--paper), transparent 45%); margin: 8px 0 0; }

.systems-section, .architecture { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 120px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 50px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { color: var(--muted); max-width: 420px; }
.section-heading > a { color: var(--muted); text-underline-offset: 5px; }
.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.system-card { position: relative; min-height: 330px; padding: 26px; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-decoration: none; overflow: hidden; }
.system-card:hover { background: var(--accent-soft); }
.system-card:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.system-card .card-index { font-family: PlexMono, monospace; font-size: 10px; color: var(--muted); }
.system-card .card-category { margin: auto 0 10px; color: var(--accent); font-family: PlexMono, monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.system-card h3 { font-size: 27px; line-height: 1.05; letter-spacing: -.035em; margin-bottom: 14px; }
.system-card p { color: var(--muted); font-size: 13px; }
.card-proof { display: flex; gap: 16px; padding-top: 15px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.card-proof b { color: var(--ink); }
.card-arrow { position: absolute; right: 24px; top: 22px; color: var(--muted); }

.evaluation-section { display: grid; grid-template-columns: .78fr 1.22fr; gap: 100px; padding: 120px max(24px, calc((100vw - 1400px) / 2)); background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.evaluation-copy { position: sticky; top: 30px; align-self: start; }
.evaluation-copy p:not(.section-label) { max-width: 500px; color: var(--muted); font-size: 18px; }
.evaluation-copy a { display: inline-block; margin-top: 14px; color: var(--accent); text-underline-offset: 5px; }
.evaluation-list { border-top: 1px solid var(--line-strong); }
.evaluation-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.evaluation-row strong { display: block; margin-bottom: 4px; }
.evaluation-row p { color: var(--muted); font-size: 12px; margin: 0; }
.evaluation-score { text-align: right; }
.evaluation-score b { display: block; color: var(--success); font-size: 20px; }
.evaluation-score small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }

.architecture-flow { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr; align-items: stretch; }
.architecture-flow article { min-height: 190px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; }
.architecture-flow article span { color: var(--accent); font-family: PlexMono, monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.architecture-flow article strong { margin: auto 0 8px; font-size: 22px; letter-spacing: -.03em; }
.architecture-flow article small { color: var(--muted); }
.architecture-flow > i { display: grid; place-items: center; color: var(--muted); font-style: normal; }
.tech-row { display: flex; align-items: center; gap: 26px; margin-top: 35px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-row > span { color: var(--muted); font-family: PlexMono, monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin-right: auto; }
.tech-row div { display: flex; align-items: center; gap: 8px; }
.tech-row img { width: 23px; height: 23px; object-fit: contain; filter: grayscale(1); }
:root[data-theme="dark"] .tech-row img { filter: grayscale(1) invert(.88); }
.tech-row small { font-size: 11px; color: var(--muted); }

footer { width: min(1400px, calc(100% - 48px)); min-height: 150px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 40px; align-items: center; border-top: 1px solid var(--line); }
.footer-brands { display: flex; gap: 18px; align-items: center; }
.footer-brands > i { width: 1px; height: 28px; background: var(--line); }
.footer-brands a { display: flex; align-items: center; gap: 7px; text-decoration: none; font-size: 11px; font-weight: 700; }
.footer-brands img { max-width: 84px; max-height: 30px; }
:root[data-theme="dark"] .footer-brands img { filter: brightness(0) invert(1); }
footer > p { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
footer nav { display: flex; justify-content: end; gap: 18px; }
footer nav a { color: var(--muted); font-size: 11px; }

[hidden] { display: none !important; }

@media (max-width: 1060px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 50px; }
  .hero-proof { max-width: 620px; }
  .sandbox-shell { grid-template-columns: 390px minmax(0, 1fr); }
  .receipt-grid { grid-template-columns: 1fr 1fr; }
  .receipt-grid article:nth-child(2) { border-right: 0; }
  .receipt-grid article:nth-child(-n+2) { border-bottom: 1px solid color-mix(in srgb, var(--paper), transparent 78%); }
  .system-grid { grid-template-columns: 1fr 1fr; }
  .evaluation-section { gap: 50px; }
  .architecture-flow { grid-template-columns: 1fr 20px 1fr; gap: 14px 0; }
  .architecture-flow article:nth-of-type(3) { grid-column: 1; }
  .architecture-flow article:nth-of-type(4) { grid-column: 3; }
  footer { grid-template-columns: 1fr; padding: 35px 0; text-align: center; }
  .footer-brands, footer nav { justify-content: center; }
}

@media (max-width: 760px) {
  .site-header { width: calc(100% - 28px); height: 70px; }
  .header-nav { gap: 10px; }
  .header-nav a { display: none; }
  .hero, .systems-section, .architecture, footer { width: calc(100% - 28px); }
  .hero { padding: 70px 0; }
  h1 { font-size: clamp(50px, 15vw, 76px); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .primary-link { justify-content: space-between; }
  .hero-proof div { min-height: 125px; padding: 18px; }
  .hero-proof strong { font-size: 36px; }
  .sandbox-section, .evaluation-section { padding: 80px 14px; }
  .sandbox-shell { display: block; }
  .control-panel { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--paper), transparent 78%); padding: 20px; }
  .response-room { min-height: 600px; padding: 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .output-card { padding: 20px; }
  .receipt-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 20px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 290px; }
  .evaluation-section { grid-template-columns: 1fr; }
  .evaluation-copy { position: static; }
  .architecture-flow { display: grid; grid-template-columns: 1fr; }
  .architecture-flow article, .architecture-flow article:nth-of-type(3), .architecture-flow article:nth-of-type(4) { grid-column: 1; }
  .architecture-flow > i { transform: rotate(90deg); min-height: 20px; }
  .tech-row { gap: 14px; flex-wrap: wrap; }
  .tech-row > span { width: 100%; margin: 0; }
  footer { display: flex; flex-direction: column; }
}
