/* zerostel.com: one stylesheet, no web fonts, no third-party anything. */

:root {
  --orange: #f1653b;
  --orange-deep: #c94a22;
  --ink: #19242d;
  --ink-2: #3d4a55;
  --muted: #5d6b77;
  --line: #e3e7eb;
  --bg: #fbfbfa;
  --panel: #ffffff;
  --tint: #fff4ef;
  --term-bg: #111a21;
  --term-fg: #dfe6ec;
  --term-dim: #7f8d99;
  --term-green: #6ccf8e;
  --term-red: #ff7a6b;
  --term-yellow: #f5c062;
  --term-cyan: #7cc7e8;
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f5;
    --ink-2: #c6d0d8;
    --muted: #93a1ad;
    --line: #26323c;
    --bg: #0d141a;
    --panel: #131d25;
    --tint: #24170f;
    --orange-deep: #ff8a63;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-deep); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.9em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 5px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none !important; }
  .logo-dark { display: block !important; }
}
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav .gh { border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; color: var(--ink); }
.lang { color: var(--muted) !important; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .nav { gap: 14px; } }

/* ---- hero ---- */
.hero { padding: 72px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 44px; } }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--orange-deep); background: var(--tint); padding: 5px 12px; border-radius: 999px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.025em; margin: 18px 0 18px; font-weight: 800; }
h1 em { font-style: normal; color: var(--orange); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.install { display: flex; align-items: center; gap: 10px; background: var(--term-bg); color: var(--term-fg); border-radius: 12px; padding: 12px 12px 12px 18px; font-family: var(--mono); font-size: 16px; max-width: 460px; }
.install .prompt { color: var(--term-dim); user-select: none; }
.install code { background: none; padding: 0; color: inherit; font-size: inherit; flex: 1; overflow-x: auto; white-space: nowrap; }
.copy { font: 600 13px var(--sans); border: 1px solid #2c3a45; background: #1a2630; color: var(--term-fg); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.copy:hover { background: #22313d; }
.copy[data-done] { color: var(--term-green); }
.ctas { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; font-size: 15px; }
/* white on the brand orange is 3.2:1; this deeper orange keeps 5:1 in both themes */
.btn.primary { background: #c94a22; color: #fff; }
.btn.primary:hover { background: #a93c1b; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--panel); }
.small { font-size: 14px; color: var(--muted); }
.hero .small { margin-top: 14px; }

/* ---- terminal ---- */
.term { margin: 0; background: var(--term-bg); color: var(--term-fg); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgba(17, 26, 33, 0.55); overflow: hidden; border: 1px solid #22303b; }
.term-bar { display: flex; gap: 8px; padding: 12px 14px; background: #0c1318; align-items: center; }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4752; }
.term-bar span:nth-child(1) { background: #ff6159; }
.term-bar span:nth-child(2) { background: #ffbd2e; }
.term-bar span:nth-child(3) { background: #28c941; }
.term-bar b { margin-left: 10px; font: 500 12px var(--mono); color: var(--term-dim); }
/* the newlines between line spans collapse; each span is its own line */
.term pre { margin: 0; padding: 18px 20px 22px; font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: normal; }
.term .l { display: block; white-space: pre; min-height: 1.7em; }
.c-dim { color: var(--term-dim); }
.c-g { color: var(--term-green); }
.c-r { color: var(--term-red); }
.c-y { color: var(--term-yellow); }
.c-c { color: var(--term-cyan); }
.c-o { color: var(--orange); }
.c-b { font-weight: 700; color: #fff; }
/* lines appear one after another; with reduced motion they're simply there */
@media (prefers-reduced-motion: no-preference) {
  .term .l { opacity: 0; animation: show 0.01s forwards; }
  .term .l:nth-child(1) { animation-delay: 0.30s; }
  .term .l:nth-child(2) { animation-delay: 0.58s; }
  .term .l:nth-child(3) { animation-delay: 0.86s; }
  .term .l:nth-child(4) { animation-delay: 1.14s; }
  .term .l:nth-child(5) { animation-delay: 1.42s; }
  .term .l:nth-child(6) { animation-delay: 1.70s; }
  .term .l:nth-child(7) { animation-delay: 1.98s; }
  .term .l:nth-child(8) { animation-delay: 2.26s; }
  .term .l:nth-child(9) { animation-delay: 2.54s; }
  .term .l:nth-child(10) { animation-delay: 2.82s; }
  .term .l:nth-child(11) { animation-delay: 3.10s; }
  .term .l:nth-child(12) { animation-delay: 3.38s; }
  .term .l:nth-child(13) { animation-delay: 3.66s; }
  .term .l:nth-child(14) { animation-delay: 3.94s; }
  .term .l:nth-child(15) { animation-delay: 4.22s; }
  .term .l:nth-child(16) { animation-delay: 4.50s; }
  .term .l:nth-child(17) { animation-delay: 4.78s; }
  .term .l:nth-child(18) { animation-delay: 5.06s; }
  .term .l:nth-child(19) { animation-delay: 5.34s; }
  .term .l:nth-child(20) { animation-delay: 5.62s; }
  .term .l:nth-child(21) { animation-delay: 5.90s; }
  .term .l:nth-child(22) { animation-delay: 6.18s; }
  .term .l:nth-child(23) { animation-delay: 6.46s; }
  .term .l:nth-child(24) { animation-delay: 6.74s; }
  .term .l:nth-child(25) { animation-delay: 7.02s; }
  .term .l:nth-child(26) { animation-delay: 7.30s; }
  @keyframes show { to { opacity: 1; } }
}

/* ---- sections ---- */
section { padding: 72px 0; scroll-margin-top: 64px; }
section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
.sub { color: var(--muted); font-size: 18px; max-width: 46em; margin: 0 0 36px; }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g4, .g2 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card pre { margin: 14px 0 0; background: var(--term-bg); color: var(--term-fg); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; overflow-x: auto; }
.icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tint); color: var(--orange-deep); font: 700 18px var(--mono); margin-bottom: 14px; }

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--bg); }
.table td:first-child { font-weight: 600; white-space: nowrap; }
.scroll { overflow-x: auto; border-radius: var(--radius); }
.yes { color: #17703f; font-weight: 700; }
.no { color: var(--muted); }
@media (prefers-color-scheme: dark) { .yes { color: var(--term-green); } }

/* ---- agents ---- */
.agents { display: flex; flex-wrap: wrap; gap: 10px; }
.agent { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 600; }
.agent small { font-weight: 500; color: var(--muted); margin-left: 6px; }

/* ---- security ---- */
.shield { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .shield { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { padding-left: 32px; position: relative; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px; background: var(--tint); box-shadow: inset 0 0 0 2px var(--orange); }
.checks li::after { content: ""; position: absolute; left: 7px; top: 8px; width: 6px; height: 10px; border: solid var(--orange-deep); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.checks b { color: var(--ink); }

/* ---- faq ---- */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--orange); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--ink-2); margin: 10px 0 0; max-width: 52em; }

/* ---- final ---- */
.final { text-align: center; }
.final .install { margin: 26px auto 0; }
.final .sub { margin-left: auto; margin-right: auto; }
.final .ctas { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--muted); }
.why-name { font-size: 15px; color: var(--muted); max-width: 40em; }

/* ---- hero: the night sky, and one point everything returns to ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: #0a1117 url("/assets/stars.svg") center / cover no-repeat;
  color: #eef2f5;
  border-bottom: 1px solid #1c2731;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(to bottom, transparent, rgba(10, 17, 23, 0.6)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero .lead { color: #c3cdd5; }
.hero .small { color: #93a1ad; }
.hero code { background: #1a2630; color: #e7edf2; }
.hero .eyebrow { background: rgba(241, 101, 59, 0.14); color: #ff9a76; }
.hero .btn.ghost { background: transparent; border-color: #2c3a45; color: #eef2f5; }
.hero .btn.ghost:hover { border-color: #4a5a66; }

/* ---- the flight recorder ---- */
.rec {
  margin: 0;
  background: rgba(13, 21, 28, 0.92);
  border: 1px solid #24323d;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 16px 18px 18px;
  font-family: var(--mono);
  color: var(--term-fg);
}
.rec-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--term-dim); letter-spacing: 0.04em; }
.rec-head b { color: #ff6159; font-weight: 700; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff6159; box-shadow: 0 0 10px #ff6159; }
@media (prefers-reduced-motion: no-preference) { .rec-dot { animation: blink 1.6s steps(2, start) infinite; } @keyframes blink { to { opacity: 0.25; } } }
.rec-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.rec.rewound .rec-head b { color: var(--orange); }
.rec.rewound .rec-dot { background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.rec-title { margin: 12px 0 10px; font: 600 14px var(--sans); color: #eef2f5; }
.rec-steps { list-style: none; margin: 0; padding: 0; font-size: 13px; border-top: 1px solid #1e2a33; }
.rec-steps li { display: flex; gap: 10px; align-items: baseline; padding: 7px 2px; border-bottom: 1px solid #1a252e; transition: opacity 0.2s; }
.rec-steps .n { color: var(--term-dim); width: 24px; }
.rec-steps .k { width: 12px; color: var(--term-dim); }
.rec-steps .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-steps .dim { color: var(--term-dim); }
.rec-steps .b { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid #2c3a45; color: var(--term-dim); white-space: nowrap; }
.rec-steps .b.ok { color: var(--term-green); border-color: #2a5a3e; }
.rec-steps .b.bad { color: var(--term-red); border-color: #6a2e28; }
.rec-steps li.undone { opacity: 0.32; }
.rec-steps li.undone .s { text-decoration: line-through; text-decoration-color: rgba(241, 101, 59, 0.7); }
.rec-scrub { margin: 14px 0 6px; }
.rec-scrub label { display: flex; gap: 8px; font: 13px var(--sans); color: #c3cdd5; margin-bottom: 6px; }
.rec-scrub output { font-family: var(--mono); color: var(--orange); font-weight: 700; }
.rec-scrub input { width: 100%; min-height: 32px; accent-color: var(--orange); cursor: pointer; direction: ltr; }
.rec-files { margin-top: 10px; padding: 12px 14px; background: #0a1117; border: 1px solid #1e2a33; border-radius: 10px; font-size: 12.5px; }
.rec-files-h { margin: 0 0 6px; font: 600 12px var(--sans); color: var(--term-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.rec-files ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rec-files li { display: flex; gap: 8px; }
.rec-files em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 4px; }
.rec-files li[data-state="modified"] em { color: #111; background: var(--term-yellow); }
.rec-files li[data-state="deleted"] { color: var(--term-red); text-decoration: line-through; }
.rec-files li[data-state="deleted"] em { color: #111; background: var(--term-red); text-decoration: none; }
.rec-files li[data-state="back"] em { color: #111; background: var(--term-green); }
.rec-status { margin: 10px 0 0; font: 13px var(--sans); color: #c3cdd5; }
.rec-zero { margin-top: 12px; width: 100%; font: 600 14px var(--sans); color: #fff; background: transparent; border: 1px dashed rgba(241, 101, 59, 0.6); border-radius: 10px; padding: 10px; cursor: pointer; }
.rec-zero:hover { background: rgba(241, 101, 59, 0.12); }

/* ---- channel labels: each section reads like an instrument on the panel ---- */
.ch { display: inline-block; font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-deep); margin-bottom: 10px; }
.ch::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--orange); vertical-align: middle; margin-right: 10px; }

/* Patch bay: every way to plug Zerostel in, as jacks on a rack */
.bay { background: var(--term-bg); border: 1px solid #22303b; border-radius: var(--radius); padding: 6px 22px; color: var(--term-fg); box-shadow: inset 0 1px 0 #1d2a34, 0 18px 40px -28px rgba(10, 17, 23, 0.6); }
.bay-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px dashed #26343f; }
.bay-row:first-child { border-top: 0; }
.bay-row h3 { margin: 8px 0 0; font: 600 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--term-dim); }
.bay ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.port { position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 14px; background: #16222c; border: 1px solid #24323d; border-radius: 12px; padding: 9px 10px 9px 42px; min-width: 0; transition: border-color 0.15s; }
.port h4 { margin: 0; font-size: 14px; line-height: 1.3; color: #eef3f6; }
.port h4 small { display: block; font-weight: 500; color: var(--term-dim); font-size: 12px; overflow-wrap: anywhere; }
.jack { position: absolute; left: 14px; top: 50%; margin-top: -8px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #3a4b58; background: radial-gradient(circle, #0a1117 0 3px, #22303b 3.5px); transition: border-color 0.15s, box-shadow 0.15s; }
.port:hover, .port:focus-within { border-color: #3a4b58; }
.port:hover .jack, .port:focus-within .jack { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(241, 101, 59, 0.16); }
.plug { display: flex; align-items: center; gap: 8px; }
.plug code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; scrollbar-color: #3a4b58 transparent; background: none; padding: 0; color: var(--term-fg); font-size: 12.5px; }
.plug .copy { padding: 4px 9px; font-size: 12px; flex: none; }
@media (max-width: 720px) { .bay { padding: 4px 14px; } .bay-row { grid-template-columns: minmax(0, 1fr); gap: 10px; } .bay-row h3 { margin: 0; } .port { grid-template-columns: minmax(0, 1fr); gap: 6px; } .plug code { white-space: pre-wrap; overflow-wrap: anywhere; } .jack { top: 14px; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .port, .jack { transition: none; } }

/* Website review: labels, touch targets, table headers */
.rec-title .tag { display: inline-block; font: 600 11px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #0a1117; background: var(--orange); border-radius: 4px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; }
.copy { min-height: 36px; }
.plug .copy { min-height: 32px; }
.table tbody th { text-align: left; font-weight: 600; }
.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; }
.bay-head p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--term-dim); }
.bay-head code { background: none; color: #c3cdd5; padding: 0; }
.plug a { color: var(--orange); font: 12.5px var(--mono); overflow-wrap: anywhere; }

/* anchors land below the sticky header */
[id] { scroll-margin-top: 84px; }
