:root {
  --bg: #0A0A09;
  --bg-2: #0F0F0E;
  --panel: #121211;
  --line: #1F1E1C;
  --line-2: #2A2926;
  --fg: #E8E6E0;
  --muted: #8C8981;
  --faint: #5A5852;
  --amber: #FFB547;
  --amber-dim: #7A5A2B;
  --green: #8BD17C;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(255, 181, 71, .07), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .055) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg);
  color: var(--fg);
  font: 14px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }
::selection { background: var(--amber); color: #140F05; }
.cm { color: var(--faint); }
.dim { color: var(--muted); }
.ps { color: var(--amber); }

.wrap, .bar-in, .foot-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---- status bar --------------------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bar-in { display: flex; align-items: center; gap: 20px; height: 44px; font-size: 12px; }
.mark { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--sans); letter-spacing: -.01em; }
.light { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 2px var(--amber); } }
.ver { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); font: 500 10.5px var(--mono); }
.crumbs { display: flex; gap: 8px; color: var(--faint); }
.crumbs .sep { color: var(--line-2); }
.crumbs .hash { color: var(--muted); }
.bar nav { display: flex; gap: 4px; margin-left: auto; }
.bar nav a { padding: 4px 9px; border-radius: 5px; color: var(--muted); transition: color .15s, background .15s; }
.bar nav a:hover { color: var(--fg); background: var(--panel); }
.bar nav .gh { color: var(--fg); border: 1px solid var(--line-2); }

/* ---- hero --------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: start;
  padding: 72px 0 56px;
}
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; font-size: 11.5px; color: var(--muted); }
.tags .ok { color: var(--green); }
h1 {
  margin: 0;
  font: 600 clamp(40px, 5.6vw, 64px)/1.02 var(--sans);
  letter-spacing: -.05em;
}
h1 s {
  white-space: nowrap;
  color: var(--muted);
  text-decoration-color: var(--amber);
  text-decoration-thickness: .07em;
}
.sub { max-width: 470px; margin: 24px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

.install { margin-top: 30px; max-width: 520px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.install-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); }
.install-tabs button, .install-tabs a {
  position: relative;
  padding: 6px 12px 8px;
  border: 0; background: none;
  color: var(--faint);
  font: 12px var(--mono);
  cursor: pointer;
  transition: color .15s;
}
.install-tabs a { margin-left: auto; }
.install-tabs button:hover, .install-tabs a:hover { color: var(--fg); }
.install-tabs button[aria-selected="true"] { color: var(--fg); }
.install-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 1px; background: var(--amber); }
.install-cmd { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; }
.install-cmd code { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.install-cmd code::-webkit-scrollbar { display: none; }
.copy {
  padding: 4px 10px;
  border: 1px solid var(--line-2); border-radius: 5px;
  background: var(--panel); color: var(--muted);
  font: 11.5px var(--mono); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy:hover { color: var(--fg); border-color: var(--faint); }
.copy.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line-2)); }
.install-note { margin: 0; padding: 9px 16px 11px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 11.5px; }
.install-note code { color: var(--fg); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 30px 0 0; max-width: 520px; border-block: 1px solid var(--line); }
.stats div { padding: 12px 0 10px 14px; border-left: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.stats dd { margin: 2px 0 0; font: 600 22px var(--sans); letter-spacing: -.03em; }
.stats small { margin-left: 2px; color: var(--muted); font: 500 11px var(--mono); }

/* ---- figures ------------------------------------------------------------------ */
.fig { position: relative; margin: 0; }
.fig::before, .fig::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--amber-dim); pointer-events: none; }
.fig::before { top: -6px; left: -6px; border-top: 1px solid; border-left: 1px solid; }
.fig::after { right: -6px; bottom: -6px; border-right: 1px solid; border-bottom: 1px solid; }
.fig figcaption { display: flex; gap: 14px; margin-bottom: 10px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.fig figcaption span:first-child { color: var(--amber); }
.rec { margin-left: auto; color: #FF6B5E; animation: pulse 1.6s ease-in-out infinite; }

.term { border: 1px solid var(--line-2); border-radius: 10px; background: #0C0B0A; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,181,71,.03); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2A2926; }
.term-bar span { margin: 0 auto; transform: translateX(-20px); color: var(--faint); font-size: 11px; }
#screen {
  margin: 0;
  padding: 16px 18px 18px;
  font: 400 clamp(7px, 1.02vw, 12px)/1.55 var(--mono);
  color: #E9E6DF;
  min-height: calc(19 * 1.55em + 34px);
  white-space: pre;
  overflow: hidden;
}
.c-a { color: #FFB547; } .c-ad { color: #7A5A2B; } .c-f { color: #E9E6DF; } .c-m { color: #9B978E; }
.c-x { color: #5B5851; } .c-ok { color: #9BD88A; } .c-b { color: #E9E6DF; font-weight: 600; }
.c-i { font-style: italic; color: #5B5851; }
.c-btn { background: #FFB547; color: #1A1408; font-weight: 600; }
.c-cur { background: #FFB547; color: #141311; }
.box { color: #34322E; }
.caption { margin: 10px 2px 0; color: var(--muted); font-size: 12px; }

/* ---- blocks ------------------------------------------------------------------- */
.block { padding: 64px 0 8px; border-top: 1px solid var(--line); }
.block-head { margin-bottom: 26px; }
.label { margin: 0 0 12px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.label span { color: var(--amber); margin-right: 6px; }
h2 { margin: 0; font: 600 30px/1.1 var(--sans); letter-spacing: -.04em; }
.lede { max-width: 560px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* signal path */
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.pipe li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; border-left: 1px solid var(--line); }
.pipe li:first-child { border-left: 0; }
.pipe li::before {
  content: "";
  position: absolute; top: 25px; left: -4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--amber-dim);
}
.pipe li:first-child::before { display: none; }
.pipe li::after {
  content: "";
  position: absolute; top: 28px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber) 50%, transparent) 0 0 / 40% 100% no-repeat;
  opacity: 0;
  animation: packet 3.5s linear infinite;
  animation-delay: calc(var(--i) * .7s);
}
@keyframes packet { 0% { opacity: 1; background-position: -60% 0; } 20% { background-position: 160% 0; opacity: 1; } 21%, 100% { opacity: 0; } }
.pipe b { color: var(--fg); font: 600 15px var(--sans); letter-spacing: -.02em; }
.pipe span { color: var(--muted); font-size: 12px; }
.pipe code { margin-top: 10px; color: var(--amber); font-size: 11px; overflow-wrap: anywhere; }

/* ops sheet */
.sheet { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.filter { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font: 13px var(--mono); caret-color: var(--amber); }
.filter input::placeholder { color: var(--faint); }
.filter .count { color: var(--faint); font-size: 11px; }
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.op-table { margin: 0; padding: 6px 0; list-style: none; border-right: 1px solid var(--line); max-height: 468px; overflow-y: auto; scrollbar-width: thin; }
.op-table li {
  display: grid; grid-template-columns: 28px 92px minmax(0, 1fr);
  align-items: baseline;
  padding: 8px 16px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s;
}
.op-table li:hover { background: var(--panel); }
.op-table li[aria-selected="true"] { background: var(--panel); border-left-color: var(--amber); }
.op-table .n { color: var(--faint); font-size: 11px; }
.op-table .name { font-weight: 500; font-size: 13px; }
.op-table li[aria-selected="true"] .name { color: var(--amber); }
.op-table .desc { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-table .empty { display: block; padding: 18px 16px; color: var(--faint); cursor: default; }
.op-detail { padding: 18px 20px; min-width: 0; }
.op-detail-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin: 0 0 12px; }
.op-detail-head #d-name { color: var(--amber); font: 600 18px var(--sans); letter-spacing: -.02em; }
.op-detail-head .dim { font-size: 11.5px; }
#d-cmd {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #0B0B0A;
  color: var(--fg);
  font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
#d-cmd .k { color: var(--amber); } #d-cmd .f { color: var(--muted); } #d-cmd .s { color: var(--green); }
.op-detail-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

/* keys + cli */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.keys { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.keys li { display: flex; align-items: center; gap: 6px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.keys li:nth-child(odd) { padding-right: 12px; }
.keys span { margin-left: 6px; }
kbd {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--panel); color: var(--fg);
  font-size: 11px;
}
.code {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--bg-2);
  font-size: 12.5px; line-height: 1.8;
  overflow-x: auto;
}
.code .fl { color: var(--muted); }
.code .out { color: var(--green); }

/* ---- footer ------------------------------------------------------------------- */
.foot { margin-top: 72px; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 18px; padding-bottom: 28px; color: var(--faint); font-size: 11.5px; }
.foot a { color: var(--muted); border-bottom: 1px solid var(--line-2); transition: color .15s, border-color .15s; }
.foot a:hover { color: var(--fg); border-color: var(--amber); }

/* ---- motion ------------------------------------------------------------------- */
.hero-copy > *, .hero-fig { opacity: 0; transform: translateY(8px); animation: rise .7s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .22s; } .hero-copy > :nth-child(5) { animation-delay: .3s; }
.hero-fig { animation-delay: .25s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-fig, .reveal { animation: none; opacity: 1; transform: none; transition: none; }
  .light, .rec, .pipe li::after { animation: none; }
}

/* ---- responsive --------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 52px; }
  #screen { font-size: clamp(6.5px, 1.95vw, 12px); }
  .pipe { grid-template-columns: minmax(0, 1fr); }
  .pipe li { border-left: 0; border-top: 1px solid var(--line); padding-left: 34px; }
  .pipe li:first-child { border-top: 0; }
  .pipe li::before { display: block; top: 24px; left: 14px; }
  .pipe li::after { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}
@media (max-width: 720px) {
  .wrap, .bar-in, .foot-in { padding: 0 16px; }
  .crumbs { display: none; }
  .bar nav a:not(.gh):not([href="#ops"]) { display: none; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr); }
  .op-table { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .op-table li { grid-template-columns: 26px 84px minmax(0, 1fr); padding: 8px 12px; }
  .stats dd { font-size: 19px; }
  .keys { grid-template-columns: minmax(0, 1fr); }
  .keys li:nth-child(odd) { padding-right: 0; }
  #screen { padding: 12px; }
  .block { padding-top: 52px; }
}
