/* ============================================================
   guide.css, QNSQY user guide.
   Scaffold styles: page shell, feature index, the reusable
   GUI/TUI/CLI mode-tab component, and per-feature panels.
   Reuses the site tokens from styles.css (:root). No CDN.
   ============================================================ */

.guide { max-width: 1360px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 5rem; }

/* ---- page hero ---- */
.guide-hero { padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--color-border); margin-bottom: 2.5rem; }
.guide-hero__kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-accent); }
.guide-hero h1 { font-family: var(--font-body); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; color: var(--color-text); margin: 0.6rem 0 0.75rem; }
.guide-hero p { font-family: var(--font-body); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; color: var(--color-text-secondary); max-width: 88ch; margin: 0; }
.guide-hero strong { color: var(--color-text); font-weight: 600; }

/* ---- feature index ---- */
.guide-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem 2rem; margin: 0 0 3.5rem; }
.guide-index__group h2 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 0.75rem; }
.guide-index__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.guide-index__group a { font-family: var(--font-body); font-size: 0.95rem; color: var(--color-text-secondary); text-decoration: none; transition: color .15s ease; }
.guide-index__group a:hover { color: var(--color-accent); }

/* ---- feature section ---- */
.feature { padding: 2.25rem 0; border-top: 1px solid var(--color-border); scroll-margin-top: 90px; }
.feature__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.6rem 1rem; margin-bottom: 0.4rem; }
.feature__head h2 { font-family: var(--font-body); font-weight: 700; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.01em; color: var(--color-text); margin: 0; }
.feature__purpose { font-family: var(--font-body); font-size: 1.02rem; line-height: 1.55; color: var(--color-text-secondary); margin: 0 0 1.25rem; max-width: 82ch; }

.tier-badge { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid var(--color-border-light); color: var(--color-text-secondary); }
.tier-badge--free { color: var(--color-success); border-color: rgba(40,200,64,0.4); }
.tier-badge--pro { color: var(--color-accent); border-color: rgba(255,107,0,0.4); }
.tier-badge--business { color: #c9a227; border-color: rgba(201,162,39,0.45); }

/* ---- mode tabs (GUI / TUI / CLI), reusable per section ---- */
.modetabs { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--color-border-light); border-radius: 12px; background: var(--color-bg-elevated); margin-bottom: 1.25rem; }
.modetabs__tab { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--color-text-secondary); background: transparent; border: 0; border-radius: 9px; padding: 0.5rem 1.1rem; cursor: pointer; transition: background .15s ease, color .15s ease; }
.modetabs__tab:hover { color: var(--color-text); }
.modetabs__tab[aria-selected="true"] { background: var(--color-accent); color: #0a0a0a; font-weight: 600; }
.modetabs__tab:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.modepanel { display: none; animation: guide-fade .2s ease both; }
.modepanel.is-active { display: block; }
@keyframes guide-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- GUI/TUI step list ---- */
.steps { list-style: none; counter-reset: step; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem 1.1rem; align-items: start; }
.step__n { counter-increment: step; font-family: var(--font-mono); font-size: 0.8rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--color-border-light); color: var(--color-accent); }
.step__n::before { content: counter(step); }
.step__body { min-width: 0; }
.step__text { font-family: var(--font-body); font-size: 0.98rem; line-height: 1.5; color: var(--color-text-secondary); margin: 0 0 0.6rem; }
.step__text strong { color: var(--color-text); font-weight: 600; }

/* ---- screenshot / video slots ---- */
.shot, .clip { display: block; width: 100%; max-width: 820px; border: 1px solid var(--color-border-light); border-radius: 10px; background: var(--color-bg-elevated); }
.shot { aspect-ratio: 16 / 9; object-fit: cover; }
.shot--placeholder { display: grid; place-items: center; color: var(--color-text-muted); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; min-height: 180px; }
figure { margin: 0 0 2rem; }
figcaption { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.45; color: var(--color-text-secondary); margin-top: 0.65rem; }
.clip-wrap { margin: 2rem 0 0; }
.clip-wrap + .clip-wrap { margin-top: 2.25rem; }
.clip-wrap h4 { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); margin: 0 0 0.6rem; }

/* ---- command note (shown in GUI/TUI panels) ---- */
.cmdnote { border: 1px solid var(--color-border-light); border-left: 3px solid var(--color-accent); border-radius: 8px; background: rgba(255,107,0,0.04); padding: 0.85rem 1rem; margin: 1.25rem 0; }
.cmdnote__label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); margin: 0 0 0.4rem; }
.cmdnote code, .cli-cmd code { font-family: var(--font-mono); }

/* ---- CLI panel ---- */
.cli-usage { font-family: var(--font-mono); font-size: 0.9rem; color: var(--color-text); background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.7rem 0.9rem; margin: 0 0 1.25rem; overflow-x: auto; }
.cli-usage .kw { color: var(--color-accent); }
.cli-cmd { margin: 0 0 1.25rem; }
.cli-cmd h4 { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 0.45rem; }
.cli-cmd pre { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.5; color: var(--color-text); background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.8rem 0.95rem; margin: 0; overflow-x: auto; }
.cli-cmd pre .cm { color: var(--color-text-muted); }
.cli-output pre { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.5; color: var(--color-text-secondary); background: #060606; border: 1px solid var(--color-border); border-radius: 8px; padding: 0.8rem 0.95rem; margin: 0; overflow-x: auto; min-height: 3rem; }

/* ---- flag table ---- */
.flagtable-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.flagtable { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.flagtable th, .flagtable td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.flagtable th { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); }
.flagtable td:first-child { font-family: var(--font-mono); color: var(--color-accent); white-space: nowrap; }
.flagtable td:nth-child(2) { font-family: var(--font-mono); color: var(--color-text-secondary); white-space: nowrap; }
.flagtable td:last-child { font-family: var(--font-body); color: var(--color-text-secondary); }

/* ---- common combinations ---- */
.combos h3, .panel-sub h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; color: var(--color-text); margin: 1.5rem 0 0.75rem; }
.combo { margin: 0 0 1rem; }
.combo__desc { font-family: var(--font-body); font-size: 0.92rem; color: var(--color-text-secondary); margin: 0 0 0.4rem; }

/* Stale "[... pending]" placeholders: never show them in the shipped guide.
   (The peer also strips the elements from guide.html; this guarantees it.) */
.fill { display: none; }

/* ---- real screenshots: show the whole frame, never crop, but cap the height
   so a single panel doesn't become a wall of full-size screenshots. ---- */
img.shot { aspect-ratio: auto; object-fit: contain; width: 100%; max-width: 1100px; height: auto; background: #060606; }
video.clip { object-fit: contain; width: 100%; max-width: 1100px; height: auto; background: #060606; }

/* ---- tell playable videos apart from static screenshots ----
   Videos get the brand-accent frame + a play glyph on their "Watch" heading;
   screenshots keep the neutral border + a small corner "Screenshot" tag. So a
   viewer can see at a glance which media will play. ---- */
video.clip { border: 2px solid var(--color-accent); box-shadow: 0 0 0 4px rgba(255,107,0,0.07); }
.clip-wrap h4::before { content: "\25B6"; margin-right: 0.45rem; font-size: 0.78em; color: var(--color-accent); }
figure { position: relative; }
figure:has(img.shot)::after {
  content: "Screenshot"; position: absolute; top: 0.55rem; right: 0.55rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-text-secondary); background: rgba(0,0,0,0.62);
  padding: 0.18rem 0.5rem; border-radius: 6px; pointer-events: none;
}

/* ---- command-line-only feature badge + small notes ---- */
.tier-badge--cli { color: #6cb6ff; border-color: rgba(108,182,255,0.42); }
.feature--cli-only { }
.feature__note { font-family: var(--font-body); font-size: 0.85rem; line-height: 1.55; color: var(--color-text-muted); margin: 0.6rem 0 1rem; max-width: 70ch; }
.feature__note code { font-family: var(--font-mono); color: var(--color-text-secondary); }

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; }
  .step__n { display: none; }
}
