/*
Theme Name: Accounting Reports Daily
Theme URI: https://accountingreportsdaily.com
Author: BrizoSystem Pte Ltd
Author URI: https://brizosystem.com
Description: Custom theme for Accounting Reports Daily — practical accounting education for SME owners and finance professionals.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ard
Tags: blog, custom-colors, custom-logo, featured-images, sticky-post, two-columns
*/

/* ═══════════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════════ */
:root {
  --ground:       #F6FBFA;
  --surface:      #FFFFFF;
  --surface-2:    #EEF8F5;
  --ink:          #0F2828;
  --ink-2:        #2E5050;
  --ink-3:        #6A9290;
  --accent:       #3DDBB8;
  --accent-hov:   #2ECBA8;
  --accent-10:    rgba(61,219,184,0.10);
  --accent-20:    rgba(61,219,184,0.18);
  --accent-dark:  #1A3E3E;
  --border:       #D4EDE9;
  --border-lt:    #E8F5F2;
  --header-h:     68px;
  --container:    1200px;
  --side:         260px;   /* single post sidebar width  */
  --gap-lg:       56px;    /* single post sidebar gap    */
  --shadow-card:  0 12px 40px rgba(0,40,40,.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; }

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

.site-wrap { min-height: 60vh; }
.site-main { display: block; }

/* ═══════════════════════════════════════════════════════════════
   SHARED UI (buttons / labels / shared patterns)
═══════════════════════════════════════════════════════════════ */

/* Primary + ghost buttons */
.btn-primary, .btn-ghost, .btn-subscribe, .btn-tmpl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 100px;
  line-height: 1.2;
  transition: background .14s, border-color .14s, color .14s, opacity .14s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-dark);
  color: #fff;
}
.btn-primary:hover { background: #254F4F; }

.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn-tmpl {
  background: var(--accent-dark);
  color: #fff;
}
.btn-tmpl:hover { opacity: .88; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0,40,40,.06); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo:hover { opacity: .85; }
.site-logo img.custom-logo { max-height: 40px; width: auto; }
.site-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.2px;
  color: var(--ink);
}

/* Primary nav */
.primary-nav { margin-right: auto; }

.nav-list { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; }

.nav-list a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 13px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .14s, background .14s;
}
.nav-list a:hover,
.nav-list > li.current-menu-item > a,
.nav-list > li.current_page_item > a,
.nav-list > li.current-menu-ancestor > a {
  color: var(--ink);
  background: var(--accent-10);
}

/* Caret for dropdown parents */
.nav-list .menu-item-has-children > a::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .5;
  flex-shrink: 0;
}

/* Dropdowns */
.nav-list .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-list .sub-menu a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.nav-list .sub-menu .sub-menu {
  top: 0;
  left: calc(100% + 6px);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-search-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  border-radius: 10px;
  transition: background .14s, color .14s;
}
.btn-search-toggle:hover { background: var(--accent-10); color: var(--ink); }

.btn-subscribe {
  background: var(--accent);
  color: var(--accent-dark);
  padding: 9px 18px;
  font-size: 13px;
}
.btn-subscribe:hover { background: var(--accent-hov); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  align-items: center;
  border-radius: 10px;
  color: var(--ink);
}
.hamburger:hover { background: var(--accent-10); }
.hamburger span { width: 20px; height: 2px; background: currentColor; border-radius: 2px; display: block; }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8,15,15,.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16vh 20px 0;
}
.search-overlay:not([hidden]) { display: flex; }

.search-overlay-inner {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 10px 10px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 24px 64px rgba(0,40,40,.18);
}
.search-overlay .search-form { flex: 1; margin: 0; }
.search-close {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  border-radius: 10px;
  transition: background .14s, color .14s;
}
.search-close:hover { background: var(--accent-10); color: var(--ink); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 32px rgba(0,40,40,.08);
  padding: 10px 20px 18px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.mobile-menu:not([hidden]) { display: block; }

.mobile-nav-list { list-style: none; }
.mobile-nav-list li { border-bottom: 1px solid var(--border-lt); }
.mobile-nav-list li:last-child { border-bottom: none; }
.mobile-nav-list a {
  display: block;
  padding: 12px 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.mobile-nav-list li.current-menu-item > a,
.mobile-nav-list li.current_page_item > a { color: var(--ink); }
.mobile-nav-list .sub-menu { list-style: none; padding: 0 0 4px 16px; }
.mobile-nav-list .sub-menu a { font-size: 13.5px; font-weight: 500; color: var(--ink-3); padding: 8px; }

/* ═══════════════════════════════════════════════════════════════
   SEARCH FORM (core get_search_form() markup)
═══════════════════════════════════════════════════════════════ */
.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 520px;
}
.search-form label { flex: 1; min-width: 0; }
.search-form .search-field {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14.5px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  transition: border-color .14s;
}
.search-form .search-field:focus { border-color: var(--accent); }

.search-submit {
  width: 46px; height: 46px;
  flex-shrink: 0;
  background-color: var(--accent-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
  border-radius: 10px;
  color: transparent;
  transition: background-color .14s;
}
.search-submit:hover { background-color: #254F4F; }

/* ═══════════════════════════════════════════════════════════════
   HOME — HERO
═══════════════════════════════════════════════════════════════ */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 64px;
  align-items: center;
  padding: 64px 0 72px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  background: var(--accent-10);
  border: 1px solid rgba(61,219,184,.25);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hero-headline {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -.5px;
  text-wrap: balance;
  margin-bottom: 16px;
}
.hero-headline em { font-style: italic; }

.hero-sub {
  font-size: 16.5px;
  color: var(--ink-2);
  line-height: 1.72;
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-lt);
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-stat-label { font-size: 12.5px; color: var(--ink-3); }

/* Hero dashboard visual */
.hero-visual { min-width: 0; }

.hero-card {
  background: var(--ground);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(61,219,184,.16) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card-head { display: flex; align-items: center; gap: 5px; margin-bottom: 20px; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; }
.hc-red    { background: #F87171; }
.hc-yellow { background: #FBBF24; }
.hc-green  { background: #34D399; }
.hc-label {
  margin-left: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.hero-card-body { position: relative; }

.hc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.hc-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hc-kpi-val { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.hc-kpi-lbl { font-size: 11px; color: var(--ink-3); }
.hc-kpi-up { font-size: 11.5px; font-weight: 700; color: #1FA97F; }

.hc-chart { height: 92px; margin-bottom: 16px; }
.hc-chart svg { width: 100%; height: 100%; display: block; }

.hc-items { display: flex; flex-direction: column; gap: 10px; }
.hc-item { display: grid; grid-template-columns: 110px 1fr 34px; gap: 10px; align-items: center; }
.hc-item-label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.hc-bar-bg { height: 6px; background: var(--accent-20); border-radius: 3px; overflow: hidden; }
.hc-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.hc-item-pct { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════
   HOME / 404 — CATEGORY STRIP + PILLS
═══════════════════════════════════════════════════════════════ */
.cat-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 28px;
}
.cat-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  transition: transform .12s;
}
.cat-pill:hover { transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   SECTIONS + GRID LAYOUT
═══════════════════════════════════════════════════════════════ */
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 28px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
a.section-eyebrow:hover { text-decoration: underline; }

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}
.section-more:hover { color: var(--ink); }
.section-more svg { width: 15px; height: 15px; }

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

/* ═══════════════════════════════════════════════════════════════
   POST CARD (template-parts/post-card.php)
═══════════════════════════════════════════════════════════════ */
.post-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.post-card-thumb {
  display: block;
  height: 152px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-cat {
  align-self: flex-start;
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 8px;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--accent-dark); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-lt);
}
.post-card-date { font-size: 12px; color: var(--ink-3); }
.post-card-read { font-size: 12px; font-weight: 600; color: var(--accent-dark); }

/* ═══════════════════════════════════════════════════════════════
   HOME — TEMPLATES BANNER
═══════════════════════════════════════════════════════════════ */
.templates-banner {
  background: var(--accent);
  border-block: 1px solid rgba(26,62,62,.06);
  padding: 0 28px;
}
.templates-banner-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.tmpl-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(26,62,62,.10);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmpl-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -.3px;
  margin-bottom: 6px;
}
.tmpl-sub {
  font-size: 15px;
  color: rgba(14,40,40,.62);
  line-height: 1.6;
  max-width: 60ch;
}

/* ═══════════════════════════════════════════════════════════════
   HOME — NEWSLETTER
═══════════════════════════════════════════════════════════════ */
.newsletter-section {
  background: var(--accent-dark);
  padding: 0 28px;
}
.newsletter-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.newsletter-title {
  font-size: 26px;
  font-weight: 800;
  color: #C8EDEA;
  letter-spacing: -.4px;
  line-height: 1.2;
  text-wrap: balance;
  margin-bottom: 12px;
}
.newsletter-sub {
  font-size: 15px;
  color: #5A9490;
  line-height: 1.7;
  margin-bottom: 20px;
}

.newsletter-perks { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.newsletter-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #6AAAA5;
}
.newsletter-perks li::before {
  content: '✓';
  width: 17px; height: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(61,219,184,.12);
  border: 1px solid rgba(61,219,184,.28);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.newsletter-form-wrap { min-width: 0; }

.newsletter-form {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 14px;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #C8EDEA;
  outline: none;
  transition: border-color .14s, background .14s;
}
.newsletter-form input[type="email"]::placeholder { color: #2E6865; }
.newsletter-form input[type="email"]:focus { border-color: rgba(61,219,184,.35); background: rgba(61,219,184,.05); }
.newsletter-form button {
  background: var(--accent);
  color: var(--accent-dark);
  border-radius: 12px;
  padding: 0 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .14s;
}
.newsletter-form button:hover { background: var(--accent-hov); }

/* Subscribe feedback message */
.subscribe-msg {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.subscribe-msg.is-success {
  background: rgba(61,219,184,.10);
  border: 1px solid rgba(61,219,184,.28);
  color: #9ACDCA;
}
.subscribe-msg.is-error {
  background: rgba(244,63,94,.12);
  border: 1px solid rgba(244,63,94,.30);
  color: #FCA5A5;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer { background: #080F0F; border-top: 1px solid #101A1A; padding: 0 28px; }

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 52px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr));
  gap: 36px;
}

.footer-brand { min-width: 0; }
.footer-logo { display: inline-flex; align-items: center; margin-bottom: 14px; }
.footer-logo img.custom-logo { max-height: 36px; width: auto; }
.footer-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #6A9A97;
}
.footer-tagline {
  font-size: 12.5px;
  color: #264040;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 40ch;
}

.footer-social { display: flex; gap: 7px; }
.social-link {
  width: 32px; height: 32px;
  background: #0E1C1C;
  border: 1px solid #162828;
  border-radius: 8px;
  color: #2E5A57;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .14s, color .14s;
}
.social-link:hover { border-color: rgba(61,219,184,.35); color: var(--accent); }

.footer-col { min-width: 0; }
.footer-widget-title, .footer-col .widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #264040;
  margin-bottom: 16px;
}

.footer-link-list, .footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-link-list a, .footer-col ul a {
  font-size: 12.5px;
  color: #264040;
  transition: color .12s;
}
.footer-link-list a:hover, .footer-col ul a:hover { color: var(--accent); }
.footer-col .widget { margin-bottom: 18px; }

.footer-bar {
  border-top: 1px solid #101A1A;
  padding: 0 28px;
}
.footer-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 12px; color: #162828; }
.footer-copy a { color: #264040; }
.footer-copy a:hover { color: var(--accent); }

.footer-nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav-list a {
  font-size: 12px;
  color: #162828;
  transition: color .12s;
}
.footer-nav-list a:hover { color: #264040; }

/* ═══════════════════════════════════════════════════════════════
   PAGINATION (paginate_links type="list")
═══════════════════════════════════════════════════════════════ */
.pagination-wrap { max-width: var(--container); margin: 0 auto; padding: 0 28px 56px; }
.pagination-wrap ul.page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pagination-wrap li .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  transition: border-color .14s, color .14s, background .14s;
}
.pagination-wrap li .page-numbers:hover { border-color: var(--accent); color: var(--ink); }
.pagination-wrap li .page-numbers.current {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.pagination-wrap li .page-numbers.dots { border: none; background: none; }

.no-results {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-2);
}
.no-results p { margin-bottom: 18px; font-size: 15px; }
.no-results .search-form { margin-bottom: 22px; }

/* ═══════════════════════════════════════════════════════════════
   ARCHIVE + SEARCH HEADER
═══════════════════════════════════════════════════════════════ */
.archive-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
}
.archive-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
}
.archive-hero-inner > div { min-width: 0; }
.archive-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.3px;
  line-height: 1.2;
}
.archive-title em { font-style: normal; color: var(--accent-dark); }
.archive-desc {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 56ch;
  line-height: 1.7;
  margin-top: 10px;
}
.archive-count {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  background: var(--accent-10);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════════════════════ */

/* Reading progress */
.reading-progress {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 150;
}
.reading-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .1s linear;
}

/* Post hero */
.post-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.post-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px calc(28px + var(--side) + var(--gap-lg)) 44px 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.breadcrumb a { transition: color .12s; }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb-sep { opacity: .5; }

.post-cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.post-title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -.5px;
  text-wrap: balance;
  margin-bottom: 14px;
}

.post-deck {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 62ch;
  margin-bottom: 22px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.post-meta .author-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.post-meta-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.4;
}
.post-author { font-weight: 600; color: var(--ink-2); }
.post-meta-sep { opacity: .45; }

.post-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.share-btn {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color .14s, color .14s, background .14s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-10); }

/* Featured image band */
.post-featured-img {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.post-featured-img-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px calc(28px + var(--side) + var(--gap-lg)) 0 28px;
}
.post-featured-img-inner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

/* Content + TOC grid */
.single-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 28px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  gap: var(--gap-lg);
  align-items: start;
}

.single-content { min-width: 0; }

/* Entry content typography (single + pages) */
.entry-content {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--ink);
}
.entry-content > * + * { margin-top: 1.5em; }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--ink);
  letter-spacing: -.3px;
  line-height: 1.2;
}
.entry-content h2 {
  font-size: 1.55em;
  font-weight: 800;
  margin-top: 2.2em;
  padding-top: 24px;
  border-top: 1px solid var(--border-lt);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.entry-content h3 {
  font-size: 1.2em;
  font-weight: 700;
  margin-top: 1.8em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.entry-content h4 {
  font-size: 1em;
  font-weight: 700;
  margin-top: 1.6em;
}
.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.entry-content p { max-width: 68ch; }
.entry-content a {
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(61,219,184,.4);
  transition: border-color .14s;
}
.entry-content a:hover { border-color: var(--accent); }
.entry-content strong { font-weight: 700; }
.entry-content em { font-style: italic; }

.entry-content ul, .entry-content ol { padding-left: 1.6em; }
.entry-content ul li, .entry-content ol li { margin-bottom: .5em; }
.entry-content ul li::marker { color: var(--accent); }
.entry-content ol li::marker { font-weight: 700; color: var(--ink-3); }

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--ink-2);
}

.entry-content code {
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--accent-dark);
}
.entry-content pre {
  background: var(--ink);
  color: #C8EDEA;
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: 'DM Mono', monospace;
  font-size: .875em;
  line-height: 1.6;
}
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9em;
  font-variant-numeric: tabular-nums;
}
.entry-content th {
  background: var(--surface-2);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: .85em;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-3);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-lt);
  color: var(--ink-2);
}
.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:hover td { background: var(--accent-10); }

.entry-content img {
  border-radius: 12px;
  border: 1px solid var(--border);
}
.entry-content figure { max-width: 100%; margin-inline: 0; }
.entry-content figcaption { font-size: .85em; color: var(--ink-3); text-align: center; margin-top: 8px; }

/* Callout boxes */
.entry-content .wp-block-callout,
.entry-content .callout {
  background: var(--accent-10);
  border: 1px solid rgba(61,219,184,.25);
  border-radius: 12px;
  padding: 18px 20px;
}

/* Post tags */
.post-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-lt);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.post-tags-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color .14s, color .14s;
}
.post-tag:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Prev / next post nav */
.post-nav {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.post-nav-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .14s, transform .14s;
}
.post-nav-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-nav-dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-3);
}
.post-nav-dir svg { width: 14px; height: 14px; }
.post-nav-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.post-nav-prev { align-items: flex-start; }
.post-nav-next { align-items: flex-end; text-align: right; }
.post-nav-next .post-nav-dir { flex-direction: row-reverse; }

/* Author bio */
.author-bio {
  margin-top: 40px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-bio-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-bio-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.author-bio-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }

/* Comments */
.comments-wrap { margin-top: 48px; }
.comments-wrap .comment-list { list-style: none; }
.comments-wrap .comment-list .comment { margin-bottom: 20px; }
.comments-wrap #reply-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.comments-wrap .comment-form input[type="text"],
.comments-wrap .comment-form input[type="email"],
.comments-wrap .comment-form input[type="url"],
.comments-wrap .comment-form textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
}
.comments-wrap .comment-form input:focus,
.comments-wrap .comment-form textarea:focus { border-color: var(--accent); }
.comments-wrap .form-submit .submit {
  background: var(--accent-dark);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 11px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Related posts */
.related-section { border-top: 1px solid var(--border); }

/* TOC sidebar */
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.toc-widget {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.toc-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.toc-title::before {
  content: '';
  width: 14px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  display: inline-block;
}

.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-item a {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 5px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: color .12s, background .12s, border-color .12s;
}
.toc-item a:hover {
  color: var(--ink);
  background: var(--accent-10);
  border-left-color: var(--accent);
}
.toc-item.is-active a {
  color: var(--accent-dark);
  font-weight: 600;
  background: var(--accent-10);
  border-left-color: var(--accent);
}
.toc-item.toc-h3 a { padding-left: 22px; font-size: 12px; }

/* Sticky CTA under TOC */
.toc-cta {
  background: var(--accent-dark);
  border-radius: 16px;
  padding: 20px;
  color: #C8EDEA;
}
.toc-cta-label { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 700; color: #9ACDCA; }
.toc-cta-sub { font-size: 12px; color: #5A9490; line-height: 1.5; margin: 6px 0 14px; }
.toc-cta .btn-primary { background: var(--accent); color: var(--accent-dark); width: 100%; }
.toc-cta .btn-primary:hover { background: var(--accent-hov); }

/* ═══════════════════════════════════════════════════════════════
   STATIC PAGE
═══════════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
}
.page-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 0 40px;
}
.page-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.4px;
  line-height: 1.15;
}

.page-content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 44px 28px 80px;
}

.page-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-lt);
  font-size: 14px;
}
.page-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  margin-left: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent-dark);
}

/* Page uses the same featured-image band as single, but narrower */
.page-wrap .post-featured-img { border-bottom: none; background: transparent; }
.page-wrap .post-featured-img-inner {
  max-width: 860px;
  padding: 32px 28px 0;
}
.page-wrap .post-featured-img-inner img { height: 380px; }

/* ═══════════════════════════════════════════════════════════════
   404
═══════════════════════════════════════════════════════════════ */
.error-404-wrap { padding: 0 28px; }
.error-404-inner {
  max-width: 660px;
  margin: 0 auto;
  padding: 88px 0 96px;
  text-align: center;
}
.error-404-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 88px;
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}
.error-404-title { font-size: 24px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.error-404-sub { font-size: 15px; color: var(--ink-2); line-height: 1.7; margin-bottom: 28px; }
.error-404-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 48px; }
.error-404-actions .search-form { width: 100%; margin: 0; }

.error-404-cats { text-align: center; }
.error-404-cats-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.error-404-cats .cat-strip-inner {
  justify-content: center;
  flex-wrap: wrap;
  overflow: visible;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════════ */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 24px;
  z-index: 9999;
  background: var(--accent);
  color: var(--accent-dark);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  transition: top .14s;
}
.skip-link:focus { top: 0; }

/* Layout helpers (wrapper refinement) */
.hero-text, .newsletter-text, .tmpl-text { min-width: 0; }
.author-bio-text { flex: 1; min-width: 0; }
.footer-legal-nav { margin-left: auto; }
.topic-section { border-top: 1px solid var(--border-lt); }
main [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 460px; margin-inline: auto; }

  .posts-grid { grid-template-columns: repeat(2, 1fr); }

  .single-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc-sidebar {
    position: static;
    order: -1;
    max-height: none;
  }
  .post-hero-inner,
  .post-featured-img-inner {
    padding-right: 28px;
  }
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .newsletter-inner { grid-template-columns: 1fr; gap: 32px; }
  .templates-banner-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .templates-banner-inner .tmpl-icon { display: none; }

  .archive-hero-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-bar-inner { flex-direction: column; align-items: flex-start; }
  .post-meta { gap: 10px; }
  .post-share-row { margin-left: 0; }
  .author-bio { flex-direction: column; }
}

@media (max-width: 640px) {
  .primary-nav { display: none; }
  .hamburger { display: flex; }
  .btn-subscribe { display: none; }

  .hero-inner { padding: 44px 0 56px; }
  .section-inner { padding: 44px 28px; }
  .single-wrap { padding: 40px 28px 56px; }

  .newsletter-form { flex-direction: column; }
  .newsletter-form button { padding: 13px 20px; }

  .hc-item { grid-template-columns: 1fr 1fr 34px; }
  .hero-stats { gap: 24px; }
}
