@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #0b0910;
  --panel: #110e17;
  --panel-2: #0d0b12;
  --bar: #1a1522;
  --line: #2b2435;
  --line-2: #3a3046;
  --text: #d8d1e2;
  --muted: #a79cb6;
  --dim: #9286a3;
  --accent: #c9b6ff;
  --ok: #8fd1a8;
  --warn: #e8c27a;
  --err: #f0a6c8;
  --white: #ffffff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--white); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; cursor: pointer; }
code { font-family: inherit; color: var(--muted); }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--panel); padding: 10px 16px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--panel); text-decoration: none; }

.window { max-width: 1040px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }

.bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  padding: 8px 16px; background: var(--bar); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.bar .path { overflow-wrap: anywhere; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lang, .view { display: flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.lang a, .view button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px;
  border: 0; background: transparent; color: var(--muted); font-size: 13px;
}
.lang a[aria-current], .view button[aria-pressed="true"] { background: var(--accent); color: var(--panel); font-weight: 700; }
.lang a:hover, .view button:hover { text-decoration: none; color: var(--white); }
.lang a[aria-current]:hover, .view button[aria-pressed="true"]:hover { color: var(--panel); }

html[data-view="terminal"] .simple { display: none; }

.pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 12px 28px; border-bottom: 1px solid #1f1a27; }
.pages a { padding: 6px 12px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 6px; color: var(--muted); }
.pages a:hover { color: var(--white); text-decoration: none; background: #1f1a27; }
.pages a[aria-current] { color: var(--white); background: #1f1a27; }
.pages .brand { color: var(--accent); font-weight: 700; font-size: 16px; margin-right: 12px; padding-left: 0; }
.pages .brand[aria-current] { background: transparent; }

main { padding: 40px 28px 48px; display: flex; flex-direction: column; gap: 40px; }
main:focus { outline: none; }
main > header, .hero { display: flex; flex-direction: column; gap: 10px; }
main h1 { font-size: 36px; color: var(--accent); }
.hero h1 { font-size: 56px; letter-spacing: -1.5px; line-height: 1.05; }
.tagline { font-size: 18px; color: var(--muted); }
main h2 { font-size: 20px; color: var(--accent); }
section { display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); }
.meta { color: var(--dim); font-size: 13px; }
.lead { font-size: 17px; color: var(--text); max-width: 760px; }
.hero p, main > header p { max-width: 760px; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.section-head a { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
}
.card:hover, .card:focus-within { border-color: #5a4a72; }
.card h2, .card h3 { font-size: 17px; color: var(--white); }
.card-link { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

.status { font-size: 12px; white-space: nowrap; }
.status::before { content: "● "; }
.status.ok { color: var(--ok); }
.status.wip { color: var(--warn); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; color: var(--accent); }

.back a { color: var(--muted); font-size: 14px; }
.doc { display: flex; flex-direction: column; gap: 28px; max-width: 780px; }
.doc > header { display: flex; flex-direction: column; gap: 10px; }
.doc h1 { font-size: 40px; }
.doc h2 { font-size: 17px; }
.doc section { gap: 6px; }
.title-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--dim); }

.kv { display: flex; flex-direction: column; gap: 10px; }
.kv > div { display: flex; flex-wrap: wrap; column-gap: 24px; padding-bottom: 10px; border-bottom: 1px solid #1f1a27; }
.kv dt { width: 170px; font-weight: 700; color: var(--white); }
.kv dd { margin: 0; flex: 1 1 400px; min-width: 0; color: var(--muted); }

.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; flex-wrap: wrap; column-gap: 24px; }
.timeline .when { width: 170px; color: var(--dim); }
.timeline li > div { flex: 1 1 400px; min-width: 0; }
.role strong { color: var(--white); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  background: var(--bar); border: 1px solid var(--line); border-radius: 6px; color: var(--text);
}
.button:hover { border-color: var(--accent); text-decoration: none; color: var(--white); }
.button .k { color: var(--accent); }

.foot { padding: 16px 28px 24px; border-top: 1px solid #1f1a27; font-size: 13px; color: var(--dim); }
.foot code { color: var(--muted); }

.notfound section { gap: 10px; }
.notfound section + section { padding-top: 32px; border-top: 1px solid #1f1a27; }

main.term { padding: 0; display: block; gap: 0; font-size: 14px; line-height: 1.6; }
.t-screen { padding: 24px 28px 28px; min-height: 640px; display: flex; flex-direction: column; gap: 4px; }
.t-out { display: flex; flex-direction: column; gap: 4px; }
.t-block { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.t-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-boot { font-size: 13px; color: var(--dim); }
.c-a { color: var(--accent); } .c-m { color: var(--muted); } .c-d { color: var(--dim); }
.c-g { color: var(--ok); } .c-y { color: var(--warn); } .c-e { color: var(--err); }
.b { font-weight: 700; }
.t-fetch { display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: flex-start; margin: 8px 0; }
.t-logo { margin: 0; color: var(--accent); font: inherit; font-weight: 700; line-height: 1.25; }
.t-fields { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.t-swatches { display: flex; margin-top: 10px; }
.t-swatches span { width: 28px; height: 16px; }
.s1 { background: #110e17; } .s2 { background: #f0a6c8; } .s3 { background: #8fd1a8; } .s4 { background: #e8c27a; }
.s5 { background: #c9b6ff; } .s6 { background: #9ad1e8; } .s7 { background: #a79cb6; } .s8 { background: #d8d1e2; }
.t-prompt-row { display: flex; align-items: center; margin-top: 12px; min-height: 32px; }
.t-prompt { white-space: pre; }
.t-inline { display: inline; }
.t-input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; caret-color: var(--accent); padding: 4px 0; }
.t-input:focus { outline: none; }
.t-prompt-row:focus-within { box-shadow: inset 0 -1px 0 var(--line-2); }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--panel-2); border-top: 1px solid var(--line); }
.t-chips button { background: var(--bar); border: 1px solid var(--line); border-radius: 4px; color: var(--text); padding: 6px 12px; min-height: 36px; font-size: 13px; }
.t-chips button:hover { border-color: var(--accent); }
.t-skip { align-self: flex-start; margin-top: 12px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); padding: 6px 12px; min-height: 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  body { padding: 0; }
  .window { border-radius: 0; border-left: 0; border-right: 0; }
  main { padding: 28px 18px 36px; }
  .pages { padding: 10px 14px; }
  .hero h1 { font-size: 40px; }
  main h1 { font-size: 30px; }
  .doc h1 { font-size: 30px; }
  .t-screen { padding: 18px 16px; min-height: 70vh; }
  .foot { padding: 16px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
