/* ═══════════════════════════════════════════════
   WHO'S DRIVING — GHOST THEME
   Dark editorial design with burnished orange accent
   ═══════════════════════════════════════════════ */

:root {
    --bg: #0A0A0F;
    --surface: #13131A;
    --border: #2a2a3a;
    --text: #F0EDE6;
    --muted: #8A8A9A;
    --dim: #6E6E7E;
    --accent: #E8720C;
    --accent-light: #FF8A2E;
    --lane-1: #FF6B35;
    --lane-2: #E63946;
    --lane-3: #6C63FF;
    --lane-4: #2EC4B6;
    --lane-5: #FFB627;
    --lane-6: #90BE6D;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-body: 'Source Serif 4', Georgia, serif;
    --max-width: 1200px;
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

img { max-width: 100%; height: auto; }

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.006) 2px, rgba(255,255,255,0.006) 4px);
    pointer-events: none;
    z-index: 9999;
}

/* ─── TICKER ─── */
.wd-ticker {
    background: var(--accent);
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--bg);
    font-weight: 600;
}

.wd-ticker-inner {
    display: inline-block;
    animation: ticker 40s linear infinite;
}

.wd-ticker-text {
    display: inline-block;
    padding-right: 50px;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── NAVIGATION ─── */
.wd-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.wd-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wd-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.wd-logo-mark {
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
}

.wd-logo-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}

.wd-logo-tld {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--dim);
    letter-spacing: 3px;
}

.wd-nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
}

.wd-nav-links .nav { display: flex; gap: 28px; list-style: none; }
.wd-nav-links .nav li a {
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.wd-nav-links .nav li a:hover { color: var(--accent); }

.wd-btn-subscribe {
    background: var(--accent);
    color: var(--bg) !important;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: background 0.2s;
}
.wd-btn-subscribe:hover { background: var(--accent-light); color: var(--bg) !important; }

/* ─── HERO ─── */
.wd-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 32px 60px;
    position: relative;
}

.wd-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.wd-hero-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 4px;
    margin-bottom: 24px;
    animation: fadeIn 1s ease-out;
}

.wd-hero-title {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 900;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 24px;
    animation: fadeSlideUp 0.8s ease-out;
}

.wd-accent { color: var(--accent); }

.wd-hero-subtitle {
    font-family: var(--font-body);
    font-size: 22px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 650px;
    margin-bottom: 40px;
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

/* Typewriter */
.wd-typewriter {
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.7;
    color: var(--accent);
    min-height: 52px;
    letter-spacing: 0.3px;
}

.wd-typewriter::after {
    content: '';
    border-right: 2px solid var(--accent);
    margin-left: 1px;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Stats Bar */
.wd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    margin-top: 60px;
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.wd-stat {
    background: var(--bg);
    padding: 24px;
    text-align: center;
}

.wd-stat-num {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 6px;
}

.wd-stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--dim);
    letter-spacing: 1.5px;
    line-height: 1.4;
}

/* ─── ARTICLES SECTION ─── */
.wd-articles {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 32px;
}

.wd-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.wd-articles-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--dim);
}

.wd-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wd-articles-grid-flat {
    grid-template-columns: repeat(3, 1fr);
}

/* ─── ARTICLE CARDS ─── */
.wd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    padding: 28px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    background: #15151E;
}

.wd-card-featured {
    grid-column: 1 / -1;
    border-top: none;
    border-left: 4px solid var(--accent);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.wd-card-featured:hover {
    box-shadow: 0 12px 40px rgba(232, 114, 12, 0.1);
}

.wd-card-featured-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: var(--bg);
    padding: 6px 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.wd-card-lane {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2.5px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.wd-card-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    flex: 1;
}

.wd-card-title a { color: var(--text); text-decoration: none; }
.wd-card-title a:hover { color: var(--accent); }

.wd-card-title-lg {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 800px;
}

.wd-card-title-lg a { color: var(--text); text-decoration: none; }
.wd-card-title-lg a:hover { color: var(--accent); }

.wd-card-excerpt {
    font-family: var(--font-body);
    font-size: 14px;
    color: #8A8A9A;
    line-height: 1.5;
    margin-bottom: 16px;
}

.wd-card-excerpt-lg {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 20px;
}

.wd-card-meta, .wd-card-footer {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    display: flex;
    gap: 12px;
    align-items: center;
}

.wd-card-footer {
    justify-content: space-between;
    border-top: 1px solid #1E1E2E;
    padding-top: 12px;
    margin-top: auto;
    font-size: 11px;
}

.wd-card-meta-sep { color: #555; }

/* ─── NEWSLETTER CTA ─── */
.wd-cta {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.wd-cta-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.wd-cta-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.wd-cta-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 16px;
}

.wd-cta-desc {
    font-family: var(--font-body);
    font-size: 16px;
    color: #8A8A9A;
    line-height: 1.6;
}

.wd-cta-form-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 32px;
}

.wd-cta-form-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6E6E7E;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.wd-cta-btn {
    width: 100%;
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 14px 24px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}
.wd-cta-btn:hover { background: var(--accent-light); }

.wd-cta-note {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6E6E7E;
    margin-top: 12px;
}

/* ─── AI NARRATOR BOX ─── */
.wd-narrator {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 32px;
}

.wd-narrator-box {
    background: linear-gradient(135deg, var(--surface) 0%, #0f0f18 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 40px;
    position: relative;
}

.wd-narrator-status {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6E6E7E;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wd-narrator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.wd-narrator-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.wd-narrator-quote {
    font-family: var(--font-body);
    font-size: 18px;
    font-style: italic;
    color: #9A9AAA;
    line-height: 1.7;
    max-width: 800px;
}

.wd-narrator-punchline {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
}

/* ─── POST / ARTICLE PAGES ─── */
.wd-post-header {
    border-bottom: 1px solid var(--border);
    padding: 60px 0 40px;
}

.wd-post-header-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 32px;
}

.wd-post-lane {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.wd-post-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 20px;
}

.wd-post-excerpt {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.wd-post-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    display: flex;
    gap: 12px;
    align-items: center;
}

.wd-post-image {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 32px;
}

.wd-post-image img {
    width: 100%;
    border: 1px solid var(--border);
}

.wd-post-image figcaption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    text-align: center;
    margin-top: 12px;
}

/* Post Content */
.wd-post-content {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 32px;
}

.wd-post-content p {
    margin-bottom: 1.5em;
    font-size: 18px;
    line-height: 1.8;
    color: #C8C4BC;
}

.wd-post-content h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin: 2em 0 0.8em;
}

.wd-post-content h3 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin: 1.8em 0 0.6em;
}

.wd-post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 24px;
    margin: 2em 0;
    font-style: italic;
    color: var(--muted);
}

.wd-post-content strong { color: var(--text); font-weight: 600; }

.wd-post-content a { color: var(--accent); text-decoration: underline; }
.wd-post-content a:hover { color: var(--accent-light); }

.wd-post-content ul, .wd-post-content ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
    color: #C8C4BC;
}

.wd-post-content li { margin-bottom: 0.5em; }

.wd-post-content code {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent);
    border-radius: 3px;
}

.wd-post-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 4px;
}

.wd-post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #C8C4BC;
}

.wd-post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3em 0;
}

.wd-post-content figure { margin: 2em 0; }
.wd-post-content figcaption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    text-align: center;
    margin-top: 10px;
}

/* Ghost specific cards */
.kg-image-card, .kg-gallery-card { margin: 2em 0; }
.kg-width-wide { max-width: 1040px; margin-left: calc(50% - 520px); }
.kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); }
.kg-image { width: 100%; }
.kg-bookmark-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 2em 0;
}

/* Post Footer */
.wd-post-footer {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.wd-post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.wd-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 4px 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.wd-tag:hover { border-color: var(--accent); color: var(--accent); }

/* Post Sign-off */
.wd-post-signoff {
    max-width: 780px;
    margin: 20px auto 60px;
    padding: 24px 32px;
    border-left: 3px solid var(--accent);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wd-narrator-dot-inline {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
    animation: pulse 2s ease-in-out infinite;
}

.wd-post-signoff p {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--dim);
    font-style: italic;
    line-height: 1.5;
}

/* ─── ARCHIVE PAGES ─── */
.wd-archive {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 32px;
}

.wd-archive-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.wd-archive-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.wd-archive-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: var(--text);
}

.wd-archive-desc {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--muted);
    margin-top: 12px;
    max-width: 600px;
}

/* ─── FOOTER ─── */
.wd-footer {
    border-top: 1px solid var(--border);
    background: #08080D;
}

.wd-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 32px;
}

.wd-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.wd-footer-brand {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.wd-footer-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: #7A7A8A;
    line-height: 1.6;
    max-width: 300px;
}

.wd-footer-copy {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #5A5A6A;
    margin-top: 16px;
    letter-spacing: 1px;
}

.wd-footer-heading {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--dim);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.wd-footer-col .nav { list-style: none; }
.wd-footer-col .nav li { padding: 4px 0; }
.wd-footer-col .nav li a {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #7A7A8A;
    text-decoration: none;
    transition: color 0.2s;
}
.wd-footer-col .nav li a:hover { color: var(--accent); }

.wd-footer-bar {
    border-top: 1px solid #1E1E2E;
    padding: 16px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #4A4A5A;
    letter-spacing: 2px;
}

/* ─── PAGINATION ─── */
.pagination {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 32px 60px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.pagination a {
    color: var(--accent);
    letter-spacing: 1px;
}

.page-number {
    color: var(--dim);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .wd-hero-title { font-size: 48px; }
    .wd-articles-grid { grid-template-columns: 1fr; }
    .wd-articles-grid-flat { grid-template-columns: repeat(2, 1fr); }
    .wd-cta-inner { grid-template-columns: 1fr; gap: 32px; }
    .wd-stats { grid-template-columns: repeat(2, 1fr); }
    .wd-footer-grid { grid-template-columns: 1fr; }
    .wd-card-featured { padding: 28px; }
    .wd-card-title-lg { font-size: 28px; }
    .wd-post-title { font-size: 36px; }
    .wd-cta-title { font-size: 28px; }
    .wd-narrator-punchline { font-size: 22px; }
}

@media (max-width: 600px) {
    .wd-hero-title { font-size: 36px; }
    .wd-hero { padding: 40px 20px 40px; }
    .wd-articles { padding: 32px 20px; }
    .wd-nav-inner { padding: 12px 20px; }
    .wd-nav-links .nav { display: none; }
    .wd-articles-grid-flat { grid-template-columns: 1fr; }
    .wd-stats { grid-template-columns: repeat(2, 1fr); }
    .wd-stat-num { font-size: 24px; }
    .wd-post-header-inner, .wd-post-content, .wd-post-footer, .wd-post-signoff { padding: 0 20px; }
    .wd-post-title { font-size: 28px; }
}

/* ─── GHOST MEMBERSHIP PORTAL OVERRIDE ─── */
.gh-portal-triggerbtn-iframe { color-scheme: dark; }
