@import url("pygments.css");

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #16202c;
  --muted: #5a6778;
  --border: #dde3ea;
  --accent: #d9480f;          /* amber-orange: "on air" */
  --accent-2: #0b5cad;        /* link blue */
  --accent-soft: #fff1e8;
  --code-bg: #f1f3f6;
  --hero-1: #0d1b2a;
  --hero-2: #1b3550;
  --radius: 10px;
  --maxw: 1240px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1117;
    --surface: #121922;
    --surface-2: #18212c;
    --text: #e4e9ef;
    --muted: #93a1b2;
    --border: #253141;
    --accent: #ff8a3d;
    --accent-2: #6cb6ff;
    --accent-soft: #2a1a10;
    --code-bg: #161e28;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--hero-1); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700;
  letter-spacing: .14em; font-size: 15px; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(255,138,61,.35)); }
.mainnav { margin-left: auto; display: flex; gap: 4px; }
.mainnav a { color: #c9d4e0; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.mainnav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.mainnav a[aria-current="page"] { color: #fff; background: rgba(255,138,61,.18); }
.navtoggle, .navbutton { display: none; }

/* ---------- layout ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 40px; }
.content { min-width: 0; padding: 32px 0 64px; }
.page.plain .content { padding-top: 0; }

.sidebar { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px);
  overflow-y: auto; padding: 28px 0; font-size: 14px; }
.side-group { margin-bottom: 22px; }
.side-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 6px 10px; }
.sidebar a { display: block; padding: 5px 10px; color: var(--text); border-radius: 6px; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.toc { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto;
  padding: 32px 0; font-size: 13px; }
.toc-title { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { padding-left: 12px; }
.toc a { display: block; padding: 3px 0; color: var(--muted); }
.toc a:hover { color: var(--accent-2); }
.toc > .toc > ul > li > ul { margin-top: 2px; }

/* ---------- prose ---------- */
.content h1 { font-size: 2.1rem; line-height: 1.2; margin: .4em 0 .5em; letter-spacing: -.01em; }
.content h2 { font-size: 1.45rem; margin: 2em 0 .6em; padding-top: .4em; border-top: 1px solid var(--border); }
.content h3 { font-size: 1.12rem; margin: 1.6em 0 .4em; }
.content h1 + h2, .content h1 + p + h2 { border-top: 0; }
.anchor { margin-left: 8px; color: var(--border); font-weight: 400; visibility: hidden; }
h2:hover .anchor, h3:hover .anchor { visibility: visible; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
p, li { max-width: 52em; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .12em .38em;
  border-radius: 5px; border: 1px solid var(--border); }
pre, .hl pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.5; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; }
.hl { background: transparent !important; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

blockquote.callout { margin: 1.2em 0; padding: 12px 16px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote.callout p { margin: .3em 0; }
.source { margin-top: 3em; font-size: 13px; color: var(--muted); }

/* ---------- home ---------- */
.content .btn-ghost { border-color: var(--border); color: var(--text); }

.section { padding: 56px 0 8px; }
.section > h2 { border-top: 0; margin-top: 0; font-size: 1.7rem; }
.section > p.lede { margin-top: -6px; }

.editions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.edition { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; }
.edition:hover { border-color: var(--accent); }
.edition .tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.edition h3 { margin: 6px 0 8px; font-size: 1.35rem; }
.edition p { color: var(--muted); margin: 0 0 14px; }
.edition ul { padding-left: 18px; margin: 0 0 18px; font-size: 15px; }
.edition li { margin: 4px 0; }
.edition .more { margin-top: auto; font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.ladder td:nth-child(2), .ladder td:nth-child(3) { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 22px 0; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.fact b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact span { font-size: 15px; font-weight: 600; }

.doc-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.doc-group { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px 12px; }
.doc-group h2 { border-top: 0; margin: .8em 0 .3em; font-size: 1.1rem; }
.doc-group ul { padding-left: 18px; }

.empty { padding: 16px 18px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
code.sha { font-size: 11.5px; word-break: break-all; }


/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .page.doc { grid-template-columns: 200px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .page.doc { display: block; }
  .sidebar { display: none; }
  .editions { grid-template-columns: 1fr; }
  .navbutton { display: block; margin-left: auto; width: 40px; height: 40px; cursor: pointer; position: relative; }
  .navbutton span, .navbutton span::before, .navbutton span::after { position: absolute; left: 9px; width: 22px;
    height: 2px; background: #fff; content: ""; }
  .navbutton span { top: 19px; }
  .navbutton span::before { left: 0; top: -7px; }
  .navbutton span::after { left: 0; top: 7px; }
  .mainnav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column;
    background: var(--hero-1); padding: 8px 16px 16px; }
  .navtoggle:checked ~ .mainnav { display: flex; }
  .hero { padding: 56px 20px 64px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .fr-row { grid-template-columns: 1fr; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  font-size: 15px; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, filter .15s; cursor: pointer;
  font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary { background: linear-gradient(135deg, #ff6a1a, #ff9a3d); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(255,106,26,.6); }
.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(255,106,26,.75); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.hero .btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.04);
  backdrop-filter: blur(4px); }
.btn-disabled { border: 1px dashed var(--border); color: var(--muted); background: transparent; cursor: default; }
.btn-disabled:hover { transform: none; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 96px 20px 88px;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: #08101e; }
#waterfall { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero-shade { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,16,30,.96) 0%, rgba(8,16,30,.7) 40%, rgba(8,16,30,.1) 100%),
              linear-gradient(0deg, rgba(8,16,30,1) 0%, rgba(8,16,30,0) 30%); }
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .16em;
  text-transform: uppercase; color: #ffb27d; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,138,61,.1); border: 1px solid rgba(255,138,61,.3); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d2e; box-shadow: 0 0 0 0 rgba(255,77,46,.7);
  animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,77,46,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,46,0); } }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: .35em 0 .3em; max-width: 13em; line-height: 1.05;
  letter-spacing: -.025em; }
.grad { background: linear-gradient(90deg, #ff6a1a, #ffc24b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.2rem; color: #c9d4e0; max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, max-content); gap: 14px 40px; margin-top: 56px; }
.hero-stats b { display: block; font-size: 1.5rem; font-weight: 700; }
.hero-stats span { font-size: 13px; color: #93a1b2; text-transform: uppercase; letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } .btn { transition: none; } }

/* ---------- home sections ---------- */
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.section { padding: 72px 0 8px; }
.section > h2, .split h2, .cta-band h2 { border-top: 0; margin-top: 0; padding-top: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.015em; }
.edition { color: var(--text); position: relative; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.edition:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(0,0,0,.35); }
.edition::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #ff6a1a, #ffc24b); opacity: 0; transition: opacity .2s; }
.edition:hover::before { opacity: 1; }
.edition .more { color: var(--accent-2); }
.ed-icon svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ed-icon circle { fill: var(--accent); stroke: none; }
.feature { transition: border-color .2s; }
.feature:hover { border-color: var(--accent); }
.f-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 12px;
  background: var(--accent-soft); color: var(--accent); font-size: 18px; }

.ladder-viz { display: grid; gap: 6px; margin: 24px 0 10px; }
.rung { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 80px 110px; gap: 12px; align-items: center;
  padding: 8px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; overflow: hidden; }
.rung::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w);
  background: linear-gradient(90deg, rgba(255,106,26,.08), rgba(255,154,61,.28)); }
.rung > * { position: relative; }
.rung span { font-weight: 600; }
.rung em, .rung i { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; }
.note { font-size: 13px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.terminal { background: #0b1622; border-radius: 14px; border: 1px solid #1f2d3d; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #101e2e; color: #93a1b2; font-size: 12px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3a4c; }
.term-bar i:first-child { background: #ff5f56; } .term-bar i:nth-child(2) { background: #ffbd2e; } .term-bar i:nth-child(3) { background: #27c93f; }
.term-bar span { margin-left: 10px; }
.terminal pre { margin: 0; border: 0; border-radius: 0; background: transparent; color: #ffcf9e; padding: 18px 20px; font-size: 14px; }
.terminal .c { color: #6fd3a4; }

.cta-band { margin-top: 72px; padding: 48px 40px; border-radius: 18px; text-align: center; color: #fff;
  background: radial-gradient(600px 200px at 50% 0%, rgba(255,138,61,.3), transparent 70%), linear-gradient(160deg, #0d1b2a, #1b3550); }
.cta-band p { color: #c9d4e0; max-width: none; }
.cta-band .cta { justify-content: center; }
.cta-band .btn-ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.3); color: #fff; }

/* ---------- inner page hero ---------- */
.ed-hero { padding: 8px 0 8px; }
.ed-hero .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.ed-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .3em 0 .2em; letter-spacing: -.02em; }
.page.plain .content { padding-top: 40px; }
.page.plain .content:has(.hero) { padding-top: 0; }

/* ---------- downloads / support ---------- */
.dl-grid, .support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 28px 0 8px; }
.dl-card, .support-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 6px; }
.dl-card h3, .support-card h3 { margin: 6px 0 0; font-size: 1.25rem; }
.dl-card p, .support-card p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.dl-actions .btn { font-size: 14px; word-break: break-all; }
.support-card .btn { align-self: flex-start; margin-top: auto; }
.support-card.primary { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.s-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 20px;
  background: var(--accent-soft); color: var(--accent); }
.mail-big { font-size: 1.2rem !important; font-weight: 700; color: var(--text) !important; font-family: var(--mono); word-break: break-all; }

/* ---------- feature request form ---------- */
.fr-form { max-width: 760px; margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; display: grid; gap: 18px; }
.fr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fr-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; position: relative; }
.fr-form small { font-weight: 400; color: var(--muted); }
.fr-form input, .fr-form select, .fr-form textarea { font: inherit; font-weight: 400; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; width: 100%; }
.fr-form textarea { resize: vertical; min-height: 160px; }
.fr-form :is(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fr-count { position: absolute; right: 12px; bottom: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.fr-privacy { font-size: 13px; color: var(--muted); }
.fr-status { max-width: 760px; margin-top: 20px; padding: 18px 20px; border-radius: 12px; }
.fr-status.ok { background: rgba(39,201,63,.1); border: 1px solid rgba(39,201,63,.4); }
.fr-status.err { background: var(--accent-soft); border: 1px solid var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; max-width: var(--maxw);
  margin: 72px auto 0; padding: 40px 20px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text); }
.footer a:not(.brand) { display: block; color: var(--muted); padding: 3px 0; }
.footer a:not(.brand):hover { color: var(--accent); text-decoration: none; }
.footer .brand { color: var(--text); }
.footer .mail { display: block; margin-top: 8px; font-family: var(--mono); font-size: 13px; color: var(--text); }
.foot-brand p { margin: 10px 0 0; font-size: 13px; }
.foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; font-size: 13px; }
@media (max-width: 860px) { .footer { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- one-line installs ---------- */
.oneliners { display: grid; gap: 10px; margin: 20px 0; max-width: 760px; }
.oneliner { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 12px;
  background: #0b1622; border: 1px solid #1f2d3d; color: #e4e9ef; min-width: 0; }
.ol-label { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #ffb27d;
  width: 150px; }
.ol-cmd { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 4px 0;
  font-size: 14px; color: #e4e9ef; scrollbar-width: thin; }
.ol-prompt { color: #6fd3a4; user-select: none; }
.ol-copy { flex: none; font: 600 13px var(--sans); color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.ol-copy:hover { background: rgba(255,138,61,.25); border-color: rgba(255,138,61,.6); }
.ol-copy.done { background: rgba(39,201,63,.2); border-color: rgba(39,201,63,.5); }
.hero .oneliners { margin-top: 26px; }
.hero .oneliner { background: rgba(8,16,30,.7); backdrop-filter: blur(6px); }
@media (max-width: 640px) {
  .oneliner { flex-wrap: wrap; }
  .ol-label { width: 100%; }
}
