/*
 * grepforge.com — hand-written CSS.
 * Story gf-07: dark-theme primary redesign.
 * gf-02 ratified hand-written CSS (see docs/stories/02_corporate_pages.md).
 * Raw hex values appear ONLY in :root variable definitions below.
 */

/* ─── Brand palette ──────────────────────────────────────────────────────── */
:root {
    /* Brand colour tokens
       Surface family re-tuned at LTS round 1 (2026-06-04): darker and
       hue-shifted toward the owner reference 053f76 (hue ~209°). */
    --brand-navy:        #041a2f;
    --brand-navy-lift:   #0a2743;
    --brand-navy-deep:   #021120;
    --brand-blue:        #1f6feb;
    --brand-blue-bright: #3b8dff;
    --brand-blue-deep:   #0d4fb5;
    --brand-mist:        #a9c5f5;
    --brand-white:       #ffffff;
    --brand-fg-muted:    #b9c5dc;
    --brand-border:      #1c344a;

    /* Validation / error tokens (not part of the brand palette) */
    --error-fg:          #ff6b6b;
    --error-bg:          #1a0a0a;
    --warn-fg:           #f5c842;
    --warn-bg:           #1a1400;

    /* Semantic aliases — every component uses these */
    --fg:          var(--brand-white);
    --fg-strong:   var(--brand-white);
    --fg-muted:    var(--brand-fg-muted);
    --bg:          var(--brand-navy);
    --bg-alt:      var(--brand-navy-lift);
    --bg-card:     var(--brand-navy-lift);
    --accent:      var(--brand-blue);
    --accent-hover: var(--brand-blue-deep);
    --accent-bright: var(--brand-blue-bright);
    --border:      var(--brand-border);
    --border-strong: var(--brand-mist);

    /* Layout */
    --maxw:   960px;
    --pad:    1rem;
    --radius: 10px;

    /* Typography */
    --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
                    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body:    "Manrope", -apple-system, BlinkMacSystemFont,
                    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono:    ui-monospace, "SFMono-Regular", "SF Mono", Menlo,
                    Consolas, "Liberation Mono", monospace;
}

/* ─── Self-hosted fonts ──────────────────────────────────────────────────── */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ─── Reset / base ───────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

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

a {
    color: var(--accent-bright);
    text-decoration: none;
}
a:hover { text-decoration: underline; color: var(--brand-mist); }
a:focus-visible {
    outline: 2px solid var(--brand-white);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Heading hierarchy */
h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.6rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--fg-strong);
    margin: 0 0 0.5rem;
}
h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.25;
    color: var(--fg-strong);
    margin: 2rem 0 0.5rem;
}
h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--fg-strong);
    margin: 0 0 0.35rem;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ─── Skip link ──────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--brand-white);
    font-family: var(--font-body);
    z-index: 200;
    border-radius: 0 0 var(--radius) 0;
    transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--brand-navy);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    position: relative;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Brand link — mark + live-text wordmark */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--brand-white);
}
.brand:hover { text-decoration: none; color: var(--brand-white); }
.brand:focus-visible {
    outline: 2px solid var(--brand-white);
    outline-offset: 3px;
    border-radius: 3px;
}

.brand-mark {
    /* viewBox 0 0 187 302 → natural ratio ~0.619; render at 28px tall */
    display: block;
    height: 28px;
    width: auto; /* preserves real 187:302 ratio */
    flex-shrink: 0;
}

.brand-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--brand-white);
    line-height: 1;
}

/* Nav */
.site-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    margin-left: 1.25rem;
    color: var(--brand-white);
    text-decoration: none;
    transition: color 0.15s;
}
.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: var(--accent-bright); text-decoration: none; }
.site-nav a:focus-visible {
    outline: 2px solid var(--brand-white);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─── Main ───────────────────────────────────────────────────────────────── */
main.container {
    padding-top: 3rem;
    padding-bottom: 4rem;
    min-height: 60vh;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
/*
 * Full-bleed hero with WebGL canvas behind the content.
 * The hero section itself is position:relative; the canvas is absolute.
 * A dark vignette gradient sits between the canvas and the text.
 */
.hero {
    position: relative;
    margin: -3rem calc(-1 * var(--pad)) 2.5rem;
    padding: 5rem var(--pad) 4.5rem;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Static gradient fallback (always present; canvas draws on top) */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--brand-navy-deep) 0%,
        var(--brand-navy) 45%,
        var(--brand-navy-lift) 100%
    );
    z-index: 0;
}

/* Dark vignette overlay — guarantees text contrast over brightest frame */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(2, 17, 32, 0.82) 0%,
        rgba(2, 17, 32, 0.55) 50%,
        rgba(2, 17, 32, 0.30) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* WebGL canvas */
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.2s ease;
}
#hero-canvas.ready { opacity: 1; }

/* Hero content sits above vignette */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 620px;
}

.hero h1 {
    font-size: 3rem;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    color: var(--brand-white);
}

/* reduced-motion: hide canvas, keep static gradient */
@media (prefers-reduced-motion: reduce) {
    #hero-canvas { display: none; }
}

/* ─── Page header (non-hero pages) ──────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }

/* ─── Lead text ─────────────────────────────────────────────────────────── */
.lead {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--fg-muted);
    max-width: 62ch;
    margin: 0 0 0.5rem;
}

/* ─── CTA row ────────────────────────────────────────────────────────────── */
.hero-cta { margin-top: 1.5rem; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    border: none;
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--brand-white);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--brand-white);
    box-shadow: 0 2px 8px rgba(31, 111, 235, 0.30);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--brand-white);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(31, 111, 235, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-bright);
    border: 1.5px solid var(--accent-bright);
}
.btn-secondary:hover {
    background: var(--bg-alt);
    color: var(--brand-white);
    text-decoration: none;
}

/* ─── Section block ──────────────────────────────────────────────────────── */
.section { margin: 2.5rem 0; }

/* ─── Two-column pair grid (gf-06 — "What we do" on /index) ─────────────── */
.pair-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.pair-grid h3 { margin-top: 0; }
@media (min-width: 720px) {
    .pair-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ─── Cards (shared chrome) ──────────────────────────────────────────────── */
/* Top-edge gradient rule */
.product-card,
.article-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(31, 111, 235, 0.10),
                0 8px 24px rgba(0, 0, 0, 0.30);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card::before,
.article-card-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright));
    border-radius: var(--radius) var(--radius) 0 0;
}
.product-card:hover,
.article-card-box:hover {
    box-shadow: 0 3px 6px rgba(31, 111, 235, 0.14),
                0 12px 32px rgba(0, 0, 0, 0.36);
    transform: translateY(-2px);
}

/* ─── Product cards ──────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 720px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-card {
    display: flex;
    flex-direction: column;
}

/* 16:9 cover image slot */
.product-card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: 3px; /* clear the gradient rule */
}
.product-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
    color: var(--brand-white);
    transition: color 0.15s;
}
.product-card:hover h2 { color: var(--accent-bright); }
.product-card h2 a {
    color: inherit;
    text-decoration: none;
}
.product-card h2 a:hover { text-decoration: none; }

/* Cards without a cover image: no top-cover override needed (handled by ::before rule) */
.product-card-no-cover .product-card-body {
    padding-top: 1.5rem;
}

.product-tagline {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--fg-muted);
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}
.product-meta {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    color: var(--fg-muted);
    font-size: 0.9rem;
}
.product-meta li { padding: 0.15rem 0; }
.link-arrow { font-weight: 600; color: var(--accent-bright); }
.link-arrow:hover { color: var(--brand-mist); }

/* ─── Lists / kv ─────────────────────────────────────────────────────────── */
.bullet-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.bullet-list li { margin: 0.4rem 0; }
.kv-list {
    margin: 0.5rem 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
}
.kv-list dt { font-weight: 600; color: var(--brand-mist); }
.kv-list dd { margin: 0; }

/* ─── Placeholder callout ────────────────────────────────────────────────── */
.placeholder-box {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    background: var(--bg-alt);
    color: var(--fg-muted);
}
.placeholder-box p { margin: 0.25rem 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--brand-navy-deep);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.25rem;
    color: var(--fg-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Footer brand cell */
.footer-brand-cell { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--brand-white);
}
.footer-brand-link:hover { text-decoration: none; color: var(--brand-white); }

.footer-mark {
    height: 22px;
    width: auto;
    flex-shrink: 0;
    display: block;
}

.footer-brand-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--brand-white);
    line-height: 1;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brand-white);
    margin: 0;
}
.footer-muted { color: var(--fg-muted); margin: 0; font-size: 0.88rem; }
.footer-heading {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-muted);
    margin: 0 0 0.5rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: 0.12rem 0; }
.footer-list a { color: var(--fg-muted); }
.footer-list a:hover { color: var(--brand-white); text-decoration: none; }
.footer-bottom {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--fg-muted);
}

/* ─── Articles — list ────────────────────────────────────────────────────── */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Article card uses the shared .article-card-box chrome */
.article-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.article-card-cover img {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.article-card-body {
    padding: 1rem 1.25rem 1.25rem;
}
.article-card-body h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--brand-white);
    transition: color 0.15s;
}
.article-card-box:hover .article-card-body h2 { color: var(--accent-bright); }
.article-card-body h2 a { color: inherit; text-decoration: none; }
.article-meta {
    color: var(--fg-muted);
    font-size: 0.88rem;
    margin: 0 0 0.5rem;
}
.article-summary {
    color: var(--fg-muted);
    margin: 0 0 0.5rem;
    max-width: 62ch;
    font-size: 0.95rem;
}
.pagination {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
.pagination-current { color: var(--fg-muted); font-size: 0.9rem; }

/* ─── Articles — detail ──────────────────────────────────────────────────── */
.article-doc { max-width: 68ch; }
.article-cover { margin: 1.5rem 0; }
.article-cover img {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.article-body h2 { margin-top: 2rem; }
.article-body h3 { margin-top: 1.5rem; }
.article-body p, .article-body li { line-height: 1.7; }
.article-body img { max-width: 100%; border-radius: var(--radius); margin: 0.5rem 0; }
.article-body figure { margin: 1.5rem 0; }
.article-body figcaption { color: var(--fg-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.article-body code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--brand-mist);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.article-body pre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    overflow-x: auto;
    color: var(--brand-mist);
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.article-body pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}
.article-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    color: var(--fg-muted);
}
.article-back { margin-top: 2.5rem; }

/* ─── Preview banner ─────────────────────────────────────────────────────── */
.preview-banner {
    border: 1px solid var(--warn-fg);
    background: var(--warn-bg);
    color: var(--warn-fg);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.preview-banner code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-family: var(--font-mono);
}

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--bg-alt);
    color: var(--fg-muted);
    max-width: 62ch;
}
.empty-state h2 { margin-top: 0; color: var(--fg-strong); }

@media (min-width: 720px) {
    .article-card {
        grid-template-columns: 260px 1fr;
        gap: 0;
        align-items: stretch;
    }
    .article-card-cover img {
        height: 100%;
        aspect-ratio: unset;
        border-radius: var(--radius) 0 0 var(--radius);
    }
    .article-card-body { padding: 1.25rem 1.5rem; }
}

/* ─── Contact form ───────────────────────────────────────────────────────── */
.contact-form {
    max-width: 56ch;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.contact-form label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--brand-mist);
}
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form select,
.contact-form textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
    color: var(--fg);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}
.contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b9c5dc' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}
.contact-form textarea {
    resize: vertical;
    min-height: 8rem;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--fg-muted);
    opacity: 0.7;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px rgba(59, 141, 255, 0.20);
}

/* Form error colours */
.form-errors, .field-error {
    color: var(--error-fg);
    font-size: 0.9rem;
    margin: 0;
}
.form-actions { margin: 0.5rem 0 0; }

/* Honeypot — visually hidden from humans, present in DOM for bots */
.honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ─── Thanks / rate-limit callouts ──────────────────────────────────────── */
.thanks-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    background: var(--bg-alt);
    color: var(--fg-muted);
}
.thanks-box h3 {
    margin-top: 0;
    color: var(--brand-white);
    font-family: var(--font-display);
    font-weight: 700;
}
/* Dark-palette amber-on-navy rate-limit variant */
.thanks-box-warning {
    border-color: var(--warn-fg);
    background: var(--warn-bg);
    color: var(--warn-fg);
}
.thanks-box-warning h3 { color: var(--warn-fg); }

/* ─── Legal documents ────────────────────────────────────────────────────── */
.legal-doc {
    max-width: 68ch;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
}
.legal-doc .effective-date {
    color: var(--fg-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 1.5rem;
}
.legal-version-tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.05rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--fg-muted);
    background: var(--bg);
    vertical-align: middle;
}
.legal-body h2 { margin-top: 2rem; }
.legal-body h3 { margin-top: 1.5rem; }
.legal-body p, .legal-body li { line-height: 1.7; }
.legal-body ul, .legal-body ol { padding-left: 1.5rem; }
.legal-body code {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--brand-mist);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.legal-body pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    overflow-x: auto;
    color: var(--brand-mist);
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.legal-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    color: var(--fg-muted);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.2rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero {
        padding: 3.5rem var(--pad) 3rem;
        min-height: 320px;
    }
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav { margin-top: 0.5rem; }
    .site-nav a { margin-left: 0; margin-right: 1rem; display: inline-block; }
    .site-footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .btn-primary, .btn-secondary {
        display: block;
        text-align: center;
        margin: 0.5rem 0;
    }
    .legal-doc { padding: 1.25rem 1rem; }
    .product-grid { grid-template-columns: 1fr; }
}
