/* The Aixia AI site. Tokens, Inter and the logo come from internal/webassets
   (Aixia Design System V7): black and white, Scandinavian Blue as the only
   accent, black buttons (blue fails contrast as a button), no pills.
   Every page is built from the same parts: a big balanced heading, dark
   one-line terminal boxes, framed stages, and hairline sections with an
   eyebrow. */

@font-face {
  font-family: "Inter";
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root { --ease: cubic-bezier(0.2, 0, 0, 1); --ink-box: #0a0a0a; --shadow-stage: 0 24px 64px rgba(0, 0, 0, 0.12); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 17px; line-height: 1.55; color: var(--fg-1); background: var(--bg); }
img { display: block; max-width: 100%; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.9em; }
p { margin: 0 0 12px; max-width: 68ch; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.logo img { height: 24px; width: auto; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--fg-2); padding: 4px 0; border-bottom: 2px solid transparent; transition: color 200ms var(--ease); }
.top nav a:hover { color: var(--fg-1); }
.top nav a[aria-current="page"] { color: var(--fg-1); border-bottom-color: var(--fg-1); }
.top nav a.lang { margin-left: 8px; padding-left: 18px; border-left: 1px solid var(--rule); font-size: 14px; }
.foot { border-top: 1px solid var(--rule); margin-top: 72px; padding-top: 20px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--fg-2); }
.foot a { color: var(--fg-2); }

/* Type */
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 5.4vw, 72px); line-height: 1.02; text-wrap: balance; max-width: 16ch; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.lead { font-size: 20px; color: var(--fg-2); max-width: 46ch; margin-top: 20px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 18px; }
.sub { font-size: 16px; color: var(--fg-2); }
.fine { font-size: 15px; color: var(--fg-2); }
.muted { color: var(--fg-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero: a big heading and one line; with media, text left and media right,
   and an optional full-width row below. */
.hero { padding: 72px 0 56px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "text media" "cmd cmd"; gap: 56px 64px; align-items: center; padding: 72px 0 80px; }
.hero-text { grid-area: text; }
.hero-media { grid-area: media; min-width: 0; }
.hero-cmd { grid-area: cmd; min-width: 0; }

/* Sections: a hairline and an eyebrow, generous room. */
.section { border-top: 1px solid var(--rule); padding: 32px 0 64px; }
.section > h2 { margin-bottom: 24px; }

/* Buttons */
.btn {
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 22px; border-radius: 6px;
  background: #000; color: #fff; border: 1px solid #000; cursor: pointer; text-decoration: none;
  transition: background 200ms var(--ease);
}
a.btn, a.btn:visited { color: #fff; }
.btn:hover { background: #2a2a2a; }
.btn:active { transform: scale(0.98); }
.btn-large { min-height: 56px; padding: 18px 28px; font-size: 17px; }
.btn-quiet { background: transparent; color: var(--fg-2); border-color: transparent; padding-left: 0; padding-right: 0; text-decoration: underline; min-height: 0; }
.btn-quiet:hover { background: transparent; color: var(--fg-1); }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Tabs */
.tabs { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 6px; overflow: hidden; }
.tabs button { font: inherit; font-size: 16px; padding: 10px 22px; border: 0; background: #fff; color: #000; cursor: pointer; transition: background 200ms var(--ease), color 200ms var(--ease); }
.tabs button:not([aria-selected="true"]):hover { background: var(--bg-paper); }
.tabs button[aria-selected="true"] { background: #000; color: #fff; }
.tabs { margin-bottom: 20px; }
.os, .stage { animation: show 200ms var(--ease); }
@keyframes show { from { opacity: 0; } to { opacity: 1; } }

/* The dark terminal box: one line, a blue prompt, Copy inside. Long lines
   scroll inside the box, never wrap and never widen the page. */
.term-box { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 22px; background: var(--ink-box); color: #fff; border-radius: 12px; min-width: 0; }
.term-box + .term-box { margin-top: 10px; }
.term-box .label { flex: none; width: 92px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.prompt { color: var(--aixia-blue); font-family: var(--font-mono); font-size: 16px; line-height: 1.6; flex: none; }
.term-box code { flex: 1; min-width: 0; white-space: pre; overflow-x: auto; font-size: 17px; line-height: 1.6; padding: 8px 0; scrollbar-width: none; }
.term-box code::-webkit-scrollbar { display: none; }
.copy {
  font: inherit; font-size: 15px; font-weight: 500; flex: none; min-height: 40px; padding: 8px 16px; border-radius: 6px;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.copy:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.step { font-size: 17px; color: var(--fg-2); margin: 14px 0 0; }

/* Stages: framed media with a soft shadow. */
.stage { margin: 0; min-width: 0; }
.stage video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 12px; background: var(--bg-paper); box-shadow: var(--shadow-stage); }
.stage figcaption { margin-top: 12px; }
.stage-term { aspect-ratio: 16 / 9; background: var(--ink-box); border-radius: 12px; box-shadow: var(--shadow-stage); overflow: hidden; display: flex; flex-direction: column; }
.stage-bar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.stage-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.stage-term pre { margin: 0; padding: 24px; color: #fff; font-family: var(--font-mono); font-size: 17px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.stage-term .prompt { font-size: 17px; }
.stage-term .dim { color: rgba(255, 255, 255, 0.55); }
.stage-paper { border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-stage); padding: 32px; background: var(--bg); }

/* Cards: numbered figure rows and grids of short explanations. */
.figrow { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: fig; }
.figrow li { counter-increment: fig; border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px 22px; }
.figrow li::before { content: counter(fig); display: block; font-size: 40px; line-height: 1; letter-spacing: -0.02em; margin-bottom: 18px; }
.figrow h3 { margin-bottom: 6px; }
.after { margin-top: 24px; }
.figrow p, .card p { font-size: 15px; color: var(--fg-2); margin: 0; }
.cardgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { border: 1px solid var(--rule); border-radius: 12px; padding: 22px; transition: border-color 200ms var(--ease); }
.card:hover { border-color: var(--fg-1); }
.card h3 { margin-bottom: 8px; }
@media (min-width: 900px) { .cardgrid .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }

/* Home: the apps the server offers, as a quiet logo row. */
.apps-row { border-top: 1px solid var(--rule); padding-top: 28px; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.logos li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.logos img { width: 28px; height: 28px; border-radius: 6px; }
.logos .rec { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }

/* Your key */
.notice { padding: 14px 16px; background: var(--bg-paper); border-radius: 6px; max-width: 760px; }
.signed-in { margin-top: 18px; font-size: 15px; color: var(--fg-2); }

/* Checksums */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
td code { word-break: break-all; color: var(--fg-2); }

/* The architecture picture on How it works: wide on screens, stacked on phones. */
.arch { margin: 0; }
.arch svg { display: block; width: 100%; height: auto; font-family: var(--font-sans); }
.arch-tall { display: none !important; max-width: 420px; margin: 0 auto; }
.d-zone { fill: var(--bg-paper); stroke: none; }
.d-zone-t { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--fg-3); }
.d-box { fill: var(--bg); stroke: var(--rule-strong); stroke-width: 1.2; }
.d-main { fill: var(--bg-inverse); }
.d-acc { stroke: var(--accent); stroke-width: 2.5; }
.d-title { font-size: 16px; font-weight: 600; fill: var(--fg-1); }
.d-title-s { font-size: 14px; font-weight: 600; fill: var(--fg-1); }
.d-sub { font-size: 12.5px; fill: var(--fg-2); }
.d-inv { fill: var(--fg-inverse); }
.d-note { font-size: 12.5px; font-style: italic; fill: var(--fg-2); }
.d-label { font-size: 13px; fill: var(--fg-1); }
.d-label-s { font-size: 12px; fill: var(--fg-1); }
.d-line { fill: none; stroke: var(--rule-strong); stroke-width: 1.4; }
.d-a { stroke: var(--accent); stroke-width: 3; }
.d-head { fill: var(--rule-strong); }
.d-head-a { fill: var(--accent); }
.d-num { fill: var(--bg-inverse); }
.d-num-a { fill: var(--accent); }
.d-num-t { font-size: 12px; font-weight: 700; fill: var(--fg-inverse); }

@media (max-width: 960px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "cmd" "media"; gap: 36px; padding: 40px 0 56px; }
  .hero { padding: 40px 0 40px; }
  .stage-term { aspect-ratio: auto; }
  .stage-term pre { font-size: 14px; padding: 18px; }
}
@media (max-width: 720px) {
  .arch-wide { display: none !important; }
  .arch-tall { display: block !important; }
  .stage-paper { padding: 20px; }
}
@media (max-width: 640px) {
  .top nav a.lang { margin-left: 0; padding-left: 0; border-left: 0; }
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .lead { font-size: 18px; }
  .term-box { flex-wrap: wrap; padding: 12px 12px 12px 16px; }
  .term-box code { flex-basis: calc(100% - 40px); }
  .term-box .label { width: 100%; }
  .copy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .os, .stage { animation: none; }
  .tabs button, .copy, .btn, .card { transition: none; }
}

/* Your key: the signed-out button and the signed-in boxes. */
.keypage { max-width: 860px; padding-bottom: 24px; }
