/*
Theme Name: FinConsolidated Blog
Theme URI: http://localhost/finconsolidated-blog
Author: FinConsolidated
Author URI: http://localhost/finconsolidated-blog
Description: A custom SEO-first editorial WordPress theme inspired by SmartMag, optimized for Core Web Vitals and financial news publishing.
Version: 2.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finconsolidated
Tags: blog, news, custom-header, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    --red:           #00B98E;
    --red-dark:      #009970;
    --red-light:     #00d4a8;
    --black:         #000000;
    --near-black:    #0d0d0d;
    --dark-bg:       #0a1628;
    --dark-bg2:      #111d35;
    --dark-border:   #1a2d4a;
    --text:          #111111;
    --text-2:        #555555;
    --text-3:        #888888;
    --bg:            #ffffff;
    --bg-2:          #f7f7f7;
    --bg-3:          #efefef;
    --border:        #e5e5e5;
    --border-2:      #dddddd;
    --topbar-bg:     #07201a;
    --topbar-text:   #aaaaaa;

    --serif:  'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono:   'Courier New', monospace;

    --radius:    4px;
    --radius-lg: 8px;
    --shadow:    0 2px 8px rgba(0,0,0,.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,.12);
    --trans:     all .2s ease;

    --container: 1200px;
    --sidebar-w: 300px;
    --gap:       24px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--trans); }
ul, ol { list-style: none; }

/* ==========================================================================
   Skip link
   ========================================================================== */
.skip-link { position: absolute; top: -100%; left: 0; padding: 8px 16px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; z-index: 99999; border-radius: 0 0 4px 0; }
.skip-link:focus { top: 0; }

/* ==========================================================================
   Container
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.site-layout { display: flex; flex-direction: column; min-height: 100vh; }
.content-wrap { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: var(--gap); align-items: start; }
@media (max-width: 940px) { .content-wrap { grid-template-columns: 1fr; } }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.site-topbar { background: var(--topbar-bg); height: 40px; display: flex; align-items: center; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.topbar-date { font-size: 12px; color: var(--topbar-text); letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-social { display: flex; align-items: center; gap: 8px; }
.topbar-social a { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #2a2a2a; border-radius: 50%; color: var(--topbar-text); font-size: 11px; font-weight: 700; transition: var(--trans); }
.topbar-social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.topbar-login-btn { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #fff; background: var(--red); padding: 5px 14px; border-radius: var(--radius); }
.topbar-login-btn:hover { background: var(--red-dark); }
@media (max-width: 768px) { .site-topbar { display: none; } }

/* ==========================================================================
   MID HEADER
   ========================================================================== */
.site-header-mid { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.header-mid-inner { display: flex; align-items: center; gap: 20px; height: 70px; }

.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img, .site-logo .custom-logo { height: 44px; width: auto; max-height: 44px; display: block; }
.logo-icon { width: 40px; height: 40px; background: var(--red); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; font-weight: 700; color: #fff; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -.3px; line-height: 1.1; }
.logo-tagline { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-3); }

.header-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; justify-content: flex-end; }
.header-nav a { display: block; padding: 8px 12px; font-size: 13px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--text); border-radius: var(--radius); }
.header-nav a:hover, .header-nav .current-menu-item > a { color: var(--red); }
@media (max-width: 940px) { .header-nav { display: none; } }

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-search { width: 38px; height: 38px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-2); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text); transition: var(--trans); }
.btn-search:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-search svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.btn-subscribe { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 8px 16px; background: var(--red); color: #fff; border-radius: var(--radius); display: none; }
@media (min-width: 640px) { .btn-subscribe { display: block; } }
.btn-subscribe:hover { background: var(--red-dark); }

.btn-hamburger { width: 38px; height: 38px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-2); cursor: pointer; display: none; align-items: center; justify-content: center; }
@media (max-width: 940px) { .btn-hamburger { display: flex; } }
.btn-hamburger svg { width: 18px; height: 18px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ==========================================================================
   BOTTOM BAR (Category nav + Trending ticker)
   ========================================================================== */
.site-header-bottom { background: var(--bg); border-bottom: 2px solid var(--red); }
.header-bottom-inner { display: flex; align-items: center; height: 42px; overflow: hidden; }

.cat-tabs { display: flex; align-items: center; flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { display: flex; align-items: center; height: 42px; padding: 0 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: var(--trans); }
.cat-tabs a:hover, .cat-tabs a.active { color: var(--red); border-color: var(--red); }
.cat-divider { width: 1px; height: 20px; background: var(--border-2); flex-shrink: 0; margin: 0 4px; }

.trending-bar { display: flex; align-items: center; flex: 1; overflow: hidden; min-width: 0; height: 42px; }
.trending-label { display: flex; align-items: center; gap: 6px; flex-shrink: 0; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 0 14px; height: 42px; margin-left: 8px; white-space: nowrap; }
.ticker-wrap { flex: 1; overflow: hidden; height: 42px; display: flex; align-items: center; padding-left: 12px; }
.ticker-track { display: flex; align-items: center; animation: ticker-scroll 45s linear infinite; white-space: nowrap; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; padding-right: 48px; font-size: 13px; font-weight: 600; color: var(--text); }
.ticker-item::before { content: '▸'; color: var(--red); margin-right: 8px; }
.ticker-item a:hover { color: var(--red); }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (max-width: 768px) { .site-header-bottom { display: none; } }

/* Mobile drawer */
.mobile-drawer { display: none; background: var(--bg); border-top: 1px solid var(--border); padding: 16px 20px; position: sticky; top: 70px; z-index: 190; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mobile-drawer.is-open { display: block; }
.mobile-drawer .nav-list { display: flex; flex-direction: column; gap: 2px; }
.mobile-drawer .nav-list a { display: block; padding: 10px 12px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--text); border-radius: var(--radius); }
.mobile-drawer .nav-list a:hover { background: var(--bg-2); color: var(--red); }

/* Search overlay */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; align-items: flex-start; justify-content: center; padding-top: 100px; }
.search-overlay.is-open { display: flex; }
.search-overlay-inner { width: 100%; max-width: 700px; padding: 0 20px; position: relative; }
.search-overlay input { width: 100%; background: transparent; border: none; border-bottom: 2px solid #fff; color: #fff; font-size: 32px; font-family: var(--serif); padding: 12px 0; outline: none; }
.search-overlay input::placeholder { color: rgba(255,255,255,.35); }
.search-overlay-hint { color: rgba(255,255,255,.4); font-size: 13px; margin-top: 12px; }
.btn-close-search { position: fixed; top: 24px; right: 24px; background: none; border: none; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

/* ==========================================================================
   HERO / FEATURED SECTION
   ========================================================================== */
.hero-section { padding: 28px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 4px; }
@media (max-width: 768px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-post-main { grid-row: 1 / 3; position: relative; overflow: hidden; border-radius: var(--radius); background: #111; }
.hero-post-main .post-img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; opacity: .88; transition: transform .4s ease, opacity .3s ease; }
.hero-post-main:hover .post-img { transform: scale(1.03); opacity: .75; }
.hero-post-main .post-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 55%, transparent 100%); }
.hero-post-main .post-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 24px; }
@media (max-width: 768px) { .hero-post-main { grid-row: auto; } .hero-post-main .post-img { min-height: 260px; } }

.hero-post-small { position: relative; overflow: hidden; border-radius: var(--radius); background: #111; }
.hero-post-small .post-img { width: 100%; height: 200px; object-fit: cover; opacity: .88; transition: transform .4s ease, opacity .3s ease; }
.hero-post-small:hover .post-img { transform: scale(1.03); opacity: .75; }
.hero-post-small .post-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.hero-post-small .post-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; }

.post-cat-badge { display: inline-block; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; margin-bottom: 8px; }
.post-cat-badge:hover { background: var(--red-dark); }
.overlay-title { font-family: var(--serif); font-weight: 700; color: #fff; line-height: 1.25; letter-spacing: -.02em; }
.overlay-title a { color: inherit; }
.overlay-title a:hover { color: rgba(255,255,255,.85); }
.hero-post-main .overlay-title { font-size: 26px; }
.hero-post-small .overlay-title { font-size: 16px; }
.overlay-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.65); }

/* ==========================================================================
   SECTION LABELS
   ========================================================================== */
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-label-text { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -.02em; position: relative; padding-bottom: 6px; }
.section-label-text::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--red); }
.section-label-line { flex: 1; height: 1px; background: var(--border); }
.section-label-link { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--red); flex-shrink: 0; }
.section-label-link:hover { color: var(--red-dark); }

/* ==========================================================================
   POST CARDS
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 940px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .post-grid { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--bg); }
.card-img-wrap { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-3); aspect-ratio: 16/9; flex-shrink: 0; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-body { padding: 14px 0 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.card-cat { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
.card-cat:hover { color: var(--red-dark); }
.card-title { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; color: var(--text); margin: 0; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--red); }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: auto; padding-top: 4px; }
.card-meta .dot { font-size: 10px; }
.card-meta a { color: var(--text-3); font-weight: 600; }
.card-meta a:hover { color: var(--red); }
.card-excerpt { font-size: 13px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* List card */
.card-list { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-list:last-child { border-bottom: none; padding-bottom: 0; }
.card-list-img-wrap { width: 100px; height: 70px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; background: var(--bg-3); }
.card-list-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card-list:hover .card-list-img-wrap img { transform: scale(1.05); }
.card-list-body { flex: 1; min-width: 0; }
.card-list-cat { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin-bottom: 5px; display: block; }
.card-list-title { font-family: var(--serif); font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-list-title a { color: inherit; }
.card-list-title a:hover { color: var(--red); }
.card-list-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Numbered list card */
.card-number { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px dashed var(--border-2); }
.card-number:last-child { border-bottom: none; padding-bottom: 0; }
.card-number-badge { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--border); line-height: 1; flex-shrink: 0; width: 30px; padding-top: 2px; }
.card-number-title { font-family: var(--serif); font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--text); }
.card-number-title a { color: inherit; }
.card-number-title a:hover { color: var(--red); }
.card-number-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.site-main { flex: 1; padding: 32px 0 48px; }
.split-section { display: grid; grid-template-columns: 1fr 280px; gap: var(--gap); align-items: start; }
@media (max-width: 940px) { .split-section { grid-template-columns: 1fr; } }
.split-main .card-title { font-size: 20px; }
.split-aside { display: flex; flex-direction: column; gap: 0; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 32px; }
@media (max-width: 940px) { .sidebar { display: none; } }

.widget-title { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--text); padding: 0 0 10px; border-bottom: 2px solid var(--border-2); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ''; display: block; width: 3px; height: 18px; background: var(--red); border-radius: 2px; flex-shrink: 0; }

/* Tabbed widget */
.tab-nav { display: flex; border-bottom: 2px solid var(--border-2); margin-bottom: 16px; }
.tab-btn { flex: 1; padding: 10px 8px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: var(--trans); font-family: inherit; }
.tab-btn.active, .tab-btn:hover { color: var(--red); border-color: var(--red); }
.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; gap: 14px; }

.search-box { display: flex; border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; }
.search-box input { flex: 1; padding: 10px 14px; font-size: 14px; font-family: inherit; background: var(--bg); border: none; outline: none; color: var(--text); }
.search-box button { padding: 0 14px; background: var(--red); border: none; color: #fff; cursor: pointer; font-size: 16px; transition: var(--trans); }
.search-box button:hover { background: var(--red-dark); }

.cat-list-item a { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 13px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); transition: var(--trans); }
.cat-list-item:last-child a { border-bottom: none; }
.cat-list-item a:hover { color: var(--red); padding-left: 4px; }
.cat-list-count { font-size: 11px; background: var(--bg-3); padding: 2px 8px; border-radius: 20px; color: var(--text-3); }

.tag-cloud-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 5px 10px; border: 1px solid var(--border-2); border-radius: 3px; color: var(--text-2); transition: var(--trans); }
.tag-pill:hover { background: var(--red); border-color: var(--red); color: #fff; }

.promo-box { background: linear-gradient(135deg, var(--red) 0%, #007a5e 100%); border-radius: var(--radius); padding: 24px 20px; text-align: center; color: #fff; }
.promo-box-title { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.promo-box-text { font-size: 13px; opacity: .85; margin-bottom: 16px; line-height: 1.5; }
.promo-box-btn { display: inline-block; padding: 9px 22px; background: #fff; color: var(--red); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; border-radius: var(--radius); }
.promo-box-btn:hover { background: var(--bg-2); }

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.single-wrap { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: var(--gap); align-items: start; }
@media (max-width: 940px) { .single-wrap { grid-template-columns: 1fr; } }

.post-cat-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.post-h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.03em; color: var(--text); margin-bottom: 16px; }
@media (max-width: 768px) { .post-h1 { font-size: 26px; } }
.post-meta-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.author-avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.author-link { font-size: 13px; font-weight: 700; color: var(--text); }
.author-link:hover { color: var(--red); }
.post-date-sm { font-size: 12px; color: var(--text-3); }
.read-time-sm { font-size: 12px; color: var(--text-3); }
.share-bar { margin-left: auto; display: flex; gap: 6px; }
.share-btn-sm { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; border-radius: var(--radius); color: #fff; }
.share-btn-sm.tw { background: #1da1f2; }
.share-btn-sm.tw:hover { background: #0d8fd9; color: #fff; }
.share-btn-sm.li { background: #0a66c2; }
.share-btn-sm.li:hover { background: #084e96; color: #fff; }
.share-btn-sm.fb { background: #1877f2; }
.share-btn-sm.fb:hover { background: #1260cc; color: #fff; }
.post-featured-img { width: 100%; border-radius: var(--radius); object-fit: cover; margin-bottom: 28px; }

.entry-content { font-size: 17px; line-height: 1.75; color: var(--text); }
.entry-content > * + * { margin-top: 1.5em; }
.entry-content h2 { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--border); }
.entry-content h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin-top: 1.75em; }
.entry-content h4 { font-size: 17px; font-weight: 700; margin-top: 1.5em; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--red-dark); }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 1.5em; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote { border-left: 3px solid var(--red); padding: 16px 20px; background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--text-2); margin-block: 2em; }
.entry-content code { font-family: var(--mono); font-size: .875em; background: var(--bg-2); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--border-2); }
.entry-content pre { background: var(--near-black); color: #e2e8f0; padding: 20px; border-radius: var(--radius-lg); overflow-x: auto; margin-block: 2em; }
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin-block: 2em; }
.entry-content figcaption { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; margin-block: 2em; font-size: 14px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--border-2); text-align: left; }
.entry-content th { background: var(--bg-2); font-weight: 700; }
.entry-content tr:nth-child(even) td { background: var(--bg-2); }

.post-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--border); }
.post-tags-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); margin-right: 4px; }

.author-box { display: flex; gap: 20px; padding: 24px; background: var(--bg-2); border-radius: var(--radius-lg); margin-top: 40px; border: 1px solid var(--border); }
.author-box-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box-name { font-family: var(--serif); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.author-box-name a { color: var(--text); }
.author-box-name a:hover { color: var(--red); }
.author-box-bio { font-size: 13px; color: var(--text-2); line-height: 1.6; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
@media (max-width: 540px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav-item.next { text-align: right; }
.post-nav-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin-bottom: 4px; display: block; }
.post-nav-title { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.post-nav-title:hover { color: var(--red); }

.related-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-section { margin-top: 48px; padding-top: 28px; border-top: 2px solid var(--border); }
.comments-heading { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 24px; letter-spacing: -.02em; }
.comment { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-body { display: flex; gap: 14px; }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.comment-right { flex: 1; }
.comment-author-name { font-size: 14px; font-weight: 700; color: var(--text); }
.comment-date { font-size: 12px; color: var(--text-3); margin-left: 10px; }
.comment-text { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--text); }
.comment-reply-link { font-size: 12px; font-weight: 700; color: var(--red); margin-top: 8px; display: inline-block; }
.comment-reply-link:hover { color: var(--red-dark); }
.pending-badge { font-size: 10px; background: #fff3cd; color: #856404; padding: 2px 8px; border-radius: 3px; margin-left: 8px; }

.comment-form-wrap { background: var(--bg-2); border-radius: var(--radius-lg); padding: 28px; margin-top: 36px; }
.comment-form-title { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text); }
.form-control { width: 100%; padding: 10px 14px; font-size: 14px; font-family: inherit; background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--radius); color: var(--text); transition: var(--trans); }
.form-control:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(0,185,142,.15); }
textarea.form-control { min-height: 130px; resize: vertical; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border: none; border-radius: var(--radius); cursor: pointer; transition: var(--trans); font-family: inherit; margin-top: 8px; }
.btn-primary:hover { background: var(--red-dark); }
.must-login-notice { text-align: center; padding: 24px; color: var(--text-2); font-size: 14px; }
.must-login-notice a { color: var(--red); font-weight: 700; }

/* ==========================================================================
   ARCHIVE HEADER
   ========================================================================== */
.archive-banner { background: var(--bg-2); border-bottom: 3px solid var(--red); padding: 28px 0; margin-bottom: 32px; }
.archive-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--red); margin-bottom: 4px; }
.archive-h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.archive-desc { font-size: 14px; color: var(--text-2); margin-top: 8px; max-width: 500px; }

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumb-nav { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-3); }
.breadcrumb-list a { color: var(--text-3); }
.breadcrumb-list a:hover { color: var(--red); }
.breadcrumb-sep { color: var(--border-2); }
.breadcrumb-current { color: var(--text-2); font-weight: 600; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding-inline: 10px; font-size: 13px; font-weight: 700; border: 1px solid var(--border-2); border-radius: var(--radius); color: var(--text); transition: var(--trans); }
.page-numbers.current, .page-numbers:hover { background: var(--red); border-color: var(--red); color: #fff; }
.page-numbers.dots { border-color: transparent; background: transparent; }

/* ==========================================================================
   404
   ========================================================================== */
.error-404 { text-align: center; padding: 80px 20px; }
.error-code { font-family: var(--serif); font-size: 120px; font-weight: 700; color: var(--bg-3); line-height: 1; }
.error-title { font-family: var(--serif); font-size: 28px; font-weight: 700; margin: 12px 0 8px; }
.error-text { color: var(--text-2); font-size: 15px; max-width: 400px; margin-inline: auto; margin-bottom: 24px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--dark-bg); margin-top: auto; }
.footer-top { padding: 56px 0 40px; border-bottom: 1px solid var(--dark-border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 940px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo-name { color: #fff; font-size: 22px; }
.footer-brand .logo-tagline { color: rgba(255,255,255,.35); }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.6; margin: 16px 0 20px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 36px; height: 36px; border: 1px solid #2a2a2a; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); font-size: 12px; font-weight: 700; transition: var(--trans); }
.footer-social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.footer-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.3); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.55); transition: var(--trans); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.35); }
.footer-copy a { color: rgba(255,255,255,.35); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,.35); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.6); }

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section-gap { padding-block: 40px; }
.notice { padding: 14px 18px; border-radius: var(--radius); font-size: 14px; border-left: 3px solid; }
.notice-info { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.notice-success { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.notice-warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.notice-error { background: #fef2f2; border-color: #e53e3e; color: #991b1b; }

@media print {
    .site-topbar, .site-header-mid, .site-header-bottom, .site-footer, .sidebar, .comments-section, .related-section { display: none; }
    body { font-size: 12pt; }
    .entry-content { max-width: 100%; }
}

/* ==========================================================================
   Sign In Page
   ========================================================================== */
.page-template-page-signin .breadcrumb-nav { display: none; }
.signin-page { background: var(--bg-2); min-height: 70vh; display: flex; align-items: center; padding: 0; }
.signin-wrap { width: 100%; padding: 32px 16px; display: flex; justify-content: center; }
.signin-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px 40px; width: 100%; max-width: 440px; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.signin-logo-link { display: flex; justify-content: center; margin-bottom: 28px; }
.signin-logo-link img, .signin-logo-link .custom-logo { height: 48px; width: auto; }
.signin-heading { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--text); text-align: center; margin: 0 0 6px; }
.signin-subtext { font-size: 14px; color: var(--text-2); text-align: center; margin: 0 0 28px; }
.signin-alert { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: var(--radius); padding: 12px 14px; font-size: 13px; margin-bottom: 20px; }
.signin-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; border-radius: var(--radius); padding: 12px 14px; font-size: 13px; margin-bottom: 20px; }
.signin-form { display: flex; flex-direction: column; gap: 18px; }
.signin-field { display: flex; flex-direction: column; gap: 6px; }
.signin-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.signin-field input { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; font-family: var(--sans); color: var(--text); background: var(--bg); transition: var(--trans); outline: none; }
.signin-field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(0,185,142,.12); }
.signin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signin-remember { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.signin-remember input[type="checkbox"] { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; }
.signin-field-hint { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.page-template-page-register .breadcrumb-nav { display: none; }
.signin-forgot { font-size: 13px; color: var(--red); font-weight: 600; }
.signin-forgot:hover { color: var(--red-dark); text-decoration: underline; }
.signin-submit { width: 100%; padding: 12px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border: none; border-radius: var(--radius); cursor: pointer; transition: var(--trans); margin-top: 4px; }
.signin-submit:hover { background: var(--red-dark); }
.signin-register-row { font-size: 13px; color: var(--text-2); text-align: center; margin: 22px 0 0; }
.signin-register-row a { color: var(--red); font-weight: 600; }
.signin-register-row a:hover { text-decoration: underline; }
@media (max-width: 480px) {
    .signin-card { padding: 32px 20px; }
}
