/* ===================================================================
   ArrestStories.com — Redesign
   arre.st design system + truecrimenews content patterns
   =================================================================== */

/* ---------------------------------------------------------------
   1. CSS Custom Properties (Midnight Orange — default)
--------------------------------------------------------------- */
:root {
    --bg: #0a0a0a;
    --surface: #141416;
    --surface-2: #1c1c1e;
    --surface-3: #1a1a1e;
    --border: #1a1a1a;
    --border-light: #2a2a2e;
    --text: #e5e5e5;
    --text-secondary: #666;
    --text-muted: #444;
    --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);
    --card-overlay: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0,0,0,.85) 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);
    --badge: var(--accent);
    --badge-text: #fff;
    --btn-text: #fff;
    --on-dark: #fff;
    --font-head: 'Inter', system-ui, sans-serif;
    --head-weight: 800;
    --head-transform: none;
    --head-spacing: -0.01em;
    --radius: 10px;
    --radius-sm: 8px;
}

/* ---------------------------------------------------------------
   THEME: NEWSPRINT
--------------------------------------------------------------- */
[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 55%, rgba(244,241,234,.95) 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;
    --font-head: 'Playfair Display', Georgia, serif;
    --head-weight: 900;
    --head-transform: none;
    --head-spacing: -0.02em;
}

/* ---------------------------------------------------------------
   THEME: POLICE BLOTTER
--------------------------------------------------------------- */
[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: #5e6c7d;
    --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 45%, rgba(13,27,42,.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(13, 27, 42, 0.92);
    --badge: #d4a017;
    --badge-text: #0d1b2a;
    --btn-text: #0d1b2a;
    --font-head: 'IBM Plex Mono', 'Courier New', monospace;
    --head-weight: 600;
    --head-transform: uppercase;
    --head-spacing: 0.06em;
}

/* ---------------------------------------------------------------
   THEME: MANILA FILE
--------------------------------------------------------------- */
[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 55%, rgba(232,220,196,.92) 100%);
    --overlay-light: rgba(58, 38, 18, 0.12);
    --overlay-medium: rgba(58, 38, 18, 0.55);
    --overlay-strong: rgba(58, 38, 18, 0.78);
    --nav-bg: rgba(232, 220, 196, 0.92);
    --badge: #7a1414;
    --badge-text: #f1e8d2;
    --btn-text: #f1e8d2;
    --font-head: 'Special Elite', 'Courier New', monospace;
    --head-weight: 400;
    --head-transform: uppercase;
    --head-spacing: 0.04em;
}

/* ---------------------------------------------------------------
   THEME: TRUE CRIME NOIR
--------------------------------------------------------------- */
[data-theme="noir"] {
    --bg: #08080a;
    --surface: #121215;
    --surface-2: #1a1a1f;
    --surface-3: #1a1a1f;
    --border: #2a1015;
    --border-light: #401820;
    --text: #ebe8e0;
    --text-secondary: #999;
    --text-muted: #555;
    --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 40%, rgba(8,8,10,.95) 100%);
    --overlay-light: rgba(0, 0, 0, 0.3);
    --overlay-medium: rgba(0, 0, 0, 0.7);
    --overlay-strong: rgba(0, 0, 0, 0.95);
    --nav-bg: rgba(8, 8, 10, 0.9);
    --badge: #dc143c;
    --badge-text: #fff;
    --btn-text: #fff;
    --font-head: 'Playfair Display', Georgia, serif;
    --head-weight: 900;
    --head-transform: none;
    --head-spacing: -0.02em;
}

/* ---------------------------------------------------------------
   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: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-top: 56px;
}

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; }

h1, h2, h3, .section-title, .nav-logo {
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    text-transform: var(--head-transform);
    letter-spacing: var(--head-spacing);
}

/* ---------------------------------------------------------------
   3. Navigation
--------------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 32px;
}

.nav-logo {
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-decoration: none;
    flex-shrink: 0;
}

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

.nav-links a {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: color 0.15s;
}

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

.nav-search {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    gap: 8px;
    margin-left: auto;
}

.nav-search input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 13px;
    outline: none;
    width: 160px;
    font-family: inherit;
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search button {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 0;
    display: flex;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-left: auto;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
}

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

.nav-mobile {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
    gap: 0;
}

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

.nav-mobile a {
    display: block;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a.active { color: var(--accent); }

/* ---------------------------------------------------------------
   4. Content Wrapper
--------------------------------------------------------------- */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px 40px;
}

/* ---------------------------------------------------------------
   5. Sections
--------------------------------------------------------------- */
.section { margin-bottom: 40px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 20px;
    color: var(--text);
}

.section-link {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    transition: opacity 0.15s;
}

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

/* ---------------------------------------------------------------
   6. Hero / Featured Section
--------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-main {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    background: var(--surface);
}

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

.hero-main .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
}

.hero-main .hero-content {
    position: relative;
    z-index: 1;
    padding: 28px;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--btn-text);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-main .hero-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 8px;
}

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

.hero-main .hero-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-side-card {
    flex: 1;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    background: var(--surface);
}

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

.hero-side-card .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 50%, transparent 70%);
}

.hero-side-card .hero-content {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.hero-side-card .hero-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 4px;
}

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

.hero-side-card .hero-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.hero-no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
    background: var(--surface);
}

/* ---------------------------------------------------------------
   7. Story Cards (image-dominant grid)
--------------------------------------------------------------- */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.story-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.story-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.story-card a { display: block; }

.story-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface-2);
}

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

.story-card:hover .story-thumb img {
    transform: scale(1.05);
}

.story-thumb .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.story-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: var(--btn-text);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.story-body {
    padding: 14px;
}

.story-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.story-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------------------------------------------------------------
   8. Load More
--------------------------------------------------------------- */
.load-more-btn {
    display: block;
    width: 100%;
    background: var(--surface);
    color: var(--accent);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 24px;
}

.load-more-btn:hover { background: var(--surface-2); }

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ---------------------------------------------------------------
   9. Headlines Section (external links)
--------------------------------------------------------------- */
.headline-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.headline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.15s;
    text-decoration: none;
    color: inherit;
}

.headline-item:first-child { border-top: 1px solid var(--border); }
.headline-item:hover { opacity: 0.8; }

.headline-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    flex: 1;
    margin-right: 12px;
}

.headline-source {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   10. Single Post View
--------------------------------------------------------------- */
.post-hero-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 24px;
    background: var(--surface);
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 500px;
}

.post-header {
    margin-bottom: 32px;
}

.post-header h1 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 12px;
}

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-meta-bar span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    max-width: 800px;
}

.post-content p { margin-bottom: 1.5em; }
.post-content h2 { font-size: 24px; margin: 2em 0 0.75em; color: var(--text); }
.post-content h3 { font-size: 20px; margin: 1.5em 0 0.75em; color: var(--text); }

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Resources / Embeds */
.resources-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
    border: 1px solid var(--border);
}

.resources-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-item {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

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

.resource-item h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: var(--btn-text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

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

/* Video container */
.video-container {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* Sources */
.sources-list {
    list-style: none;
    padding: 0;
}

.sources-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.sources-list li:last-child { border-bottom: none; }

.sources-list a {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    transition: opacity 0.15s;
}

.back-link:hover { opacity: 0.8; }

/* ---------------------------------------------------------------
   11. Search
--------------------------------------------------------------- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--accent-tint);
    border: 1px solid var(--accent-tint-strong);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 24px;
}

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

.search-bar a {
    background: var(--surface);
    color: var(--text);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: background 0.15s;
}

.search-bar a:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------
   12. Not Found / Empty State
--------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

.empty-state h2 {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p { margin-bottom: 16px; }

.empty-state a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: var(--btn-text);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

/* ---------------------------------------------------------------
   13. Footer
--------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 40px auto 0;
}

.footer-left {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a,
.footer-links button {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

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

/* ---------------------------------------------------------------
   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-family: var(--font-head);
    font-weight: var(--head-weight);
    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-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

@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) {
    .hero { grid-template-columns: 1fr; }
    .hero-main { min-height: 300px; }
    .hero-side { flex-direction: row; }
    .hero-side-card { min-height: 180px; }
    .stories-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 767px) {
    .nav { padding: 0 16px; }
    .nav-links { display: none; }
    .nav-search { display: none; }
    .nav-hamburger { display: flex; }
    .content { padding: 16px; }
    .hero { grid-template-columns: 1fr; }
    .hero-main { min-height: 260px; }
    .hero-side { flex-direction: column; }
    .hero-side-card { min-height: 160px; }
    .hero-main .hero-title { font-size: 18px; }
    .stories-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .story-body { padding: 10px; }
    .story-title { font-size: 13px; }
    .story-meta { font-size: 11px; }
    .footer { flex-direction: column; gap: 12px; padding: 20px 16px; text-align: center; }
    .post-content { font-size: 15px; }
    .headline-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 480px) {
    .hero-main { min-height: 220px; }
    .hero-main .hero-title { font-size: 16px; }
    .stories-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
