/* Shared layout, base and components. Sections below the tokens were folded in from the retired styles.css; page files (clarity, audience, docs, downloads, legal, offer) load between the two halves where a page uses them. */

/* Self-hosted Sometype Mono variable font (GDPR: no external font requests) */
@font-face {
    font-family: 'Sometype Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/SometypeMono-VariableFont_wght.woff2') format('woff2');
}

@font-face {
    font-family: 'Sometype Mono';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/SometypeMono-Italic-VariableFont_wght.woff2') format('woff2');
}

/* Self-hosted IBM Plex Sans, latin subset, weights 400, 600 and 700 (SIL OFL, fonts/IBM-Plex-Sans-LICENSE.txt) */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
}

/* ---------- Custom Properties ---------- */
:root {
    --purple: #C3A0FE;
    --lime: #C4FE8A;
    --cyan: #BFF6FD;
    --pink: #FE8AC9;
    --yellow: #F4FF70;
    --coral: #FF7A7A;
    --turquoise: #8AFFE3;
    --orange: #FEA878;
    --gold: #FEDB8A;
    --dark: #1a1a1a;
    --plum: #2b2136;
    --radius: 0.5rem;
    --font: 'Sometype Mono', monospace;
    --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --fs-label: 12px;   /* scanned labels: kickers, table heads, chips */
    --fs-small: 14px;   /* captions, meta, footer, code */

    --surface-inset: #e8e8e8;
    --border-light: #e0e0e0;
}

/* ---------- 1. Reset + Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
    /* Short pages: keep the footer at the bottom instead of leaving a cream band under it. */
    display: flex;
    flex-direction: column;
}

body > footer {
    margin-top: auto;
}

/* Flex children with auto side margins shrink to fit; keep the page body block-like. */
body > main,
body > .docs-layout {
    width: 100%;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 14% 14%, rgba(195, 160, 254, 0.18), transparent 26%),
        radial-gradient(circle at 86% 10%, rgba(138, 255, 227, 0.16), transparent 20%),
        radial-gradient(circle at 78% 78%, rgba(254, 138, 201, 0.16), transparent 24%),
        radial-gradient(circle at 18% 76%, rgba(196, 254, 138, 0.14), transparent 22%);
    background-size: 24px 24px, 24px 24px, auto, auto, auto, auto;
    opacity: 0.85;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ---------- 2. Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #171218 0%, #050505 100%);
    border-bottom: 3px solid #000;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.95), 0 9px 0 rgba(195, 160, 254, 0.35);
}

nav {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
}

.nav-links a {
    transition: color 0.2s, transform 0.15s;
}

/* ---------- 3. Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.2s;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 5px 5px 0 #000;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 #000;
}

.btn-nav-download {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    margin-left: 0.5rem;
}

.btn-nav-download:hover {
    color: #fff;
    transform: none;
    box-shadow: 5px 5px 0 var(--pink);
}

.btn-large {
    padding: 1rem 2.25rem;
    font-size: 1.15rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- 4. Shared Components ---------- */
.section-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 0.8rem;
    display: table;
    padding: 0.45rem 1.05rem;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--paper-strong);
    box-shadow: var(--shadow-pixel);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--plum);
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

/* Grid crosshatch background (reused across sections) */
.proof-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.35;
}

.proof-inner {
    position: relative;
    z-index: 1;
}

/* ============================================
   5. Hero
   ============================================ */

/* Product name — small, above the headline */

/* Headline — value proposition, larger and cleaner */

/* Description — one tight sentence, capped width */

/* Trial-first hero actions with a secondary purchase option */

/* Hero Download Buttons (OS-aware) */

/* Smaller installer links used outside the homepage hero */
.secondary-download {
    margin-top: 1rem;
}
.secondary-download .btn-download {
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
}

/* Download Trust Signal */

/* Context stays secondary to the single purchase card. */

/* FAQ Section */

/* Hero screenshot frame */

/* Hero proof pills */

/* ============================================
   6. Demo Section (See it in action)
   ============================================ */
.demo-section {
    padding: 2.5rem 1.5rem 3rem;
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.demo-heading {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.demo-showcase {
    max-width: 1120px;
    margin: 0 auto;
    overflow: hidden;
}

.demo-media-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 30%),
        linear-gradient(180deg, #1d1d1d 0%, #090909 100%);
    overflow: hidden;
}

.demo-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.demo-panel img,
.demo-panel video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.demo-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.demo-carousel-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 5px;
    background: rgba(255, 255, 255, 0.16);
}

.demo-carousel-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--pink) 0%, var(--gold) 55%, var(--cyan) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.12s linear;
}

.demo-caption {
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.demo-caption-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.demo-caption-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.demo-caption h3 {
    font-weight: 700;
    margin: 0;
}

.demo-caption p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.65;
    max-width: 760px;
}

.demo-carousel-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    background: #fffdf8;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.demo-carousel-toggle:hover {
    transform: translateY(-1px);
    background: #fff3cf;
}

.demo-carousel-toggle:active {
    transform: translateY(1px);
    box-shadow: 2px 2px 0 #000;
}

.demo-carousel-toggle-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.demo-carousel-toggle[aria-pressed="false"] .demo-carousel-toggle-icon::before,
.demo-carousel-toggle[aria-pressed="false"] .demo-carousel-toggle-icon::after {
    content: "";
    position: absolute;
    top: 1px;
    width: 4px;
    height: 12px;
    background: currentColor;
}

.demo-carousel-toggle[aria-pressed="false"] .demo-carousel-toggle-icon::before {
    left: 2px;
}

.demo-carousel-toggle[aria-pressed="false"] .demo-carousel-toggle-icon::after {
    right: 2px;
}

.demo-carousel-toggle[aria-pressed="true"] .demo-carousel-toggle-icon::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 3px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid currentColor;
}

.demo-caption-progress {
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
}

.demo-caption-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.12s linear;
}

.demo-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.demo-selector-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-dark);
    padding: 0.8rem 0.9rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.18rem;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.demo-selector-kicker {
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .demo-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-caption {
        padding: 1rem;
    }
}

@media (max-width: 620px) {
    .demo-caption-header {
        align-items: stretch;
        flex-direction: column;
    }

    .demo-carousel-toggle {
        justify-content: center;
        width: 100%;
    }

    .demo-selector {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   7. Audience Paths
   ============================================ */

.audience-kicker {
    margin: 0;
    color: var(--plum);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.audience-lede {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
}

.audience-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 2rem 1.35rem 1.35rem;
    color: var(--ink);
    text-decoration: none;
}

.audience-card:focus-visible {
    outline: 3px solid var(--pink);
    outline-offset: 4px;
}

.audience-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.35;
}

.audience-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (max-width: 900px) {

    .audience-card {
        min-height: 0;
    }
}

/* ============================================
   8. Pain Section
   ============================================ */

/* ============================================
   9. Mid-page CTA
   ============================================ */

/* ============================================
   10. Workflow Cards
   ============================================ */

/* ============================================
   11. Production Details (Proof Cards)
   ============================================ */
.proof-section {
    position: relative;
    scroll-margin-top: 128px;
    padding: 4rem 1.5rem;
    background: linear-gradient(180deg, rgba(239, 248, 255, 0.78) 0%, rgba(255, 249, 241, 0.98) 100%);
    border-top: var(--border);
    border-bottom: var(--border);
    overflow: hidden;
}

.proof-inner {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.proof-lede {
    max-width: 680px;
    margin: 1rem auto 0;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
    text-align: center;
}

.proof-lede code {
    color: var(--ink);
    font-size: 0.9em;
    font-weight: 700;
}

.proof-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================
   12. Built-in Audio Toolkit
   ============================================ */
.dsp-nodes {
    position: relative;
    padding: 4rem 1.5rem;
    max-width: var(--max-width-content);
    margin: 0 auto;
    overflow: visible;
}

.dsp-nodes .section-subtitle {
    margin-bottom: 1.5rem;
}

.dsp-toolkit-shell {
    display: grid;
    align-items: start;
}

.dsp-tab {
    border-left-width: 8px;
    border-left-color: var(--accent);
    background: var(--paper-strong);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dsp-tab span {
    color: var(--text-strong);
    line-height: 1.2;
}

.dsp-tab small {
    color: var(--text-secondary);
    font-size: var(--fs-label);
    line-height: 1.35;
}

.dsp-tab:hover,
.dsp-tab:focus-visible,
.dsp-tab.is-active {
    background: var(--accent);
}

.dsp-tab:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
}

.dsp-tab.is-active small,
.dsp-tab:hover small,
.dsp-tab:focus-visible small {
    color: rgba(0, 0, 0, 0.72);
}

.dsp-panels {
    min-width: 0;
}

.dsp-category {
    border-top-width: 8px;
    border-top-color: var(--accent);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.dsp-tabs-enhanced .dsp-category:not(.is-active) {
    display: none;
}

.dsp-category-header h3 {
    color: var(--text-strong);
    font-weight: 800;
    margin: 0;
}

.dsp-category-header p {
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0.3rem 0 0;
    max-width: 680px;
}

.dsp-nodes-grid {
    display: grid;
}

.dsp-node-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dsp-node-card:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
}

.dsp-node-card h4 {
    font-weight: 700;
}

.dsp-plugin-callout {
    align-items: center;
    background: var(--paper-strong);
    border: var(--border);
    border-left-color: var(--pink);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.dsp-plugin-callout h3 {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.dsp-plugin-callout p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
    max-width: 780px;
}

.dsp-plugin-preview {
    background: var(--pink);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.9);
    color: #000;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.75rem 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dsp-plugin-preview:hover,
.dsp-plugin-preview:focus-visible {
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.95), 0 10px 20px rgba(0, 0, 0, 0.14);
    transform: translate(-2px, -2px);
}

.dsp-plugin-preview:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
}

/* ---------- Node Settings Modal ---------- */
#node-modal {
    border: var(--border);
    border-radius: var(--radius);
    padding: 0;
    max-width: 700px;
    width: 90vw;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

#node-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 1.5rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font);
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
}

#modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-image-wrapper {
    border: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0f0f0;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
}

.modal-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 280px;
    color: #888;
    font-size: 0.95rem;
    font-family: var(--font);
}

/* ============================================
   13. Creative Angle
   ============================================ */

/* ============================================
   14. Trust Section
   ============================================ */

/* ============================================
   15. Pricing Section
   ============================================ */

/* Audio toolkit back-to-download link */

/* ============================================
   16. Final CTA
   ============================================ */

/* ============================================
   17. Footer
   ============================================ */
footer {
    background: linear-gradient(180deg, #151117 0%, #050505 100%);
    color: #fff;
    padding: 3.5rem 1.5rem 1.5rem;
    border-top: 3px solid #000;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: var(--max-width-content);
    margin: 0 auto 2rem;
}

.footer-column h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-column a {
    color: #fff;
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.2s;
    overflow-wrap: break-word;
    word-break: break-word;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--cyan);
}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-link-btn {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.7;
    font-size: 0.9rem;
    font-family: var(--font);
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: opacity 0.2s;
}

.footer-link-btn:hover {
    opacity: 1;
    color: var(--cyan);
}

.footer-bottom {
    padding-top: 1.5rem;
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom p + p {
    margin-top: 0.4rem;
}

/* ============================================
   19. Accessibility
   ============================================ */
.skip-link {
    position: absolute;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

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

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--pink);
    outline-offset: 3px;
}

/* ============================================
   20. Mobile Nav
   ============================================ */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Desktop shows the menu permanently: drop the checkbox from the tab order. */
@media (min-width: 769px) {
    .nav-toggle { display: none; }
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus-visible + .nav-toggle-label {
    outline: 3px solid var(--pink);
    outline-offset: 3px;
}

.nav-toggle-label span {
    display: block;
    width: 25px;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ============================================
   21. Cookie Consent
   ============================================ */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    font-size: 0.9rem;
    max-height: 80vh;
    overflow-y: auto;
}

#cookie-consent-banner:focus:not(:focus-visible) {
    outline: none;
}

.consent-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.consent-inner p {
    margin: 0;
    flex: 1 1 300px;
}

.consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.consent-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    transition: background-color 0.2s;
}

.consent-btn:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.consent-btn-primary {
    background: #4080c8;
    color: #fff;
}

.consent-btn-primary:hover {
    background: #3570b8;
}

.consent-btn-secondary {
    background: transparent;
    color: var(--paper-strong, #fffdf8);
    border: 1px solid var(--paper-strong, #fffdf8);
}

.consent-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Reduced Motion
   ============================================ */
@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;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Tablet (769px - 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }

    .dsp-toolkit-shell {
        grid-template-columns: minmax(200px, 0.38fr) minmax(0, 1fr);
    }
}

/* ============================================
   Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: flex;
    }

    nav {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Hero mobile */

    /* Sections mobile */

    .section-heading {
        font-size: 1.25rem;
        display: inline-block;
        max-width: calc(100% - 1rem);
        word-wrap: break-word;
        box-shadow: 4px 4px 0 #000;
    }

    .demo-heading {
        font-size: 1.35rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .dsp-toolkit-shell {
        grid-template-columns: 1fr;
    }

    .dsp-tab-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dsp-tab {
        min-height: 70px;
        padding: 0.65rem 0.75rem;
    }

    .dsp-plugin-callout {
        align-items: flex-start;
        flex-direction: column;
    }

    .dsp-plugin-preview {
        width: 100%;
    }

    .dsp-nodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }
}

/* ── Email Capture (post-download) ── */

/* ============================================
   Small mobile (max-width: 600px)
   ============================================ */
@media (max-width: 600px) {
    .consent-inner {
        flex-direction: column;
        text-align: center;
    }
    .consent-inner p {
        flex: 0 1 auto;
    }
    .consent-buttons {
        width: 100%;
        justify-content: center;
    }

    .dsp-tab-list {
        grid-template-columns: 1fr;
    }

    .dsp-nodes-grid {
        grid-template-columns: 1fr;
    }

    .dsp-node-card {
        min-height: 0;
    }
}

/* ── Download Gate ─────────────────────────────────────────────── */
.download-gate {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: 440px;
}

/* The [hidden] attribute must win over the display: flex rules below.
   Author-specificity CSS otherwise defeats the UA stylesheet's
   [hidden] { display: none } rule, which would render the email form
   (and thanks panel) on page load alongside the download button. */
.download-gate [hidden] { display: none !important; }

.btn[aria-disabled="true"],
.newsletter-form button:disabled {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

/* Primary "Get Download" fills the full gate width; skip link sits below it. */

/* ── Newsletter signup ─────────────────────────────────────────── */

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1 1 220px;
    padding: 0.5rem 0.75rem;
    font: inherit;
    border: 1px solid var(--ink, #181419);
    border-radius: 4px;
    background: #fff;
}

.newsletter-input:focus-visible {
    outline: 3px solid var(--yellow, #F4FF70);
    outline-offset: 2px;
}

.newsletter-error {
    color: var(--coral, #FF7A7A);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .download-gate { max-width: 100%; width: 100%; }
    .newsletter-form { flex-direction: column; }
}

/* ---------- Light layout (formerly the override layer) ---------- */
:root {
    color-scheme: only light;
    --ink: #222126;
    --paper: #fffdf8;
    --paper-strong: #fff;
    --paper-muted: #f3f0eb;
    --text-strong: #222126;
    --text-dark: #222126;
    --text-secondary: #646168;
    --line: #dedbd6;
    --border: 1px solid var(--line);
    --shadow-pixel: 2px 2px 0 var(--ink);
    --shadow-soft: 0 8px 24px #2221260a;
    --max-width-content: 1120px;
    --max-width-narrow: 1120px;
    /* Node category colours and wire colour, taken from the app:
       Source/Modules/batchy_ui_common/UI/Style/BatchyPalette.h:25-43. */
    --cat-input: #FF92DA;
    --cat-output: #FF64C8;
    --cat-processing: #3D8CFF;
    --cat-eq: #FFAA00;
    --cat-time: #8B6BFF;
    --cat-reverb: #20D7F2;
    --cat-dist: #FF4D40;
    --cat-dyn: #555EFF;
    --cat-routing: #B8E633;
    --cat-spatial: #BE74FF;
    --cat-pitch: #27F2CE;
    --cat-viz: #54E87C;
    --cat-plugin: #FFD447;
    --cat-utility: #82D9FF;
    --wire: #6B73FF;
    --wire-hi: #C9CCFF;
    --node-outline: 1.5px solid var(--ink);
    --node-shadow: 2px 2px 0 var(--ink);
}

body { background: var(--paper); font-family: var(--font-body); }
body::before { display: none; }
.skip-link { top: 0; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
h1, h2, h3, h4, .clarity-kicker, .audience-kicker, .clarity-card-index { font-family: var(--font); }
a:focus-visible, button:focus-visible, select:focus-visible, [role="button"]:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid var(--ink); outline-offset: 4px; }

/* Wordmark: the pre-light-layout Sometype Mono logo with its pink offset shadow. */
body > header { background: var(--paper); border-bottom: var(--border); box-shadow: none; transition: box-shadow 150ms ease; }
body > header.is-scrolled { box-shadow: 0 2px 12px #2221260f; }
@media (prefers-reduced-motion: reduce) { body > header { transition: none; } }
body > header > nav { max-width: 1216px; min-height: 78px; gap: 28px; padding: 16px 48px; }
.nav-logo { color: var(--ink); font-family: 'Sometype Mono', monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; text-shadow: 2px 2px 0 var(--pink); white-space: nowrap; }
.nav-links { align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); font-size: var(--fs-small); font-weight: 600; }
.nav-links a:hover { color: var(--ink); transform: none; text-decoration: underline; text-underline-offset: 5px; }
.docs-page .nav-links .active, .downloads-page .nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: #a32968; text-underline-offset: 6px; }
.nav-toggle-label span { background: var(--ink); height: 2px; }

.btn, .dsp-plugin-preview { font-family: var(--font-body); font-size: 14px; line-height: 1.4; min-height: 46px; padding: 12px 20px; border: 1px solid var(--ink); border-radius: 5px; box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--pink); color: var(--ink); }
.btn-primary:hover { background: #ffa9d7; }
.btn-secondary { background: var(--paper-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--paper-muted); }
.btn:hover, .dsp-plugin-preview:hover, .dsp-plugin-preview:focus-visible { transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.nav-links .btn, .nav-links .btn:hover { color: var(--ink); font-size: var(--fs-small); padding: 11px 14px; margin: 0; box-shadow: none; text-decoration: none; }

.clarity-wrap, .audience-wrap { width: min(1120px, calc(100% - 96px)); }
.clarity-hero-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 38px; align-items: center; padding-block: 60px 46px; }
.clarity-hero { padding: 0; text-align: left; min-width: 0; }
.clarity-hero h1, .audience-page h1, .clarity-feature-intro h1 { font-size: clamp(30px, 3.5vw, 43px); line-height: 1.12; letter-spacing: -.065em; text-wrap: balance; }
.clarity-hero h1 { max-width: none; margin: 20px 0 22px; }
.clarity-kicker, .audience-page .audience-kicker { font-size: var(--fs-label); letter-spacing: .055em; color: var(--text-secondary); }
.clarity-hero .clarity-kicker::before, .audience-hero .audience-kicker::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--audience-accent, var(--purple)); border-radius: 2px; }
.clarity-lede, .audience-page .audience-lede { font-size: 16px; line-height: 1.65; color: var(--text-secondary); }
.clarity-hero .clarity-lede { margin-inline: 0; }
.clarity-actions { justify-content: flex-start; gap: 18px 22px; margin-block: 26px 16px; }
.clarity-link, .audience-text-link { font-size: 14px; }
.clarity-meta, .clarity-owner, .audience-purchase-note { font-size: var(--fs-small); line-height: 1.75; }
.clarity-demo { min-width: 0; }
.clarity-demo .clarity-section-title { display: block; margin-bottom: 14px; }
.clarity-demo .clarity-section-title h2 { font-size: 16px; letter-spacing: -.025em; }
.clarity-demo .clarity-section-title > p { font-size: var(--fs-small); margin-top: 5px; }
.clarity-video, .audience-hero-proof { border: var(--border); border-radius: 7px; box-shadow: 0 5px 0 var(--audience-accent, var(--purple)), var(--shadow-soft); }
.clarity-video figcaption, .audience-hero-proof figcaption { padding: 14px 16px; font-size: var(--fs-small); color: var(--text-secondary); }
.clarity-video figcaption a { display: inline-block; margin-left: 0; }
.workflow-example-proof { max-width: none; margin: 0 0 28px; }

.clarity-benefits { gap: 30px; padding-block: 30px 12px; }
.clarity-benefits > div { min-width: 0; border-top: var(--border); padding-top: 20px; }
.clarity-benefits h3 { font-size: 16px; line-height: 1.4; }
.clarity-benefits p { font-size: 14px; line-height: 1.7; }
.clarity-detail-link { margin-top: 22px; font-size: 14px; }
.clarity-workflows { padding-block: 64px; }
.clarity-section-title h2, .clarity-faq h2, .audience-page h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.05em; }
.clarity-audience-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.clarity-audience-grid .clarity-audience { padding: 22px 20px; border: var(--border); border-top: 4px solid var(--purple); border-radius: 5px; }
.clarity-audience-grid .clarity-audience:nth-child(2) { border-top-color: var(--orange); }
.clarity-audience-grid .clarity-audience:nth-child(3) { border-top-color: var(--lime); }
.clarity-audience-grid .clarity-audience:nth-child(4) { border-top-color: var(--cyan); }
.clarity-audience-grid .clarity-audience:hover { transform: none; box-shadow: var(--shadow-soft); background: var(--paper-strong); }
.clarity-card-index { font-size: var(--fs-label); color: var(--text-secondary); }
.clarity-audience h3 { font-size: 17px; line-height: 1.4; margin-block: 16px 10px; }
.clarity-audience p { font-size: 14px; line-height: 1.6; }
.clarity-audience .clarity-link { font-size: var(--fs-small); line-height: 1.6; }
.clarity-more summary, .clarity-newsletter summary { padding-block: 12px; font-size: 14px; }
.clarity-more nav { padding-top: 12px; }
.clarity-more a { font-size: 14px; }
.clarity-purchase { border-top: var(--border); gap: 64px; padding-block: 48px 64px; }
.clarity-price h2 { font-size: 48px; }
.clarity-price li, .clarity-faq summary, .clarity-faq details p { font-size: 14px; line-height: 1.7; }
.clarity-faq details, .clarity-faq details:last-of-type, .clarity-newsletter { border-color: var(--line); }
.clarity-newsletter .newsletter-input { font-family: var(--font-body); border: var(--border); background: var(--paper-strong); box-shadow: none; min-width: 0; }

/* Audience pages: consistent structure with a distinct workflow accent. */
.audience-game { --audience-accent: var(--orange); }
.audience-hero { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 38px; padding-block: 60px 40px; }
.audience-hero > div { min-width: 0; }
.audience-page .audience-hero .audience-kicker { border: 0; padding: 0; background: transparent; }
.audience-page h1 { margin-bottom: 22px; }
.audience-actions { gap: 18px 22px; margin-top: 26px; }
.audience-purchase-note { margin-top: 18px; }
.audience-demo-heading strong { color: var(--ink); }
.audience-demo iframe { min-height: 0; }
.clarity-segment .audience-workflow { padding-block: 30px 44px; }
.clarity-segment .clarity-benefits { padding-top: 24px; }
.workflow-example { padding-block: 28px 48px; }
.audience-section-heading { margin-bottom: 26px; }
.audience-section-heading > p:last-child { font-size: 14px; }
.workflow-example-grid { border: var(--border); border-radius: 6px; background: #f8f6f1; }
.workflow-example-stage { padding: 24px; }
.workflow-example-stage + .workflow-example-stage { border-color: var(--line); }
.workflow-example-stage h3 { font-size: 16px; line-height: 1.45; margin-bottom: 18px; }
.workflow-example-stage p, .workflow-example-stage ol { font-size: 14px; line-height: 1.75; }
.workflow-example-files code { background: var(--paper-strong); border: var(--border); border-radius: 3px; font-family: var(--font); font-size: var(--fs-small); }
.workflow-example-note { font-size: var(--fs-small); }

/* Feature catalogue: quiet rows and compact, keyboard-accessible categories. */
.clarity-feature-hero { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 36px; align-items: center; padding-block: 44px 48px; }
.clarity-feature-intro { min-width: 0; padding: 0; }
.clarity-feature-intro h1 { margin-block: 20px; }
.clarity-feature-intro .clarity-lede { margin-bottom: 24px; }
.clarity-feature-intro .btn { margin-top: 0; }
.clarity-feature-intro .clarity-meta { margin-top: 14px; }
.clarity-features .section-heading { display: block; text-align: left; margin: 0 0 16px; padding: 0; border: 0; background: none; box-shadow: none; text-transform: none; font-size: 28px; line-height: 1.3; letter-spacing: -.045em; color: var(--ink); max-width: none; }
.clarity-app-preview { min-width: 0; }
.clarity-app-preview [hidden] { display: none; }
.app-preview-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.app-preview-tabs { display: flex; gap: 6px; }
.app-preview-rotation { min-height: 44px; min-width: 58px; padding: 10px 8px; border: var(--border); border-radius: 5px; color: var(--text-secondary); background: var(--paper-strong); font: 13px var(--font-body); cursor: pointer; }
.app-preview-rotation:hover { color: var(--ink); border-color: var(--ink); }
.app-preview-tabs button { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 5px; color: var(--ink); background: transparent; font: 600 13px var(--font-body); cursor: pointer; }
.app-preview-tabs button:hover { background: var(--paper-muted); }
.app-preview-tabs button[aria-selected="true"] { background: var(--purple); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.app-preview-tabs button#preview-waveform-tab[aria-selected="true"] { background: var(--cyan); }
.app-preview-image { display: block; border: var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-soft); }
.clarity-app-preview img { display: block; width: 100%; height: auto; }
.clarity-app-preview figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.clarity-app-preview figcaption a { flex-shrink: 0; padding-block: 8px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.clarity-features .proof-section { background: var(--paper-muted); border: 0; padding: 44px 0; overflow: visible; }
.clarity-features .proof-section::before, .clarity-features .dsp-nodes::before { display: none; }
.proof-inner { width: min(1120px, calc(100% - 96px)); }
.proof-lede, .dsp-nodes .section-subtitle { text-align: left; margin: 0 0 26px; max-width: 72ch; font-size: 15px; }
.proof-label { font-size: var(--fs-label); color: var(--text-secondary); }
.clarity-features .dsp-nodes { width: min(1120px, calc(100% - 96px)); padding: 52px 0; }
.dsp-toolkit-shell { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.dsp-tab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dsp-tab { min-height: 46px; border: var(--border); border-radius: 4px; box-shadow: none; padding: 12px 14px; font-family: var(--font-body); }
.dsp-tab span { font-size: 13px; font-weight: 600; }
.dsp-tab small { display: none; }
.dsp-tab:hover, .dsp-tab:focus-visible, .dsp-tab.is-active { transform: none; box-shadow: none; border-color: var(--ink); }
.dsp-category { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 24px; }
.dsp-category-header { padding: 4px 0 18px; border-bottom: var(--border); margin-bottom: 18px; }
.dsp-category-header h3 { font-size: 19px; }
.dsp-category-header p { font-size: 14px; }
.dsp-nodes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dsp-node-card { border: var(--border); border-left: 4px solid var(--accent); border-radius: 5px; box-shadow: none; min-height: 120px; padding: 20px; cursor: pointer; }
.dsp-node-card:hover, .dsp-node-card:focus-visible { transform: none; box-shadow: var(--shadow-soft); border-color: var(--ink); border-left-color: var(--accent); }
.dsp-node-card h4 { font-size: 15px; margin-bottom: 9px; }
.dsp-node-card p { font-size: 14px; line-height: 1.65; color: var(--text-secondary); max-width: 58ch; }
#node-modal .modal-image-wrapper { display: flex; justify-content: center; border: 0; background: transparent; }
#node-modal .modal-image { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 180px); object-fit: contain; }
#node-modal .modal-image[hidden] { display: none; }
.modal-full-size { display: inline-block; margin-top: 12px; color: var(--ink); font-size: 13px; text-underline-offset: 3px; }
.modal-full-size[hidden] { display: none; }
.dsp-plugin-callout { box-shadow: none; border-left-width: 4px; padding: 22px; gap: 24px; }
.dsp-category-picker { display: none; }
.clarity-features .demo-section { width: min(1120px, calc(100% - 96px)); padding: 12px 0 52px; }
.demo-heading { text-align: left; font-size: 28px; letter-spacing: -.045em; color: var(--ink); }
.demo-showcase { border: var(--border); border-radius: 7px; box-shadow: var(--shadow-soft); background: var(--paper-strong); }
.demo-media-shell { padding: 0; background: var(--paper-strong); }
.demo-media-stage { border: 0; border-radius: 0; box-shadow: none; }
.demo-caption { border-top: var(--border); background: var(--paper-strong); padding: 24px; gap: 16px; }
.demo-caption h3 { color: var(--ink); font-size: 19px; }
.demo-caption .demo-caption-kicker { font-size: var(--fs-label); color: var(--text-secondary); }
.demo-caption p { font-size: 14px; }
.demo-carousel-toggle { min-height: 44px; font-family: var(--font-body); border: 1px solid var(--ink); box-shadow: none; border-radius: 4px; }
.demo-carousel-toggle:hover, .demo-carousel-toggle:active { transform: none; box-shadow: none; background: var(--paper-muted); }
.demo-caption-progress { height: 4px; border: 0; background: var(--paper-muted); box-shadow: none; }
.demo-selector-btn { min-height: 60px; border: var(--border); border-radius: 4px; box-shadow: none; font-family: var(--font-body); }
.demo-selector-btn:hover { transform: none; background: var(--paper-muted); }
.demo-selector-btn.active { background: #f5eafa; border-color: var(--ink); box-shadow: none; }
.demo-selector-title { font-size: 13px; line-height: 1.5; }
.final-cta { background: var(--paper-muted); border-top: var(--border); color: var(--ink); }

/* Shared footer and consent controls stay readable on the light canvas. */
body > footer { background: var(--paper-muted); color: var(--ink); border-top: var(--border); padding: 40px 48px 28px; }
.footer-column h4 { font-size: 13px; }
.footer-column a, .footer-link-btn, .site-footer__address { color: var(--text-secondary); opacity: 1; font-family: var(--font-body); font-size: 13px; }
.footer-column a:hover, .footer-link-btn:hover, .site-footer__address a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: var(--border); text-align: left; font-size: var(--fs-small); color: var(--text-secondary); }
.footer-bottom p { opacity: 1; }

@media (min-width: 769px) {
    /* Keep the documentation navigation below the taller shared header. */
    .docs-sidebar { top: 79px; height: calc(100vh - 79px); }
}

@media (max-width: 1000px) {
    body > header > nav { padding-inline: 32px; gap: 18px; }
    .nav-links { gap: 14px; }
    .clarity-wrap, .audience-wrap, .proof-inner, .clarity-features .dsp-nodes, .clarity-features .demo-section { width: calc(100% - 64px); }
    .clarity-hero-grid, .audience-hero { gap: 28px; }
    .clarity-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .clarity-feature-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
    .clarity-hero-grid, .audience-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 36px; }
    .clarity-hero h1, .audience-page h1 { font-size: clamp(30px, 5.2vw, 40px); max-width: 25ch; }
    .clarity-hero .clarity-lede { max-width: 58ch; }
    .audience-hero-proof { max-width: none; }
    .clarity-benefits { gap: 24px; }
    .clarity-purchase { gap: 36px; }
    .workflow-example-stage + .workflow-example-stage { border-left: 0; border-top: var(--border); }
}

@media (max-width: 768px) {
    body > header > nav { padding: 12px 24px; min-height: 70px; }
    .nav-links { background: var(--paper); border-bottom: var(--border); align-items: stretch; padding: 12px 24px 20px; max-height: calc(100dvh - 70px); overflow-y: auto; }
    .nav-links li { padding: 0; border-bottom: var(--border); }
    .nav-links li:last-child { border: 0; padding-top: 12px; }
    .nav-links a { display: block; padding: 12px 0; font-size: 15px; min-height: 44px; }
    .nav-links .btn { display: inline-block; }
    .dsp-tabs-enhanced .dsp-tab-list { display: none; }
    .dsp-tabs-enhanced .dsp-category-picker { display: grid; gap: 8px; }
    .dsp-category-picker label { font-size: 13px; font-weight: 700; }
    .dsp-category-picker select { width: 100%; min-height: 48px; padding: 12px; font: 16px var(--font-body); color: var(--ink); background: var(--paper-strong); border: 1px solid var(--ink); border-radius: 5px; }
    body > footer { padding-inline: 32px; }
}

@media (max-width: 520px) {
    .clarity-wrap, .audience-wrap, .proof-inner, .clarity-features .dsp-nodes, .clarity-features .demo-section { width: calc(100% - 40px); }
    .clarity-hero-grid { padding-bottom: 28px; }
    .clarity-hero h1, .audience-page h1, .clarity-feature-intro h1 { font-size: 30px; }
    .clarity-actions, .audience-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
    .clarity-actions .btn, .audience-hero .btn { width: 100%; }
    .clarity-actions .clarity-link { padding-block: 6px; }
    .clarity-benefits, .clarity-audience-grid, .dsp-nodes-grid { grid-template-columns: minmax(0, 1fr); }
    .clarity-workflows { padding-block: 44px; }
    .clarity-audience-grid .clarity-audience { padding: 22px; }
    .clarity-audience h3 { margin-top: 12px; }
    .clarity-purchase { padding-block: 36px 44px; }
    .workflow-example-stage { padding: 22px; }
    .dsp-plugin-callout { align-items: flex-start; flex-direction: column; }
    .clarity-features .section-heading { font-size: 24px; }
    .demo-caption { padding: 18px; }
    .clarity-newsletter .newsletter-form { display: grid; grid-template-columns: minmax(0, 1fr); }
    body > footer { padding-inline: 20px; }
}

/* ------------------------------------------------------------------
   Sell-the-story components (2026-09-25 rework).
   Shared by the homepage, Features, the landing pages and About.
   ------------------------------------------------------------------ */
.story-section { padding-block: 64px; border-top: var(--border); }
.story-section .clarity-section-title { display: block; margin-bottom: 28px; }
.story-section .clarity-section-title .clarity-kicker { margin-bottom: 10px; }
.section-lede { max-width: 64ch; margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--text-secondary); }
.story-subhead { font-size: 18px; line-height: 1.35; letter-spacing: -.03em; margin: 36px 0 14px; }
.story-subhead:first-of-type { margin-top: 0; }

/* How it works: three numbered steps with a media slot each. */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.how-step { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.how-step-number { align-self: flex-start; padding: 3px 9px; background: var(--step-accent, var(--purple)); font-family: var(--font); font-size: var(--fs-label); font-weight: 700; }
.how-step h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.03em; }
.how-step p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.media-crop { position: relative; margin: 0 0 6px; aspect-ratio: 16 / 10; overflow: hidden; border: var(--border); border-radius: 6px; background: #1d1c21; box-shadow: var(--shadow-soft); }
.media-crop img { position: absolute; top: 0; left: 0; width: calc(var(--crop-scale, 1) * 100%); max-width: none; height: auto; transform: translate(var(--crop-x, 0), var(--crop-y, 0)); }

/* One source -> many deliverables. Pure HTML/CSS so it needs no media. */
.flow-figure { margin: 0; }
.flow-figure + .flow-figure { margin-top: 28px; }
.flow-figure figcaption { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }

/* Lead-audience bands on the homepage. */
.lead-bands { display: grid; gap: 40px; }
.lead-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding-top: 32px; border-top: 4px solid var(--band-accent, var(--purple)); }
.lead-band:nth-child(even) .lead-band-copy { order: 2; }
.lead-band-copy { min-width: 0; }
.lead-band h3 { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.25; letter-spacing: -.045em; margin: 12px 0 14px; }
.lead-band p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); max-width: 56ch; }
.lead-band ul { list-style: none; margin: 18px 0 22px; padding: 0; }
.lead-band li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.lead-band li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--band-accent, var(--purple)); }
.lead-band figure { margin: 0; min-width: 0; border: var(--border); border-radius: 7px; overflow: hidden; box-shadow: 0 5px 0 var(--band-accent, var(--purple)), var(--shadow-soft); background: var(--paper-strong); }
.lead-band figure img { display: block; width: 100%; height: auto; }
.lead-band figcaption { padding: 12px 16px; font-size: var(--fs-small); line-height: 1.6; color: var(--text-secondary); }
.other-workflows { margin-top: 48px; }
.other-workflows .clarity-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.other-workflows .clarity-audience-grid .clarity-audience:nth-child(1) { border-top-color: var(--orange); }
.other-workflows .clarity-audience-grid .clarity-audience:nth-child(2) { border-top-color: var(--cyan); }
.workflow-links { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 22px; font-size: 14px; }
.workflow-links span { color: var(--text-secondary); }
.workflow-links a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Spec strip: the numbers professionals scan for. */
.spec-strip { padding-block: 44px; border-top: var(--border); }
.spec-strip h2 { font-size: 18px; letter-spacing: -.03em; margin-bottom: 20px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border: var(--border); border-radius: 6px; background: var(--paper-strong); overflow: hidden; }
.spec-grid > div { min-width: 0; padding: 18px 20px; border-right: var(--border); border-bottom: var(--border); }
.spec-grid > div:nth-child(4n) { border-right: 0; }
.spec-grid > div:nth-last-child(-n + 4) { border-bottom: 0; }
.spec-grid dt { font-family: var(--font); font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.spec-grid dd { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.spec-strip .clarity-detail-link { margin-top: 16px; }

/* Comparison table: dated, sourced, Batchy column first. */
.compare-scroll { position: relative; overflow-x: auto; border: var(--border); border-radius: 6px; background: var(--paper-strong); }
.compare-scroll:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.compare-table caption { text-align: left; padding: 14px 16px; font-size: 13px; color: var(--text-secondary); caption-side: top; }
.compare-table th, .compare-table td { padding: 12px 14px; border-top: var(--border); text-align: left; vertical-align: top; }
.compare-table thead th { font-family: var(--font); font-size: var(--fs-label); background: var(--paper-muted); }
.compare-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 170px; background: var(--paper-strong); font-weight: 600; box-shadow: 1px 0 0 var(--line); }
.compare-table .compare-batchy { background: #f5eafa; }
.compare-table thead .compare-batchy { background: var(--purple); }
.compare-sources, .compare-trademarks { margin-top: 12px; font-size: var(--fs-small); line-height: 1.6; color: var(--text-secondary); }

/* Proof block: intentionally empty and hidden until real names exist. */
.social-proof[hidden] { display: none; }
.social-proof-quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.social-proof-credits { margin-top: 18px; font-size: 13px; color: var(--text-secondary); }

/* Everything-in-one-license pricing card. */
.clarity-price .license-model { font-size: 14px; line-height: 1.6; margin: -6px 0 18px; color: var(--text-secondary); }
.clarity-price .license-includes li { position: relative; padding-left: 22px; margin-block: 7px; }
.clarity-price .license-includes li::before { content: '\2713'; position: absolute; left: 0; top: 0; font-weight: 700; }
.clarity-price .license-includes a { text-decoration: underline; text-underline-offset: 3px; }

/* Features: open capability sections with media slots. */
.capability-list { display: grid; gap: 0; margin-top: 8px; }
.capability { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding-block: 36px; border-top: var(--border); }
.capability:nth-child(even) .capability-copy { order: 2; }
.capability-copy { min-width: 0; border-left: 4px solid var(--accent, var(--purple)); padding-left: 20px; }
.capability h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; letter-spacing: -.04em; margin: 8px 0 12px; }
.capability p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); max-width: 58ch; }
.capability-media { margin: 0; min-width: 0; }
.capability-media > img { display: block; width: 100%; height: auto; border: var(--border); border-radius: 7px; box-shadow: var(--shadow-soft); }
.capability-media figcaption { margin-top: 10px; font-size: var(--fs-small); line-height: 1.6; color: var(--text-secondary); }
.mock-panel { border: 1px solid var(--ink); border-radius: 7px; background: #1d1c21; color: #f1eef3; padding: 20px; font-family: var(--font); font-size: var(--fs-small); line-height: 1.7; box-shadow: var(--shadow-soft); overflow-wrap: anywhere; }
.mock-panel dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.mock-panel dt { color: #b9b3bd; }
.mock-panel dd { margin: 0; }
.mock-panel .mock-title { display: block; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #4a4450; color: var(--pink); font-weight: 700; }
.mock-panel ol { margin: 0; padding-left: 1.2em; }
.mock-panel .mock-arrow { color: var(--lime); }
.mock-panel pre { margin: 0; white-space: pre-wrap; font: inherit; }
.features-final-cta { padding-block: 52px 64px; border-top: var(--border); }
.features-final-cta h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.05em; margin-bottom: 12px; }
.features-final-cta .clarity-actions { margin-bottom: 0; }

/* Landing pages: example, comparison of workflows and CLI blocks. */
.lp-section { padding-block: 56px; border-top: var(--border); scroll-margin-top: 108px; }
.lp-section .audience-section-heading { margin-bottom: 26px; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.lp-steps li { min-width: 0; border-top: var(--border); padding-top: 16px; }
.lp-steps h3 { font-size: 17px; line-height: 1.4; margin: 12px 0 8px; }
.lp-steps p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.lp-versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper-strong); }
.lp-versus > div { min-width: 0; padding: 24px; }
.lp-versus > div + div { border-left: 1px solid var(--ink); background: #f5eafa; }
.lp-versus h3 { font-size: 16px; margin-bottom: 14px; }
.lp-versus ol, .lp-two-up ol { margin: 0; padding-left: 1.3em; font-size: 14px; line-height: 1.75; color: var(--text-secondary); }
.lp-versus ol li + li { margin-top: 6px; }
.lp-versus .lp-versus-result { margin-top: 16px; font-size: 14px; font-weight: 600; }
.lp-code { margin: 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--ink); border-radius: 6px; background: #1d1c21; color: #f1eef3; font-family: var(--font); font-size: var(--fs-small); line-height: 1.7; }
.lp-code code { font: inherit; color: inherit; background: none; }
.lp-two-up { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.lp-two-up h3 { font-size: 16px; margin-bottom: 12px; }
.lp-note { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.lp-note a { text-decoration: underline; text-underline-offset: 3px; }
.lp-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.lp-points li { min-width: 0; padding: 16px 18px; border: var(--border); border-left: 4px solid var(--audience-accent, var(--purple)); border-radius: 4px; background: var(--paper-strong); }
.lp-points strong { display: block; font-size: 15px; margin-bottom: 4px; }
.lp-points span { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }

@media (max-width: 1000px) {
    .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spec-grid > div:nth-child(4n) { border-right: var(--border); }
    .spec-grid > div:nth-child(2n) { border-right: 0; }
    .spec-grid > div:nth-last-child(-n + 4) { border-bottom: var(--border); }
    .spec-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 800px) {
    .how-steps, .lp-steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .lead-band, .capability, .lp-two-up { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .lead-band:nth-child(even) .lead-band-copy, .capability:nth-child(even) .capability-copy { order: 0; }
    .social-proof-quotes { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .lp-versus, .lp-points, .other-workflows .clarity-audience-grid { grid-template-columns: minmax(0, 1fr); }
    .lp-versus > div + div { border-left: 0; border-top: 1px solid var(--ink); }
}

@media (max-width: 520px) {
    .story-section, .lp-section { padding-block: 44px; }
    .spec-grid { grid-template-columns: minmax(0, 1fr); }
    .spec-grid > div, .spec-grid > div:nth-child(2n), .spec-grid > div:nth-child(4n) { border-right: 0; border-bottom: var(--border); }
    .spec-grid > div:nth-last-child(-n + 2) { border-bottom: var(--border); }
    .spec-grid > div:last-child { border-bottom: 0; }
    .lp-versus > div { padding: 20px; }
    .lp-code { font-size: 13px; padding: 14px; }
}

/* A/B audio player (ab-player.js). */
.ab-section[hidden] { display: none; }
.ab-players { display: grid; gap: 16px; }
.ab-player { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "play toggle label" "seek seek time"; align-items: center; gap: 14px 16px; padding: 18px 20px; border: var(--border); border-radius: 8px; background: var(--paper-strong); box-shadow: var(--shadow-soft); }
.ab-play { grid-area: play; }
.ab-toggle { grid-area: toggle; }
.ab-label { grid-area: label; min-width: 0; font-size: 14px; line-height: 1.5; }
.ab-label strong { display: block; }
.ab-state { display: block; font-family: var(--font); font-size: var(--fs-small); color: var(--text-secondary); }
.ab-seek { grid-area: seek; width: 100%; min-height: 44px; accent-color: var(--ink); }
.ab-time { grid-area: time; font-family: var(--font); font-size: var(--fs-small); color: var(--text-secondary); white-space: nowrap; }
.ab-play, .ab-toggle { min-height: 44px; min-width: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 5px; box-shadow: 2px 2px 0 var(--ink); background: var(--paper-strong); color: var(--ink); font: 600 13px var(--font-body); cursor: pointer; }
.ab-toggle[aria-pressed="true"] { background: var(--pink); }
.ab-play:active, .ab-toggle:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.ab-play:disabled, .ab-toggle:disabled { opacity: .5; cursor: not-allowed; }
.ab-player:focus-within { border-color: var(--ink); }
.ab-note { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
@media (max-width: 520px) {
    .ab-player { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play toggle" "label label" "seek seek" "time time"; }
}
@media (prefers-reduced-motion: reduce) {
    .ab-play:active, .ab-toggle:active, .btn:active { transform: none; }
}
.clarity-price .btn + .clarity-owner { display: block; width: fit-content; margin-top: 16px; }
.compare-sources a { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------
   Round-2 polish (QA 2026-09-26).
   ------------------------------------------------------------------ */
h1, h2, h3 { text-wrap: balance; }
.clarity-page figcaption code, .clarity-page p code { white-space: nowrap; }

/* Workflow link rows: undo the generic header-nav rule above. */
.workflow-links { justify-content: flex-start; padding-inline: 0; padding-top: 0; max-width: none; }
.other-workflows .workflow-links { margin-inline: 0; padding-bottom: 0; }

/* offer.js hints inside plain text links stay on the same line. */
.compare-table .batchy-regular-price { font-size: 1em; }
.compare-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
@media (max-width: 600px) {
    .compare-table { font-size: var(--fs-small); }
    .compare-table tbody th { min-width: 112px; }
}

/* Footer: Product and Legal columns share one row rhythm. */
.footer-column ul, .footer-legal { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.footer-column li, .footer-legal > a, .footer-legal > button { line-height: 1.5; }
.footer-column li a, .footer-legal > a, .footer-legal > button { display: block; width: fit-content; padding: 6px 0; }

/* Kickers: one mono style everywhere. */
.proof-label, .demo-caption .demo-caption-kicker, .downloads-kicker, .legal-page .clarity-kicker { font-family: var(--font); font-size: var(--fs-label); font-weight: 700; letter-spacing: .055em; text-transform: uppercase; color: var(--text-secondary); }
.legal-page .clarity-kicker { margin-bottom: 14px; }

/* Downloads: hero, "After download" and the license card share one gutter. */
.downloads-main { width: min(1120px, calc(100% - 96px)); max-width: none; padding-inline: 0; }
.downloads-steps { max-width: none; margin-inline: 0; padding-inline: 0; }
.downloads-support { max-width: none; margin-inline: 0; }

/* Landing-page step badges match the homepage steps. */
.lp-steps .audience-step-number { font-family: var(--font); font-size: var(--fs-label); font-weight: 700; padding: 3px 9px; background: var(--purple); }
.lp-steps li:nth-child(2) .audience-step-number { background: var(--cyan); }
.lp-steps li:nth-child(3) .audience-step-number { background: var(--lime); }

/* Music page: room between the diagram caption and the screenshot. */
.flow-figure + .workflow-example-proof { margin-top: 40px; }

/* Features demo selector: rows fill, no empty cell. */
.clarity-features .demo-selector { display: flex; flex-wrap: wrap; }
.clarity-features .demo-selector-btn { flex: 1 1 30%; min-width: 0; }
@media (max-width: 760px) { .clarity-features .demo-selector-btn { flex-basis: 45%; } }
.dsp-plugin-callout .dsp-plugin-preview.btn-secondary { background: var(--paper-strong); }

@media (max-width: 1000px) {
    .downloads-main { width: calc(100% - 64px); }
}
@media (max-width: 520px) {
    .downloads-main { width: calc(100% - 40px); }
}

/* ------------------------------------------------------------------
   Batchy visual layer (round 2): everything is drawn as an app node.
   One system: 1.5px ink outline + 2px ink offset shadow + category
   colour + port dot. Sometype Mono for node labels.
   ------------------------------------------------------------------ */

/* B1. One source -> outputs, drawn as a node graph. node-flow.js adds the wires. */
.flow { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2.4fr); gap: 0 56px; align-items: center; padding: 28px 24px; border: 1px solid var(--ink); border-radius: 8px; overflow: visible;
    background: radial-gradient(circle, #22212614 1px, transparent 1.2px) 0 0 / 16px 16px, var(--paper-strong); }
.flow-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.flow-wires path { fill: none; stroke-linecap: round; }
.flow-wires .wire-under { stroke: var(--ink); stroke-width: 5; }
.flow-wires .wire-core { stroke: var(--wire); stroke-width: 3; }
.flow-wires .wire-dash { stroke: var(--wire-hi); stroke-width: 3; stroke-dasharray: 2 16; animation: wire-flow 1.1s linear infinite; }
@keyframes wire-flow { to { stroke-dashoffset: -18; } }
.flow-source { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.flow-label { display: block; font-family: var(--font); font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.flow-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.flow-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 12px 56px; }
.flow-branch { display: flex; align-items: center; gap: 36px; min-width: 0; }
.flow-branch > .fnode { flex: 1 1 0; }
.flow-pass { display: block; width: 100%; padding: 0 4px 24px; font-family: var(--font); font-size: var(--fs-small); line-height: 1.4; color: var(--text-secondary); position: relative; z-index: 1; }

.fnode { position: relative; z-index: 1; min-width: 0; border: var(--node-outline); border-radius: 6px; background: var(--paper-strong); box-shadow: var(--node-shadow); }
.fnode-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; padding: 5px 10px; border-bottom: var(--node-outline); border-radius: 4px 4px 0 0; background: var(--c, var(--cat-processing)); color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 700; line-height: 1.3; }
.fnode-head small { font: inherit; font-weight: 400; }
.fnode.on-dark .fnode-head { color: #fff; }
.fnode.fnode-compact .fnode-head { border-bottom: 0; border-radius: 4px; }
.fnode-body { display: block; padding: 8px 10px; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.fnode-body code { display: block; font-family: var(--font); font-size: var(--fs-small); line-height: 1.4; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.fnode-body .flow-label { display: block; margin-top: 4px; }
.fnode-body p { margin-top: 4px; font-size: var(--fs-small); }
.fnode .flow-spec { display: block; margin-top: 3px; font-size: var(--fs-small); color: var(--text-secondary); }
.port { position: absolute; top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--cat-processing)); border: var(--node-outline); z-index: 2; }
.port.in { left: -7px; }
.port.out { right: -7px; }
/* The shared chain under the Input node: short vertical links, as in the app. */
.flow-source .fnode + .fnode::before { content: ''; position: absolute; left: 50%; top: -19px; width: 3px; height: 18px; margin-left: -1.5px; background: var(--wire); box-shadow: 0 0 0 1.5px var(--ink); }

/* Rail layout: used on narrow screens, in print and without JavaScript.
   node-flow.js adds .wired only on screens wider than 880px, where it can draw the wires. */
.flow:not(.wired) { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px 18px 34px; }
.flow:not(.wired)::before { content: ''; position: absolute; left: 15px; top: 24px; bottom: 24px; width: 3px; background: var(--wire); box-shadow: 0 0 0 1.5px var(--ink); }
.flow:not(.wired) .flow-wires, .flow:not(.wired) .port { display: none; }
.flow:not(.wired) .flow-source, .flow:not(.wired) .flow-rows { gap: 12px; }
.flow:not(.wired) .flow-rows { counter-reset: branch; }
.flow:not(.wired) .flow-row { position: relative; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); counter-increment: branch; }
/* Each row is a branch off the rail, not the next step of one serial chain. */
.flow:not(.wired) .flow-row::before { content: 'Branch ' counter(branch); font-family: var(--font); font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.flow:not(.wired) .flow-row::after { content: ''; position: absolute; left: -19px; top: 17px; width: 14px; height: 3px; background: var(--wire); box-shadow: 0 0 0 1.5px var(--ink); }
.flow:not(.wired) .flow-branch { flex-direction: column; align-items: stretch; gap: 8px; }
.flow:not(.wired) .flow-pass { padding: 0; }
.flow:not(.wired) .flow-source .fnode + .fnode::before { top: -13px; height: 12px; }
@media print {
    .flow-wires, .port { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .flow-wires .wire-dash { animation: none; display: none; }
}

/* B2. Category chips before processor names in lists. Text stays ink. */
.cat-chip { white-space: nowrap; }
.cat-chip::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: 0; background: var(--c); border: 1.5px solid var(--ink); }

/* B3. Audience cards as nodes: category header strip, port dot, lift on hover. */
.clarity-audience-grid .clarity-audience.node-card { padding: 0; overflow: hidden; border: var(--node-outline); border-top: var(--node-outline); border-radius: 6px; box-shadow: var(--node-shadow); transition: transform .16s ease, box-shadow .16s ease; }
.node-card .clarity-card-index { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 14px; border-bottom: var(--node-outline); background: var(--c); color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 700; }
.node-card.on-dark .clarity-card-index { color: #fff; }
.node-card .clarity-card-index::after { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-strong); border: var(--node-outline); transition: background .16s ease; }
.node-card h3, .node-card p, .node-card .clarity-link { margin-inline: 18px; }
.node-card h3 { margin-top: 16px; }
.node-card .clarity-link { margin-bottom: 18px; }
.clarity-audience-grid .clarity-audience.node-card:hover, .clarity-audience-grid .clarity-audience.node-card:focus-visible { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: 5px 5px 0 var(--ink); background: var(--paper-strong); }
.node-card:hover .clarity-card-index::after, .node-card:focus-visible .clarity-card-index::after { background: var(--ink); }
.lead-band-copy .clarity-card-index { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: var(--node-outline); border-radius: 4px; box-shadow: var(--node-shadow); background: var(--c); color: var(--ink); font-family: var(--font); font-size: var(--fs-label); font-weight: 700; }
.lead-band-copy .clarity-card-index.on-dark { color: #fff; }
.lead-band-copy .clarity-card-index::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--paper-strong); border: var(--node-outline); }
@media (prefers-reduced-motion: reduce) {
    .clarity-audience-grid .clarity-audience.node-card { transition: none; }
    .clarity-audience-grid .clarity-audience.node-card:hover, .clarity-audience-grid .clarity-audience.node-card:focus-visible { transform: none; }
}

/* B4. Node-colour divider. */
.node-divider { display: flex; height: 6px; margin: 0 0 32px; border: var(--node-outline); box-shadow: var(--node-shadow); }
.node-divider i { flex: 1; background: var(--c); }
.lead-bands .lead-band:first-child { border-top: 0; padding-top: 0; }

/* B5. The one sticker (homepage only). */
.sticker { display: inline-block; margin-left: 14px; padding: 7px 10px 6px; border: var(--node-outline); border-radius: 6px; box-shadow: var(--node-shadow); background: var(--cat-plugin); color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1; white-space: nowrap; vertical-align: .35em; transform: rotate(-5deg); }

/* B6. The 404 page: an unpatched output. */
.nf-page { width: min(1120px, calc(100% - 96px)); margin: 0 auto; padding-block: 64px 80px; }
.nf-canvas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 40px 32px; border: 1px solid var(--ink); border-radius: 8px; background: radial-gradient(circle, #22212614 1px, transparent 1.2px) 0 0 / 16px 16px, var(--paper-strong); }
.nf-code { margin: 0; font-family: var(--font); font-size: clamp(88px, 14vw, 168px); font-weight: 800; line-height: .9; letter-spacing: -.06em; color: var(--ink); text-shadow: 5px 5px 0 var(--pink); }
.nf-title { margin: 22px 0 10px; font-family: var(--font); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.nf-copy { margin: 0 0 24px; font-size: 15px; line-height: 1.65; color: var(--text-secondary); max-width: 44ch; }
.nf-links { margin-top: 18px; font-size: 14px; }
.nf-links a { text-decoration: underline; text-underline-offset: 4px; margin-right: 18px; }
.nf-art { width: 100%; height: auto; max-width: 440px; justify-self: center; overflow: visible; }
.nf-cable { transform-origin: 136px 82px; animation: nf-sway 3.2s ease-in-out infinite; }
@keyframes nf-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .nf-cable { animation: none; } }
@media (max-width: 760px) {
    .nf-page { width: calc(100% - 40px); padding-block: 36px 56px; }
    .nf-canvas { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; }
    .nf-art { order: -1; max-width: 320px; }
}
.clarity-audience-grid .clarity-audience.node-card, .other-workflows .clarity-audience-grid .clarity-audience.node-card { border-top-color: var(--ink); }
.node-card .clarity-card-index { align-self: stretch; }
.compare-table code { white-space: nowrap; font-size: var(--fs-small); }
/* A one-competitor table fits a phone without sideways scrolling. */
@media (max-width: 600px) {
    .compare-table.compare-table--two { min-width: 0 !important; }
    .compare-table--two tbody th { min-width: 0; }
}

/* Homepage command-line band: a Batchy node holding a real docs command. */
.cli-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.cli-copy { min-width: 0; }
.cli-copy h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.05em; margin: 10px 0 0; }
.cli-points { list-style: none; margin: 18px 0 20px; padding: 0; }
.cli-points li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.cli-points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border: 1.5px solid var(--ink); background: var(--cat-utility); }
.cli-points code { font-family: var(--font); font-size: 13px; }
.cli-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; font-size: 14px; }
.cli-links a:not(.clarity-link) { text-decoration: underline; text-underline-offset: 4px; }
.cli-terminal { margin: 0; overflow: visible; }
.cli-terminal .fnode-head { border-radius: 4px 4px 0 0; }
.cli-code { margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 0 0 5px 5px; background: var(--ink); color: #f1eef3; font-family: var(--font); font-size: 12.5px; line-height: 1.75; }
.cli-code code { font: inherit; color: inherit; white-space: pre; }

/* Landing pages: quiet routes to the main site. */
.lp-overview-link { margin-top: 12px; font-size: 14px; }
.lp-overview-link a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lp-toolkit { padding-block: 40px; }
.toolkit-card .fnode-body { padding: 20px 24px 22px; color: var(--text-secondary); }
.toolkit-card h2 { font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -.04em; color: var(--ink); margin-bottom: 8px; }
.toolkit-card p { font-size: 15px; line-height: 1.65; max-width: 72ch; }
.toolkit-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; }
.toolkit-links a { color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 880px) {
    .cli-band { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
    .cli-code { font-size: 13px; padding: 14px; }
    .toolkit-card .fnode-body { padding: 16px 16px 18px; }
}

/* ------------------------------------------------------------------
   Mobile QA pass (2026-09-26).
   ------------------------------------------------------------------ */

/* M1. Consent banner: site button system, Accept and Decline equally prominent,
   compact on phones, and space reserved so it never hides page content. */
#cookie-consent-banner { background: var(--paper-strong); color: var(--ink); border-top: 1.5px solid var(--ink); box-shadow: 0 -4px 20px #22212612; padding: 12px 24px; }
.consent-inner { gap: 12px 20px; }
.consent-inner p { font-size: 14px; line-height: 1.5; }
.consent-inner a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#cookie-consent-banner .consent-btn { min-height: 44px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 5px; box-shadow: 2px 2px 0 var(--ink); background: var(--paper-strong); color: var(--ink); font: 700 14px/1.2 var(--font-body); }
#cookie-consent-banner .consent-btn:hover { background: var(--paper-muted); color: var(--ink); }
#cookie-consent-banner .consent-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
#cookie-consent-banner .consent-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
body:has(#cookie-consent-banner) { padding-bottom: 80px; }
@media (max-width: 600px) {
    #cookie-consent-banner { padding: 8px 12px; font-size: 13px; }
    #cookie-consent-banner .consent-inner { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; text-align: left; }
    #cookie-consent-banner .consent-inner p { flex: 1 1 auto; font-size: 13px; line-height: 1.3; }
    #cookie-consent-banner .consent-buttons { width: auto; flex: none; gap: 6px; }
    #cookie-consent-banner .consent-btn { min-height: 44px; padding: 6px 10px; font-size: 13px; }
    body:has(#cookie-consent-banner) { padding-bottom: 100px; }
}
@media (max-width: 380px) {
    #cookie-consent-banner .consent-inner { flex-direction: column; align-items: stretch; gap: 8px; }
    #cookie-consent-banner .consent-buttons { display: grid; grid-template-columns: 1fr 1fr; }
    body:has(#cookie-consent-banner) { padding-bottom: 124px; }
}
/* W6 (owner decision D3=b): from 769px up the banner is a compact card at the bottom left, so it
   never covers the page's call to action. Same copy, same two equal buttons, same behaviour. */
@media (min-width: 769px) {
    #cookie-consent-banner { right: auto; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--ink); border-radius: 7px; box-shadow: 2px 2px 0 var(--ink), var(--shadow-soft); }
    #cookie-consent-banner .consent-inner { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; }
    #cookie-consent-banner .consent-inner p { flex: 0 1 auto; }
    #cookie-consent-banner .consent-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    #cookie-consent-banner .consent-btn:active { transform: none; }
}

/* M2, M3, N2, N3. Docs on phones. */
.doc-table td code { white-space: normal; overflow-wrap: anywhere; }
.guide-steps-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide-steps-nav a { text-align: center; }
@media (max-width: 768px) {
    .docs-sidebar { visibility: hidden; transition: left .3s ease, visibility 0s linear .3s; }
    .docs-sidebar.open { visibility: visible; transition: left .3s ease; }
    .docs-content { padding-bottom: 88px; }
}
@media (max-width: 420px) {
    .guide-steps-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* S2. Comparison table on phones. */
.compare-swipe { display: none; margin: 0 0 8px; font-family: var(--font); font-size: var(--fs-label); font-weight: 700; color: var(--text-secondary); text-align: right; }
.compare-swipe.is-overflowing { display: block; }
@media (max-width: 600px) {
    .compare-table { font-size: 13px; }
    .compare-table tbody th, .compare-table thead th:first-child { width: 112px; min-width: 112px; max-width: 112px; }
    .compare-swipe { display: block; }
    .compare-scroll { background: linear-gradient(to left, var(--paper-strong) 30%, #fff0) left center / 40px 100% no-repeat local, linear-gradient(to left, #2221261f, #22212600) right center / 16px 100% no-repeat scroll, var(--paper-strong); }
}

/* S3. Tap targets of at least 44px on phones, without moving the layout. */
@media (max-width: 768px) {
    body > footer .footer-column li a, body > footer .footer-legal > a, body > footer .footer-link-btn { display: inline-block; padding-block: 12px; margin-block: -6px; }
    .workflow-links a { padding-block: 10px; }
    .clarity-link, .audience-text-link, .lp-overview-link a, .toolkit-links a, .license-includes a, .cli-links a, .clarity-owner { display: inline-block; padding-block: 12px; margin-block: -12px; }
    .clarity-owner { margin-block: 0 -12px; }
}

/* S4. Secondary text no smaller than 13px on phones. */
@media (max-width: 600px) {
    .clarity-meta, .clarity-owner, .audience-purchase-note, figcaption, .flow-figure figcaption, .lead-band figcaption, .capability-media figcaption,
    .clarity-video figcaption, .audience-hero-proof figcaption, .flow-spec, .fnode .flow-spec, .flow-pass, .lp-note, .compare-sources, .compare-trademarks,
    body > footer, body > footer p, body > footer .footer-column a, body > footer .footer-link-btn, .footer-bottom { font-size: 13px; }
}

/* S5. Tablet: centred rail diagrams and two-up steps. */
.flow:not(.wired) { max-width: 560px; margin-inline: auto; }
@media (min-width: 700px) and (max-width: 1000px) {
    .how-steps, .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
}

/* N4. Mobile nav: lock page scroll and dim the page while the menu is open. */
@media (max-width: 768px) {
    body:has(#nav-toggle:checked) { overflow: hidden; }
    body:has(#nav-toggle:checked)::after { content: ''; position: fixed; inset: 0; z-index: 90; background: #22212640; }
}

/* N6. Full-width primary button in the price card on phones. */
@media (max-width: 520px) {
    .clarity-price .btn-primary { display: block; width: 100%; text-align: center; }
}
/* The banner takes focus programmatically for screen readers; its buttons carry the visible focus ring. */
#cookie-consent-banner:focus { outline: none; }
/* Smallest phones: keep the hero CTA above the fold on 320 x 568. */
@media (max-width: 360px) {
    .clarity-hero-grid { padding-top: 22px; }
    .audience-hero { padding-top: 24px; }
    .clarity-hero h1, .audience-page h1 { font-size: 26px; margin: 12px 0 14px; }
    .clarity-hero .clarity-lede, .audience-page .audience-lede { font-size: 15px; line-height: 1.55; }
    .clarity-actions, .audience-actions { margin-block: 18px 12px; margin-top: 18px; }
}
/* N7. On phones the sticker sits under the heading so the heading itself can balance. */
@media (max-width: 520px) {
    #deliverables h2 .sticker { display: table; margin: 10px 0 0; }
}
/* Docs on phones: wide reference tables scroll inside their own box, and the floating
   menu button rides above the consent banner while it is showing. */
@media (max-width: 768px) {
    .details-content .doc-table { display: block; max-width: 100%; overflow-x: auto; }
    body:has(#cookie-consent-banner) .sidebar-toggle { bottom: calc(100px + 1.25rem); }
}
@media (max-width: 380px) {
    body:has(#cookie-consent-banner) .sidebar-toggle { bottom: calc(132px + 1.25rem); }
}

/* Banked product loops: videos in media slots, with a pause control. */
.media-crop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capability-media { position: relative; }
.capability-media > video { display: block; width: 100%; height: auto; border: var(--border); border-radius: 7px; box-shadow: var(--shadow-soft); background: #1d1c21; }
.capability--wide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.capability--wide .capability-copy { order: 0; }
.loop-toggle { position: absolute; right: 10px; top: 10px; z-index: 2; min-height: 32px; padding: 5px 10px; border: 1px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 0 var(--ink); background: var(--paper-strong); color: var(--ink); font: 700 12px/1.2 var(--font-body); cursor: pointer; opacity: .92; }
.loop-toggle:hover, .loop-toggle:focus-visible { opacity: 1; }
.loop-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 768px) {
    .loop-toggle { min-height: 44px; min-width: 44px; }
}
.dsp-node-card--info { cursor: default; border-left-style: dashed; }
.dsp-node-card--info:hover { box-shadow: none; border-color: var(--line); border-left-color: var(--accent); }
