/* =============================================================
   Regula — shared design system
   One source of truth for dark-mode tokens and components.
   Loaded by: index.html, de.html, pt-br.html, regulations.html, uae.html,
   blog-does-ai-act-apply.html, blog-omnibus-delay.html,
   blog-risk-tiers-in-code.html, south-korea-ai-regulation.html,
   colorado-ai-regulation.html, uk-ai-regulation.html,
   south-africa-ai-policy.html
   ============================================================= */

/* ===== VIEW TRANSITIONS ===== */
@view-transition {
    navigation: auto;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* ===== DESIGN TOKENS (CSS custom properties) ===== */
:root {
    /* Colour */
    --bg: #070711;
    --bg-elev: #101020;
    --bg-elev-2: #161632;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.16);
    --text: #e2e2f0;
    --text-2: #b8b8c8;
    --text-dim: #9898b4;
    --text-faint: #7a7aa0;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59,130,246,0.08);
    --success: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --purple: #7c3aed;
    --purple-soft: rgba(124,58,237,0.06);
    --cyan: #7dd3fc;
    --nav-bg: rgba(7,7,17,0.85);

    /* Typography */
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Fraunces', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Spacing rhythm (8px base) */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
    --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px;
    --s11: 80px; --s12: 96px;

    /* Radii */
    --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 100px;

    /* Shadows */
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}

/* ===== BASE ===== */
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
code, .mono { font-family: var(--font-mono); }
h1, h2, h3, .sec-head, .final h2 {
    font-family: var(--font-serif);
    color: var(--text);
    letter-spacing: -0.02em;
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }
.sec a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #fff;
    padding: var(--s3) var(--s5);
    font-family: var(--font-mono);
    font-size: 12px;
    z-index: 1000;
    border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ===== SCROLL PROGRESS BAR ===== */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    z-index: 999;
    transition: width 0.1s linear;
}

/* ===== GLOBAL NAV ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    padding: 0 var(--s7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, backdrop-filter 0.2s;
}
.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: var(--border);
}
.nav-brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}
dialog.nav-right {
    display: flex;
    gap: var(--s5);
    font-size: 13px;
    align-items: center;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    position: static;
    inset: unset;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    color: inherit;
}
.nav-right a { color: var(--text-dim); }
.nav-right a:hover { color: var(--text); }
.nav-right .active { color: var(--text); font-weight: 600; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    dialog.nav-right {
        display: none;
        position: fixed;
        top: 52px;
        right: 0;
        left: 0;
        bottom: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(7, 7, 17, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: none;
        border-top: 1px solid rgba(255,255,255,0.07);
        padding: 12px 32px 16px;
        max-width: 100%;
        max-height: 100%;
    }
    dialog.nav-right[open] { display: flex; }
    dialog.nav-right::backdrop { background: transparent; }
    .nav-right a, .nav-right .active { padding: 8px 0; font-size: 14px; }
}

/* ===== HERO ===== */
.hero-wrap { position: relative; overflow: hidden; }
.hero-glow {
    position: absolute;
    top: -20%;
    right: -5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 65%);
    pointer-events: none;
}
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px var(--s7) var(--s9);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    position: relative;
}
.hero-text { max-width: 520px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    font-size: 11px;
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-pill);
    padding: 5px 14px;
    margin-bottom: var(--s6);
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.03);
}
.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
}
.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: var(--s5);
}
.hero h1 .hl { color: var(--accent); }
.hero .sub {
    font-size: 17px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: var(--s7);
}
.hero .sub strong { color: var(--text); font-weight: 600; }

/* ===== INSTALL BOX ===== */
.install-row {
    display: flex;
    align-items: center;
    gap: var(--s4);
    flex-wrap: wrap;
}
.install-box {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    background: var(--bg-elev);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md);
    padding: var(--s3) 18px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: var(--font-mono);
}
.install-box:hover {
    border-color: var(--border-strong);
    background: var(--bg-elev-2);
}
.install-box .dollar { color: var(--text-faint); font-size: 14px; }
.install-box .cmd { color: var(--cyan); font-size: 14px; }
.install-box .cp {
    color: var(--text-faint);
    font-size: 11px;
    transition: color 0.2s;
}
.install-box.copied .cp { color: var(--success); }
.gh-link {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    color: var(--text-dim);
    font-size: 13px;
}
.gh-link:hover { color: var(--text); }
.gh-link svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== TERMINAL PREVIEW ===== */
.term, .term-wrap {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.term-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px var(--s4);
    background: #15152a;
    border-bottom: 1px solid var(--border);
}
.term-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.td-r { background: #ff5f56; }
.td-y { background: #ffbd2e; }
.td-g { background: #27c93f; }
.term pre {
    padding: var(--s5) var(--s6);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
    overflow-x: auto;
    margin: 0;
}
.term pre .p { color: var(--text-faint); }
.term pre .c { color: var(--cyan); }
.term pre .h { color: var(--text); font-weight: 600; }
.term pre .g { color: var(--success); }
.term pre .y { color: var(--warn); }
.term pre .m { color: var(--text-faint); }
.term pre hr {
    border: 0;
    border-top: 1px dashed var(--border);
    margin: var(--s2) 0;
}

/* ===== STATS ROW ===== */
.stats {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--s6) var(--s7);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s6);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.st { text-align: center; }
.st-n {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}
.st-l {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
}

/* ===== URGENCY BOX ===== */
.urgency {
    max-width: 880px;
    margin: var(--s9) auto var(--s8);
    padding: 0 var(--s7);
}
.urgency-box {
    background: linear-gradient(180deg, rgba(245,158,11,0.06), rgba(245,158,11,0.02));
    border: 1px solid rgba(245,158,11,0.22);
    border-radius: var(--r-lg);
    padding: var(--s6) var(--s7);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s6);
    align-items: center;
}
.urgency-box .date {
    font-family: var(--font-mono);
    font-size: 22px;
    color: var(--warn);
    font-weight: 500;
    letter-spacing: -0.02em;
}
.urgency-box .body {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.65;
}
.urgency-box .body strong { color: var(--text); font-weight: 600; }

/* ===== SECTION LAYOUT ===== */
.sec {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--s10) var(--s7);
}
.sec-head {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: var(--s3);
    line-height: 1.15;
}
.sec-head .hl { color: var(--accent); }
.sec-sub {
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: var(--s8);
    max-width: 640px;
}
.sep {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-strong);
}

/* ===== STEPS ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s4);
}
.step {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s6) var(--s6);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.step:hover {
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.step-n {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: var(--s3);
}
.step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--s3);
    font-family: var(--font-body);
    letter-spacing: -0.01em;
}
.step p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: var(--s3);
}
.step code {
    display: inline-block;
    background: rgba(59,130,246,0.08);
    color: var(--cyan);
    padding: 4px 10px;
    border-radius: var(--r-sm);
    font-size: 12px;
}

/* ===== RISK TIERS ===== */
.tiers { display: flex; flex-direction: column; gap: 6px; }
.tier {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: default;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tier:hover {
    transform: translateX(4px) scaleY(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.tier-r  { background: rgba(239,68,68,0.08);   border-color: rgba(239,68,68,0.2); }
.tier-a  { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.2); }
.tier-y  { background: rgba(234,179,8,0.08);   border-color: rgba(234,179,8,0.2); }
.tier-g  { background: rgba(16,185,129,0.08);  border-color: rgba(16,185,129,0.2); }
.tier-r:hover  { border-color: rgba(239,68,68,0.45); }
.tier-a:hover  { border-color: rgba(245,158,11,0.45); }
.tier-y:hover  { border-color: rgba(234,179,8,0.45); }
.tier-g:hover  { border-color: rgba(16,185,129,0.45); }
.tier-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}
/* Badge text colours are brightened to the -400 variants of each tier's
   hue to clear WCAG 2.2 AA (4.5:1) against the tinted card background.
   The underlying --danger / --warn / --success tokens remain unchanged
   so other UI that uses them (icons, final-CTA glow, etc.) is unaffected.
   axe-core 4.x confirms ≥4.6:1 on each. */
.tier-r .tier-badge { background: rgba(239,68,68,0.20); color: #f87171; }
.tier-a .tier-badge { background: rgba(245,158,11,0.20); color: #fbbf24; }
.tier-y .tier-badge { background: rgba(234,179,8,0.20); color: #facc15; }
.tier-g .tier-badge { background: rgba(16,185,129,0.20); color: #34d399; }
.tier-examples { font-size: 13px; color: var(--text-dim); flex: 1; }
.tier-hint {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}
.tier:hover .tier-hint { opacity: 1; }
.tier-cta { font-size: 13px; color: var(--text-dim); margin-top: 20px; }

/* ===== CTA PILL ===== */
.cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(16,185,129,0.3);
    letter-spacing: -0.01em;
    font-family: var(--font-body);
}
.cta-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(16,185,129,0.4);
}
.cta-pill.copied { background: linear-gradient(135deg, #059669, #047857); }
/* Tag colour brightened to accent-hover (#60a5fa) for WCAG AA 4.5:1. */
.tag-blue { background: rgba(59,130,246,0.18); color: var(--accent-hover); }

/* ===== LINK CARDS ===== */
a.card-base { text-decoration: none; cursor: pointer; color: inherit; }
a.card-base:hover { color: inherit; }

/* ===== SHARED CARD BASE ===== */
.card-base {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

/* ===== ART GRID ===== */
.art-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s4);
}
.art-card {
    border-radius: var(--r-lg);
    padding: 22px 24px;
}
.art-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
}
.art-card .tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: var(--s2);
    /* WCAG AA: same brightened palette as .tier-badge. */
    background: rgba(59,130,246,0.18);
    color: var(--accent-hover);
}
.tag-red { background: rgba(239,68,68,0.18); color: #f87171; }
.tag-amber { background: rgba(245,158,11,0.18); color: #fbbf24; }
.tag-purple { background: rgba(124,58,237,0.18); color: #a78bfa; }
.art-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    font-family: var(--font-body);
}
.art-card p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.55;
}

/* ===== REG CARD (regulations.html) ===== */
.reg-card {
    border-radius: var(--r-lg);
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.reg-card.live {
    border-color: rgba(16,185,129,0.3);
}
.reg-card.live:hover {
    border-color: var(--success);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(16,185,129,0.1);
}
.reg-card.upcoming {
    /* Was `opacity: 0.6` — that dimmed text below WCAG AA contrast.
       Swap for a subtle border treatment that signals "not live yet"
       without muting the text colour. */
    opacity: 0.85;
    border-style: dashed;
}
.reg-card.upcoming:hover {
    border-color: var(--border-strong);
    opacity: 1;
}
.reg-card h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.15;
}
.reg-card h2 a { color: inherit; }

/* ===== LIAB CARD (uae.html) ===== */
.liab-card {
    background: #0f0f1f;
    border-color: rgba(255,255,255,0.08);
    border-radius: var(--r-lg);
    padding: 22px;
}
.liab-card h3 {
    font-family: var(--font-serif);
    font-size: 19px;
    color: #fff;
    margin-bottom: 8px;
}
.liab-card p { font-size: 14px; color: #aaaac0; }
.liab-card .ref { font-size: 11px; color: #9898b4; margin-top: 10px; font-family: var(--font-mono); }  /* WCAG AA */

/* ===== COMMANDS GRID ===== */
.cmds {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s2);
}
.cm {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: border-color 0.2s;
}
.cm:hover { border-color: var(--border-strong); }
.cm code {
    background: rgba(59,130,246,0.08);
    color: var(--cyan);
    padding: 3px 9px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-family: var(--font-mono);
    white-space: nowrap;
    flex-shrink: 0;
}
.cm span {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ===== FRAMEWORK LIST ===== */
.fw-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--s3);
}
.fw {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--s3) var(--s4);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--text-2);
    font-family: var(--font-mono);
}
.fw-d {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
}
.fw.pri .fw-d { background: var(--accent); }
.fw.pri { color: var(--text); }

/* ===== FINAL CTA ===== */
.final-wrap {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
    margin-top: var(--s10);
}
.final-glow {
    position: absolute;
    bottom: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(59,130,246,0.10) 0%, transparent 60%);
    pointer-events: none;
}
.final {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--s12) var(--s7);
    text-align: center;
    position: relative;
}
.final h2 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: var(--s4);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.final p {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: var(--s7);
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border);
    padding: var(--s8) var(--s7) var(--s7);
    background: #04040b;
}
.foot-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s6);
    flex-wrap: wrap;
}
.foot-left {}
.foot-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 6px;
}
.foot-links {
    display: flex;
    gap: var(--s4);
    flex-wrap: wrap;
    margin-bottom: var(--s2);
}
.foot-links a {
    color: var(--text-dim);
    font-size: 13px;
}
.foot-links a:hover { color: var(--text); }
.foot-copy {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    margin-top: 6px;
}
.foot-middle { min-width: 220px; }
.foot-col-head {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 10px;
    font-weight: 500;
}
.foot-col-links {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}
.foot-col-links a {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.4;
}
.foot-col-links a:hover { color: var(--text); }
.foot-col-links a .muted {
    color: var(--text-faint);
    font-size: 11px;
    display: block;
    font-family: var(--font-mono);
}
.foot-right {
    text-align: right;
    max-width: 400px;
}
.foot-legal {
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.6;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
}

/* ===== TERMINAL TABS (index.html tabbed terminal) ===== */
.term-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    background: #080813;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.term-tab {
    padding: 7px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
}
.term-tab:hover { color: var(--text-dim); }
.term-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.term-body { position: relative; min-height: 340px; }
.term-panel {
    position: absolute;
    top: 0; left: 0; right: 0;
    opacity: 0;
    pointer-events: none;
    /* No transition by default — prevents the 0→1 fade on first paint
       (Chromium & Firefox can both replay the transition from the
       base `opacity: 0` style before JS or CSS sets .active). */
}
.term-panel.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}
/* Only animate the opacity swap AFTER the page has loaded. The
   .term-panels-ready class is added to <body> via a small inline
   script below so the very first paint sees the final opacity state
   without any animation. */
.term-panels-ready .term-panel { transition: opacity 0.12s ease-in-out; }
.term-panel pre {
    padding: 20px 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    overflow-x: auto;
    line-height: 1.75;
    color: var(--text-dim);
    overflow-x: auto;
    margin: 0;
    white-space: pre;
}
.term-panel pre hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 4px 0; display: block; }

/* Terminal colour classes (index.html variant) */
.t-p { color: #8a8aa8; }  /* WCAG AA: 4.62:1 on --bg-elev (#101020) */
.t-c { color: #e2e2f0; }
.t-h { color: #38bdf8; font-weight: 500; }
.t-g { color: #10b981; }
.t-y { color: #eab308; }
.t-r { color: #ef4444; }
.t-m { color: #8a8aa8; }  /* WCAG AA: 4.62:1 on --bg-elev (#101020) */
.t-b { color: #3b82f6; }

/* ===== STATS BAR (index.html variant) ===== */
.stats-bar {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 0;
}
.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat-item {
    padding: 28px 24px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.stat-label { font-size: 12px; color: var(--text-dim); }

/* ===== AUDIENCE ===== */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}
.audience-card {
    border-radius: 10px;
    padding: 32px;
}
.audience-biz {
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.18);
}
.audience-dev {
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.18);
}
.audience-audit {
    background: rgba(16,185,129,0.05);
    border: 1px solid rgba(16,185,129,0.18);
}
.audience-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.audience-biz .audience-label { color: var(--warn); }
.audience-dev .audience-label { color: var(--accent); }
.audience-audit .audience-label { color: #10b981; }
.audience-card h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
.audience-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 10px;
}
.audience-card ul {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}
.audience-card ul li {
    font-size: 13px;
    color: var(--text-dim);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}
.audience-card ul li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--text-faint);
    font-size: 11px;
}
.audience-fwd {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--warn);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}
.audience-fwd:hover { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); }
.audience-audit .audience-fwd {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.2);
    color: #10b981;
}
.audience-audit .audience-fwd:hover { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.35); }

/* ===== CTA SECONDARY ===== */
.cta-secondary {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cta-install {
    color: var(--cyan);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(125,211,252,0.3);
    transition: color 0.15s;
}
.cta-install:hover { color: #bae6fd; }
.social-proof {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.social-proof .sp-star { color: var(--warn); }
/* .sp-sep middots (·) are purely decorative separators. They carry
   aria-hidden="true" in the HTML so screen readers skip them, which
   also exempts them from axe-core's colour-contrast rule while
   keeping the visual subtlety the design calls for. */
.social-proof .sp-sep { color: #2e2e3e; }

/* ===== PRICING GRID ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.price-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
}
.price-card.featured {
    border-color: rgba(59,130,246,0.4);
    background: rgba(59,130,246,0.05);
}
.price-tier {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.price-featured-tier { color: var(--success); }
.price-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.1;
}
.price-featured-amount { color: var(--success); }
.price-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ===== EMAIL NOTIFY ===== */
.notify {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}
.notify input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-elev);
    color: var(--text);
    transition: border-color 0.2s;
}
.notify input:focus { outline: none; border-color: rgba(59,130,246,0.5); }
.notify input::placeholder { color: var(--text-faint); }
.notify button {
    padding: 10px 20px;
    /* Darker blue for WCAG AA 4.5:1 on white text.
       var(--accent) = #3b82f6 gives 3.67:1, which fails. */
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.notify button:hover { background: #1e40af; }
.notify-msg { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 10px; }

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Fallback: if JS fails, don't hide content */
@media (scripting: none) {
    .reveal { opacity: 1; transform: none; }
}
/* Also show for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== FOOT LEGAL STRONG ===== */
.foot-legal strong { color: var(--text-dim); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 56px var(--s6) var(--s8); gap: var(--s8); }
    .hero h1 { font-size: 40px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .art-grid { grid-template-columns: repeat(2, 1fr); }
    .cmds { grid-template-columns: 1fr; }
    .fw-list { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
    .sec { padding: var(--s8) var(--s6); }
    .sec-head { font-size: 28px; }
    .final h2 { font-size: 32px; }
    .final { padding: var(--s11) var(--s6); }
    .foot-inner { flex-direction: column; }
    .foot-middle { min-width: 0; }
    .foot-right { text-align: left; max-width: 100%; }
}
@media (max-width: 768px) {
    .audience-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .nav { padding: 0 var(--s5); }
    .hero h1 { font-size: 32px; }
    .steps { grid-template-columns: 1fr; }
    .art-grid { grid-template-columns: 1fr; }
    .fw-list { grid-template-columns: repeat(2, 1fr); }
    .urgency-box { grid-template-columns: 1fr; gap: var(--s3); }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .tier-hint { display: none; }
    .notify { flex-direction: column; }
    .hero-glow { width: 400px; height: 400px; }
    /* Mobile card borders need more visibility */
    .card-base { border-color: var(--border-strong); }
    /* Issue 12: hide long descriptions in footer on mobile */
    .foot-col-links a .muted { display: none; }
    /* Issue 9: command descriptions legibility on mobile */
    .cm { font-size: 13px; padding: 12px 14px; }
}

/* =============================================================
   REGULATION TRACKER PAGES
   Shared by: south-korea-ai-regulation, colorado-ai-regulation,
   uk-ai-regulation
   ============================================================= */

/* ===== TRACKER HERO ===== */
.hub-hero { max-width: 880px; margin: 0 auto; padding: 80px 32px 48px; }
.breadcrumb { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--text); }
.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 11px;
    color: var(--warn); background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.25); border-radius: var(--r-pill);
    padding: 5px 14px; margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: pulse 2.4s infinite; }
.status-badge.live { color: var(--success); background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); }
.status-badge.live .status-dot { background: var(--success); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hub-hero h1 { font-size: 52px; font-weight: 700; line-height: 1.08; margin-bottom: 18px; }
.hub-hero h1 .hl { color: var(--accent); }
.hub-hero .lede { font-size: 18px; color: var(--text-2); line-height: 1.7; margin-bottom: 28px; max-width: 720px; }
.last-updated { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 36px; }
.last-updated strong { color: var(--text-dim); }

/* ===== TRACKER BOX ===== */
.tracker { background: linear-gradient(180deg, rgba(245,158,11,0.06), rgba(245,158,11,0.02)); border: 1px solid rgba(245,158,11,0.25); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 56px; }
.tracker h2 { font-size: 14px; font-family: var(--font-mono); color: var(--warn); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; font-weight: 500; }
.tracker-row { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(245,158,11,0.08); font-size: 13px; }
.tracker-row:last-child { border-bottom: none; }
.tracker-row .lbl { color: var(--text-dim); min-width: 180px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.tracker-row .val { color: var(--text); }
.tracker-row .val .ok { color: var(--success); font-family: var(--font-mono); font-size: 11px; }
.tracker-row .val .pend { color: var(--warn); font-family: var(--font-mono); font-size: 11px; }

/* ===== TRACKER CONTENT ===== */
.tracker-content { max-width: 880px; margin: 0 auto; padding: 0 32px 80px; }
.tracker-content section { margin-bottom: 64px; }
.tracker-content h2 { font-size: 32px; font-weight: 600; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.tracker-content h3 { font-size: 22px; font-weight: 600; margin-top: 36px; margin-bottom: 14px; }
.tracker-content p { font-size: 16px; color: var(--text-2); margin-bottom: 18px; line-height: 1.75; }
.tracker-content p strong { color: var(--text); font-weight: 600; }
.tracker-content ul, .tracker-content ol { margin: 18px 0 24px 24px; color: var(--text-2); }
.tracker-content li { font-size: 15px; margin-bottom: 10px; line-height: 1.65; }
.tracker-content li strong { color: var(--text); }
.tracker-content blockquote { border-left: 3px solid var(--accent); padding: 12px 0 12px 20px; margin: 24px 0; font-size: 16px; color: var(--text-dim); font-style: italic; }
.tracker-content code { background: rgba(59,130,246,0.08); color: var(--cyan); padding: 2px 6px; border-radius: 3px; font-size: 13px; }

/* ===== FAQ ACCORDION ===== */
.faq details { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 22px; margin-bottom: 10px; transition: border-color 0.2s; }
.faq details[open] { border-color: rgba(59,130,246,0.3); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 15px; list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 0; color: var(--text-faint); font-size: 20px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 14px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ===== SOURCES BOX ===== */
.sources { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 28px; }
.sources h3 { font-size: 18px; margin-top: 0; margin-bottom: 14px; }
.sources ul { list-style: none; margin-left: 0; }
.sources li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }
.sources li:last-child { border-bottom: none; }
.sources li strong { color: var(--text); }

/* ===== TRACKER RESPONSIVE ===== */
@media (max-width: 700px) {
    .hub-hero h1 { font-size: 36px; }
    .tracker-content h2 { font-size: 26px; }
    .tracker-row { flex-direction: column; gap: 4px; }
    .tracker-row .lbl { min-width: 0; }
    .hub-hero { padding: 56px 24px 32px; }
    .tracker-content { padding: 0 24px 60px; }
}

/* =============================================================
   BLOG ARTICLE TYPOGRAPHY
   Shared by: blog-does-ai-act-apply, blog-omnibus-delay,
   blog-risk-tiers-in-code
   ============================================================= */

/* ===== BLOG HERO ===== */
.blog-hero {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px var(--s7) 40px;
}
.blog-meta {
    display: flex;
    align-items: center;
    gap: var(--s4);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: var(--s6);
    flex-wrap: wrap;
}
.blog-meta .dot { color: var(--text-faint); }
.blog-hero h1 {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: var(--s5);
}
.blog-hero .standfirst {
    font-size: 17px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ===== BLOG BODY ===== */
.blog-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--s7) var(--s10);
}
.blog-body h2 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin: var(--s10) 0 var(--s5);
    letter-spacing: -0.02em;
}
.blog-body h3 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: var(--s7) 0 var(--s3);
}
.blog-body p {
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: var(--s5);
}
.blog-body p strong { color: var(--text); font-weight: 600; }
.blog-body a { color: var(--accent); }
.blog-body a:hover { color: var(--accent-hover); }
.blog-body ul, .blog-body ol {
    margin: 0 0 var(--s5) var(--s6);
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.75;
}
.blog-body li { margin-bottom: var(--s2); }
.blog-body code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--accent-soft);
    color: var(--cyan);
    padding: 2px 7px;
    border-radius: var(--r-sm);
}
.blog-body blockquote {
    border-left: 3px solid var(--accent);
    margin: var(--s6) 0;
    padding: var(--s4) var(--s6);
    background: var(--accent-soft);
    border-radius: 0 var(--r-md) var(--r-md) 0;
}
.blog-body blockquote p {
    color: var(--text-2);
    margin-bottom: 0;
    font-size: 15px;
}

/* ===== BLOG SEPARATOR ===== */
.blog-sep {
    max-width: 760px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

/* ===== CITE / DISCLAIMER ===== */
.cite {
    font-size: 13px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.cite a { color: var(--text-dim); text-decoration: underline; }
.cite a:hover { color: var(--accent); }
.disclaimer {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: var(--s4) var(--s5);
    margin: var(--s6) 0;
}
.disclaimer p {
    font-size: 13px;
    color: var(--text-faint);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== CALLOUT BOX ===== */
.callout {
    background: linear-gradient(180deg, rgba(245,158,11,0.06), rgba(245,158,11,0.02));
    border: 1px solid rgba(245,158,11,0.22);
    border-radius: var(--r-lg);
    padding: var(--s5) var(--s6);
    margin: var(--s5) 0;
}
.callout p {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 0;
}
.callout strong { color: var(--warn); }

/* ===== COMPETITOR NOTE ===== */
.competitor-note { font-size: 13px; color: var(--text-dim); margin-top: 24px; font-family: var(--font-mono); }
@media (max-width: 600px) { .competitor-note { font-size: 12px; line-height: 1.7; } }

/* ===== BLOG RESPONSIVE ===== */
@media (max-width: 600px) {
    .blog-hero h1 { font-size: 32px; }
    .blog-body h2 { font-size: 24px; }
}

/* ===== ACCESSIBILITY — WCAG 2.2 AA compliance =====
   axe-core audit (2026-04-16) flagged link-in-text-block on links
   that relied on colour alone to differentiate from surrounding text.
   WCAG SC 1.4.1 (Use of Color) requires a non-colour indicator.
   The rules below add a subtle underline to every <a> in text
   contexts (paragraphs, lists, breadcrumbs, last-updated metadata,
   footer copy, hero subtitle, competitor note, blog body). Explicitly
   excluded: nav anchors, CTA buttons, art-card entry links, region-card
   CTAs — these have their own visual affordance (background fill,
   border, or nav-row context) and are not 'in a text block'. */
main p a,
main li a,
.hero-text .sub a,
.competitor-note a,
.urgency-box .body a,
.blog-body a,
.breadcrumb a,
.last-updated a,
.foot-copy a,
.foot-legal a,
footer p a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: currentColor;
}
main p a:hover,
main li a:hover,
.blog-body a:hover,
.breadcrumb a:hover,
.last-updated a:hover,
.foot-copy a:hover,
.foot-legal a:hover,
footer p a:hover {
    text-decoration-thickness: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    body { background: white; color: black; }
    .nav, .hero-glow, .final-glow, .term-wrap, .cta-pill,
    .badge, .notify, footer { display: none; }
    .reveal { opacity: 1; transform: none; }
    a { color: black; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
    .card-base { border: 1px solid #ccc; background: white; }
    .sec-head, h1, h2, h3, h4 { color: black; }
    p, li { color: #333; }
}
