/* ============================================
   Media Monitor Landing Page — Styles
   "Executive Terminal" Dark Mode Aesthetic
   ============================================ */

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

:root {
    /* Palette */
    --bg-deep: #020617;
    --bg-panel: #0B1121;
    --border: rgba(30, 41, 59, 0.6);
    --border-solid: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Accents */
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --sky-400: #38bdf8;
    --emerald-500: #10b981;
    --amber-500: #f59e0b;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'DM Serif Display', Georgia, serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

[hidden] {
    display: none !important;
}

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav .nav-brand,
.nav .nav-brand:visited {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo {
    width: 2rem;
    height: 2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.brand-accent {
    color: var(--indigo-500);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav .nav-actions .nav-link,
.nav .nav-actions .nav-link:visited {
    display: none;
    align-items: center;
    min-height: 2.25rem;
    padding: 0 0.625rem;
    border-radius: 0.375rem;
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav .nav-actions .nav-link:hover,
.nav .nav-actions .nav-link:focus-visible {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    outline: none;
}

@media (min-width: 640px) {

    .nav .nav-actions .nav-link,
    .nav .nav-actions .nav-link:visited {
        display: inline-flex;
    }
}

.nav-login {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-login:hover {
    color: var(--text-primary);
}

@media (min-width: 640px) {
    .nav-login {
        display: block;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-light {
    height: 2.25rem;
    padding: 0 1rem;
    background: var(--text-primary);
    color: var(--bg-deep);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-light:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.btn-primary {
    height: 3rem;
    padding: 0 2rem;
    background: var(--indigo-600);
    color: #ffffff;
    font-size: 0.9375rem;
    border: 1px solid var(--indigo-500);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: var(--indigo-500);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.3);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero {
        padding: 5rem 0 8rem;
    }

    .hero-inner {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.hero-copy {
    max-width: 36rem;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-solid);
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--emerald-500);
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot-sm {
    width: 0.5rem;
    height: 0.5rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Hero Heading */
.hero-heading {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--indigo-400), var(--sky-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 32rem;
    margin-bottom: 2rem;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .hero-cta {
        flex-direction: row;
        align-items: center;
    }
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

.avatar-stack {
    display: flex;
}

.avatar-stack .avatar+.avatar {
    margin-left: -0.5rem;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--border-solid);
    border: 2px solid var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

.trust-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: block;
    width: min(100%, 42rem);
    margin: 0 auto;
}

.visual-glow {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.15);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.2;
}

/* Interface Card */
.interface-card {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--border-solid);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: rotate(-1.5deg);
    transform-origin: center top;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.interface-card:hover {
    transform: rotate(0deg);
}

@media (min-width: 1024px) {
    .interface-card {
        transform: rotate(-2deg);
    }
}

.card-titlebar {
    height: 2.5rem;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-solid);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
}

.titlebar-dots {
    display: flex;
    gap: 0.375rem;
}

.dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--border-solid);
}

.titlebar-label {
    margin-left: 1rem;
    height: 1rem;
    width: clamp(5rem, 28vw, 8rem);
    background: var(--border-solid);
    border-radius: 2px;
}

.card-body {
    padding: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

/* Metrics */
.metrics-row {
    display: flex;
    gap: clamp(0.625rem, 2.5vw, 1rem);
}

.metric-tile {
    flex: 1;
    min-width: 0;
    height: clamp(4.125rem, 13vw, 5rem);
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border-solid);
    border-radius: 0.375rem;
    padding: clamp(0.625rem, 2vw, 0.75rem);
}

.metric-tile-active {
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.metric-label {
    height: 0.5rem;
    width: 3rem;
    background: var(--border-solid);
    border-radius: 2px;
    margin-bottom: 0.75rem;
}

.metric-label-active {
    background: rgba(129, 140, 248, 0.5);
}

.metric-value {
    height: 1.5rem;
    width: min(4rem, 78%);
    border-radius: 0.25rem;
}

.metric-emerald {
    background: rgba(16, 185, 129, 0.2);
}

.metric-indigo {
    background: rgba(99, 102, 241, 0.2);
}

.metric-value-pulse {
    width: 2rem;
    background: rgba(99, 102, 241, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* Feed Items */
.feed-items {
    display: grid;
    gap: 0.75rem;
}

.feed-item {
    height: 3.5rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-solid);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
}

.feed-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: var(--border-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feed-lines {
    display: grid;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.feed-line {
    height: 0.5rem;
    border-radius: 2px;
}

.feed-line-short {
    width: 45%;
    max-width: 6rem;
    background: var(--border-solid);
}

.feed-line-med {
    width: 58%;
    max-width: 8rem;
    background: var(--border-solid);
}

.feed-line-long {
    width: 100%;
    max-width: 12rem;
    background: rgba(30, 41, 59, 0.6);
}

.interface-card.has-live-signal .feed-items {
    display: none;
}

.live-signal-panel {
    min-height: 8.75rem;
    display: grid;
    align-content: start;
    gap: 0.65rem;
    padding: 1rem;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.08)),
        rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 0.5rem;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.live-signal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.live-signal-kicker,
.live-signal-chip {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.live-signal-kicker {
    color: var(--emerald-500);
}

.live-signal-chip {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.25rem 0.45rem;
    border-radius: 9999px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--border-solid);
    color: var(--text-muted);
}

.live-signal-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.live-signal-summary {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.live-signal-link {
    justify-self: start;
    color: #a5b4fc;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.live-signal-link:hover,
.live-signal-link:focus-visible {
    color: var(--text-primary);
    outline: none;
}

/* Floating Badge */
.floating-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--bg-deep);
    border: 1px solid #334155;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 6s ease-in-out infinite;
}

@media (min-width: 640px) {
    .floating-badge {
        top: 1rem;
        left: -0.75rem;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.badge-text {
    display: flex;
    flex-direction: column;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.6875rem;
    line-height: 1.4;
}

.badge-title {
    color: var(--emerald-500);
    font-weight: 600;
}

.badge-sub {
    color: var(--text-muted);
}

/* Background Grid */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    background-image:
        linear-gradient(var(--border-solid) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-solid) 1px, transparent 1px);
    background-size: 40px 40px;
}

.bg-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8rem;
    background: linear-gradient(to top, var(--bg-deep), transparent);
    pointer-events: none;
}

/* --- Active Newsletters --- */
.newsletters {
    padding: 5rem 0;
    border-top: 1px solid var(--border-solid);
    background:
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.08), transparent 30rem),
        var(--bg-deep);
}

.newsletters-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-kicker {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--emerald-500);
    margin-bottom: 0.75rem;
}

.newsletters-header {
    display: grid;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .newsletters-header {
        grid-template-columns: minmax(0, 34rem) 1fr;
    }
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    color: var(--text-primary);
    font-weight: 700;
}

.section-desc {
    max-width: 34rem;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-rule {
    display: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.45), transparent);
    margin-bottom: 0.7rem;
}

@media (min-width: 768px) {
    .section-rule {
        display: block;
    }
}

.newsletter-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .newsletter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.newsletter-card,
.noscript-card,
.newsletter-skeleton-card {
    min-height: 20rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(11, 17, 33, 0.78);
    border: 1px solid var(--border-solid);
    border-radius: 0.5rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.newsletter-skeleton-card {
    pointer-events: none;
    user-select: none;
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.8s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-badge-ph {
    width: 5.5rem;
    height: 1.5rem;
    border-radius: 9999px;
}

.skeleton-icon-ph {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
}

.skeleton-title-ph {
    width: 72%;
    height: 1.75rem;
}

.skeleton-reader-ph {
    width: 82%;
    height: 0.875rem;
}

.skeleton-desc-ph {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-desc-line-1 {
    width: 100%;
    height: 0.875rem;
}

.skeleton-desc-line-2 {
    width: 65%;
    height: 0.875rem;
}

.skeleton-meta-ph {
    width: 6.5rem;
    height: 1.35rem;
    border-radius: 9999px;
}

.skeleton-btn-ph {
    flex: 1;
    height: 2.25rem;
    border-radius: 0.375rem;
}

.skeleton-story-ph {
    min-height: 4.5rem;
    display: grid;
    gap: 0.5rem;
    opacity: 0.6;
}

.newsletter-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.newsletter-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.newsletter-title {
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-size: 1.65rem;
    line-height: 1.1;
    font-weight: 700;
}

.newsletter-top-story {
    display: grid;
    gap: 0.5rem;
    padding: 0.875rem;
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 0.5rem;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(99, 102, 241, 0.06)),
        rgba(15, 23, 42, 0.68);
}

.newsletter-top-story-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.newsletter-top-story-label,
.newsletter-top-story-source {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.newsletter-top-story-label {
    color: var(--emerald-500);
}

.newsletter-top-story-source {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.25rem 0.45rem;
    border-radius: 9999px;
    border: 1px solid var(--border-solid);
    color: var(--text-muted);
    background: rgba(2, 6, 23, 0.65);
}

.newsletter-top-story-title {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

a.newsletter-top-story-title:hover,
a.newsletter-top-story-title:focus-visible {
    color: #c7d2fe;
    outline: none;
}

.newsletter-top-story-summary {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.newsletter-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.newsletter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.newsletter-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-solid);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.newsletter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.newsletter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-solid);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.newsletter-link:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.6);
    color: var(--text-primary);
}

.newsletter-link-primary {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-deep);
}

.newsletter-link-primary:hover {
    background: #ffffff;
    color: var(--bg-deep);
}

/* --- Features --- */
.features {
    padding: 6rem 0;
    border-top: 1px solid var(--border-solid);
    background: var(--bg-panel);
}

.features-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.features-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    display: grid;
    gap: 1rem;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-solid);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* --- Footer --- */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-solid);
    background: var(--bg-deep);
    text-align: center;
}

.footer-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-dim {
    opacity: 0.5;
}

/* --- Icons (Lucide sizing) --- */
.icon-xs {
    width: 0.75rem;
    height: 0.75rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-feature {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-indigo {
    color: var(--indigo-400);
}

.icon-sky {
    color: var(--sky-400);
}

.icon-amber {
    color: var(--amber-500);
}

.icon-muted {
    color: var(--text-dim);
}

/* --- Reveal animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-copy {
    animation: fadeUp 0.8s ease-out both;
}

.hero-visual {
    animation: fadeUp 0.8s 0.2s ease-out both;
}

.feature {
    opacity: 0;
    animation: fadeUp 0.6s ease-out both;
}

.feature:nth-child(1) {
    animation-delay: 0.1s;
}

.feature:nth-child(2) {
    animation-delay: 0.25s;
}

.feature:nth-child(3) {
    animation-delay: 0.4s;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--border-solid);
    border-radius: 0.75rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-sub {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* --- Form --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-solid);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
}

.form-error {
    margin-top: 0.875rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(244, 63, 94, 0.35);
    background: rgba(244, 63, 94, 0.08);
    color: #fecdd3;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.form-error[hidden] {
    display: none;
}

/* --- Form Success --- */
.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    text-align: center;
}

.success-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-emerald {
    color: var(--emerald-500);
}

.success-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.success-sub {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* The public newsletter directory shares the light reader theme. */
.newsletter-directory {
    --bg-deep: #f8fafc;
    --bg-panel: #ffffff;
    --border: #e2e8f0;
    --border-solid: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dim: #475569;
    --font-serif: 'Merriweather', Georgia, serif;
    --indigo-400: #047857;
    --sky-400: #0369a1;
    --emerald-500: #047857;
}
.newsletter-directory .nav { background: rgba(255, 255, 255, .95); }
.newsletter-directory .btn-light { color: #ffffff; background: #047857; border-color: #047857; text-decoration: none; }
.newsletter-directory .btn-light:hover { color: #ffffff; background: #065f46; }
.newsletter-directory .brand-text, .newsletter-directory .brand-accent { color: #0f172a; }
.directory-hero { max-width: 66rem; margin: 0 auto; padding: 4rem 1.5rem 2rem; }
.directory-hero .hero-heading { max-width: 55rem; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.25; margin: 1rem 0; background: none; color: #0f172a; -webkit-text-fill-color: currentColor; }
.directory-hero .hero-sub { max-width: 43rem; margin-bottom: 1.5rem; color: #475569; }
.directory-note { font-size: .8rem; margin-top: 1rem; }
.newsletter-directory .newsletters { padding-top: 2rem; scroll-margin-top: 5rem; }
.newsletter-directory .newsletter-card { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 4px 16px rgba(15, 23, 42, .04); }
.newsletter-directory .newsletter-badge { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.newsletter-directory .newsletter-title { font-family: var(--font-serif); }
.newsletter-directory .newsletter-meta span { background: #f1f5f9; border-color: #e2e8f0; color: #334155; }
.newsletter-directory .newsletter-link:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }
.newsletter-directory .newsletter-link-primary { background: #047857; color: #ffffff; }
.newsletter-directory .newsletter-link-primary:hover { background: #065f46; }
.newsletter-directory .newsletter-top-story { background: #f8fafc; border-color: #e2e8f0; margin-top: 1.5rem; }
.newsletter-directory .newsletter-top-story-source { background: #ffffff; border-color: #cbd5e1; color: #475569; }
.newsletter-directory .newsletter-top-story-title { color: #0f172a; }
.newsletter-directory a.newsletter-top-story-title:hover,
.newsletter-directory a.newsletter-top-story-title:focus-visible { color: #047857; text-decoration: underline; }
.newsletter-directory .feature-icon { background: #f1f5f9; border-color: #e2e8f0; }
.directory-reader { color: #047857; font-size: .75rem; font-weight: 600; }
.directory-footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; font-size: .8rem; }
.directory-footer-links a, .directory-footer-links button { color: #475569; background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.newsletter-directory .modal { background: #ffffff; color: #0f172a; }
.newsletter-directory .form-group input, .newsletter-directory .form-group textarea { background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
.newsletter-directory a:focus-visible, .newsletter-directory button:focus-visible, .newsletter-directory input:focus-visible, .newsletter-directory textarea:focus-visible { outline: 3px solid #047857; outline-offset: 3px; }
@media (max-width: 639px) {
    .directory-hero { padding-top: 2rem; }
    .newsletter-directory .nav-inner { padding: 0 1rem; }
    .newsletter-directory .brand-text { font-size: 1rem; }
    .newsletter-directory .nav .btn { padding: .6rem .75rem; font-size: .75rem; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.noscript-directory {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    width: 100%;
}

