/* ==========================================================
   PROJECT VISION · v4 · pure black & white
   Emil design-eng principles. No accent hue. Weight = emphasis.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== TOKENS ===== */
:root {
    /* Ground — deep neutral, no hue */
    --bg:          #0a0a0a;
    --bg-elev:     #101010;
    --surface:     rgba(255, 255, 255, 0.035);
    --surface-hi:  rgba(255, 255, 255, 0.06);
    --border:      rgba(255, 255, 255, 0.08);
    --border-hi:   rgba(255, 255, 255, 0.16);

    /* Text — three levels, high top-contrast */
    --text:       rgba(255, 255, 255, 0.98);
    --text-dim:   rgba(255, 255, 255, 0.62);
    --text-mute:  rgba(255, 255, 255, 0.36);

    /* Functional only */
    --ok:      #ffffff;
    --danger:  #ff5a5a;

    /* Cyan — used sparingly. Signal only: "live", "focused", "active" */
    --cyan:      #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.14);
    --cyan-ring: rgba(34, 211, 238, 0.32);

    /* Type */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

    /* Layout */
    --w: 1080px;
    --pad: clamp(20px, 4vw, 40px);
    --gap: clamp(72px, 10vw, 132px);

    /* Motion */
    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

    /* Radii */
    --r-s: 10px;
    --r-m: 14px;
    --r-l: 20px;
    --r-xl: 28px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-feature-settings: 'ss01', 'cv11';
    min-height: 100dvh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(1400px 700px at 82% -20%, rgba(34, 211, 238, 0.055), transparent 60%),
        radial-gradient(900px 500px at 0% 20%, rgba(255, 255, 255, 0.025), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Cursor follow light — soft white glow tracking mouse */
.cursor-light {
    position: fixed;
    top: 0; left: 0;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.09), rgba(255,255,255,0.025) 40%, transparent 70%);
    transform: translate3d(-9999px, -9999px, 0);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
}
.cursor-light.is-on { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor-light { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-light { display: none; } }

/* ===== LEGAL PAGE ===== */
.legal { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.h3-legal {
    font-family: var(--font);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.018em;
    color: var(--text);
    margin: 36px 0 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.h3-legal:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { padding-left: 20px; margin-top: 8px; }
.legal ul li { list-style: disc; margin-bottom: 8px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal em { color: var(--text-dim); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ===== TYPOGRAPHY ===== */
.h1 {
    font-weight: 700;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 1.02;
    letter-spacing: -0.038em;
}
.h2 {
    font-weight: 700;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.028em;
}
.h3 {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.012em;
}
.lead {
    font-size: clamp(17px, 1.7vw, 20px);
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 62ch;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--cyan-soft);
    animation: pulse 2400ms var(--ease-in-out) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ===== HEADER ===== */
.hd {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
    height: 56px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid transparent;
    transition: border-color 280ms var(--ease-out), background 280ms var(--ease-out);
}
.hd.is-scrolled {
    border-bottom-color: var(--border);
    background: rgba(10, 10, 10, 0.78);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.55));
    transition: filter 320ms var(--ease-out), transform 320ms var(--ease-spring);
}
.brand:hover .brand-mark {
    filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.9));
    transform: translateY(-1px) rotate(-2deg);
}
.brand-txt { font-weight: 600; font-size: 15px; letter-spacing: -0.012em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
    position: relative;
    padding: 7px 12px;
    border-radius: var(--r-s);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 3px;
    height: 1px;
    background: currentColor;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 280ms var(--ease-out);
    opacity: 0.55;
}
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover::after { clip-path: inset(0 0 0 0); }
}

.hd-actions { display: flex; align-items: center; gap: 8px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 200ms var(--ease-out),
        border-color 200ms var(--ease-out),
        color 200ms var(--ease-out),
        transform 280ms var(--ease-spring),
        box-shadow 280ms var(--ease-spring);
}
.btn .arr {
    display: inline-block;
    transition: transform 280ms var(--ease-spring);
}
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: scale(0.97); transition-duration: 120ms; }

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
}
.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.10), 0 2px 6px rgba(0,0,0,0.5);
}
.btn-primary:active { transform: scale(0.97) translateY(0); }

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--surface-hi);
    border-color: var(--border-hi);
    transform: translateY(-1.5px);
}
.btn-ghost:active { transform: scale(0.97); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }

/* Mobile toggle */
.mtoggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 110;
}
.mtoggle span {
    width: 20px; height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 280ms var(--ease-spring), opacity 200ms var(--ease-out);
}
.mtoggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mtoggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mtoggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== LAYOUT ===== */
main { position: relative; z-index: 1; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--gap) 0; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .h2 { margin-bottom: 12px; }

/* Numbered eyebrow above each section heading */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: rgba(103, 232, 249, 0.85);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 500;
}
.section-tag::before {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 0 96px;
    isolation: isolate;
}

/* Cinematic bg — image + dark gradient wash. Full viewport width, breaks out of .wrap */
.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: calc(100% + 60px);
    background-image:
        linear-gradient(180deg,
            rgba(10, 10, 10, 0.55) 0%,
            rgba(10, 10, 10, 0.40) 30%,
            rgba(10, 10, 10, 0.60) 70%,
            var(--bg) 100%),
        linear-gradient(90deg,
            rgba(10, 10, 10, 0.30) 0%,
            transparent 30%,
            transparent 70%,
            rgba(10, 10, 10, 0.30) 100%),
        url('image.png');
    background-size: cover, cover, cover;
    background-position: center, center, center 30%;
    background-repeat: no-repeat;
    z-index: -1;
    animation: hero-drift 24s var(--ease-in-out) infinite alternate;
    will-change: transform;
}
/* Very slow ken-burns drift for life. Preserves translateX from centering. */
@keyframes hero-drift {
    from { transform: translateX(-50%) scale(1.02); }
    to   { transform: translateX(-50%) scale(1.06); }
}

/* Fade to solid at bottom — full viewport width */
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 160px;
    background: linear-gradient(180deg, transparent, var(--bg));
    z-index: -1;
    pointer-events: none;
}

/* Fallback if the image doesn't load — solid feels intentional */
@media (max-width: 640px) {
    .hero::before { animation-duration: 40s; }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; transform: translateX(-50%) scale(1.02); }
}
.hero .eyebrow {
    margin-bottom: 32px;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-color: rgba(255,255,255,0.14);
}
.hero .h1 {
    margin-bottom: 26px;
    max-width: 14ch;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.5);
}
.hero .lead {
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.85);
}
.hero .status {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(255,255,255,0.14);
}
.hero-word { display: block; }
.hero-word-fade {
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.9) 55%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead { margin-bottom: 40px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-cta .btn { padding: 13px 24px; }

.status {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(20px);
}
.status-dot {
    width: 7px; height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--cyan-soft);
    animation: pulse 2400ms var(--ease-in-out) infinite;
}
.status-txt {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.status-txt strong {
    color: var(--text);
    font-weight: 600;
    margin-right: 6px;
}
.status-sep {
    width: 1px; height: 12px;
    background: var(--border);
}
.status-code {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-mute);
}

/* ===== CARDS ===== */
.grid {
    display: grid;
    gap: 12px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    padding: 26px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    transition:
        background 280ms var(--ease-out),
        border-color 280ms var(--ease-out),
        transform 320ms var(--ease-spring),
        box-shadow 320ms var(--ease-out);
    position: relative;
}
@media (hover: hover) and (pointer: fine) {
    .card:hover {
        background: var(--surface-hi);
        border-color: var(--border-hi);
        transform: translateY(-3px);
        box-shadow:
            0 24px 48px -24px rgba(0, 0, 0, 0.6),
            0 1px 0 0 rgba(255, 255, 255, 0.04) inset;
    }
    .card:hover .card-num {
        color: #a7f3fc;
        background: rgba(34, 211, 238, 0.10);
        border-color: rgba(34, 211, 238, 0.22);
    }
}
.card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mute);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    transition: color 260ms var(--ease-out), background 260ms var(--ease-out), border-color 260ms var(--ease-out);
}
.card-title {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.012em;
    margin-bottom: 8px;
}
.card-body {
    color: var(--text-dim);
    font-size: 14.5px;
    line-height: 1.55;
}

/* Rule row — compact card variant */
.rule {
    display: flex;
    gap: 14px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    transition: background 260ms var(--ease-out), border-color 260ms var(--ease-out), transform 300ms var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
    .rule:hover { background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-2px); }
}
.rule-dot {
    flex-shrink: 0;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-mute);
    margin-top: 8px;
    transition: background 260ms var(--ease-out), transform 300ms var(--ease-spring);
}
.rule:hover .rule-dot { background: var(--text); transform: scale(1.5); }
.rule-title {
    font-weight: 600;
    font-size: 14.5px;
    margin-bottom: 4px;
    letter-spacing: -0.005em;
}
.rule-body {
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.5;
}

/* ===== TEAM ===== */
.team-group { margin-bottom: 36px; }
.team-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.team-head h3 { font-weight: 600; font-size: 16.5px; letter-spacing: -0.012em; }
.team-count { font-size: 12.5px; color: var(--text-mute); }

.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}
.member {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    transition: background 260ms var(--ease-out), border-color 260ms var(--ease-out), transform 300ms var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
    .member:hover { background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-2px); }
}
.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #999999);
    color: #0a0a0a;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    flex-shrink: 0;
    transition: transform 380ms var(--ease-spring), box-shadow 380ms var(--ease-out);
    position: relative;
}
.member:hover .avatar { transform: rotate(-4deg) scale(1.06); }
.member-name { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.member-role { font-size: 12.5px; color: var(--text-mute); transition: color 220ms var(--ease-out); }

/* Role palette — one hue per rank, matches role-color rule */
.avatar-owner  { background: linear-gradient(135deg, #22d3ee, #0891b2); color: #04252b; box-shadow: 0 6px 14px -6px rgba(34,211,238,0.30); }
.avatar-admin  { background: linear-gradient(135deg, #ff5a5a, #b91c1c); color: #2b0505; box-shadow: 0 6px 14px -6px rgba(255,90,90,0.30); }
.avatar-mod    { background: linear-gradient(135deg, #ffa63d, #c2410c); color: #2b1a05; box-shadow: 0 6px 14px -6px rgba(255,166,61,0.30); }
.avatar-verify { background: linear-gradient(135deg, #34d399, #059669); color: #052b1a; box-shadow: 0 6px 14px -6px rgba(52,211,153,0.30); }

.role-owner  { color: rgba(126, 230, 244, 0.85) !important; }
.role-admin  { color: rgba(255, 128, 128, 0.85) !important; }
.role-mod    { color: rgba(255, 185, 110, 0.85) !important; }
.role-verify { color: rgba(110, 231, 183, 0.85) !important; }

.team-empty {
    padding: 18px;
    color: var(--text-mute);
    font-size: 13.5px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--r-m);
    text-align: center;
}
.team-empty a { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-hi); text-underline-offset: 3px; }

/* ===== STEPS — numbered onboarding row ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    position: relative;
}
.step {
    padding: 22px 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    position: relative;
    transition: background 280ms var(--ease-out), border-color 280ms var(--ease-out), transform 320ms var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
    .step:hover {
        background: var(--surface-hi);
        border-color: var(--cyan-ring);
        transform: translateY(-3px);
    }
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.22);
    color: #a7f3fc;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 16px;
    transition: transform 320ms var(--ease-spring), box-shadow 320ms var(--ease-out), color 220ms var(--ease-out);
}
.step:hover .step-num {
    color: var(--cyan);
    transform: scale(1.08);
    box-shadow: 0 0 0 5px rgba(34,211,238,0.08);
}
.step-title {
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.012em;
    margin-bottom: 6px;
}
.step-body {
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.55;
}

/* Cyan text-link — for "Les hele regelverket →" style */
.link-cyan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a7f3fc;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: color 200ms var(--ease-out);
    text-decoration: none;
}
.link-cyan::after {
    content: '→';
    display: inline-block;
    transition: transform 260ms var(--ease-spring);
}
.link-cyan:hover { color: var(--cyan); }
.link-cyan:hover::after { transform: translateX(3px); }

/* Primary button: clean white with soft cyan lift on hover */
.btn-primary { box-shadow: 0 1px 0 0 rgba(255,255,255,0.15) inset; }
.btn-primary:hover {
    box-shadow:
        0 12px 30px -8px rgba(34, 211, 238, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.5),
        0 1px 0 0 rgba(255, 255, 255, 0.15) inset;
}

/* ===== FAQ ===== */
.faq { max-width: 760px; }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 22px 4px;
    text-align: left;
    transition: color 200ms var(--ease-out);
}
.faq-q:hover { color: var(--text); }
.faq-q-text {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -0.012em;
    color: var(--text);
    transition: transform 240ms var(--ease-out);
    display: inline-block;
}
.faq-q:hover .faq-q-text { transform: translateX(3px); }
.faq-toggle {
    width: 26px; height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition:
        transform 340ms var(--ease-spring),
        color 200ms var(--ease-out),
        background 200ms var(--ease-out),
        border-color 200ms var(--ease-out);
}
.faq-q:hover .faq-toggle { color: var(--text); border-color: var(--border-hi); }
.faq-item.is-open .faq-toggle {
    transform: rotate(45deg);
    color: var(--cyan);
    background: var(--cyan-soft);
    border-color: var(--cyan-ring);
}
.faq-item.is-open .faq-q-text { color: var(--text); }

.faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 380ms var(--ease-spring);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a-inner {
    padding: 4px 42px 26px 4px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
}
.faq-a-inner a { color: #a7f3fc; text-decoration: underline; text-decoration-color: rgba(34,211,238,0.35); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 200ms var(--ease-out); }
.faq-a-inner a:hover { text-decoration-color: var(--cyan); }
.faq-a-inner strong { color: var(--text); font-weight: 600; }
.faq-a-inner p + p { margin-top: 10px; }
.faq-a-inner ul { margin: 10px 0 0; padding-left: 20px; }
.faq-a-inner li { list-style: disc; margin-bottom: 4px; }

/* ===== CTA BLOCK ===== */
.cta-block {
    text-align: center;
    padding: var(--gap) 0;
    border-top: 1px solid var(--border);
}
.cta-block .h2 { margin-bottom: 12px; }
.cta-block .lead { margin: 0 auto 28px; }

/* ===== FOOTER — 4-column grid ===== */
.ft {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    background: var(--bg-elev);
    position: relative;
    z-index: 1;
}
.ft-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.ft-brand-col { max-width: 340px; }
.ft-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ft-brand-row svg,
.ft-mark {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.4));
}
.ft-name { font-weight: 600; font-size: 14.5px; letter-spacing: -0.012em; color: var(--text); }
.ft-tag {
    font-size: 13px;
    color: var(--text-mute);
    line-height: 1.55;
}

.ft-col-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 14px;
}
.ft-col ul { display: flex; flex-direction: column; gap: 8px; }
.ft-col a {
    position: relative;
    font-size: 13.5px;
    color: var(--text-dim);
    transition: color 200ms var(--ease-out);
    display: inline-block;
    padding-bottom: 1px;
}
.ft-col a:hover { color: var(--text); }
.ft-col a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: currentColor;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 260ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .ft-col a:hover::after { clip-path: inset(0 0 0 0); }
}

.ft-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-mute);
    flex-wrap: wrap;
    gap: 12px;
}
.ft-bottom-l, .ft-bottom-r { display: flex; align-items: center; gap: 12px; }
.ft-code {
    font-family: var(--mono);
    color: var(--text-dim);
}

@media (max-width: 900px) {
    .ft-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .ft-brand-col { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 520px) {
    .ft-grid { grid-template-columns: 1fr; }
    .ft-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== REVEAL ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-spring);
    transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Hero staggered enter — no JS, using body.loaded */
.hero > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-spring);
}
.hero > *:nth-child(1) { transition-delay: 40ms; }
.hero > *:nth-child(2) { transition-delay: 120ms; }
.hero > *:nth-child(3) { transition-delay: 200ms; }
.hero > *:nth-child(4) { transition-delay: 280ms; }
.hero > *:nth-child(5) { transition-delay: 360ms; }
body.loaded .hero > * { opacity: 1; transform: none; }

/* ===== SUB-PAGE HERO ===== */
.sub-hero {
    padding: 140px 0 56px;
    position: relative;
    z-index: 1;
}
.sub-hero .h1 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 14px; }
.sub-hero .lead { max-width: 60ch; }

/* ===== FORM ===== */
.form-shell {
    max-width: 760px;
    padding: 120px var(--pad) 80px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.progress {
    position: sticky;
    top: 68px;
    z-index: 10;
    padding: 14px 18px;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    margin-bottom: 32px;
}
.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.progress-lbl { font-size: 12.5px; color: var(--text-mute); font-weight: 500; }
.progress-val { font-family: var(--mono); font-size: 12.5px; color: var(--text); font-weight: 600; }
.progress-track {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), #ffffff);
    border-radius: 999px;
    transition: width 500ms var(--ease-spring);
    box-shadow: 0 0 8px var(--cyan-soft);
}

.form-sec {
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    margin-bottom: 16px;
}
.form-sec-head {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.form-sec-title { font-weight: 600; font-size: 17px; letter-spacing: -0.012em; margin-bottom: 4px; }
.form-sec-desc { font-size: 13.5px; color: var(--text-dim); }

.q {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.q:first-of-type { padding-top: 0; }
.q:last-of-type { border-bottom: none; padding-bottom: 0; }

.q-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.q-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}
.q-icon { font-size: 15px; line-height: 1.4; filter: grayscale(0.6); opacity: 0.85; }
.q-text {
    font-weight: 500;
    font-size: 15.5px;
    letter-spacing: -0.005em;
    line-height: 1.4;
}
.q-tag {
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1;
    background: rgba(255,255,255,0.08);
    color: var(--text-dim);
    border: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: 4px;
}
.q-tag.optional { background: transparent; border-style: dashed; color: var(--text-mute); }

.q-hint {
    font-size: 13px;
    color: var(--text-mute);
    line-height: 1.5;
    margin: 0 0 12px 25px;
}
.q-input-wrap { margin-left: 25px; }

.field {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--r-s);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    letter-spacing: -0.003em;
    line-height: 1.5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.field:hover { border-color: var(--border-hi); }
.field:focus {
    border-color: var(--cyan-ring);
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px var(--cyan-soft);
}
.field::placeholder { color: var(--text-mute); }
.field.error {
    border-color: rgba(255, 90, 90, 0.55);
    background: rgba(255, 90, 90, 0.04);
}
textarea.field { resize: vertical; min-height: 104px; }
input[type="date"].field { color-scheme: dark; }

.char-count {
    text-align: right;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-mute);
    margin: 6px 0 0 25px;
}
.char-count.warn { color: var(--danger); }

.submit-area {
    text-align: center;
    padding-top: 28px;
}
.submit-area .hint {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-mute);
}

/* ===== INTRO CARD (søknad start) ===== */
.intro {
    max-width: 640px;
    margin: 0 auto;
    padding: 140px var(--pad) 80px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.intro .h1 { font-size: clamp(48px, 8vw, 84px); margin-bottom: 14px; }
.intro-tag { font-size: 15px; color: var(--text-mute); margin-bottom: 12px; }
.intro-desc { color: var(--text-dim); font-size: 16.5px; line-height: 1.55; margin: 0 auto 32px; max-width: 52ch; }

.stats {
    display: inline-flex;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    margin-bottom: 32px;
    backdrop-filter: blur(20px);
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 22px;
    min-width: 92px;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat-lbl {
    font-size: 11.5px;
    color: var(--text-mute);
    font-weight: 500;
}
.stat-val {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.012em;
}

.hint-kbd {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-mute);
}
.hint-kbd kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--surface-hi);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text);
    margin: 0 2px;
}

/* ===== SUCCESS ===== */
.success-shell {
    max-width: 560px;
    margin: 0 auto;
    padding: 140px var(--pad) 80px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 24px;
}
.success-shell p {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.6;
    margin: 16px auto 32px;
    max-width: 44ch;
}
.success-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    max-width: 440px;
    width: calc(100% - 32px);
    padding: 14px 16px;
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 90, 90, 0.36);
    border-radius: var(--r-m);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.7);
    animation: toast-in 320ms var(--ease-spring);
}
@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
.toast-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255, 90, 90, 0.16);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 14px; letter-spacing: -0.005em; margin-bottom: 2px; }
.toast-msg { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.toast-close {
    color: var(--text-mute);
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    transition: color 200ms var(--ease-out);
}
.toast-close:hover { color: var(--text); }

/* ===== FOCUS ===== */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
    .nav { display: none; }
    .mtoggle { display: flex; }
    .hd-actions .btn { display: none; }

    .nav.is-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 56px 0 0 0;
        padding: 24px 20px;
        background: rgba(10, 10, 10, 0.94);
        backdrop-filter: blur(30px) saturate(180%);
        border-top: 1px solid var(--border);
        gap: 2px;
        z-index: 90;
    }
    .nav.is-open .nav-link {
        font-size: 17px;
        padding: 14px 16px;
        border-radius: var(--r-m);
        opacity: 0;
        transform: translateY(6px);
        animation: nav-in 460ms var(--ease-out) forwards;
    }
    .nav.is-open .nav-link:nth-child(1) { animation-delay: 60ms; }
    .nav.is-open .nav-link:nth-child(2) { animation-delay: 110ms; }
    .nav.is-open .nav-link:nth-child(3) { animation-delay: 160ms; }
    .nav.is-open .nav-link:nth-child(4) { animation-delay: 210ms; }
    .nav.is-open .nav-link:nth-child(5) { animation-delay: 260ms; }
    .nav.is-open .nav-link:nth-child(6) { animation-delay: 310ms; }
    .nav.is-open .nav-link::after { display: none; }
    @keyframes nav-in { to { opacity: 1; transform: none; } }
}

@media (max-width: 640px) {
    .hero { padding: 120px 0 72px; min-height: auto; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
    .status { flex-wrap: wrap; }
    .stats { flex-wrap: wrap; }
    .stat + .stat { border-left: none; border-top: 1px solid var(--border); }
    .ft-row { flex-direction: column; }
    .ft-meta { flex-direction: column; gap: 8px; }
    .q-tag { display: none; }
    .q-hint, .q-input-wrap, .char-count { margin-left: 0; }
    .success-cta { flex-direction: column; }
}

/* ==========================================================
   RULES PAGE
   ========================================================== */

/* Reading progress bar at very top */
.read-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), #ffffff);
    z-index: 200;
    transition: width 120ms linear;
    box-shadow: 0 0 12px var(--cyan-soft);
}

/* Search field */
.search-wrap {
    position: relative;
    max-width: 520px;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-mute);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 60px 12px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    letter-spacing: -0.005em;
    outline: none;
    transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out), box-shadow 240ms var(--ease-out);
    -webkit-appearance: none;
    appearance: none;
}
.search-input::placeholder { color: var(--text-mute); }
.search-input:hover { border-color: var(--border-hi); }
.search-input:focus {
    border-color: var(--cyan-ring);
    background: var(--surface-hi);
    box-shadow: 0 0 0 3px var(--cyan-soft);
}
.search-input:focus + .search-kbd { color: var(--cyan); border-color: var(--cyan-ring); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-kbd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    padding: 3px 8px;
    background: var(--surface-hi);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    pointer-events: none;
}

/* Layout: sidebar + content */
.rules-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding-top: 32px;
    padding-bottom: 96px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 8px;
}
.toc-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-left: 12px;
}
.toc-nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border); }
.toc-link {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-mute);
    border-left: 1px solid transparent;
    margin-left: -1px;
    transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.toc-link:hover { color: var(--text); background: var(--surface); }
.toc-link.is-active {
    color: var(--text);
    border-left-color: var(--cyan);
}
.toc-num {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-mute);
    min-width: 26px;
    transition: color 200ms var(--ease-out);
}
.toc-link.is-active .toc-num { color: var(--cyan); }

/* Paragraph sections */
.rules-content { min-width: 0; }
.para {
    margin-bottom: 72px;
    scroll-margin-top: 80px;
}
.para-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.para-marker {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: -0.005em;
}
.para-title {
    font-weight: 700;
    font-size: clamp(24px, 3.2vw, 32px);
    letter-spacing: -0.024em;
    line-height: 1.1;
}
.para-intro {
    color: var(--text-dim);
    font-size: 15.5px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 60ch;
}

/* Single rule */
.r {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    margin-bottom: 12px;
    scroll-margin-top: 80px;
    transition:
        background 260ms var(--ease-out),
        border-color 260ms var(--ease-out),
        opacity 260ms var(--ease-out),
        filter 260ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .r:hover { background: var(--surface-hi); border-color: var(--border-hi); }
}
.r.is-target {
    border-color: var(--cyan-ring);
    background: var(--surface-hi);
    animation: r-flash 1400ms var(--ease-out);
}
@keyframes r-flash {
    0%   { box-shadow: 0 0 0 4px var(--cyan-soft); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.r-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.r-num {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-mute);
    background: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 999px;
    flex-shrink: 0;
    letter-spacing: 0;
    transition: color 220ms var(--ease-out), background 220ms var(--ease-out);
}
.r:hover .r-num { color: var(--cyan); background: var(--cyan-soft); }
.r.is-target .r-num { color: var(--cyan); background: var(--cyan-soft); }
.r-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.012em;
    line-height: 1.3;
}
.r-copy {
    opacity: 0;
    color: var(--text-mute);
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: opacity 200ms var(--ease-out), color 200ms var(--ease-out), background 200ms var(--ease-out);
    flex-shrink: 0;
}
.r-copy:hover { color: var(--cyan); background: var(--cyan-soft); }
@media (hover: hover) and (pointer: fine) {
    .r:hover .r-copy { opacity: 1; }
}

.r > p,
.r > ul {
    color: var(--text-dim);
    font-size: 14.5px;
    line-height: 1.6;
}
.r > p + p,
.r > p + ul,
.r > ul + p { margin-top: 10px; }
.r-list {
    padding-left: 20px;
}
.r-list li { list-style: disc; margin-bottom: 6px; }
.r strong { color: var(--text); font-weight: 600; }
.r em { color: var(--text-dim); }
.r code {
    font-family: var(--mono);
    font-size: 13.5px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
}
.r a.r-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-hi);
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms var(--ease-out);
}
.r a.r-link:hover { text-decoration-color: var(--text); }

.r-warn {
    color: var(--text) !important;
    font-weight: 600;
    padding: 1px 6px;
    background: rgba(255, 90, 90, 0.14);
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.r-note {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    background: rgba(255,255,255,0.04);
    border-left: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dim);
}
.r-note::before { content: '!'; color: var(--text); font-weight: 700; margin-right: 4px; }

.r-subhead {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin: 18px 0 8px;
    letter-spacing: -0.005em;
}

/* Cooldown grid */
.heat {
    margin-top: 18px;
    padding: 18px 20px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
}
.heat-head {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.heat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-s);
    overflow: hidden;
}
.heat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 16px;
    background: var(--bg-elev);
}
.heat-name { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.heat-time {
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.heat-row-hi { background: rgba(255,255,255,0.05); grid-column: span 2; }
.heat-row-hi .heat-time { font-size: 18px; }

/* Allow / Deny grid */
.allow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.allow {
    padding: 18px 18px 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
}
.allow-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: -0.005em;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.allow-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}
.allow-yes .allow-mark { background: rgba(255,255,255,0.14); color: var(--text); }
.allow-no  .allow-mark { background: rgba(255, 90, 90, 0.16); color: var(--danger); }
.allow-list { padding: 0; margin: 0; }
.allow-list li {
    list-style: none;
    padding: 6px 0 6px 18px;
    position: relative;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.4;
}
.allow-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 13px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-mute);
}
.allow-no .allow-list li { color: var(--text-dim); text-decoration: line-through; text-decoration-color: rgba(255, 90, 90, 0.35); text-decoration-thickness: 1px; }

/* Search filter: dim non-matching */
.r.is-hidden { display: none; }

.no-results {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-mute);
    font-size: 15px;
}
.no-results p { margin-bottom: 16px; }

/* Copy toast */
.copy-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    background: rgba(255,255,255,0.96);
    color: #0a0a0a;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    z-index: 1300;
    animation: copy-in 260ms var(--ease-spring);
}
@keyframes copy-in {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 900px) {
    .rules-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .toc {
        position: static;
        max-height: none;
        padding-right: 0;
        margin-bottom: 8px;
    }
    .toc-nav {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 4px;
        gap: 0;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .toc-nav::-webkit-scrollbar { display: none; }
    .toc-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        margin: 0;
        padding: 8px 14px;
    }
    .toc-link.is-active { border-left-color: transparent; border-bottom-color: var(--text); }
    .allow-grid { grid-template-columns: 1fr; }
    .heat-row-hi { grid-column: span 1; }
}

@media (max-width: 640px) {
    .r { padding: 18px 18px; }
    .r-copy { opacity: 1; }
    .search-kbd { display: none; }
    .para-head { flex-wrap: wrap; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 200ms !important;
    }
    .hero > *, [data-reveal] { opacity: 1 !important; transform: none !important; }
    .btn:hover, .card:hover, .rule:hover, .member:hover { transform: none !important; }
    .status-dot, .eyebrow::before { animation: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    .hd, .progress, .nav.is-open, .toast { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .hd { background: rgba(10,10,10,0.98); }
    .progress { background: var(--bg-elev); }
    .nav.is-open { background: var(--bg); }
    body::before { display: none; }
}
