/* ===================================================================
   ArrestStories.com — Stylesheet
   Shares the arre.st / suspects.app design system: same five themes,
   same token names, same carousel mechanics. Three type roles
   (--font-head / --font-body / --font-util) so a theme change moves
   the site's voice, not just its colors.
   =================================================================== */

/* ---------------------------------------------------------------
   1. CSS Custom Properties (Midnight Orange — default)
--------------------------------------------------------------- */
:root {
    /* Surfaces */
    --bg: #0a0a0a;
    --surface: #141416;
    --surface-2: #1c1c1e;
    --surface-3: #1a1a1e;
    --border: #1a1a1a;
    --border-light: #2a2a2e;

    /* Text */
    --text: #e5e5e5;
    --text-secondary: #8a8a8a;
    --text-muted: #5a5a5a;

    /* Accent */
    --accent: #F16324;
    --accent-hover: #d9521a;
    --accent-tint-soft: rgba(241, 99, 36, 0.05);
    --accent-tint: rgba(241, 99, 36, 0.08);
    --accent-tint-strong: rgba(241, 99, 36, 0.3);

    /* Overlays */
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 38%, rgba(0,0,0,.92) 100%);
    --overlay-light: rgba(0, 0, 0, 0.3);
    --overlay-medium: rgba(0, 0, 0, 0.7);
    --overlay-strong: rgba(0, 0, 0, 0.9);
    --nav-bg: rgba(10, 10, 10, 0.85);

    /* Badges */
    --badge: var(--accent);
    --badge-text: #fff;
    --btn-text: #fff;
    --on-dark: #fff;

    /* Hairlines — dashed rules, borrowed from suspects.app */
    --rule: rgba(255, 255, 255, 0.14);
    --stamp: var(--accent);

    /* Grain opacity — paper themes turn this up */
    --grain: 0;

    /* Status colors (semantic, constant across themes) */
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-border: rgba(34, 197, 94, 0.2);
    --success-text: #4ade80;
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-border: rgba(239, 68, 68, 0.2);
    --error-text: #f87171;

    /* Typography — three roles, all theme-tunable */
    --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-util: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
    --head-weight: 800;
    --head-transform: none;
    --head-spacing: -0.022em;
    --util-spacing: 0.16em;

    /* Headline sizes — uppercase/typewriter themes step these down */
    --lead-size: clamp(26px, 3.6vw, 43px);
    --card-size: 17.5px;
    --post-size: clamp(28px, 4.2vw, 40px);

    /* Geometry */
    --radius: 10px;
    --radius-sm: 6px;
}

/* ---------------------------------------------------------------
   THEME: NEWSPRINT — broadsheet. Serif display, serif body.
--------------------------------------------------------------- */
[data-theme="newsprint"] {
    --bg: #f4f1ea;
    --surface: #fffdf7;
    --surface-2: #ebe7dc;
    --surface-3: #ebe7dc;
    --border: #d9d3c2;
    --border-light: #c9c2af;
    --text: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;
    --accent: #b8001f;
    --accent-hover: #8e0017;
    --accent-tint-soft: rgba(184, 0, 31, 0.05);
    --accent-tint: rgba(184, 0, 31, 0.08);
    --accent-tint-strong: rgba(184, 0, 31, 0.25);
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(20,16,12,.9) 100%);
    --overlay-light: rgba(0, 0, 0, 0.08);
    --overlay-medium: rgba(0, 0, 0, 0.55);
    --overlay-strong: rgba(0, 0, 0, 0.75);
    --nav-bg: rgba(244, 241, 234, 0.92);
    --badge: #1a1a1a;
    --badge-text: #fffdf7;
    --btn-text: #fffdf7;
    --rule: rgba(20, 16, 12, 0.2);
    --stamp: #b8001f;
    --grain: 0.13;
    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: Georgia, 'Times New Roman', serif;
    --head-weight: 900;
    --head-transform: none;
    --head-spacing: -0.024em;
}

/* ---------------------------------------------------------------
   THEME: POLICE BLOTTER — official record. Mono display.
--------------------------------------------------------------- */
[data-theme="blotter"] {
    --bg: #0d1b2a;
    --surface: #152538;
    --surface-2: #1c3047;
    --surface-3: #1c3047;
    --border: #1f3552;
    --border-light: #2a4365;
    --text: #e8e6e1;
    --text-secondary: #95a4b5;
    --text-muted: #6b7a8b;
    --accent: #d4a017;
    --accent-hover: #b5870e;
    --accent-tint-soft: rgba(212, 160, 23, 0.05);
    --accent-tint: rgba(212, 160, 23, 0.08);
    --accent-tint-strong: rgba(212, 160, 23, 0.3);
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 38%, rgba(13,27,42,.94) 100%);
    --overlay-light: rgba(0, 0, 0, 0.3);
    --overlay-medium: rgba(0, 0, 0, 0.7);
    --overlay-strong: rgba(0, 0, 0, 0.9);
    --nav-bg: rgba(13, 27, 42, 0.92);
    --badge: #d4a017;
    --badge-text: #0d1b2a;
    --btn-text: #0d1b2a;
    --rule: rgba(255, 255, 255, 0.12);
    --stamp: #d4a017;
    --font-head: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    --head-weight: 600;
    --head-transform: uppercase;
    --head-spacing: 0.045em;
    /* uppercase mono sets much wider than Inter at the same value */
    --lead-size: clamp(21px, 2.7vw, 31px);
    --card-size: 14.5px;
    --post-size: clamp(22px, 3vw, 29px);
}

/* ---------------------------------------------------------------
   THEME: MANILA FILE — the case-file bridge to suspects.app.
--------------------------------------------------------------- */
[data-theme="manila"] {
    --bg: #e8dcc4;
    --surface: #f1e8d2;
    --surface-2: #ddd0b3;
    --surface-3: #ddd0b3;
    --border: #c4b491;
    --border-light: #b6a37f;
    --text: #2a1f14;
    --text-secondary: #6b5840;
    --text-muted: #9a866a;
    --accent: #7a1414;
    --accent-hover: #5c0e0e;
    --accent-tint-soft: rgba(122, 20, 20, 0.05);
    --accent-tint: rgba(122, 20, 20, 0.08);
    --accent-tint-strong: rgba(122, 20, 20, 0.25);
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(42,31,20,.9) 100%);
    --overlay-light: rgba(58, 38, 18, 0.12);
    --overlay-medium: rgba(58, 38, 18, 0.6);
    --overlay-strong: rgba(58, 38, 18, 0.78);
    --nav-bg: rgba(232, 220, 196, 0.92);
    --badge: #7a1414;
    --badge-text: #f1e8d2;
    --btn-text: #f1e8d2;
    --rule: rgba(42, 31, 20, 0.24);
    --stamp: #7a1414;
    --grain: 0.13;
    --font-head: 'Special Elite', 'Courier New', monospace;
    --font-body: Georgia, 'Times New Roman', serif;
    --head-weight: 400;
    --head-transform: uppercase;
    --head-spacing: 0.02em;
    --lead-size: clamp(21px, 2.7vw, 32px);
    --card-size: 15px;
    --post-size: clamp(22px, 3vw, 30px);
}

/* ---------------------------------------------------------------
   THEME: TRUE CRIME NOIR — jet black, crimson, pulpy.
--------------------------------------------------------------- */
[data-theme="noir"] {
    --bg: #08080a;
    --surface: #121215;
    --surface-2: #1a1a1f;
    --surface-3: #1a1a1f;
    --border: #2a1015;
    --border-light: #401820;
    --text: #ebe8e0;
    --text-secondary: #9a9a9a;
    --text-muted: #64605c;
    --accent: #dc143c;
    --accent-hover: #b30f30;
    --accent-tint-soft: rgba(220, 20, 60, 0.05);
    --accent-tint: rgba(220, 20, 60, 0.08);
    --accent-tint-strong: rgba(220, 20, 60, 0.3);
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 35%, rgba(8,8,10,.95) 100%);
    --overlay-light: rgba(0, 0, 0, 0.3);
    --overlay-medium: rgba(0, 0, 0, 0.72);
    --overlay-strong: rgba(0, 0, 0, 0.95);
    --nav-bg: rgba(8, 8, 10, 0.9);
    --badge: #dc143c;
    --badge-text: #fff;
    --btn-text: #fff;
    --rule: rgba(255, 255, 255, 0.1);
    --stamp: #dc143c;
    --font-head: 'Playfair Display', Georgia, serif;
    --head-weight: 900;
    --head-transform: uppercase;
    --head-spacing: 0.005em;
    --lead-size: clamp(24px, 3.2vw, 38px);
    --card-size: 16px;
    --post-size: clamp(25px, 3.6vw, 35px);
}

/* ---------------------------------------------------------------
   2. Reset & Base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-top: 58px;
}

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Paper grain — only visible on the paper themes (--grain > 0) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    opacity: var(--grain);
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------------------------------------------------------
   3. Type roles
   .hd  — every headline, routed through the theme's head tokens
   .dl  — the dateline: mono utility line under every headline
--------------------------------------------------------------- */
h1, h2, h3, h4, .hd, .section-title, .brand {
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    text-transform: var(--head-transform);
    letter-spacing: var(--head-spacing);
    line-height: 1.16;
    text-wrap: balance;
}

.dl {
    font-family: var(--font-util);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: var(--util-spacing);
    text-transform: uppercase;
    color: var(--text-secondary);
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.dl .sep { color: var(--text-muted); }
.dl .no { color: var(--accent); font-variant-numeric: tabular-nums; }

/* dateline sitting on a darkened image */
.dl.on-img { color: rgba(255, 255, 255, 0.78); }
.dl.on-img .sep { color: rgba(255, 255, 255, 0.4); }
.dl.on-img .no { color: #fff; }

/* media payload chip — advertises what the post ships */
.payload {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid currentColor;
    padding: 1px 6px;
    border-radius: 2px;
}

.payload .glyph { font-size: 9px; opacity: 0.85; }

/* ---------------------------------------------------------------
   4. Masthead (.nav)
--------------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 58px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--text);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
}

.brand {
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    flex-shrink: 0;
}

.brand .b1 { font-weight: var(--head-weight); }
.brand .b2 { font-weight: 300; color: var(--text-secondary); }

/* the display faces that aren't variable-weight keep one weight */
[data-theme="manila"] .brand .b2,
[data-theme="newsprint"] .brand .b2,
[data-theme="noir"] .brand .b2 { font-weight: inherit; opacity: 0.62; }

.brand-tag {
    font-family: var(--font-util);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: auto;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-util);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 4px 0 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-search {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.nav-search input {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 6px 11px;
    color: var(--text);
    font-family: var(--font-util);
    font-size: 12px;
    width: 168px;
    outline: none;
    transition: border-color 0.15s, width 0.2s;
}

.nav-search input:focus { border-color: var(--accent); width: 210px; }
.nav-search input::placeholder { color: var(--text-muted); letter-spacing: 0.06em; }

.nav-search button {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 6px 10px;
    color: var(--text-secondary);
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.14em;
    transition: color 0.15s, background 0.15s;
}

.nav-search button:hover { color: var(--badge-text); background: var(--accent); border-color: var(--accent); }

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 8px 16px 16px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
    font-family: var(--font-util);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 13px 0;
    border-bottom: 1px dashed var(--rule);
}

.nav-mobile a.active { color: var(--accent); }

.nav-mobile form { display: flex; gap: 8px; padding-top: 14px; }

.nav-mobile input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text);
    font-family: var(--font-util);
    font-size: 12px;
    outline: none;
}

.nav-mobile button[type="submit"] {
    background: var(--accent);
    color: var(--badge-text);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.14em;
}

/* ---------------------------------------------------------------
   5. Content wrapper + section
--------------------------------------------------------------- */
.content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 22px 44px;
}

.section { margin-bottom: 42px; }
.section:last-child { margin-bottom: 0; }

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border-light);
}

.section-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-right: auto;
}

.section-link {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    transition: opacity 0.15s;
}

.section-link:hover { opacity: 0.75; }

/* ---------------------------------------------------------------
   6. Lead story (.hero)
--------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 42px;
}

.hero-main {
    position: relative;
    aspect-ratio: 21 / 9;
    min-height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    display: flex;
    align-items: flex-end;
}

.hero-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--card-overlay);
}

.hero-main .hero-content {
    position: relative;
    z-index: 2;
    padding: 30px 34px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.hero-main .hero-title {
    font-size: var(--lead-size);
    color: var(--on-dark);
}

.hero-main .hero-title a { color: var(--on-dark); }
.hero-main .hero-title a:hover { color: var(--accent); }

.hero-excerpt {
    color: rgba(255, 255, 255, 0.78);
    font-size: 15.5px;
    line-height: 1.5;
    max-width: 58ch;
}

/* status stamp — the suspects.app idiom, recoded for editorial status */
.stamp {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;
    transform: rotate(-5deg);
    border: 2px solid var(--stamp);
    color: var(--stamp);
    font-family: var(--font-util);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 3px 9px;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.stamp.developing { border-style: dashed; }

/* secondary featured cards */
.hero-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.hero-side-card {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 170px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    display: flex;
    align-items: flex-end;
}

.hero-side-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-side-card:hover img { transform: scale(1.04); }

.hero-side-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--card-overlay);
}

.hero-side-card .hero-content {
    position: relative;
    z-index: 2;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hero-side-card .hero-title {
    font-size: 17px;
    line-height: 1.24;
    color: var(--on-dark);
}

.hero-side-card .hero-title a { color: var(--on-dark); }
.hero-side-card:hover .hero-title a { color: var(--accent); }

[data-theme="blotter"] .hero-side-card .hero-title,
[data-theme="manila"] .hero-side-card .hero-title { font-size: 14px; line-height: 1.34; }

/* image-less fallback — hatched photo block, no icon font */
.no-image {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.no-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(135deg, var(--accent-tint-soft) 0 12px, transparent 12px 24px),
        linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 62%, var(--bg) 100%);
}

.no-image::after {
    content: "NO IMAGE";
    position: relative;
    z-index: 1;
    font-family: var(--font-util);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--text-muted);
}

/* ---------------------------------------------------------------
   7. Video rail — same mechanics as arre.st [data-carousel]
--------------------------------------------------------------- */
.rail-wrap { position: relative; }

.rail {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 3px;
}

.rail::-webkit-scrollbar { display: none; }

.video-card {
    width: 288px;
    min-width: 288px;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transition: transform 0.18s ease;
}

.video-card:hover { transform: translateY(-3px); }

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    transition: border-color 0.15s;
}

.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card:hover .video-thumb { border-color: var(--accent); }

.video-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
}

.video-play span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--overlay-medium);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    display: grid;
    place-items: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: background 0.18s, border-color 0.18s;
}

/* play triangle in CSS — no icon font */
.video-play span::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-left: 3px;
    border-left: 13px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.video-card:hover .video-play span { background: var(--accent); border-color: var(--accent); }

.video-duration {
    position: absolute;
    bottom: 7px;
    right: 7px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-family: var(--font-util);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.video-title {
    font-size: 15px;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card:hover .video-title { color: var(--accent); }

.rail-arrow {
    position: absolute;
    top: 78px;
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--overlay-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    display: grid;
    place-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s;
}

.rail-arrow:hover { background: var(--accent); border-color: var(--accent); }
.rail-arrow.prev { left: -12px; }
.rail-arrow.next { right: -12px; }
.rail-arrow[hidden] { display: none; }

.rail-indicator {
    margin-top: 13px;
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.rail-indicator-thumb {
    display: block;
    height: 100%;
    width: 25%;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.12s ease-out;
}

/* ---------------------------------------------------------------
   8. Story grid (.stories-grid, .story-card)
--------------------------------------------------------------- */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 26px 22px;
}

.story-card { display: block; }

.story-card a {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-thumb {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    transition: border-color 0.15s;
}

.story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story-card:hover .story-thumb img { transform: scale(1.04); }
.story-card:hover .story-thumb { border-color: var(--accent); }

/* presumed-innocent strip — ported from arre.st .record-thumb::after */
.story-thumb::after {
    content: "PRESUMED INNOCENT";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.72);
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-util);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-align: center;
    padding: 2px 0;
}

.story-title {
    font-size: var(--card-size);
    line-height: 1.24;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card:hover .story-title { color: var(--accent); }

/* ---------------------------------------------------------------
   9. Load More
--------------------------------------------------------------- */
.load-more-btn {
    display: block;
    width: 100%;
    margin-top: 30px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-family: var(--font-util);
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 14px;
    transition: background 0.15s, border-color 0.15s;
}

.load-more-btn:hover { background: var(--accent-tint); border-color: var(--accent); }
.load-more-btn.loading { opacity: 0.55; cursor: default; }

/* ---------------------------------------------------------------
   10. Headline list
--------------------------------------------------------------- */
.headline-list { display: flex; flex-direction: column; }

.headline-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--rule);
    transition: color 0.15s;
}

.headline-item:first-child { border-top: 1px dashed var(--rule); }
.headline-item:hover .headline-text { color: var(--accent); }

.headline-no {
    font-family: var(--font-util);
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex: none;
    width: 26px;
}

.headline-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text);
}

.headline-source {
    font-family: var(--font-util);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex: none;
}

/* ---------------------------------------------------------------
   11. Post page
--------------------------------------------------------------- */
.post { max-width: 720px; margin: 0 auto; }

.back-link {
    display: inline-block;
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 22px;
    transition: color 0.15s;
}

.back-link:hover { color: var(--accent); }

.post-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.post-kicker {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.post-header h1 {
    font-size: var(--post-size);
    color: var(--text);
}

.post-meta-bar {
    padding: 9px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.post-hero-image {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-hero-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.figure-caption {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.05em;
    line-height: 1.5;
    color: var(--text-secondary);
    padding-left: 10px;
    border-left: 2px solid var(--accent);
}

.post-content {
    font-size: 17px;
    line-height: 1.72;
    color: var(--text);
}

.post-content p { margin-bottom: 1.15em; }

.post-content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    font-size: 3.5em;
    line-height: 0.82;
    padding: 0.06em 0.1em 0 0;
    color: var(--accent);
}

.post-content h2 {
    font-size: 24px;
    margin: 1.8em 0 0.6em;
    color: var(--text);
}

.post-content h3 {
    font-size: 19px;
    margin: 1.5em 0 0.5em;
    color: var(--text);
}

.post-content blockquote {
    margin: 26px 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--accent);
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    font-size: 21px;
    line-height: 1.34;
    letter-spacing: var(--head-spacing);
    color: var(--text);
}

[data-theme="blotter"] .post-content blockquote,
[data-theme="manila"] .post-content blockquote,
[data-theme="noir"] .post-content blockquote {
    font-size: 17px;
    text-transform: none;
    letter-spacing: 0.01em;
}

.post-content img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin: 1.4em 0;
}

.post-content a {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-tint-strong);
}

.post-content a:hover { border-bottom-color: var(--accent); }

/* Resources / sources — the suspects.app bordered-panel idiom */
.resources-section {
    margin-top: 30px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent);
    padding: 16px 18px;
}

.resources-section h3 {
    font-family: var(--font-util);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 13px;
}

.resource-item { margin-bottom: 18px; }
.resource-item:last-child { margin-bottom: 0; }

.resource-item h5 {
    font-family: var(--font-util);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--badge-text);
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.resource-link:hover { background: var(--accent-hover); }

.video-container {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--surface-2);
}

.video-container iframe,
.video-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.sources-list { display: flex; flex-direction: column; gap: 8px; }

.sources-list li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 14px;
    line-height: 1.5;
}

.sources-list .n {
    font-family: var(--font-util);
    font-size: 11px;
    color: var(--accent);
    flex: none;
    font-variant-numeric: tabular-nums;
}

.sources-list a { border-bottom: 1px solid var(--rule); }
.sources-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------
   12. Search bar + empty state
--------------------------------------------------------------- */
.search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--text);
}

.search-bar h2 { font-size: 20px; color: var(--text); }

.search-bar a {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.empty-state {
    text-align: center;
    padding: 70px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-state .mark {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 4px 12px;
    transform: rotate(-4deg);
    margin-bottom: 8px;
}

.empty-state h2 { font-size: 22px; color: var(--text); }
.empty-state p { color: var(--text-secondary); font-size: 15px; }

.empty-state a {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    margin-top: 6px;
    transition: background 0.15s, border-color 0.15s;
}

.empty-state a:hover { background: var(--accent-tint); border-color: var(--accent); }

/* ---------------------------------------------------------------
   13. Footer
--------------------------------------------------------------- */
.footer {
    border-top: 2px solid var(--text);
    margin-top: 20px;
    padding: 18px 22px 28px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: baseline;
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.footer-left { color: var(--text); margin-right: auto; }

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: baseline;
}

.footer-links a,
.footer-links button {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.footer-links a:hover,
.footer-links button:hover { color: var(--accent); }

.footer-disclaimer {
    max-width: 1120px;
    margin: 12px auto 0;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* ---------------------------------------------------------------
   14. Theme Picker Modal
--------------------------------------------------------------- */
.tp-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay-strong);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tp-backdrop.open { display: flex; }

.tp-modal {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    padding: 24px;
    box-shadow: 0 20px 60px var(--overlay-strong);
    position: relative;
}

.tp-title {
    font-size: 22px;
    margin: 0 0 4px;
}

.tp-sub {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 18px;
}

.tp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 0;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.tp-card {
    text-align: left;
    background: var(--surface-2);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.12s ease, border-color 0.12s ease;
    font-family: inherit;
    color: inherit;
}

.tp-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint-strong); }

.tp-card .swatch { height: 50px; display: flex; align-items: stretch; }
.tp-card .swatch .bg { flex: 2; }
.tp-card .swatch .surf { flex: 1; }
.tp-card .swatch .acc { flex: 0.3; }
.tp-card .meta { padding: 8px 10px 10px; }
.tp-card .name { font-weight: 700; font-size: 13px; }
.tp-card .tag { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.tp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.tp-auto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.tp-auto input { accent-color: var(--accent); width: 16px; height: 16px; }

.tp-done {
    background: var(--accent);
    color: var(--btn-text);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}

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

@media (hover: hover) and (pointer: fine) {
    .tp-close:hover { color: var(--text); }
    .tp-card:hover { transform: translateY(-2px); border-color: var(--accent); }
    .tp-done:hover { background: var(--accent-hover); }
}

/* ---------------------------------------------------------------
   15. Responsive
--------------------------------------------------------------- */
@media (max-width: 1024px) {
    .brand-tag { display: none; }
    .nav-links { margin-right: auto; }
    .stories-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; }
}

@media (max-width: 767px) {
    body { padding-top: 54px; }
    .nav { height: 54px; padding: 0 16px; }
    .brand { font-size: 20px; margin-right: auto; }
    .nav-links { display: none; }
    .nav-search { display: none; }
    .nav-hamburger { display: flex; }
    .nav-mobile { top: 54px; }
    .content { padding: 20px 16px 34px; }
    .hero-main { aspect-ratio: 4 / 3; min-height: 240px; }
    .hero-main .hero-content { padding: 20px; }
    .hero-side { grid-template-columns: 1fr; }
    .rail-arrow { display: none; }
    .stories-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
    .story-title { font-size: 14px; -webkit-line-clamp: 3; }
    .post-content { font-size: 16px; }
    .headline-item { flex-wrap: wrap; gap: 4px 12px; }
    .headline-text { flex-basis: calc(100% - 40px); }
    .headline-source { margin-left: 40px; }
    .footer { padding: 18px 16px 26px; }
}

@media (max-width: 480px) {
    .stories-grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
    .story-title { font-size: 13px; }
    .video-card { width: 250px; min-width: 250px; }
    .dl { font-size: 10px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
