/* cueforge.show — visual foundation
 *
 * Every value below is lifted from the app itself, not re-invented for the
 * web: colours from `AppTheme` (CueForge/Theme.swift, dark mode) and the type
 * face from `DS`. A visitor who downloads CueForge should recognise the site
 * they were just on. When Theme.swift changes, change this file to match — it
 * is a mirror, not a separate design.
 *
 *   AppTheme.appBG      0.10 0.10 0.13  →  #1a1a21
 *   AppTheme.panelBG    0.09 0.09 0.12  →  #17171f
 *   AppTheme.panelBG2   0.12 0.12 0.15  →  #1f1f26
 *   AppTheme.clockBG    0.06 0.06 0.08  →  #0f0f14
 *   AppTheme.accent     0.96 0.63 0.13  →  #f5a121   (amber, ONE per view)
 *
 * The app's rule holds here: amber is the single most important action on a
 * page, never decoration. Everything else is neutral or a semantic colour used
 * where its meaning applies.
 */

:root {
    /* Surfaces — appBG / panelBG2 / panelBG / clockBG. Cool near-black, the
       same slightly blue-shifted greys the console renders in. */
    --bg:            #1a1a21;
    --bg-raised:     #1f1f26;
    --bg-panel:      #17171f;
    --bg-inset:      #0f0f14;

    /* AppTheme.divider (white 12%) and .stroke (white 18%). Alpha rather than
       flat hex so borders sit correctly on every surface, exactly as in-app. */
    --line:          rgba(255, 255, 255, 0.12);
    --line-strong:   rgba(255, 255, 255, 0.18);

    /* AppTheme text ramp, lifted at the quiet end. Ratios against #1a1a21:
     *   --text-second  white 80%  ≈ 10.8:1
     *   --text-muted   white 68%  ≈  8.0:1   (was 58% / 6.5:1)
     *   --text-faint   white 46%  ≈  4.5:1   (was 38% / 3.4:1)
     *
     * This is a deliberate departure from Theme.swift rather than a drift. In
     * the app those greys sit 50cm from your face on a colour-managed display,
     * in a dark room, carrying labels you already know the meaning of. Here
     * they carry the actual sentences, on whatever monitor is in the office,
     * often in daylight. --text-muted does most of the real reading on this
     * site, so it has to clear a body-text bar the app's version never had to.
     */
    --text:          #ffffff;
    --text-second:   rgba(255, 255, 255, 0.80);
    --text-muted:    rgba(255, 255, 255, 0.68);
    --text-faint:    rgba(255, 255, 255, 0.46);

    /* AppTheme.buttonBG / buttonBGHov. */
    --button-bg:     rgba(255, 255, 255, 0.13);
    --button-bg-hov: rgba(255, 255, 255, 0.20);

    /* AppTheme.accent — amber, flat. The app deliberately avoids pure orange
       (it vibrates against near-black) and never gradients an accent. */
    --accent:        #f5a121;
    --accent-bright: #ffb84d;
    --accent-dim:    rgba(245, 161, 33, 0.55);   /* accentSoft */
    --accent-glow:   rgba(245, 161, 33, 0.16);

    /* Semantic palette — AppTheme.success / danger / warning / info / violet,
       plus the transport GO green. Same rule as the app: meaning, not decor. */
    --go:            #5ec26b;
    --go-transport:  #1ad138;
    --danger:        #e65c5c;
    --warning:       #e8c447;
    --info:          #4fa8e0;
    --violet:        #b085db;

    /* DS renders the entire app in SF Pro Rounded (`design: .rounded`), with
       tabular digits for readouts rather than a mono face. `ui-rounded` gets
       the identical face on Apple platforms; elsewhere it degrades to the
       platform UI font. There is no separate mono family — "mono" here means
       tabular figures, matching DS.fontMono. */
    --font-sans: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
                 system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-mono: var(--font-sans);

    /* One spacing scale, used everywhere. */
    --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
    --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;
    --s9: 6rem;    --s10: 8rem;

    /* Tighter than the earlier web-only radii — the console's corners. */
    --radius:    8px;
    --radius-sm: 5px;
    --radius-lg: 12px;

    --measure: 68ch;
    --page:    1120px;
}

*, *::before, *::after { box-sizing: border-box; }

/* 106.25% of whatever the reader's browser is set to — 17px at the default,
   and still 20px for someone who has set their browser to 19px. A hard
   `font-size: 17px` here would silently override that preference, which is
   exactly the person who needed the increase most. Every rem below scales
   from this, so the whole page moves together. */
html {
    font-size: 106.25%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    /* Was a hard 16px, which pinned body copy while every rem-based class
       around it scaled — the reason the page read small no matter what the
       root was set to. */
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* The app sets titles in rounded BOLD (DS.fontTitle / fontDisplay). SF Rounded
   is a wider face than SF Text, so the tight tracking the old sans stack needed
   is dialled back here — over-tightened rounded letterforms collide. */
h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.14;
    letter-spacing: -0.012em;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem);  letter-spacing: -0.016em; }
h3 { font-size: 1.25rem; }

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.page {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--s5);
}

.section     { padding-block: var(--s9); }
.section-tight { padding-block: var(--s7); }

.rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    border: 0;
    margin: 0;
}

.stack        { display: flex; flex-direction: column; gap: var(--s4); }
.stack-lg     { display: flex; flex-direction: column; gap: var(--s6); }
.row          { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

/* ── Type helpers ───────────────────────────────────────────────────────── */

/* The app's section caps: DS.fontSectionCap — 9pt rounded BOLD with kerning,
   uppercase. Same shape, scaled for a browser. */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.lede {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.55;
    color: var(--text-second);
    max-width: var(--measure);
}

.body     { color: var(--text-second); max-width: var(--measure); }
.muted    { color: var(--text-muted); }

/* .small is misleadingly named: it carries most of the real prose on this site
   — card copy, FAQ answers, the point lists, the walkthrough steps. At 0.875rem
   it was 14px doing a body-text job. It is now a shade under body size rather
   than a caption size; anything genuinely caption-sized should use .caption. */
.small    { font-size: 0.95rem; line-height: 1.6; }
.caption  { font-size: 0.84rem; }
.mono     { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease,
                color 0.12s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* The app's primary affordance: a FLAT amber fill with near-black text — the
   GO button, the armed cue, the one thing on screen you are meant to hit. No
   gradient, no glow: the console doesn't gradient its accent and neither does
   this. #1a1a21 on #f5a121 measures ≈8.1:1. */
.btn-primary {
    background: var(--accent);
    color: #1a1a21;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-bright);
    color: #1a1a21;
}

/* AppTheme.buttonBG — a white wash over the panel, lifting to buttonBGHov. */
.btn-secondary {
    background: var(--button-bg);
    border-color: var(--line-strong);
    color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--button-bg-hov);
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost { background: transparent; color: var(--text-second); padding-inline: 0.6rem; }
.btn-ghost:hover:not(:disabled) { color: var(--text); }

.btn-danger { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(230, 92, 92, 0.18); }

.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ── Panels ─────────────────────────────────────────────────────────────── */

/* A console panel: flat raised surface, hairline divider border. The app's
   panels are flat — depth comes from the surface step, not from bevels. */
.panel {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--s5);
}

/* The one surface per page that should read as selected — the same treatment
   an armed cue gets in the list: accent border over an accent-tinted fill. */
.panel-forged {
    border-color: var(--accent-dim);
    background:
        linear-gradient(180deg, var(--accent-glow), rgba(245, 161, 33, 0.04)),
        var(--bg-raised);
}

.panel-flush { padding: 0; overflow: hidden; }

.field-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-second);
    margin-bottom: var(--s2);
}

.input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--bg-inset);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease;
}
.input:focus { border-color: var(--accent); outline: none; }
.input::placeholder { color: var(--text-faint); }

.notice {
    display: flex;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    line-height: 1.55;
    border: 1px solid;
}
/* dangerSoft / successSoft / accentSoft — the app's badge treatment: the
   semantic colour at ~18% behind the semantic colour at full strength. */
.notice-error   { background: rgba(230, 92, 92, 0.14);  border-color: rgba(230, 92, 92, 0.34);  color: #f0918f; }
.notice-success { background: rgba(94, 194, 107, 0.14); border-color: rgba(94, 194, 107, 0.34); color: #8ad494; }
.notice-info    { background: var(--accent-glow);       border-color: var(--accent-dim);        color: var(--accent-bright); }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.16rem 0.5rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tag-accent { background: rgba(245,161,33,0.18);     color: var(--accent); }
.tag-forged { background: var(--accent);             color: #1a1a21; }
.tag-go     { background: rgba(94,194,107,0.18);     color: var(--go); }
.tag-muted  { background: rgba(255,255,255,0.10);    color: var(--text-muted); }
.tag-danger { background: rgba(230,92,92,0.18);      color: var(--danger); }

/* ── Grids ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: var(--s4); }

/* Wide enough that four cards land 2×2 rather than 3-then-1, which reads as a
   mistake. Below ~880px it collapses to one column. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ── Cue list figure ────────────────────────────────────────────────────── */

.cue-grid {
    display: grid;
    grid-template-columns: 3.4rem 1fr 4.2rem 3.4rem;
    gap: var(--s3);
    align-items: center;
    padding-inline: var(--s4);
}

.cue-head {
    padding-block: 0.4rem;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--line);
}

.cue-row {
    position: relative;
    padding-block: 0.42rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.83rem;
}

.cue-type,
.cue-len { font-size: 0.7rem; }

/* On a phone the fixed columns ate 215px of a 327px panel, so EVERY cue name
   truncated — the product's signature view rendered broken on the device most
   first-time visitors arrive on. Drop TYPE (the colour bar already encodes it)
   and tighten the rest so names survive. */
@media (max-width: 560px) {
    .cue-grid { grid-template-columns: 2.9rem 1fr 3rem; gap: var(--s2); padding-inline: var(--s3); }
    .cue-type { display: none; }
}

/* ── Site nav ───────────────────────────────────────────────────────────── */

.nav-bar {
    display: flex;
    align-items: center;
    gap: var(--s5);
    height: 60px;
    flex-wrap: nowrap;
}

/* The brand is also the home link — give it a full-height hit area. */
.nav-bar > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }

.nav-links { display: flex; align-items: center; gap: var(--s5); }

.nav-links a,
.nav-actions a { white-space: nowrap; }

.nav-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: nowrap; }

/* The menu toggle only exists on narrow screens. */
.nav-toggle { display: none; }

@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-bar { gap: var(--s2); }

    /* Compact the always-visible actions so brand + Sign in + Menu all fit a
       375px phone without the bar scrolling sideways. */
    .nav-actions .btn { padding-inline: 0.75rem; font-size: 0.92rem; min-height: 42px; }

    /* A real menu, not a vanishing act. The earlier version hid the links AND
       the Sign in button below 420px with nothing to replace them, so a
       returning operator on a phone — the exact person who needs to free a
       seat on a dead Mac mid-load-in — had no way into their account. */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        min-height: 44px;
        padding: 0 0.7rem;
        background: transparent;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        color: var(--text);
        font: inherit;
        font-size: 0.95rem;
        cursor: pointer;
        list-style: none;
    }
    .nav-toggle::-webkit-details-marker { display: none; }

    .nav-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--bg-raised);
        border-block: 1px solid var(--line);
        box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
        padding: var(--s3) var(--s5) var(--s5);
        display: flex;
        flex-direction: column;
        gap: var(--s1);
    }
    /* 44px minimum touch target — the previous footer-only nav was 22px. */
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        color: var(--text-second);
        border-bottom: 1px solid var(--line);
    }
    .nav-menu a:last-of-type { border-bottom: 0; }
    .nav-menu .btn { margin-top: var(--s3); min-height: 44px; }
}

/* Below 560px the bar is brand + Sign in + Menu. The buy CTA drops out rather
   than squeezing the account action off the edge — Get CueForge is the first
   thing in the menu, and every page has a pricing link. */
@media (max-width: 560px) {
    .nav-cta { display: none; }
}

@media (min-width: 821px) {
    /* Actions live in .nav-actions at every width now, so the disclosure holds
       only the section links — which .nav-links already shows inline here. */
    .nav-disclosure { display: none; }
}

.nav-menu-cta { margin-top: var(--s3); }

/* Footer links were 22px tall and are the only nav on small screens. */
.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* The recommended plan was the LAST card on a phone — the option we want
   chosen, buried below two cheaper ones. */
@media (max-width: 700px) {
    .plan-featured { order: -1; }
}

/* ── Utility ────────────────────────────────────────────────────────────── */

.center     { text-align: center; }
.center-col { margin-inline: auto; }
.spacer     { flex: 1; }

.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;
}

.skip-link {
    position: absolute; left: var(--s4); top: -100px;
    background: var(--accent); color: #17120a;
    padding: var(--s3) var(--s4); border-radius: var(--radius-sm);
    z-index: 100; font-weight: 600;
}
.skip-link:focus { top: var(--s4); }

/* ── PHP build: classes replacing what were inline styles in the React version.
      Everything above this line is the same design system, unchanged. ─────── */

.site-header {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(26, 26, 33, 0.86);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-bar { position: relative; }

.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; color: var(--text); }
.wordmark img { border-radius: 22%; box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 2px 10px rgba(0,0,0,0.6); }
.wordmark span { font-weight: 650; font-size: 1rem; letter-spacing: -0.015em; }

.site-footer { border-top: 1px solid var(--line); margin-top: var(--s9); }
.site-footer .page { padding-block: var(--s7); }
.footer-cols { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.footer-heading {
    margin: 0; font-family: var(--font-mono); font-size: 0.74rem;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500;
}
.site-footer a { color: var(--text-second); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-heat {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(720px 400px at 10% -10%, rgba(245,161,33,0.10), transparent 68%),
        radial-gradient(420px 260px at 4% 8%, rgba(245,161,33,0.06), transparent 70%);
}
.hero-inner { position: relative; padding-block: var(--s9) var(--s8); }
.hero-grid {
    display: grid; gap: var(--s8); align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

/* The accent, applied to type. Flat — the app never gradients its accent, and
   clipped-gradient text also breaks selection highlighting and forced-colours
   mode. Kept as a class so pages can mark the one phrase that carries it. */
.poured { color: var(--accent); }

.page-title { font-size: clamp(2rem, 4vw, 2.9rem); }

.band { background: var(--bg-raised); border-block: 1px solid var(--line); }
.split { display: grid; gap: var(--s7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.point { gap: var(--s1); padding-left: var(--s4); border-left: 1px solid var(--line-strong); }
.surface { gap: var(--s1); padding-block: var(--s3); border-top: 1px solid var(--line); }
.closing { align-items: center; padding-block: var(--s8); }
.faq-header { position: sticky; top: 5rem; align-self: start; }

.shot img { width: 100%; height: auto; display: block; }
.shot { box-shadow: 0 24px 60px -28px rgba(0,0,0,0.9); }

/* Pricing */
.plan-grid {
    display: grid; gap: var(--s4); align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.plan-price { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }

/* Download steps */
.steps { margin: 0; padding-left: 0; list-style: none; }
.step-num {
    flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--line-strong);
    color: var(--accent); font-size: 0.75rem;
}

/* Account */
.stat-grid { margin: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stat-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.seat-head { justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.seat-list { list-style: none; margin: 0; padding: 0; }
.seat-row { justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
.seat-btn { padding: 0.5rem 0.9rem; min-height: 44px; white-space: nowrap; }
.seat-note { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }

.anchored { scroll-margin-top: 5rem; }
.body-text { color: var(--text-second); }

/* Cue figure */
.cue-window { box-shadow: 0 30px 80px -30px rgba(0,0,0,0.75); background: var(--bg-panel); }
.cue-titlebar { gap: var(--s2); padding: 0.6rem var(--s4); border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: nowrap; }
.cue-dots { display: flex; gap: 6px; }
.cue-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); display: block; }
.cue-rows { list-style: none; margin: 0; padding: 0; }
.cue-num { font-size: 0.76rem; color: var(--text-muted); }
.cue-bar { width: 3px; height: 13px; border-radius: 2px; flex-shrink: 0; display: block; }
.cue-label { color: var(--text-second); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cue-len { text-align: right; color: var(--text-muted); }
.cue-type { color: var(--text-muted); }

.cue-row.is-next { background: rgba(245,161,33,0.09); box-shadow: inset 2px 0 0 var(--accent); }
.cue-row.is-playing { background: linear-gradient(90deg, rgba(94,194,107,0.18), rgba(94,194,107,0.04) 62%, transparent); }
.cue-row.is-playing .cue-num { color: var(--go); font-weight: 600; }
.cue-row.is-playing .cue-label { color: var(--text); }
.cue-row.is-playing .cue-len { color: var(--go); }

.cue-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--go); opacity: 0.8; }

.cue-transport { gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--bg); flex-wrap: nowrap; }
.cue-go { padding: 0.28rem 0.9rem; border-radius: 5px; background: var(--go-transport); color: #06180d; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; }
.cue-clock { font-size: 0.95rem; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

.plan-price.poured { color: var(--accent); }

/* Shown only while the site is running on config.sample.php. */
.setup-banner {
    background: rgba(245, 161, 33, 0.14);
    border-bottom: 1px solid var(--accent-dim);
    color: var(--accent-bright);
    font-size: 0.92rem;
    line-height: 1.5;
    padding-block: var(--s3);
}
.setup-banner code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* ── Admin portal ───────────────────────────────────────────────────────── */

.admin-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.admin-stat { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th {
    text-align: left; font-family: var(--font-mono); font-weight: 500;
    font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); padding: var(--s3) var(--s5);
    border-bottom: 1px solid var(--line);
}
.admin-table td { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.admin-table td:first-child { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Public coming-soon variant of the banner: centred, accented, deliberate. */
.setup-banner.coming-soon { text-align: center; padding-block: var(--s4); }
.setup-banner.coming-soon .page {
    display: flex; flex-direction: column; gap: 0.2rem; align-items: center;
}
.setup-banner.coming-soon .mono {
    font-size: 0.68rem; letter-spacing: 0.22em; color: var(--text-muted);
}
.setup-banner.coming-soon strong {
    font-size: 1rem; letter-spacing: 0.12em; font-weight: 650;
    color: var(--accent);
}

/* Honeypot: moved off-canvas rather than display:none, which lazier bots
   detect. Humans never see or tab into it. */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

/* ── Home page ──────────────────────────────────────────────────────────────
 *
 * The hero used the .eyebrow cap for "Show control for macOS". That class
 * uppercases, which turned the product's own platform name into MACOS — Apple
 * writes it lowercase-m, and an all-caps version of a proper noun reads as a
 * typo to the audience most likely to notice. This is its own class: same
 * amber, real sentence case, and sized as a line people are meant to read
 * rather than a label they skim past.
 */
.hero-kicker {
    font-weight: 700;
    font-size: clamp(1.05rem, 2.3vw, 1.5rem);
    line-height: 1.3;
    letter-spacing: -0.008em;
    color: var(--accent);
}

/* The free demo is the single strongest reason to click Download, and it was
   set in .small .muted — the quietest type on the page. */
.demo-note {
    font-size: clamp(1rem, 1.7vw, 1.15rem);
    line-height: 1.5;
    color: var(--text-second);
}
.demo-note strong { color: var(--text); font-weight: 650; }

/* Section headings that should run the width of the column rather than being
   pinned to a narrow measure. Body copy underneath keeps a measure — a 110ch
   paragraph is genuinely harder to read, a 110ch heading is not. */
.header-wide { max-width: none; }
.header-wide .body,
.header-wide .lede { max-width: 62ch; }

/* Autoplaying clip in place of the still. Muted + inline + loop so iOS plays
   it without a tap and nothing ever asks for audio. */
.media-frame { position: relative; }
.media-frame video,
.media-frame img { width: 100%; height: auto; display: block; }

/* Capability cards: optional illustration above the copy. The card renders
   perfectly well without one, so a missing file costs nothing. */
.cap-shot {
    margin: 0 0 var(--s2);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-inset);
}
.cap-shot img { width: 100%; height: auto; display: block; }

/* Quotes. Rendered only when there are real ones to render. */
.quote-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.quote blockquote {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--text-second);
}
.quote figcaption { color: var(--text-muted); font-size: 0.92rem; }
.quote cite { font-style: normal; font-weight: 600; color: var(--text); }

/* ── What's included ────────────────────────────────────────────────────── */

.incl-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.incl-table th,
.incl-table td { padding: var(--s3) var(--s4); text-align: left; }
.incl-table thead th {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.incl-table tbody th {
    font-weight: 500;
    color: var(--text-second);
    border-top: 1px solid var(--line);
}
.incl-table tbody td { border-top: 1px solid var(--line); text-align: center; width: 6.5rem; }
.incl-table .yes { color: var(--go); font-weight: 700; }
.incl-group th {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border-top: 1px solid var(--line);
    padding-top: var(--s5);
}
.incl-wrap { overflow-x: auto; }

/* On a phone three identical tick columns are noise. Collapse to the feature
   list and say once, above it, that every plan includes all of it. */
@media (max-width: 640px) {
    .incl-table thead,
    .incl-table tbody td { display: none; }
    .incl-table,
    .incl-table tbody,
    .incl-table tr,
    .incl-table tbody th { display: block; width: auto; }
    .incl-table tbody th { padding-inline: 0; }
    .incl-group th { padding-inline: 0; }
}

/* ── Start here ─────────────────────────────────────────────────────────── */

.video-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.video-card { padding: 0; overflow: hidden; }
.video-card video,
.video-card iframe,
.video-card img { width: 100%; display: block; border: 0; aspect-ratio: 16 / 9; }
.video-card .video-meta { padding: var(--s4) var(--s5); }

/* ── Features page ──────────────────────────────────────────────────────── */

.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.feature-list li {
    display: grid;
    grid-template-columns: 0.9rem 1fr;
    gap: var(--s3);
    align-items: start;
    font-size: 0.98rem;
    color: var(--text-second);
    line-height: 1.5;
}
.feature-list li::before {
    content: "";
    width: 3px;
    height: 0.95em;
    margin-top: 0.28em;
    border-radius: 2px;
    background: var(--accent-dim);
}
.feature-list b { color: var(--text); font-weight: 600; }

/* ── About ──────────────────────────────────────────────────────────────── */

.principle { gap: var(--s2); padding-left: var(--s4); border-left: 2px solid var(--accent-dim); }

/* ── Manual ─────────────────────────────────────────────────────────────────
 *
 * A documentation layout rather than a marketing one: a persistent contents
 * column, a comfortable measure for long-form reading, and headings that can
 * be linked to. Content is generated from the app's own manual, so nothing
 * here may assume prose it can edit — it has to render whatever the app says.
 */

.manual-page {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: var(--s8);
    align-items: start;
    padding-block: var(--s7) var(--s8);
}

.manual-nav {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding-right: var(--s3);
    display: flex;
    flex-direction: column;
    gap: var(--s5);
    /* The scrollbar is the only thing between the nav and the text column. */
    scrollbar-width: thin;
}

.manual-nav-home {
    font-weight: 600;
    color: var(--text-second);
}
.manual-nav-home.is-current { color: var(--accent); }

.manual-nav-group { display: flex; flex-direction: column; gap: 0.15rem; }

.manual-nav-head {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 var(--s2);
}

.manual-nav-link {
    display: block;
    padding: 0.3rem 0 0.3rem var(--s3);
    border-left: 2px solid var(--line);
    color: var(--text-second);
    font-size: 0.95rem;
    line-height: 1.4;
}
.manual-nav-link:hover { color: var(--text); border-left-color: var(--line-strong); }
.manual-nav-link.is-current {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.manual-main { min-width: 0; }

/* 72ch: long enough not to fragment a reference sentence, short enough to
   track back to the next line. The marketing pages use 68ch, but this is
   read in long stretches. */
.manual-body { max-width: 72ch; }
.manual-body .page-title { margin-bottom: var(--s2); }

.manual-crumb { font-size: 0.9rem; margin-bottom: var(--s3); }

.manual-body p { margin-block: var(--s4); color: var(--text-second); }

.manual-h {
    font-size: 1.3rem;
    margin-top: var(--s7);
    margin-bottom: var(--s3);
    scroll-margin-top: 5rem;
    position: relative;
}
.manual-h:first-of-type { margin-top: var(--s6); }

/* The anchor sits in the left margin and only appears on hover, so it is
   available to anyone linking a colleague to one paragraph without putting a
   hash in front of every heading. */
.manual-anchor {
    position: absolute;
    left: -1.1em;
    color: var(--text-faint);
    opacity: 0;
    font-weight: 400;
    transition: opacity 0.12s ease;
}
.manual-h:hover .manual-anchor,
.manual-anchor:focus-visible { opacity: 1; }

.manual-list { margin-block: var(--s4); padding-left: 1.25rem; }
.manual-list li {
    margin-block: 0.45rem;
    color: var(--text-second);
    line-height: 1.6;
}
.manual-list li::marker { color: var(--text-faint); }
.manual-list b { color: var(--text); font-weight: 600; }

.manual-toc {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-panel);
    padding: var(--s4) var(--s5);
    margin-block: var(--s5);
}
.manual-toc ul {
    margin: var(--s2) 0 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: var(--s5);
}
.manual-toc li { margin-block: 0.2rem; break-inside: avoid; }
.manual-toc a { font-size: 0.95rem; color: var(--text-second); }
.manual-toc a:hover { color: var(--accent); }

.manual-group-title { font-size: 1.35rem; }

.manual-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.manual-card {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    color: var(--text);
    transition: border-color 0.12s ease, background-color 0.12s ease;
}
.manual-card:hover { border-color: var(--accent-dim); background: var(--bg-panel); color: var(--text); }
.manual-card h3 { font-size: 1.1rem; }

.manual-search { position: relative; max-width: 34rem; }
.manual-results {
    list-style: none;
    margin: var(--s2) 0 0;
    padding: var(--s2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-raised);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
}
.manual-results li { display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline; }
.manual-results a {
    display: block;
    flex: 1;
    padding: 0.4rem var(--s3);
    color: var(--text-second);
    min-height: 40px;
    line-height: 1.5;
}
.manual-results a:hover { color: var(--accent); }
.manual-results span { padding-right: var(--s3); white-space: nowrap; }

.manual-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s4);
    margin-top: var(--s8);
    max-width: 72ch;
}
.manual-step { display: flex; flex-direction: column; gap: 0.15rem; color: var(--text); }
.manual-step:hover { border-color: var(--accent-dim); color: var(--text); }
.manual-step-next { text-align: right; }
.manual-step-title { font-weight: 600; }

/* Below the two-column threshold the contents becomes a normal block above the
   text. A sticky sidebar on a phone would leave a few centimetres to read in. */
@media (max-width: 900px) {
    .manual-page { grid-template-columns: 1fr; gap: var(--s6); }
    .manual-nav {
        position: static;
        max-height: none;
        overflow: visible;
        padding: var(--s4) var(--s5);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--bg-panel);
    }
    .manual-toc ul { columns: 1; }
    .manual-pager { grid-template-columns: 1fr; }
    .manual-step-next { text-align: left; }
    .manual-anchor { display: none; }
}

/* Search hits: heading trail above, the matching line beneath with the term
   marked. A bare list of page titles makes you open three of them to find out
   which one actually answers the question. */
.manual-results li { display: block; }
.manual-results a {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: var(--s3);
    border-radius: var(--radius-sm);
}
.manual-results a:hover { background: var(--button-bg); color: var(--text); }
.manual-hit-title {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.manual-hit-line { font-size: 0.95rem; color: var(--text-second); line-height: 1.45; }
.manual-results mark {
    background: var(--accent-glow);
    color: var(--accent-bright);
    border-radius: 2px;
    padding: 0 1px;
}

/* ── Support tickets ────────────────────────────────────────────────────── */

/* Amber, matching the app: caution, not failure. */
.tag-warning { background: rgba(246,149,9,0.14); color: var(--accent); }

textarea.input { resize: vertical; line-height: 1.55; min-height: 6rem; }

/* Native selects ignore inherited colour on some engines and render white on
   white. Drawing our own caret is the only reliable fix. */
select.input {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.75rem) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* A message. Ours is tinted so a thread scans as a conversation, not a list. */
.msg { border-left: 2px solid var(--line-strong); }
.msg-staff { border-left-color: var(--accent); background: var(--accent-glow); }
.msg-note  { border-left-color: var(--danger); background: rgba(227,93,82,0.06); }
.msg-body  { color: var(--text-second); overflow-wrap: anywhere; }

.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6rem auto;
    align-items: center;
    gap: var(--s3);
}
.upload-row > span:first-child { overflow-wrap: anywhere; }
.upload-bar {
    height: 4px;
    border-radius: 100px;
    background: var(--bg-inset);
    overflow: hidden;
}
.upload-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--pour);
    transition: width 0.2s ease;
}
.upload-row.is-done   .upload-fill { background: var(--go); }
.upload-row.is-failed .upload-fill { background: var(--danger); width: 100% !important; }
.upload-error { color: var(--danger); }

@media (max-width: 560px) {
    .upload-row { grid-template-columns: minmax(0, 1fr) auto; }
    .upload-bar { grid-column: 1 / -1; }
}
