/* Shared layout for the standalone product pages (PILEDRIVER, the MPC guide).
   Same visual language as the MOLOCH page: dark panels, mono labels, one hot
   accent. Each page sets its own palette in a small :root block; the defaults
   here are PILEDRIVER's (its MPC skin and desktop editor). */
:root {
    --bg: #101012;
    --panel: #18181b;
    --panel-hi: #202024;
    --edge: #2c2c31;
    --text: #c6c6cb;
    --text-dim: #8c8c90;
    --accent: #ff5a1f;
    --accent-ink: #120a06;
    --acid: #9dff3c;
    --steel: #8fa3b8;
    --danger: #ff5a6a;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --maxw: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}
img { max-width: 100%; }
/* Scripts show and hide parts with the hidden attribute; no display rule may override it. */
[hidden] { display: none !important; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; }
section { padding: 80px 0; border-top: 1px solid var(--edge); scroll-margin-top: 12px; }
h1, h2, h3, h4 { color: #fff; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 30px; margin-bottom: 8px; }
h3 { font-size: 17px; margin-bottom: 6px; }
p + p { margin-top: 12px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--acid); outline-offset: 3px;
}
strong { color: #fff; font-weight: 600; }
code, .path {
    font-family: var(--mono); font-size: 0.88em; color: #fff;
    background: var(--panel-hi); border: 1px solid var(--edge); border-radius: 3px;
    padding: 1px 6px; overflow-wrap: anywhere;
}
.menu {
    font-family: var(--mono); font-size: 0.88em; color: #fff; white-space: normal;
}
.section-note { color: var(--text-dim); font-size: 15px; margin-bottom: 36px; max-width: 760px; }
.dim { color: var(--text-dim); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Panel heading in the plugin's own style: an accent bar and slashes. */
.panel-label {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.panel-label::before { content: ""; width: 3px; height: 14px; background: var(--accent); flex: 0 0 auto; }
.panel-label::after {
    content: "//////"; margin-left: auto; color: var(--accent); opacity: 0.6;
    letter-spacing: 0; font-weight: 400;
}
.panel-label.acid { color: var(--acid); }
.panel-label.acid::before { background: var(--acid); }
.panel-label.acid::after { color: var(--acid); }
.panel-label.steel { color: var(--steel); }
.panel-label.steel::before { background: var(--steel); }
.panel-label.steel::after { color: var(--steel); }

/* ---------- hero ---------- */
.hero {
    padding: 80px 0 64px;
    background:
        radial-gradient(ellipse 70% 60% at 20% 0%, rgb(255 90 31 / 0.14), transparent 70%),
        linear-gradient(180deg, var(--panel-hi) 0%, var(--bg) 75%);
    border-bottom: 1px solid var(--edge);
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
    background: repeating-linear-gradient(115deg, rgb(255 90 31 / 0.5) 0 14px, transparent 14px 30px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: center; }
.eyebrow {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.hero h1 {
    font-family: var(--mono); font-weight: 700;
    font-size: clamp(44px, 9.5vw, 96px); letter-spacing: -0.04em; margin-bottom: 14px;
    overflow-wrap: normal;
}
.hero h1.long { font-size: clamp(34px, 6vw, 64px); letter-spacing: -0.03em; }
.tagline { font-size: clamp(19px, 2.4vw, 25px); color: #fff; font-weight: 500; margin-bottom: 18px; }
.lede { max-width: 620px; font-size: 18px; color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 36px; }
.btn {
    display: inline-block; padding: 15px 28px; border-radius: 3px;
    font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
    text-decoration: none; border: 1px solid transparent; text-align: center; cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.note { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.hero .note { margin-top: 14px; }

/* The 4 x 4 pad motif: pads 1-8 are the voices, 9-16 their ALT variants. */
.pads {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
    max-width: 340px; justify-self: end; width: 100%;
}
.pad {
    aspect-ratio: 1; border: 1px solid var(--edge); border-radius: 4px;
    background: linear-gradient(180deg, #26262b, #1a1a1e);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 7px 8px; font-family: var(--mono); font-size: 11px; color: var(--text-dim);
}
.pad b { color: #fff; font-size: 13px; font-weight: 700; }
.pad span { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; }
.pad.alt span { color: var(--steel); }
.pad.alt { border-color: #343a42; }
.pad.hit { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 24px rgb(255 90 31 / 0.25); }
.pads-caption { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ---------- screenshot ---------- */
figure img {
    width: 100%; height: auto; display: block;
    border: 1px solid var(--edge); border-radius: 4px; box-shadow: 0 24px 70px rgb(0 0 0 / 0.6);
}
figcaption { margin-top: 12px; font-size: 14px; color: var(--text-dim); text-align: center; }

/* ---------- features ---------- */
.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px;
    background: var(--edge); border: 1px solid var(--edge); border-radius: 4px; overflow: hidden;
}
.feature { background: var(--panel); padding: 26px 24px; }
.feature .num { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.2em; margin-bottom: 12px; }
.feature p { font-size: 15px; color: var(--text-dim); line-height: 1.6; }

/* ---------- listen ---------- */
.audio-group { margin-top: 40px; }
.audio-group:first-of-type { margin-top: 0; }
.group-note { font-size: 14px; color: var(--text-dim); margin: 0 0 14px; }
.audio-grid { display: grid; gap: 10px; }
.track {
    background: var(--panel); border: 1px solid var(--edge); border-radius: 4px;
    padding: 14px 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.track-meta { min-width: 0; flex: 1 1 260px; }
.track-name { font-family: var(--mono); font-size: 14px; color: #fff; font-weight: 500; }
.track-name .prog { color: var(--text-dim); font-weight: 400; margin-right: 8px; }
.track-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.track audio { flex: 1 1 260px; min-width: 0; height: 36px; }
.track-len { font-family: var(--mono); font-size: 12px; color: var(--text-dim); flex: 0 0 auto; }
.track-feature { border-color: var(--accent); background: linear-gradient(180deg, rgb(255 90 31 / 0.07), transparent); }

/* ---------- callouts ---------- */
.callout {
    background: var(--panel); border: 1px solid var(--edge); border-left: 3px solid var(--accent);
    border-radius: 4px; padding: 24px 26px;
}
.callout.acid { border-left-color: var(--acid); }
.callout.steel { border-left-color: var(--steel); }
.callout.warn { border-left-color: var(--danger); }
.callout h3 { margin-bottom: 10px; }
.callout p, .callout li { font-size: 15px; color: var(--text-dim); }
.callout ul, .callout ol { padding-left: 20px; margin-top: 8px; }
.callout + .callout { margin-top: 18px; }
.two-col > .callout, .models > .callout { margin-top: 0; }
.stack > * + * { margin-top: 18px; }

/* ---------- downloads ---------- */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.platform {
    background: var(--panel); border: 1px solid var(--edge); border-radius: 4px;
    padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.platform[hidden] { display: none; }
.platform-name { font-family: var(--mono); font-size: 20px; color: #fff; font-weight: 700; }
.platform-version { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.platform-detail { font-size: 14px; color: var(--text-dim); flex-grow: 1; }
.platform .btn { margin-top: 6px; }
.platform-file { font-family: var(--mono); font-size: 12px; color: var(--text-dim); overflow-wrap: anywhere; }
.platform-file [data-release-field="size"] { white-space: nowrap; }
.platform-extra { font-size: 14px; }
.hash { font-family: var(--mono); font-size: 11px; color: var(--text-dim); word-break: break-all; }

/* ---------- versions ---------- */
.versions { list-style: none; display: grid; gap: 12px; }
.versions > li { border-left: 2px solid var(--edge); padding: 2px 0 2px 16px; }
.version-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.version-number { font-family: var(--mono); font-size: 15px; color: #fff; font-weight: 700; }
.version-meta { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.versions ul { margin: 6px 0 0 18px; font-size: 14px; color: var(--text-dim); }

/* ---------- specs ---------- */
.table-scroll { overflow-x: auto; }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.specs th {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-dim); font-weight: 500; width: 200px;
}
.specs td.no { color: #fff; }

/* ---------- steps (MPC guide, MPC section) ---------- */
/* minmax(0, 1fr): a grid item's min-content (a wide .tree) must not widen the page. */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.steps > li, .two-col > *, .models > *, .platforms > *, .features > * { min-width: 0; }
.steps > li {
    counter-increment: step; position: relative; padding: 18px 20px 18px 66px;
    background: var(--panel); border: 1px solid var(--edge); border-radius: 4px;
}
.steps > li::before {
    content: counter(step); position: absolute; left: 18px; top: 16px;
    width: 32px; height: 32px; border-radius: 3px; background: var(--accent); color: var(--accent-ink);
    font-family: var(--mono); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.steps > li > strong:first-child { display: block; margin-bottom: 4px; font-size: 16px; }
.steps p, .steps li li { font-size: 15px; }
.steps ul { padding-left: 20px; margin-top: 6px; }
.steps .tip { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.tree {
    font-family: var(--mono); font-size: 13px; line-height: 1.55; color: #fff;
    background: #0a0a0c; border: 1px solid var(--edge); border-radius: 4px;
    padding: 16px 18px; overflow-x: auto; white-space: pre; margin-top: 10px;
}
.tree .c { color: var(--text-dim); }
.tree .hl { color: var(--accent); }
/* The tree's side comments, repeated as a list for phones (shown at <= 640px). */
.tree-notes { display: none; list-style: none; margin-top: 10px; font-size: 14px; color: var(--text-dim); }
.tree-notes li { padding: 3px 0; }
.tree-notes code { margin-right: 6px; }
.toc { columns: 2 260px; column-gap: 32px; list-style: none; font-size: 15px; }
.toc li { break-inside: avoid; padding: 4px 0; border-bottom: 1px solid var(--edge); }
.toc a { color: var(--text); text-decoration: none; display: flex; gap: 12px; }
.toc a:hover { color: #fff; }
.toc .n { font-family: var(--mono); color: var(--accent); min-width: 2ch; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.models { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.models ul { list-style: none; margin-top: 6px; }
.models li { font-family: var(--mono); font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--edge); color: #fff; }

/* ---------- signup ---------- */
.notify-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.notify-form input {
    flex: 1 1 240px; min-width: 0; background: var(--bg); color: var(--text);
    border: 1px solid var(--edge); border-radius: 3px; padding: 12px 14px; font-family: var(--mono); font-size: 14px;
}
.notify-form input:focus { outline: 2px solid var(--acid); outline-offset: 1px; border-color: var(--acid); }
.notify-form button { flex: 0 0 auto; border: 0; }
.notify-status { flex-basis: 100%; font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin: 0; }
.notify-status[data-state="error"] { color: var(--danger); }
.notify-status[data-state="ok"] { color: var(--acid); }

/* ---------- faq ---------- */
details { border-bottom: 1px solid var(--edge); padding: 18px 0; }
summary { cursor: pointer; color: #fff; font-weight: 500; font-size: 16px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; color: var(--accent); font-family: var(--mono); margin-right: 12px; }
details[open] summary::before { content: "-"; }
details > div, details > p { margin-top: 12px; font-size: 15px; color: var(--text-dim); padding-left: 26px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--edge); padding: 44px 0 56px; font-size: 14px; color: var(--text-dim); }
footer a { color: var(--text-dim); text-decoration: underline; }
footer p + p { margin-top: 12px; }

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .pads { justify-self: start; max-width: 300px; }
}
@media (max-width: 640px) {
    section { padding: 56px 0; }
    body { font-size: 16px; }
    .wrap { padding: 0 18px; }
    .hero { padding: 56px 0 48px; }
    .btn { width: 100%; }
    .cta-row .note { width: 100%; }
    .track { flex-direction: column; align-items: stretch; gap: 10px; }
    /* In a column the 260px flex-basis would become a height: size to content. */
    .track-meta { flex: 0 0 auto; }
    .track audio { width: 100%; flex: 0 0 auto; }
    .track-len { align-self: flex-start; }
    .specs th { width: auto; display: block; padding-bottom: 2px; border-bottom: 0; }
    .specs td { display: block; padding-top: 0; }
    .specs tr { display: block; border-bottom: 1px solid var(--edge); padding: 10px 0; }
    .specs th, .specs td { border-bottom: 0; }
    .steps > li { padding: 60px 16px 16px; }
    .steps > li::before { left: 16px; top: 16px; }
    .tree { font-size: 12px; }
    /* Side comments would need sideways scrolling: the prose and .tree-notes carry them. */
    .tree .c:not(.keep) { display: none; }
    .tree-notes { display: block; }
    .notify-form input, .notify-form button { width: 100%; flex: 1 1 100%; }
}
