/*
Theme Name: Dollar Insight Hub
Description: Decode the Dollar — global finance and economics insights
Version: 1.0
Author: Dollar Insight Hub
Text Domain: dollarinsighthub
*/

/* =============================================================================
   DESIGN TOKENS & CUSTOM PROPERTIES
   ============================================================================= */

:root {
    --noir:           #020814;
    --accent:         #D4AF37;
    --accent-light:   #e8c84a;
    --text:           #e8edf5;
    --muted:          #8899bb;
    --surface:        #050e20;
    --surface-2:      #081428;
    --surface-3:      #0b1a34;
    --border:         rgba(212, 175, 55, 0.16);
    --border-strong:  rgba(212, 175, 55, 0.42);
    --shadow-gold:    0 4px 32px rgba(212, 175, 55, 0.10);
    --shadow-deep:    0 8px 48px rgba(2, 8, 20, 0.8);
    --radius:         4px;
    --radius-lg:      8px;
    --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display:   'Libre Baskerville', Georgia, serif;
    --font-body:      'Source Sans 3', system-ui, -apple-system, sans-serif;
    --font-mono:      'Source Code Pro', 'Courier New', monospace;
    --max-width:      1200px;
    --content-width:  780px;
    --sidebar-width:  300px;
    --gutter:         clamp(16px, 4vw, 40px);
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--noir);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--accent); color: var(--noir); }

/* =============================================================================
   TICKER BAR — Static scrolling effect (CSS only)
   ============================================================================= */

.ticker-bar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    height: 32px;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker-bar::before,
.ticker-bar::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.ticker-bar::before {
    left: 0;
    background: linear-gradient(to right, var(--surface-2), transparent);
}

.ticker-bar::after {
    right: 0;
    background: linear-gradient(to left, var(--surface-2), transparent);
}

.ticker-label {
    background: var(--accent);
    color: var(--noir);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 3;
    white-space: nowrap;
}

.ticker-track {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
    height: 100%;
}

.ticker-items {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    will-change: transform;
}

.ticker-item {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0 24px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.ticker-item .ticker-symbol {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ticker-item .ticker-up   { color: #4ade80; }
.ticker-item .ticker-down { color: #f87171; }

.ticker-sep {
    color: var(--border-strong);
    padding: 0 12px;
    font-size: 0.6rem;
}

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

/* Pause on hover */
.ticker-track:hover .ticker-items { animation-play-state: paused; }

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem,   5vw,   3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.5rem; color: var(--text); }
p:last-child { margin-bottom: 0; }
strong { color: var(--accent-light); font-weight: 600; }

/* Mono / ticker / data spans */
.mono, .ticker-data, .data-figure {
    font-family: var(--font-mono);
    font-size: 0.9em;
    letter-spacing: 0.03em;
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap     { display: flex; align-items: center; gap: 12px; }

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

.text-center  { text-align: center; }
.text-gold    { color: var(--accent); }
.text-muted   { color: var(--muted); }

/* =============================================================================
   SKIP LINK
   ============================================================================= */

.skip-link {
    position: absolute; top: -100%; left: 1rem;
    background: var(--accent); color: var(--noir);
    padding: 8px 16px; border-radius: var(--radius);
    font-weight: 700; z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

#site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow var(--transition);
}

#site-header.scrolled { box-shadow: var(--shadow-deep); }

.header-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    height: 64px; gap: 24px;
}

/* Logo */
.site-branding {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; text-decoration: none;
}

.logo-dollar {
    font-family: var(--font-display);
    font-size: 1.6rem; color: var(--accent); line-height: 1;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.branding-text { display: flex; flex-direction: column; }

.site-name {
    font-family: var(--font-display);
    font-size: 1.25rem; color: var(--text);
    letter-spacing: -0.02em; line-height: 1;
}

.site-name span { color: var(--accent); }

.site-tagline {
    font-size: 0.65rem; color: var(--muted);
    letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px;
    font-family: var(--font-body);
}

/* Primary Navigation */
#primary-nav { flex: 1; display: flex; justify-content: center; }

.nav-menu { display: flex; align-items: center; gap: 2px; }

.nav-menu > li > a {
    display: block; padding: 7px 13px;
    font-size: 0.85rem; font-weight: 400;
    letter-spacing: 0.02em; color: var(--muted);
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
    font-family: var(--font-body);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.08);
}

/* Header CTA */
.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn-search {
    background: none; border: 1px solid var(--border);
    color: var(--muted); padding: 6px 12px;
    border-radius: var(--radius); cursor: pointer;
    transition: all var(--transition); font-size: 0.82rem;
    font-family: var(--font-body);
}

.btn-search:hover { border-color: var(--accent); color: var(--accent); }

/* Hamburger */
.menu-toggle {
    display: none; background: none; border: 1px solid var(--border);
    color: var(--text); padding: 8px 10px; border-radius: var(--radius);
    cursor: pointer; flex-direction: column; gap: 5px;
    align-items: center; justify-content: center; width: 40px; height: 40px;
}

.menu-toggle .bar {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: all var(--transition);
}

/* =============================================================================
   HERO — HOMEPAGE
   ============================================================================= */

.hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 60%, var(--surface-3) 100%);
    padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
    position: relative; overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 15% 50%, rgba(212,175,55,0.04) 0%, transparent 65%),
        radial-gradient(ellipse 70% 40% at 90% 80%, rgba(2,8,20,0.9) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.45;
}

/* Magazine-style hero label */
.hero-issue {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}

.hero-issue-label {
    font-family: var(--font-mono);
    font-size: 0.65rem; color: var(--accent);
    letter-spacing: 0.14em; text-transform: uppercase;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-strong);
    padding: 3px 10px; border-radius: 2px;
}

.hero-issue-date {
    font-family: var(--font-mono);
    font-size: 0.7rem; color: var(--muted);
    letter-spacing: 0.06em;
}

.hero-inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.hero-kicker {
    font-family: var(--font-body);
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
}

.hero-kicker::before {
    content: '';
    display: block; width: 32px; height: 2px;
    background: var(--accent); border-radius: 99px;
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: var(--text); margin-bottom: 20px; line-height: 1.1;
    font-family: var(--font-display);
}

.hero-title .highlight { color: var(--accent); }

.hero-subtitle {
    font-size: 1.05rem; color: var(--muted);
    margin-bottom: 36px; max-width: 520px; line-height: 1.75;
    font-family: var(--font-body);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Market Data Cards (hero right) */
.hero-market-data { display: flex; flex-direction: column; gap: 14px; }

.market-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
    transition: border-color var(--transition);
}

.market-card:hover { border-color: var(--border-strong); }

.market-card .market-name {
    font-family: var(--font-mono);
    font-size: 0.8rem; font-weight: 700;
    color: var(--text); letter-spacing: 0.06em;
    text-transform: uppercase;
}

.market-card .market-desc {
    font-size: 0.72rem; color: var(--muted);
    margin-top: 2px;
}

.market-card .market-val {
    font-family: var(--font-mono);
    font-size: 1.2rem; color: var(--accent);
    font-weight: 400; text-align: right;
}

.market-card .market-change {
    font-family: var(--font-mono);
    font-size: 0.72rem; text-align: right; margin-top: 2px;
}

.market-up   { color: #4ade80; }
.market-down { color: #f87171; }

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px; font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.03em; border-radius: var(--radius); border: none;
    cursor: pointer; text-decoration: none; transition: all var(--transition);
    line-height: 1; font-family: var(--font-body);
}

.btn-primary { background: var(--accent); color: var(--noir); }

.btn-primary:hover {
    background: var(--accent-light); color: var(--noir);
    text-decoration: none; transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.28);
}

.btn-ghost {
    background: transparent; color: var(--accent);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    background: rgba(212, 175, 55, 0.07);
    color: var(--accent-light); text-decoration: none; transform: translateY(-1px);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* =============================================================================
   SECTION STYLES
   ============================================================================= */

.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--dark     { background: var(--surface); }
.section--surface2 { background: var(--surface-2); }

.section-header { margin-bottom: clamp(32px, 4vw, 52px); }
.section-header.centered { text-align: center; }

.section-eyebrow {
    display: inline-block; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
    margin-bottom: 10px; padding: 3px 8px;
    background: rgba(212, 175, 55, 0.07);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-mono);
}

.section-title { font-family: var(--font-display); color: var(--text); margin-bottom: 12px; }

.section-desc {
    font-size: 1rem; color: var(--muted); max-width: 540px;
    font-family: var(--font-body);
}

.section-header.centered .section-desc { margin-inline: auto; }

.divider-gold {
    width: 40px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 99px; margin: 12px 0 20px;
}

.section-header.centered .divider-gold { margin-inline: auto; }

.section-link {
    font-size: 0.82rem; font-weight: 600; color: var(--accent);
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-body); letter-spacing: 0.04em; text-transform: uppercase;
    transition: gap var(--transition), color var(--transition);
}

.section-link:hover { color: var(--accent-light); gap: 10px; text-decoration: none; }

/* =============================================================================
   CATEGORY CARDS — MAGAZINE STYLE
   ============================================================================= */

.categories-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    text-decoration: none; transition: all var(--transition);
    position: relative; overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--transition);
}

.category-card:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
    text-decoration: none;
}

.category-card:hover::after { transform: scaleX(1); }

.category-label-caps {
    font-family: var(--font-mono);
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 4px;
}

.category-name {
    font-family: var(--font-display);
    font-size: 1.05rem; color: var(--text); margin: 0;
}

.category-desc {
    font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin: 0;
}

/* =============================================================================
   POST CARDS — MAGAZINE GRID
   ============================================================================= */

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.posts-grid--magazine {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.posts-grid--magazine .post-card:nth-child(1) { grid-column: span 8; }
.posts-grid--magazine .post-card:nth-child(2) { grid-column: span 4; }
.posts-grid--magazine .post-card:nth-child(3),
.posts-grid--magazine .post-card:nth-child(4),
.posts-grid--magazine .post-card:nth-child(5) { grid-column: span 4; }

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: all var(--transition);
    position: relative;
}

.post-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

.post-card__thumb {
    position: relative; overflow: hidden;
    background: var(--surface-2); aspect-ratio: 16 / 9;
}

.post-card__thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card__thumb img { transform: scale(1.03); }

.post-card__thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 2.5rem; color: var(--accent);
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
    opacity: 0.4; min-height: 160px;
}

.post-cat-label {
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 2px 8px; border-radius: 2px; text-decoration: none;
}

.post-card__body {
    padding: 18px; flex: 1;
    display: flex; flex-direction: column; gap: 9px;
}

.post-card__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}

.post-card__date {
    font-family: var(--font-mono);
    font-size: 0.7rem; color: var(--muted);
}

.post-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem; color: var(--text); line-height: 1.3; margin: 0;
}

.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--accent-light); text-decoration: none; }

.post-card__excerpt {
    font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__footer {
    padding: 12px 18px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

.reading-time { font-size: 0.7rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.read-more-link {
    font-family: var(--font-mono);
    font-size: 0.72rem; font-weight: 700;
    color: var(--accent); text-decoration: none;
    letter-spacing: 0.06em; text-transform: uppercase;
}

.read-more-link:hover { color: var(--accent-light); text-decoration: none; }

/* =============================================================================
   DATA CALLOUT BOXES
   ============================================================================= */

/* Standard data callout with monospace stats */
.data-callout {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 24px 28px;
    margin: 2rem 0;
    position: relative;
}

.data-callout::before {
    content: '$';
    position: absolute; top: -13px; left: 18px;
    background: var(--surface);
    color: var(--accent); font-family: var(--font-display);
    font-size: 0.95rem; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 50%;
}

.data-callout__title {
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 10px;
}

.data-callout p {
    color: var(--text); font-size: 0.93rem; margin: 0; line-height: 1.65;
}

.data-callout .stat-figures {
    display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px;
}

.data-callout .stat-figure {
    display: flex; flex-direction: column; align-items: center;
}

.data-callout .stat-figure .fig {
    font-family: var(--font-mono);
    font-size: 1.5rem; color: var(--accent); line-height: 1;
}

.data-callout .stat-figure .fig-label {
    font-family: var(--font-mono);
    font-size: 0.62rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px;
}

/* Market Insight pull-quote */
blockquote.market-insight,
.market-insight {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 28px 32px 24px 40px;
    margin: 2.5rem 0;
    position: relative;
}

.market-insight::before {
    content: '$';
    position: absolute; top: 50%; left: -22px;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 2rem; color: var(--accent);
    opacity: 0.6; line-height: 1;
    background: var(--surface-2);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 50%;
}

.market-insight p,
.market-insight > p {
    font-family: var(--font-display);
    font-size: 1.2rem; line-height: 1.55;
    color: var(--text); font-style: italic; margin-bottom: 12px;
}

.market-insight cite {
    display: block; font-family: var(--font-mono);
    font-size: 0.72rem; font-style: normal;
    color: var(--accent); font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
}

.market-insight cite::before { content: '— '; }

/* Stat / data row */
.stat-row {
    display: flex; flex-wrap: wrap; gap: 0;
    margin: 1.5rem 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.stat-row__item {
    flex: 1; min-width: 100px; text-align: center;
    padding: 20px 16px;
    border-right: 1px solid var(--border);
}

.stat-row__item:last-child { border-right: none; }

.stat-row__item .value {
    font-family: var(--font-mono);
    font-size: 1.5rem; color: var(--accent); display: block; font-weight: 400;
}

.stat-row__item .label {
    font-family: var(--font-mono);
    font-size: 0.62rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px;
}

/* =============================================================================
   SIDEBAR
   ============================================================================= */

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: clamp(24px, 3vw, 48px);
    align-items: start;
}

#secondary { position: sticky; top: 88px; }

.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px; margin-bottom: 22px;
}

.widget-title {
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

.widget ul li {
    padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}

.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); text-decoration: none; transition: color var(--transition); }
.widget ul li a:hover { color: var(--accent); }

/* =============================================================================
   ADSENSE ZONES
   ============================================================================= */

.adsense-leaderboard {
    width: 100%; min-height: 90px;
    background: rgba(212, 175, 55, 0.02);
    border: 1px dashed rgba(212, 175, 55, 0.12);
    border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center;
    margin: 1.5rem 0; overflow: hidden;
}

.adsense-rectangle {
    width: 100%; min-height: 250px;
    background: rgba(212, 175, 55, 0.02);
    border: 1px dashed rgba(212, 175, 55, 0.12);
    border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center;
    margin: 1.5rem 0; overflow: hidden;
}

.adsense-sidebar {
    width: 100%; min-height: 300px;
    background: rgba(212, 175, 55, 0.02);
    border: 1px dashed rgba(212, 175, 55, 0.12);
    border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center;
    margin-bottom: 22px; overflow: hidden;
}

/* =============================================================================
   SINGLE POST / ARTICLE
   ============================================================================= */

.post-hero {
    background: linear-gradient(180deg, var(--surface) 0%, var(--noir) 100%);
    padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
    border-bottom: 1px solid var(--border);
}

.post-hero .post-cat-label { margin-bottom: 14px; display: inline-block; }
.post-hero h1 { margin-bottom: 16px; max-width: 820px; }

.post-meta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    font-size: 0.8rem; color: var(--muted); margin-top: 16px;
    font-family: var(--font-mono);
}

.post-meta-row .meta-item { display: flex; align-items: center; gap: 6px; }
.post-meta-row .meta-sep  { color: var(--border-strong); font-size: 0.55rem; }

.post-featured-image {
    margin: 0 0 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid var(--border);
}

.post-featured-image img { width: 100%; height: auto; max-height: 480px; object-fit: cover; }

/* Article content */
.entry-content {
    font-size: 1.05rem; line-height: 1.8; color: var(--text);
    font-family: var(--font-body);
}

.entry-content h2 {
    font-size: 1.65rem; margin: 2.5rem 0 1rem;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

.entry-content h3 {
    font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--accent-light);
}

.entry-content h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

.entry-content p { margin-bottom: 1.5rem; }

.entry-content ul,
.entry-content ol { margin: 0 0 1.5rem 1.5rem; list-style: revert; }

.entry-content li { margin-bottom: 0.4rem; color: var(--text); }

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

.entry-content table {
    width: 100%; border-collapse: collapse;
    margin: 2rem 0; font-size: 0.88rem;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}

.entry-content th {
    background: var(--surface-2); color: var(--accent);
    font-family: var(--font-mono); font-weight: 700;
    text-align: left; padding: 12px 14px;
    font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.entry-content td {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    color: var(--text); font-family: var(--font-mono); font-size: 0.88rem;
}

.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:nth-child(even) td { background: rgba(212, 175, 55, 0.02); }

.entry-content code {
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--accent-light); padding: 2px 7px;
    border-radius: 3px; font-family: var(--font-mono); font-size: 0.87em;
}

.entry-content pre {
    background: var(--surface-2); border: 1px solid var(--border);
    border-left: 4px solid var(--accent); border-radius: var(--radius);
    padding: 20px; overflow-x: auto; margin: 1.5rem 0;
}

.entry-content pre code { background: none; border: none; padding: 0; font-size: 0.87rem; }

.entry-content blockquote {
    background: var(--surface-2); border-left: 4px solid var(--accent);
    padding: 20px 24px; margin: 2rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic; color: var(--muted);
}

/* Post tags */
.post-tags {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-tags__label {
    font-family: var(--font-mono);
    font-size: 0.62rem; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; font-weight: 700;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-pill {
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--muted); font-family: var(--font-mono);
    font-size: 0.72rem; padding: 4px 12px;
    border-radius: 2px; text-decoration: none; transition: all var(--transition);
    letter-spacing: 0.04em;
}

.tag-pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Author box */
.author-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    margin: 3rem 0; display: flex; gap: 20px; align-items: flex-start;
}

.author-box__avatar {
    width: 68px; height: 68px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    border: 2px solid var(--border-strong);
}

.author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-box__name {
    font-family: var(--font-display);
    font-size: 1.1rem; color: var(--text); margin-bottom: 4px;
}

.author-box__bio { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* Related posts */
.related-posts {
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
}

.related-posts__title {
    font-family: var(--font-mono);
    font-size: 0.62rem; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--accent); font-weight: 700; margin-bottom: 20px;
}

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* =============================================================================
   BREADCRUMBS
   ============================================================================= */

.breadcrumbs {
    padding: 14px 0; border-bottom: 1px solid var(--border);
    font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; opacity: 0.4; }

/* =============================================================================
   PAGINATION
   ============================================================================= */

.pagination,
.posts-navigation {
    margin: 3rem 0; display: flex;
    align-items: center; justify-content: center; gap: 8px;
}

.page-numbers,
.nav-previous a,
.nav-next a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--muted); font-family: var(--font-mono);
    font-size: 0.82rem; border-radius: var(--radius);
    text-decoration: none; transition: all var(--transition);
}

.page-numbers:hover,
.nav-previous a:hover,
.nav-next a:hover {
    border-color: var(--accent); color: var(--accent); text-decoration: none;
}

.page-numbers.current {
    background: var(--accent); border-color: var(--accent);
    color: var(--noir); font-weight: 700;
}

/* =============================================================================
   SEARCH OVERLAY
   ============================================================================= */

.search-overlay {
    position: fixed; inset: 0;
    background: rgba(2, 8, 20, 0.96);
    backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 15vh; opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
}

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

.search-form-wrap { width: 100%; max-width: 600px; padding: 0 var(--gutter); }

.search-form-wrap input[type="search"] {
    width: 100%;
    background: var(--surface); border: 2px solid var(--border-strong);
    color: var(--text); font-size: 1.2rem;
    padding: 16px 20px; border-radius: var(--radius-lg); outline: none;
    font-family: var(--font-body);
}

.search-form-wrap input[type="search"]:focus { border-color: var(--accent); }

.search-close {
    background: none; border: none; color: var(--muted);
    font-size: 1.4rem; cursor: pointer; margin-top: 16px;
    display: block; margin-inline: auto; transition: color var(--transition);
    font-family: var(--font-body);
}

.search-close:hover { color: var(--accent); }

/* =============================================================================
   FOOTER
   ============================================================================= */

#site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: clamp(48px, 6vw, 80px) 0 0;
}

.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    padding-bottom: clamp(40px, 5vw, 64px);
}

.footer-brand p {
    font-size: 0.88rem; color: var(--muted); line-height: 1.65; margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
    width: 34px; height: 34px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center;
    color: var(--muted); font-size: 0.8rem;
    text-decoration: none; transition: all var(--transition);
}

.social-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    color: var(--muted); font-size: 0.88rem;
    text-decoration: none; transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid var(--border); padding: 18px 0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}

.footer-bottom p { font-size: 0.78rem; color: var(--muted); margin: 0; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

.footer-disclaimer {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 14px 0; text-align: center;
    font-size: 0.7rem; color: var(--muted);
    line-height: 1.6;
    font-family: var(--font-body);
}

/* =============================================================================
   ARCHIVE PAGE
   ============================================================================= */

.archive-header {
    background: var(--surface);
    padding: clamp(40px, 5vw, 72px) 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: clamp(32px, 4vw, 56px);
}

.archive-header h1 { margin-bottom: 8px; }
.archive-header p  { color: var(--muted); font-size: 1rem; }

.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* =============================================================================
   404 PAGE
   ============================================================================= */

.error-404 {
    min-height: 60vh; display: flex;
    align-items: center; justify-content: center;
    text-align: center; padding: 80px var(--gutter);
}

.error-404__inner { max-width: 480px; }

.error-404__number {
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--accent); opacity: 0.12;
    line-height: 0.85; margin-bottom: 24px;
}

.error-404__title  { margin-bottom: 12px; }
.error-404__desc   { color: var(--muted); margin-bottom: 28px; }

/* =============================================================================
   MISC UTILITIES
   ============================================================================= */

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-light), var(--accent), transparent);
    margin: 2rem 0; opacity: 0.4;
}

.badge {
    display: inline-block; padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    border-radius: var(--radius);
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent); border: 1px solid var(--border);
}

.badge--green { background: rgba(74,222,128,0.1); color: #4ade80; border-color: rgba(74,222,128,0.3); }
.badge--red   { background: rgba(248,113,113,0.1); color: #f87171; border-color: rgba(248,113,113,0.3); }

/* Newsletter widget */
.newsletter-widget { text-align: center; }
.newsletter-widget p { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }

.newsletter-form input[type="email"] {
    width: 100%; background: var(--surface-2);
    border: 1px solid var(--border); color: var(--text);
    padding: 10px 14px; border-radius: var(--radius);
    font-size: 0.88rem; outline: none;
    transition: border-color var(--transition);
    font-family: var(--font-body);
}

.newsletter-form input[type="email"]:focus { border-color: var(--accent); }

/* =============================================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================================= */

@media (max-width: 900px) {
    .grid-3, .grid-4, .posts-grid, .categories-grid, .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-inner { grid-template-columns: 1fr; gap: 36px; }

    .posts-grid--magazine {
        grid-template-columns: 1fr 1fr;
    }

    .posts-grid--magazine .post-card:nth-child(n) { grid-column: span 1; }
    .posts-grid--magazine .post-card:nth-child(1) { grid-column: span 2; }

    .content-sidebar-wrap { grid-template-columns: 1fr; }
    #secondary { position: static; }

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

    .stat-row__item { min-width: 80px; }
}

/* =============================================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ============================================================================= */

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4,
    .posts-grid, .posts-grid--magazine,
    .categories-grid, .related-grid, .archive-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid--magazine .post-card:nth-child(n) { grid-column: span 1; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .menu-toggle { display: flex; }

    #primary-nav {
        position: fixed; top: 64px; left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        padding: 16px var(--gutter);
        transform: translateY(-110%); opacity: 0;
        pointer-events: none; transition: all var(--transition); z-index: 999;
        justify-content: flex-start;
    }

    #primary-nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }

    .nav-menu { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a {
        display: block; padding: 12px 0;
        border-bottom: 1px solid var(--border); border-radius: 0;
    }

    .header-cta .btn-search { display: none; }

    .author-box { flex-direction: column; }

    .ticker-bar { display: none; }

    .stat-row { flex-direction: column; }
    .stat-row__item { border-right: none; border-bottom: 1px solid var(--border); }
    .stat-row__item:last-child { border-bottom: none; }

    .market-insight::before { display: none; }
    .market-insight { padding-left: 24px; }
}

/* =============================================================================
   PRINT
   ============================================================================= */

@media print {
    :root { --noir: #fff; --text: #000; --surface: #f9f9f9; }

    #site-header, #site-footer, #secondary, .ticker-bar,
    .adsense-leaderboard, .adsense-rectangle, .adsense-sidebar { display: none !important; }

    .entry-content { font-size: 12pt; color: #000; }
    a { color: #000; text-decoration: underline; }
}
