/* ==========================================================================
   bada.news — Frosted broadcast stylesheet
   Palette: triadic (violet / amber / teal) on obsidian
   Design typography and motion excerpt: Inter" (Google Fonts. IntersectionObserver` with `threshold: 0.15`. Each card in a row should have a stagger delay of 120ms.
   ========================================================================== */

:root {
    /* Exact palette hex values from DESIGN.md */
    --base-obsidian: #0D0A1A;
    --surface-ink-smoke: #1A1530;
    --accent-violet: #8B5CF6;
    --accent-amber: #F59E0B;
    --accent-teal: #0D9488;
    --text-primary: #E8E4F0;
    --text-secondary: #A8A0C0;
    --border-glass: rgba(139, 92, 246, 0.15);
    --alert-crimson: #EF4444;
    --surface-deeper: #1A1530;

    /* Typographic scale */
    --font-display: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
    --font-label: "Chakra Petch", "Inter", "Segoe UI", sans-serif;
    --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Share Tech Mono", "Courier New", monospace;

    --radius-glass: 6px;
    --radius-sharp: 3px;

    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    --ticker-height: 48px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background-color: var(--base-obsidian);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 12% 8%, rgba(139, 92, 246, 0.18), transparent 65%),
        radial-gradient(900px 500px at 88% 6%, rgba(245, 158, 11, 0.12), transparent 70%),
        radial-gradient(1000px 700px at 50% 90%, rgba(13, 148, 136, 0.14), transparent 70%),
        linear-gradient(180deg, #0D0A1A 0%, #120E22 50%, #0D0A1A 100%);
    background-attachment: fixed;
    line-height: 1.55;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Scanline overlay (CRT feel) */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(13, 10, 26, 0.15) 2px,
        rgba(13, 10, 26, 0.15) 4px
    );
    mix-blend-mode: multiply;
}

/* Faint CRT vignette */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 800;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Masthead ticker
   ========================================================================== */
.masthead-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ticker-height);
    display: grid;
    grid-template-columns: 260px 1fr 160px;
    align-items: center;
    z-index: 1000;
    background: rgba(18, 10, 36, 0.55);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.ticker-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 100%;
    border-right: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(26, 21, 48, 0.55);
    position: relative;
}

.ticker-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    filter: url(#noise);
    opacity: 0.04;
    pointer-events: none;
}

.brand-mark {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.brand-mark-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-violet);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    display: inline-block;
    animation: brand-pulse 3s var(--ease-out) infinite;
}

.brand-mark-dot:nth-child(2) {
    background: var(--accent-amber);
    animation-delay: 1s;
}

.brand-mark-dot:nth-child(3) {
    background: var(--accent-teal);
    animation-delay: 2s;
}

@keyframes brand-pulse {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-2px) scale(1.25); opacity: 0.7; }
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    text-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-amber);
    letter-spacing: 0.1em;
    margin-left: auto;
}

.ticker-track {
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.ticker-inner {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    white-space: nowrap;
    animation: ticker-scroll 42s linear infinite;
    padding-left: 22px;
    flex-shrink: 0;
}

.ticker-track:hover .ticker-inner {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.ticker-item {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.ticker-flag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    padding: 3px 7px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 2px;
    color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.08);
}

.ticker-flag.breaking {
    color: var(--alert-crimson);
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    animation: breaking-flash 1.4s ease-in-out infinite alternate;
}

.ticker-flag.urgent {
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

@keyframes breaking-flash {
    from { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
    to { box-shadow: 0 0 14px rgba(239, 68, 68, 0.45); }
}

.ticker-sep {
    color: var(--accent-amber);
    font-size: 0.9rem;
    opacity: 0.85;
}

.ticker-clock {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 16px;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(26, 21, 48, 0.55);
    font-family: var(--font-mono);
}

.clock-label {
    font-size: 0.62rem;
    color: var(--text-secondary);
    letter-spacing: 0.22em;
}

.clock-time {
    font-size: 1rem;
    color: var(--accent-amber);
    letter-spacing: 0.08em;
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Retro perspective grid (page background)
   ========================================================================== */
.retro-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 72%);
    animation: grid-drift 28s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 64px 64px, 64px 64px; }
}

/* ==========================================================================
   Stage + page container
   ========================================================================== */
.stage {
    position: relative;
    z-index: 10;
    padding: calc(var(--ticker-height) + 28px) clamp(20px, 4vw, 56px) 80px;
    max-width: 1680px;
    margin: 0 auto;
}

/* ==========================================================================
   Glass-panel base
   ========================================================================== */
.glass-panel {
    position: relative;
    background: rgba(26, 21, 48, var(--glass-opacity, 0.5));
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: var(--radius-glass);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    isolation: isolate;
}

.glass-panel::before {
    /* top edge highlight */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    z-index: 1;
}

.noise-layer {
    position: absolute;
    inset: -4% -4% -4% -4%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: noise-drift 8s ease-in-out infinite alternate;
}

.noise-layer.noise-violet {
    filter: url(#noise-violet);
}

.noise-layer.noise-amber {
    filter: url(#noise-amber);
}

.noise-layer.noise-teal {
    filter: url(#noise-teal);
}

@keyframes noise-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        filter: hue-rotate(0deg);
    }
    to {
        transform: translate3d(-6px, 4px, 0) scale(1.02);
        filter: hue-rotate(12deg);
    }
}

/* ==========================================================================
   Hero slab
   ========================================================================== */
.hero-slab {
    position: relative;
    min-height: 70vh;
    padding: clamp(30px, 4vw, 56px) clamp(28px, 5vw, 64px);
    margin-top: 14px;
    margin-left: 0;
    margin-right: 8vw;
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 36px;
    align-items: stretch;
    animation: hero-hue 12s ease-in-out infinite alternate;
}

@keyframes hero-hue {
    from { filter: hue-rotate(-5deg); }
    to { filter: hue-rotate(5deg); }
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(139, 92, 246, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.09) 1px, transparent 1px),
        radial-gradient(ellipse at 50% -10%, rgba(245, 158, 11, 0.14), transparent 60%);
    background-size: 56px 56px, 56px 56px, 100% 100%;
    mask-image: radial-gradient(ellipse at 50% -10%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% -10%, black 0%, transparent 75%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 22px;
    justify-content: center;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.meta-flag {
    padding: 4px 10px;
    background: var(--accent-amber);
    color: var(--base-obsidian);
    border-radius: 2px;
    letter-spacing: 0.18em;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.meta-dot {
    width: 5px;
    height: 5px;
    background: var(--accent-violet);
    border-radius: 50%;
}

.meta-time {
    color: var(--accent-amber);
}

.meta-category {
    color: var(--accent-teal);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow: 0 2px 0 rgba(13, 10, 26, 0.65), 0 0 36px rgba(139, 92, 246, 0.2);
}

.headline-accent {
    color: var(--accent-amber);
    text-shadow: 0 0 32px rgba(245, 158, 11, 0.45);
    position: relative;
    display: inline-block;
}

.headline-accent::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    height: 8px;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-amber) 0 8px,
        transparent 8px 14px
    );
    opacity: 0.6;
}

.hero-subhead {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(1rem, 1.25vw, 1.18rem);
    line-height: 1.55;
    color: var(--text-primary);
    max-width: 58ch;
    margin: 0;
    border-left: 3px solid var(--accent-violet);
    padding-left: 18px;
}

.hero-readouts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 8px;
    border-top: 1px dashed rgba(139, 92, 246, 0.22);
    padding-top: 18px;
}

.readout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.readout-label {
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.readout-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.readout-value.live {
    color: var(--alert-crimson);
    gap: 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--alert-crimson);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 12px var(--alert-crimson);
    animation: breaking-flash 1.2s ease-in-out infinite alternate;
}

.readout-unit {
    font-size: 0.95rem;
    color: var(--accent-amber);
}

/* Hero side column */
.hero-side {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px dashed rgba(139, 92, 246, 0.25);
    padding-left: 22px;
}

.hero-chevrons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-chevrons span {
    height: 8px;
    width: 100%;
    clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%, 8% 50%);
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-teal));
    opacity: 0.35;
}

.hero-chevrons span:nth-child(odd) {
    background: linear-gradient(90deg, var(--accent-amber), var(--accent-violet));
}

.hero-chevrons span:nth-child(3n) {
    opacity: 0.7;
}

.hero-verticals {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-top: auto;
    color: var(--text-secondary);
}

.v-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    color: var(--accent-teal);
}

.v-num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    line-height: 1;
}

/* ==========================================================================
   Secondary row
   ========================================================================== */
.secondary-row {
    display: grid;
    grid-template-columns: 5fr 3fr 4fr;
    gap: 20px;
    margin-top: 30px;
}

.story-card {
    position: relative;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 190px;
    transition: transform 0.3s var(--ease-spring),
                box-shadow 0.35s var(--ease-out),
                border-color 0.35s var(--ease-out);
}

.story-card.card-major {
    min-height: 260px;
}

.card-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 2px;
    position: relative;
    z-index: 2;
}

.card-category.tag-violet {
    color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.card-category.tag-amber {
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.card-category.tag-teal {
    color: var(--accent-teal);
    background: rgba(13, 148, 136, 0.14);
    border: 1px solid rgba(13, 148, 136, 0.35);
}

.card-title {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    line-height: 0.95;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 0 rgba(13, 10, 26, 0.5);
}

.card-title.small {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    line-height: 1;
}

.card-title.feature-title {
    font-size: clamp(2.2rem, 3.4vw, 3.2rem);
    line-height: 0.95;
}

.card-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 58ch;
    margin: 0;
    position: relative;
    z-index: 2;
}

.card-excerpt.feature-excerpt {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.05rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    padding-top: 12px;
    border-top: 1px dashed rgba(139, 92, 246, 0.2);
}

.card-time {
    color: var(--accent-amber);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.time-glyph {
    color: var(--accent-violet);
}

.card-byline {
    color: var(--accent-teal);
}

.card-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    transition: box-shadow 0.35s var(--ease-out);
    z-index: 1;
}

.story-card:hover {
    transform: scale(1.015);
    border-color: rgba(139, 92, 246, 0.30);
    box-shadow:
        0 14px 44px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.story-card:hover .card-glow {
    box-shadow: inset 0 0 80px rgba(139, 92, 246, 0.08);
}

/* ==========================================================================
   Chevron divider
   ========================================================================== */
.chevron-divider {
    margin: 42px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chevron-divider.compact {
    margin: 14px 0;
}

.chevron-row {
    height: 10px;
    background-repeat: repeat-x;
    background-size: 32px 10px;
    opacity: 0.55;
}

.chevron-violet {
    background-image: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-violet) 48%, transparent 48%, transparent 52%, var(--accent-violet) 52%, var(--accent-violet) 100%);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 20px, transparent 20px 32px);
    mask-image: repeating-linear-gradient(90deg, #000 0 20px, transparent 20px 32px);
    background: var(--accent-violet);
    clip-path: polygon(
        0% 0%, 4% 0%, 6% 50%, 4% 100%, 0% 100%,
        8% 100%, 10% 50%, 8% 0%, 12% 0%, 14% 50%,
        12% 100%, 16% 100%, 18% 50%, 16% 0%,
        20% 0%, 22% 50%, 20% 100%, 24% 100%, 26% 50%, 24% 0%,
        28% 0%, 30% 50%, 28% 100%, 32% 100%, 34% 50%, 32% 0%,
        36% 0%, 38% 50%, 36% 100%, 40% 100%, 42% 50%, 40% 0%,
        44% 0%, 46% 50%, 44% 100%, 48% 100%, 50% 50%, 48% 0%,
        52% 0%, 54% 50%, 52% 100%, 56% 100%, 58% 50%, 56% 0%,
        60% 0%, 62% 50%, 60% 100%, 64% 100%, 66% 50%, 64% 0%,
        68% 0%, 70% 50%, 68% 100%, 72% 100%, 74% 50%, 72% 0%,
        76% 0%, 78% 50%, 76% 100%, 80% 100%, 82% 50%, 80% 0%,
        84% 0%, 86% 50%, 84% 100%, 88% 100%, 90% 50%, 88% 0%,
        92% 0%, 94% 50%, 92% 100%, 96% 100%, 98% 50%, 96% 0%,
        100% 0%
    );
}

.chevron-teal {
    background: var(--accent-teal);
    clip-path: polygon(
        0% 50%, 4% 0%, 8% 50%, 4% 100%,
        8% 100%, 12% 0%, 16% 50%, 12% 100%,
        16% 100%, 20% 0%, 24% 50%, 20% 100%,
        24% 100%, 28% 0%, 32% 50%, 28% 100%,
        32% 100%, 36% 0%, 40% 50%, 36% 100%,
        40% 100%, 44% 0%, 48% 50%, 44% 100%,
        48% 100%, 52% 0%, 56% 50%, 52% 100%,
        56% 100%, 60% 0%, 64% 50%, 60% 100%,
        64% 100%, 68% 0%, 72% 50%, 68% 100%,
        72% 100%, 76% 0%, 80% 50%, 76% 100%,
        80% 100%, 84% 0%, 88% 50%, 84% 100%,
        88% 100%, 92% 0%, 96% 50%, 92% 100%,
        96% 100%, 100% 0%, 100% 50%
    );
}

/* ==========================================================================
   Below-the-fold: vertical rail + content grid
   ========================================================================== */
.below-fold {
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: 20px;
    margin-top: 10px;
}

.scan-rail {
    position: sticky;
    top: calc(var(--ticker-height) + 20px);
    align-self: start;
    min-height: 520px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rail-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.25);
    position: relative;
    z-index: 2;
}

.rail-mark {
    color: var(--accent-amber);
    font-size: 0.9rem;
}

.rail-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.rail-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 14px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: rgba(13, 10, 26, 0);
    transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-spring);
}

.rail-item:hover,
.rail-item.is-active {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
}

.rail-item.is-active {
    box-shadow: inset 3px 0 0 var(--accent-amber);
}

.rail-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(13, 148, 136, 0.4));
    position: relative;
    animation: icon-pulse 4s ease-in-out infinite alternate;
}

.rail-icon.icon-triangle {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.rail-icon.icon-hex {
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.6), rgba(139, 92, 246, 0.4));
}

.rail-icon.icon-bars {
    clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%, 40% 0, 60% 0, 60% 100%, 40% 100%, 80% 0, 100% 0, 100% 100%, 80% 100%);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.6), rgba(245, 158, 11, 0.4));
}

.rail-icon.icon-diamond {
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.55), rgba(139, 92, 246, 0.4));
}

@keyframes icon-pulse {
    from { box-shadow: 0 0 0 rgba(139, 92, 246, 0.0); }
    to { box-shadow: 0 0 18px rgba(139, 92, 246, 0.45); }
}

.rail-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rail-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--accent-amber);
}

.rail-divider {
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(139, 92, 246, 0.25) 0 4px,
        transparent 4px 8px
    );
    margin: 0 6px;
}

.rail-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px dashed rgba(139, 92, 246, 0.22);
    position: relative;
    z-index: 2;
}

.rail-pulse {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
}

.pulse-bar {
    width: 4px;
    background: linear-gradient(180deg, var(--accent-violet), var(--accent-teal));
    border-radius: 1px;
    animation: pulse-bar 1.6s ease-in-out infinite;
}

.pulse-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.pulse-bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.pulse-bar:nth-child(3) { height: 80%; animation-delay: 0.4s; }
.pulse-bar:nth-child(4) { height: 50%; animation-delay: 0.6s; }
.pulse-bar:nth-child(5) { height: 70%; animation-delay: 0.8s; }

@keyframes pulse-bar {
    0%, 100% { transform: scaleY(0.6); }
    50% { transform: scaleY(1); }
}

.rail-filed {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.rail-filed span {
    color: var(--accent-amber);
}

/* ==========================================================================
   Content grid 2:3:2
   ========================================================================== */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr;
    gap: 20px;
}

.grid-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-tall {
    min-height: 260px;
}

.card-feature {
    min-height: 420px;
    padding: 30px;
}

.card-feature-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 30% 0%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 0%, black, transparent 80%);
}

.card-quote {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 8px 0 0;
    border-left: 4px solid var(--accent-amber);
    padding: 6px 0 6px 16px;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Broadcast strip (board + pulse cards)
   ========================================================================== */
.broadcast-strip {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.broadcast-panel {
    padding: 24px 22px 18px;
    min-height: 340px;
}

.panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.25);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.panel-label {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.panel-subline {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--accent-amber);
    text-transform: uppercase;
}

.board-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.board-row {
    display: grid;
    grid-template-columns: 96px 90px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.board-row:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.3);
}

.board-time {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-amber);
    letter-spacing: 0.06em;
}

.board-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    text-align: center;
}

.board-tag.tag-violet { color: var(--accent-violet); background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.3); }
.board-tag.tag-amber { color: var(--accent-amber); background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); }
.board-tag.tag-teal { color: var(--accent-teal); background: rgba(13, 148, 136, 0.14); border: 1px solid rgba(13, 148, 136, 0.3); }

.board-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.board-text em {
    font-style: italic;
    color: var(--accent-violet);
    font-family: var(--font-label);
    letter-spacing: 0.04em;
}

.broadcast-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pulse-card {
    padding: 24px 22px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pulse-form {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    position: relative;
    z-index: 2;
}

.pulse-input {
    flex: 1;
    background: rgba(13, 10, 26, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    padding: 10px 12px;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.pulse-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.pulse-input:focus {
    border-color: var(--accent-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.pulse-submit {
    background: var(--accent-amber);
    color: var(--base-obsidian);
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3);
}

.pulse-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}

.pulse-submit-arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.pulse-note {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-teal);
    letter-spacing: 0.12em;
    margin: 4px 0 0;
    position: relative;
    z-index: 2;
}

.pulse-note.show {
    animation: note-in 0.5s var(--ease-spring);
}

@keyframes note-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dispatch-readout {
    display: flex;
    align-items: baseline;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.dispatch-num {
    font-family: var(--font-display);
    font-size: 3.4rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 26px rgba(13, 148, 136, 0.45);
}

.dispatch-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    color: var(--accent-teal);
    text-transform: uppercase;
}

.count {
    font-family: var(--font-mono);
    color: var(--accent-amber);
    letter-spacing: 0.08em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.paper-footer {
    margin-top: 60px;
    padding: 22px 0 0;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-secondary);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-row.small {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    padding-bottom: 8px;
}

.footer-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-motto {
    color: var(--accent-violet);
    font-style: italic;
    letter-spacing: 0.08em;
}

.footer-meta {
    color: var(--accent-amber);
    font-family: var(--font-mono);
    letter-spacing: 0.16em;
}

/* ==========================================================================
   Bounce-enter (IntersectionObserver driven)
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(60px) scale(0.92);
}

[data-reveal].is-in {
    animation: bounce-enter 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--stagger, 0ms);
}

@keyframes bounce-enter {
    0%   { transform: translateY(60px) scale(0.92); opacity: 0; }
    50%  { transform: translateY(-12px) scale(1.02); opacity: 0.8; }
    70%  { transform: translateY(4px) scale(0.99); opacity: 0.95; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .secondary-row {
        grid-template-columns: 1fr 1fr;
    }
    .secondary-row > .card-minor {
        grid-column: 1 / -1;
    }
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
    .content-grid .col-wide {
        grid-column: 1 / -1;
    }
    .below-fold {
        grid-template-columns: 30% 1fr;
    }
    .hero-slab {
        margin-right: 0;
    }
}

@media (max-width: 820px) {
    .masthead-ticker {
        grid-template-columns: 180px 1fr 110px;
    }
    .brand-subtitle {
        display: none;
    }
    .brand-title {
        font-size: 1.15rem;
    }
    .below-fold {
        grid-template-columns: 1fr;
    }
    .scan-rail {
        position: relative;
        top: 0;
        min-height: auto;
    }
    .rail-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
    }
    .rail-item {
        flex: 0 0 auto;
        grid-template-columns: 24px auto auto;
    }
    .rail-divider {
        display: none;
    }
    .rail-bottom {
        display: none;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
    .secondary-row {
        grid-template-columns: 1fr;
    }
    .hero-slab {
        grid-template-columns: 1fr;
        min-height: 60vh;
    }
    .hero-side {
        border-left: 0;
        border-top: 1px dashed rgba(139, 92, 246, 0.25);
        padding-left: 0;
        padding-top: 14px;
        flex-direction: row;
        justify-content: space-between;
    }
    .hero-verticals {
        writing-mode: horizontal-tb;
        transform: none;
    }
    .broadcast-strip {
        grid-template-columns: 1fr;
    }
    .board-row {
        grid-template-columns: 80px 74px 1fr;
    }
}

@media (max-width: 540px) {
    .masthead-ticker {
        grid-template-columns: 52px 1fr 72px;
    }
    .ticker-brand {
        padding: 0 8px;
    }
    .brand-title {
        display: none;
    }
    .ticker-clock {
        padding: 0 10px;
    }
    .clock-time {
        font-size: 0.8rem;
    }
    .hero-headline {
        font-size: clamp(2.4rem, 11vw, 3.4rem);
    }
    .hero-readouts {
        gap: 10px;
    }
    .readout {
        min-width: 46%;
    }
    .pulse-form {
        flex-direction: column;
    }
}

/* Reduced motion: skip bounce + drifts */
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .ticker-inner,
    .noise-layer,
    .rail-icon,
    .brand-mark-dot,
    .pulse-bar,
    .hero-slab {
        animation: none !important;
    }
}
