/* =========================================================
   SignalBytes — Editorial Stylesheet (Apple-Newsroom inspired)
   Light only · warm bone palette · compact cards · restored legacy classes
   Fonts: Fraunces (serif display), Inter Tight (UI), JetBrains Mono (meta)
   ========================================================= */

:root {
    /* Warm bone palette — NO pure white, NO pure black */
    --page:        #F7F4EE;   /* warm bone background (soft, readable) */
    --page-alt:    #F1ECE2;   /* deeper bone for bands/ticker */
    --surface:     #FFFFFF;   /* cards sit bright against bone */
    --surface-alt: #FBF8F2;   /* very soft fallback card */

    --ink:         #1C1917;   /* warm near-black body text */
    --ink-strong:  #0F0D0B;   /* headlines (very dark warm charcoal, not pure black) */
    --ink-muted:   #57534E;   /* secondary, readable at small sizes */
    --ink-subtle:  #8A857E;   /* captions, meta */

    --line:        rgba(28, 25, 23, 0.10);
    --line-soft:   rgba(28, 25, 23, 0.06);

    /* Accents — kept simple and editorial */
    --accent:        #4F46E5;   /* indigo, refined */
    --accent-strong: #3730A3;
    --accent-warm:   #C2410C;   /* warm cedar for Live/alerts */
    --accent-teal:   #0F766E;
    --accent-rose:   #BE185D;

    /* Card accent tints (soft, Apple-Newsroom flavour) */
    --tint-violet: #EEF0FF;
    --tint-amber:  #FCEFDD;
    --tint-teal:   #E4F2EF;
    --tint-rose:   #FBE9EF;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-pill: 999px;

    --ease: cubic-bezier(.22, .61, .36, 1);
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04), 0 2px 6px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 10px rgba(28, 25, 23, 0.05), 0 12px 28px rgba(28, 25, 23, 0.06);
    --shadow-lg: 0 8px 20px rgba(28, 25, 23, 0.08), 0 22px 50px rgba(28, 25, 23, 0.10);

    --max: 1240px;
    --gutter: 24px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: 'Inter Tight', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
.visually-hidden {
    position: absolute !important; clip: rect(0 0 0 0);
    width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    white-space: nowrap; overflow: hidden;
}
::selection { background: var(--accent); color: #fff; }

.container, .page-wrap {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}

/* =========================================================
   READING PROGRESS BAR
   ========================================================= */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    z-index: 1000;
    transition: width .1s linear;
}

/* =========================================================
   HEADER / NAV — works for both index.html (.site-header)
   and legacy partials (same classes)
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(247, 244, 238, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700;
    color: var(--ink-strong);
}
.brand-mark {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--ink-strong);
    color: #fff;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.brand-mark svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2.2; }
.brand-name {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 120;
}
.brand-dot { color: var(--accent); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--r-pill);
    cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink-strong); fill: none; stroke-width: 2; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link, .nav-links a {
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-muted);
    border-radius: var(--r-pill);
    transition: color .2s var(--ease), background-color .2s var(--ease);
    white-space: nowrap;
}
.nav-link:hover, .nav-links a:hover { color: var(--ink-strong); background: rgba(28, 25, 23, 0.04); }
.nav-link.active { color: var(--ink-strong); background: rgba(28, 25, 23, 0.06); }

main { padding: 32px 0 72px; }

/* =========================================================
   HOMEPAGE: HERO (asymmetric 60/40)
   ========================================================= */
.hero {
    padding: 32px 0 56px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: flex-start;
}
.hero-feature { position: relative; }

.hero-meta-row {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 20px;
}
.pill {
    display: inline-flex; align-items: center;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.pill-accent {
    background: var(--tint-violet);
    color: var(--accent-strong);
    border: 1px solid rgba(79, 70, 229, 0.18);
}
.pill-soft {
    background: var(--surface);
    color: var(--ink-muted);
    border: 1px solid var(--line);
}

h1.entry-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.1rem, 4.4vw + 0.3rem, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--ink-strong);
    margin: 0 0 18px;
    max-width: 15ch;
    font-variation-settings: "opsz" 144;
}
.hero-dek {
    max-width: 52ch;
    margin: 0 0 28px;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--ink-muted);
}
.hero-byline {
    display: flex; align-items: center;
    gap: 22px; flex-wrap: wrap;
    padding: 14px 0 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}
.byline-author { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.avatar svg { width: 16px; height: 16px; }
.byline-text { display: flex; flex-direction: column; gap: 1px; }
.byline-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent-teal);
}
.byline-badge svg { width: 11px; height: 11px; }
.byline-name {
    font-size: 0.88rem; font-weight: 500;
    color: var(--ink);
}
.read-time {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.74rem;
    color: var(--ink-subtle);
}
.read-time svg { width: 13px; height: 13px; }

.hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 22px;
    background: var(--ink-strong);
    color: var(--page);
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.hero-cta svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.hero-cta:hover svg { transform: translateX(3px); }

/* Fast Intel — clean bordered card, NOT pure white */
.fast-intel {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}
.fast-intel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.fast-intel-head h2 {
    margin: 0;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-strong);
}
.live-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-warm);
}
.pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-warm);
    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.55);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(194, 65, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(194, 65, 12, 0); }
}

.intel-list {
    list-style: none; counter-reset: intel;
    padding: 0; margin: 0;
    display: grid; gap: 14px;
}
.intel-list li {
    counter-increment: intel;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}
.intel-list li:last-child { border-bottom: none; padding-bottom: 0; }
.intel-list a {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    align-items: start;
    transition: transform .2s var(--ease);
}
.intel-list a::before {
    content: counter(intel, decimal-leading-zero);
    grid-row: span 3;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem; font-weight: 500;
    color: var(--accent);
    margin-top: 3px;
}
.intel-list a:hover { transform: translateX(2px); }
.intel-kicker {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.64rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-subtle);
    grid-column: 2;
}
.intel-list h3 {
    margin: 0;
    grid-column: 2;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-strong);
    letter-spacing: -0.005em;
}
.intel-list a:hover h3 { color: var(--accent-strong); }
.intel-meta {
    grid-column: 2;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    color: var(--ink-subtle);
}

/* =========================================================
   SIGNAL / NOISE TICKER
   ========================================================= */
.ticker {
    display: flex;
    align-items: center;
    margin: 8px 0 48px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--page-alt);
    border-radius: var(--r-md);
    overflow: hidden;
}
.ticker-label {
    flex: 0 0 auto;
    padding: 0 20px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-strong);
    border-right: 1px solid var(--line);
    white-space: nowrap;
}
.ticker-label span { color: var(--accent); margin: 0 1px; }
.ticker-track {
    flex: 1 1 auto;
    display: flex;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}
.ticker-run {
    display: flex; gap: 28px;
    padding-right: 28px;
    padding-left: 20px;
    flex-shrink: 0;
    animation: tickerScroll 70s linear infinite;
    white-space: nowrap;
}
.ticker-run span {
    font-size: 0.82rem;
    color: var(--ink-muted);
}
.ticker-run .dot { color: var(--accent); font-size: 0.55rem; }
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}
.ticker:hover .ticker-run { animation-play-state: paused; }

/* =========================================================
   COLLECTION — Apple Newsroom style compact cards
   ========================================================= */
.collection { padding-top: 16px; }

.collection-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.section-kicker {
    display: inline-block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.collection-head h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 120;
}
.section-dek {
    max-width: 44ch;
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.94rem;
}

/* Compact news grid — 3 columns, Apple Newsroom-like size */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(28, 25, 23, 0.15);
}

/* Compact thumbnail area — soft tint + clean icon */
.news-thumb {
    aspect-ratio: 16/10;
    display: grid;
    place-items: center;
    color: var(--accent-strong);
    position: relative;
    overflow: hidden;
}
.news-thumb::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(80% 70% at 20% 10%, rgba(255,255,255,0.6), transparent 70%);
    pointer-events: none;
}
.news-thumb svg { width: 46%; height: 46%; position: relative; z-index: 1; opacity: 0.75; }
.news-thumb-violet { background: var(--tint-violet); color: var(--accent-strong); }
.news-thumb-amber  { background: var(--tint-amber);  color: var(--accent-warm); }
.news-thumb-teal   { background: var(--tint-teal);   color: var(--accent-teal); }
.news-thumb-rose   { background: var(--tint-rose);   color: var(--accent-rose); }

.news-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.news-kicker {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.66rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-subtle);
}
.news-card h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 96;
    transition: color .2s var(--ease);
}
.news-card:hover h3 { color: var(--accent-strong); }
.news-meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    color: var(--ink-subtle);
    margin-top: 2px;
}

/* =========================================================
   NEWSLETTER STRIP
   ========================================================= */
.newsletter { margin-top: 72px; }
.newsletter-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 36px;
    align-items: center;
    padding: 40px 44px;
    background: var(--page-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    position: relative;
    overflow: hidden;
}
.newsletter-inner::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent 70%);
    pointer-events: none;
}
.newsletter-copy h2 {
    margin: 6px 0 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--ink-strong);
    max-width: 18ch;
}
.newsletter-copy p {
    margin: 0;
    color: var(--ink-muted);
    max-width: 52ch;
    font-size: 0.94rem;
}
.newsletter-form {
    display: flex; gap: 8px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    min-width: 340px;
    box-shadow: var(--shadow-sm);
}
.newsletter-form input {
    flex: 1;
    padding: 9px 16px;
    background: transparent;
    border: none; outline: none;
    font-size: 0.92rem;
    color: var(--ink);
    min-width: 0;
}
.newsletter-form input::placeholder { color: var(--ink-subtle); }
.newsletter-form button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--ink-strong);
    color: var(--page);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s var(--ease);
}
.newsletter-form button:hover { transform: translateY(-1px); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    margin-top: 72px;
    padding: 36px 0 40px;
    border-top: 1px solid var(--line);
}
.footer-inner {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 24px;
    align-items: flex-start;
}
.footer-brand {
    font-size: 0.88rem;
    color: var(--ink-muted);
    max-width: 60ch;
}
.footer-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.footer-links a {
    font-size: 0.88rem;
    color: var(--ink-muted);
    transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--ink-strong); }

/* =========================================================
   COOKIE BANNER
   ========================================================= */
.cookie-banner {
    display: none;
    position: fixed;
    left: 50%; bottom: 18px;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 28px));
    padding: 18px 20px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
}
.cookie-copy { font-size: 0.9rem; line-height: 1.5; color: var(--ink-muted); }
.cookie-copy strong { color: var(--ink-strong); }
.cookie-copy a { color: var(--accent); text-decoration: underline; }
.cookie-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    padding: 9px 18px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all .2s var(--ease);
}
.btn:hover { color: var(--ink-strong); border-color: rgba(28,25,23,0.25); }
.btn.primary {
    background: var(--ink-strong);
    color: var(--page);
    border-color: var(--ink-strong);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* =========================================================
   === LEGACY CATEGORY-PAGE CLASSES (ai-guide, future-living,
   cybersecurity-checklist, creator-workflows) ===
   ========================================================= */

.category-intro {
    padding: 16px 0 26px;
    border-bottom: 1px solid var(--line);
}
.kicker, .feed-kicker, .story-kicker, .row-kicker, .mini-kicker {
    display: inline-block;
    margin: 0 0 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
.category-intro h1 {
    margin: 0;
    max-width: 16ch;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2rem, 4.4vw, 3.8rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 144;
}
.category-standfirst {
    max-width: 60ch;
    margin: 18px 0 0;
    font-size: 1.04rem;
    color: var(--ink-muted);
}
.tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}
.tags li {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: 0.82rem;
    color: var(--ink-muted);
    background: var(--surface);
}

.editorial-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1.15fr) 260px;
    gap: 28px;
    padding: 28px 0 0;
    align-items: start;
}
.rail-stack { display: grid; gap: 22px; }

.rail-thumb, .feature-media, .row-media, .feed-thumb, .mini-media {
    background: var(--tint-violet);
    overflow: hidden;
    border-radius: var(--r-md);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
}
.rail-thumb { aspect-ratio: 4/3; margin-bottom: 12px; }
.feature-media { aspect-ratio: 16/9; margin-bottom: 16px; border-radius: var(--r-lg); }
.row-media { aspect-ratio: 16/10; border-radius: var(--r-md); }
.feed-thumb { aspect-ratio: 1/1; border-radius: var(--r-sm); }
.mini-media { aspect-ratio: 16/10; margin-bottom: 12px; border-radius: var(--r-md); }

.rail-thumb img, .feature-media img, .feed-thumb img, .row-media img, .mini-media img {
    width: 100%; height: 100%; object-fit: cover;
}

.rail-story, .feed-story, .story-row, .mini-card, .feature-story { display: block; }

.rail-story h2, .feature-story h2, .feed-story h3, .story-row h3, .mini-card h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 120;
}
.rail-story h2 { font-size: 1.35rem; line-height: 1.14; margin-bottom: 6px; }
.rail-story p, .feature-summary, .feed-story p, .story-row p, .mini-card p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.94rem;
}
.rail-meta, .feature-meta, .feed-meta, .row-meta, .mini-meta {
    margin-top: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.74rem;
    color: var(--ink-subtle);
}
.rail-story {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.rail-story:last-child { border-bottom: none; padding-bottom: 0; }

.feature-story { padding: 0 0 8px; }
.feature-story h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    line-height: 1.05;
    max-width: 16ch;
    margin-bottom: 10px;
}
.feature-summary { font-size: 1.02rem; max-width: 64ch; }
.feature-meta { display: flex; gap: 14px; flex-wrap: wrap; }

.feed-heading {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-strong);
}
.feed-list {
    display: grid;
    gap: 16px;
}
.feed-story {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.feed-story:last-child { padding-bottom: 0; border-bottom: none; }
.feed-story h3 { font-size: 1rem; line-height: 1.2; margin-bottom: 4px; }
.feed-story p { font-size: 0.88rem; line-height: 1.45; }

.section-block { padding-top: 40px; margin-top: 12px; }
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.section-head h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 120;
}
.section-head p { margin: 0; max-width: 56ch; color: var(--ink-muted); }

.story-rows {
    display: grid;
    gap: 0;
    margin-top: 8px;
}
.story-row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.story-row h3 { font-size: 1.4rem; line-height: 1.15; margin-bottom: 6px; }
.story-row p { font-size: 0.96rem; }

.explore-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 16px;
}
.mini-card {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.mini-card h3 {
    font-size: 1.2rem;
    line-height: 1.18;
    margin-bottom: 6px;
}

/* =========================================================
   === LEGACY ARTICLE-PAGE CLASSES (all .html article files) ===
   ========================================================= */

.content-panel, .article-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.article { max-width: 800px; margin: 0 auto; }
.article-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--tint-violet);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    color: var(--accent-strong);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--tint-teal);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    color: var(--accent-teal);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.article h1 {
    margin: 0 0 14px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ink-strong);
    font-variation-settings: "opsz" 144;
}
.article h2 {
    margin: 36px 0 12px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
}
.article h3 {
    margin: 24px 0 10px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--ink-strong);
}
.article p, .article li {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.7;
}
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article ul li, .article ol li { margin-bottom: 6px; }
.article a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article a:hover { color: var(--accent); }

.lede {
    font-size: 1.14rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

.callout {
    margin: 24px 0;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-md);
    background: var(--surface-alt);
}
.callout p:last-child { margin-bottom: 0; }

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.tool-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool-card h3 { margin-top: 0; font-size: 1.15rem; }

.tag {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: var(--tint-violet);
    color: var(--accent-strong);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Numbered steps */
.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
    margin: 22px 0;
}
.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-left: 0;
}
.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tint-violet);
    color: var(--accent-strong);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.88rem;
}

/* Code / prompt boxes */
pre, .prompt-box {
    overflow: auto;
    padding: 18px 20px;
    border-radius: var(--r-md);
    background: #1F1D1A;
    color: #F5F1E8;
    border: 1px solid rgba(28, 25, 23, 0.3);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 18px 0;
}
pre code { background: none; padding: 0; color: inherit; }
code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: var(--page-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-strong);
}

.sources {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--ink-muted);
}
.sources a { color: var(--accent-strong); }

/* Action card (from article pages) */
.action-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--r-md);
    padding: 24px 26px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}
.action-card h3 {
    margin-top: 0;
    color: var(--ink-strong);
    display: flex;
    align-items: center;
    gap: 10px;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.5;
}
.checkbox-icon {
    width: 20px; height: 20px;
    background: var(--tint-violet);
    border: 1.5px solid var(--accent);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.site-shell { background: var(--page); }

.logo {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--ink-strong);
    text-decoration: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .fast-intel { position: static; }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .newsletter-inner {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 28px;
    }
    .newsletter-form { min-width: 0; }

    .editorial-grid {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    .editorial-feed { grid-column: 1 / -1; }
    .feed-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 24px;
    }
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile menu break */
@media (max-width: 820px) {
    .nav-toggle { display: grid; place-items: center; }
    .site-nav { position: relative; }
    .nav-links {
        display: none;
        position: absolute;
        right: 0; top: 52px;
        width: min(280px, calc(100vw - 32px));
        padding: 8px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        align-items: stretch;
        z-index: 950;
    }
    .site-nav.open .nav-links { display: flex; }
    .nav-link { padding: 10px 14px; text-align: left; }

    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .rail-stack { order: 2; }
    .editorial-feed { order: 3; }
    .story-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .explore-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
    body { font-size: 16px; }
    main { padding: 20px 0 56px; }
    .hero { padding: 20px 0 32px; }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .collection-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hero-byline {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .newsletter-form {
        flex-direction: column;
        border-radius: var(--r-md);
        padding: 8px;
    }
    .newsletter-form input { padding: 10px 12px; }
    .newsletter-form button { border-radius: var(--r-sm); }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-links { justify-content: flex-start; }

    .ticker-label {
        font-size: 0.64rem;
        padding: 0 14px;
    }

    .content-panel, .article-content { padding: 22px; border-radius: var(--r-lg); }
    .article h1 { font-size: 1.85rem; }
    .tool-grid { grid-template-columns: 1fr; }
    .feed-list { grid-template-columns: 1fr !important; }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .ticker-run { animation: none; }
}
