/* Cueline site styles. Vanilla CSS, no build step. Colours live in the custom properties below
   (dark is the default; light follows the system setting or the header toggle). */
:root {
  --bg: #0b0d10; --surface: #12151a; --surface-2: #191d25; --line: #272d38;
  --text: #e9ebee; --muted: #9da7b5; --accent: #4ba6ff; --accent-strong: #2b8df0; --accent-ink: #04121f;
  --ok: #43c46b; --bad: #ff6b5e; --warn: #f2b84b; --play: #ff4136;
  --tint: rgba(75, 166, 255, .09); --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --header-h: 56px; --radius: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eceef2; --line: #d3d8e0;
    --text: #141920; --muted: #535e6e; --accent: #0a5fc4; --accent-strong: #0a5fc4; --accent-ink: #ffffff;
    --ok: #17753a; --bad: #c22a22; --warn: #8a5600; --play: #d42a20;
    --tint: rgba(10, 95, 196, .07); --shadow: 0 10px 30px rgba(20, 30, 50, .14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eceef2; --line: #d3d8e0;
  --text: #141920; --muted: #535e6e; --accent: #0a5fc4; --accent-strong: #0a5fc4; --accent-ink: #ffffff;
  --ok: #17753a; --bad: #c22a22; --warn: #8a5600; --play: #d42a20;
  --tint: rgba(10, 95, 196, .07); --shadow: 0 10px 30px rgba(20, 30, 50, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p, ul, ol { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: .08em .35em; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0 0 1em; }
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.es { color: var(--muted); font-size: .92rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

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

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); }
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800;
  font-size: 1.15rem; letter-spacing: .01em; height: var(--header-h); }
.brand svg { width: 26px; height: 26px; flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--tint); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav a.cta { color: var(--accent-ink); background: var(--accent); }
.site-nav a.cta:hover { background: var(--accent-strong); color: var(--accent-ink); }
.site-nav a.cta[aria-current="page"] { box-shadow: none; color: var(--accent-ink); background: var(--accent); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; padding: 0; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
}
html:not(.js) .theme-toggle { display: none; }
@media (max-width: 860px) {
  .site-nav { margin-left: 0; order: 5; width: 100%; padding-bottom: 10px; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 11px 12px; }
  .site-header .spacer { margin-left: auto; }
  .js .nav-toggle { display: inline-grid; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
}
@media (min-width: 861px) { .site-header .spacer { display: none; } }

/* ---------- buttons, pills, cards ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 8px;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); }
.btn:hover { background: var(--accent-strong); }
.btn.ghost, button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover, button.secondary:hover { background: var(--surface-2); }
button.secondary { font: 600 1rem/1.2 var(--sans); border-radius: 8px; padding: 11px 18px; cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 5px 13px; font-size: .88rem; color: var(--muted); min-height: 32px; }
.pill b { color: var(--text); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: minmax(0, 1fr); } }

.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 5px; border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
.tag.need { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--tint); }
.tag.status { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.tags, .content ul.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.content ul.tags li { margin: 0; font-size: .86rem; color: var(--muted); }

.note { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 8px; padding: 12px 16px; margin: 0 0 1.2em; }
.note > :last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--warn); }
.note.bad { border-left-color: var(--bad); }
.note.ok { border-left-color: var(--ok); }
.note strong.lbl { display: block; margin-bottom: 2px; }

/* ---------- landing ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 420px at 78% 10%, var(--tint), transparent 70%), var(--bg); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.02em; margin: 16px 0 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }
.hero .fine { font-size: .88rem; color: var(--muted); margin: 0; }
.screen { margin: 0; border-radius: 14px; background: #000; border: 1px solid #2a2f38; padding: 10px; box-shadow: var(--shadow); }
.screen img { border-radius: 6px; width: 100%; aspect-ratio: 800 / 480; }
.screen figcaption { color: #a9b2bf; font-size: .82rem; padding: 8px 4px 0; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 36px; padding-bottom: 40px; gap: 28px; } }

.band { padding: 56px 0; border-bottom: 1px solid var(--line); }
.band.alt { background: var(--surface); }
.band.alt .card { background: var(--bg); }
.band > .wrap > h2, .section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.01em; margin-bottom: 8px; }
.band .intro { color: var(--muted); max-width: 46em; margin-bottom: 28px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.stats { list-style: none; padding: 0; margin: 0; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stats b { display: block; font-size: 1.7rem; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .92rem; }
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 10px; font-size: .96rem; }
.card > :last-child { margin-bottom: 0; }
.card .more { font-weight: 600; font-size: .92rem; }
.shots figure { margin: 0; }
.shots img { border-radius: 8px; border: 1px solid var(--line); width: 100%; aspect-ratio: 800 / 480; background: #000; }
.shots figcaption { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: 0 0 12px 30px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .42em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.checklist.no li::before { width: 14px; height: 0; border-left: 0; border-bottom: 2.5px solid var(--warn); transform: none; top: .75em; }
.steps3 { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps3 li { counter-increment: s; }
.steps3 li h3::before { content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .95rem; font-weight: 800; vertical-align: -3px; }
.release-box { min-height: 250px; }
.release-box dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 16px; }
.release-box dt { color: var(--muted); }
.release-box dd { margin: 0; font-weight: 600; }
.release-box ul { padding-left: 20px; margin: 0; }
@media (max-width: 620px) { .release-box dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .release-box dd { margin-bottom: 10px; } }
.release-box li { margin-bottom: 8px; }

/* ---------- docs layout (features / build / install) ---------- */
.page-head { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 260px at 85% 0%, var(--tint), transparent 70%); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.02em; margin-bottom: 10px; }
.page-head p { color: var(--muted); max-width: 48em; margin: 0; font-size: 1.05rem; }
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: start; padding-top: 28px; padding-bottom: 72px; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding: 0 6px 12px 0; font-size: .93rem; }
.toc h2 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; padding-left: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ul > li { margin-bottom: 10px; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.toc > ul > li > a { color: var(--text); font-weight: 700; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); background: var(--tint); }
.toc ul ul a { padding-left: 18px; }
.content { min-width: 0; max-width: 840px; }
.content > section { padding: 0 0 20px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.content > section:last-child { border-bottom: 0; margin-bottom: 0; }
.content h2 { font-size: 1.65rem; letter-spacing: -.01em; margin: 0 0 8px; }
.content h2 + .intro { color: var(--muted); margin-bottom: 22px; }
.content h3 { font-size: 1.2rem; margin: 0 0 8px; }
.content h4 { font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin-bottom: 6px; }
.anchor { color: var(--muted); text-decoration: none; margin-left: 8px; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { opacity: .55; } }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 16px; }
.feat > :last-child { margin-bottom: 0; }
.feat:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.feat figure { margin: 14px 0; }
.feat figure img { border-radius: 8px; border: 1px solid var(--line); width: 100%; max-width: 560px; aspect-ratio: 800 / 480; background: #000; }
.feat figcaption { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.figs2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.figs2 figure { margin: 0; }
@media (max-width: 620px) { .figs2 { grid-template-columns: minmax(0, 1fr); } }
.helptext { margin: 10px 0 14px; padding: 10px 14px; border-radius: 6px; background: #05070a; color: #cfd6df; border: 1px solid #262c36; font-size: .9rem; line-height: 1.5; }
.helptext::before { content: "Help text on the deck"; display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #8b96a5; margin-bottom: 4px; font-family: var(--sans); }
.path { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 700; white-space: nowrap; }
tr.cat th { background: var(--tint); color: var(--accent); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
td.sha { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; min-width: 16ch; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 0 1.2em; list-style: none; font-size: .9rem; color: var(--muted); }
.legend li { margin: 0; display: flex; gap: 8px; align-items: center; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); flex: none; vertical-align: -2px; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .toc { position: sticky; top: var(--header-h); z-index: 20; max-height: none; overflow: visible; background: var(--bg); margin: 0 -20px 24px; padding: 0;
    border-bottom: 1px solid var(--line); }
  .toc h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .toc > ul { display: flex; gap: 6px; overflow-x: auto; padding: 9px 20px; scrollbar-width: thin; }
  .toc > ul > li { margin: 0; flex: none; }
  .toc ul ul { display: none; }
  .toc > ul > li > a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-weight: 600; font-size: .88rem; white-space: nowrap; color: var(--muted); }
  .toc a[aria-current="true"] { border-color: var(--accent); }
  html { scroll-padding-top: calc(var(--header-h) + 66px); }
}

/* ---------- builder (ids and state classes are driven by app.js) ---------- */
.builder { margin: 0 0 1.2em; }
section.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 14px; }
section.step[aria-disabled="true"] { opacity: .45; pointer-events: none; }
section.step > h3 { font-size: .82rem; margin: 0 0 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
section.step > h3 .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-right: 8px; letter-spacing: 0; }
.disclaimer { margin: 0 0 14px; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; }
label.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 30px 14px; text-align: center; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s; position: relative; }
.drop strong { color: var(--text); font-size: 1.05rem; }
.drop.hover, .drop:focus-within { border-color: var(--accent); background: var(--tint); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
ol.phases { list-style: none; padding: 0 !important; margin: 0 0 12px; }
ol.phases li { display: flex; gap: 10px; padding: 4px 0; margin: 0; color: var(--muted); }
ol.phases li::before { content: "\25CB"; width: 1.2em; flex: none; text-align: center; }
ol.phases li.run { color: var(--text); }
ol.phases li.run::before { content: "\25D4"; color: var(--warn); animation: spin 1s linear infinite; display: inline-block; }
ol.phases li.ok { color: var(--text); }
ol.phases li.ok::before { content: "\2713"; color: var(--ok); }
ol.phases li.bad { color: var(--bad); }
ol.phases li.bad::before { content: "\2717"; color: var(--bad); }
ol.phases li .t { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { ol.phases li.run::before { animation: none; } .drop { transition: none; } }
progress { width: 100%; height: 8px; accent-color: var(--accent); display: block; }
.msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.msg.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid var(--bad); }
.msg.ok { background: color-mix(in srgb, var(--ok) 9%, transparent); border: 1px solid var(--ok); font-family: var(--mono); font-size: .82rem; }
.sha { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; color: var(--muted); margin: 8px 0 0; }
.warnbox { color: var(--warn); font-weight: 700; }
noscript.need-js { display: block; color: var(--bad); font-weight: 700; margin: 0 0 16px; }
.dl-cards .card h3 { display: flex; align-items: center; gap: 8px; }
.dl-cards .btn { margin: 4px 0 10px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
.site-footer h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin-bottom: .7em; max-width: 52em; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: minmax(0, 1fr); } }

@media print { .site-header, .toc, .site-footer { display: none; } .docs { display: block; } }
