/* ==========================================================================
   CA Sandesh Pokharel — Editorial Design System
   Inspired by Financial Times, The Economist & Stripe Press
   ========================================================================== */

:root {
  --bg-page: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F2EFE9;
  --bg-elevated: #FFFFFF;
  --text-primary: #14181F;
  --text-secondary: #4A5568;
  --text-muted: #6B7280;
  --accent: #0F3D3E;
  --accent-hover: #175456;
  --accent-soft: rgba(15, 61, 62, 0.08);
  --gold: #B68D40;
  --gold-soft: rgba(182, 141, 64, 0.14);
  --border: #E5E0D8;
  --border-strong: #D0C9BD;
  --danger: #B42318;
  --success: #0F6E4A;
  --shadow-sm: 0 1px 3px rgba(20, 24, 31, 0.05);
  --shadow-md: 0 10px 30px rgba(20, 24, 31, 0.07);
  --shadow-lg: 0 24px 60px rgba(20, 24, 31, 0.14);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-serif: "Newsreader", Georgia, Cambria, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container-max: 1240px;
  --article-font-size: 1.16rem;
}

[data-theme="dark"] {
  --bg-page: #0D1117;
  --bg-surface: #151C25;
  --bg-subtle: #1B2330;
  --bg-elevated: #1A222D;
  --text-primary: #F3EFE6;
  --text-secondary: #B8C2D1;
  --text-muted: #8B97A8;
  --accent: #2A7B7C;
  --accent-hover: #359596;
  --accent-soft: rgba(42, 123, 124, 0.18);
  --gold: #D4AF6A;
  --gold-soft: rgba(212, 175, 106, 0.16);
  --border: #25303F;
  --border-strong: #354459;
  --danger: #F97066;
  --success: #32D583;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 120;
  transition: width 0.08s linear;
}

/* Top Edition Bar */
.edition-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.edition-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 7px;
  padding-bottom: 7px;
  gap: 12px;
}

.edition-meta, .edition-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edition-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

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

.sep { opacity: 0.5; }

/* Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .masthead {
  background: rgba(13, 17, 23, 0.92);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-monogram {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #FAF8F5;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--gold);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--text-primary);
  border-bottom-color: var(--gold);
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #14181F;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.mobile-menu-btn { display: none; }
.mobile-drawer {
  display: flex;
  flex-direction: column;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  gap: 10px;
}
.mobile-drawer[hidden] { display: none; }
.mobile-drawer a {
  padding: 8px 4px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-sm { padding: 7px 14px; font-size: 0.84rem; }
.btn-xs { padding: 4px 10px; font-size: 0.76rem; }

.btn-primary {
  background: var(--accent);
  color: #FAF8F5;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-gold {
  background: var(--gold);
  color: #14181F;
}
.btn-gold:hover { filter: brightness(1.06); }

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-strong); }

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.eyebrow {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.app-main {
  min-height: 70vh;
  padding-bottom: 72px;
}

/* Fiscal Ticker Strip */
.fiscal-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  overflow-x: auto;
}

.fiscal-strip-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 24px;
  white-space: nowrap;
  font-size: 0.8rem;
}

.fiscal-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fiscal-item strong {
  color: var(--accent);
  font-weight: 600;
}
.fiscal-label { color: var(--text-muted); }

/* Hero Editorial Grid */
.hero-section {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 32px;
  align-items: start;
}

.lead-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lead-cover-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
  position: relative;
}

.lead-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.lead-card:hover .lead-cover-wrap img { transform: scale(1.02); }

.lead-body { padding: 28px 30px; }

.lead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pill-category {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent);
}

.lead-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}

.lead-excerpt {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.55;
}

.lead-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Dispatches Sidebar */
.dispatches-rail {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--text-primary);
  margin-bottom: 8px;
}

.rail-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
}

.dispatch-item {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.dispatch-item:last-child { border-bottom: none; padding-bottom: 4px; }
.dispatch-item:hover .dispatch-title { color: var(--accent); }

.dispatch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.dispatch-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.32;
  margin: 0 0 5px;
  transition: color 0.15s ease;
}

.dispatch-stats {
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* Filter Toolbar & Article Grid */
.catalog-section { padding: 38px 0 20px; }

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-pill:hover { border-color: var(--accent); color: var(--accent); }
.tab-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FAF8F5;
}

.sort-select {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.85rem;
}

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

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
}

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

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.28;
  margin: 0 0 10px;
}
.article-card:hover .card-title { color: var(--accent); }

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 18px;
  line-height: 1.55;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Mid-page Desk Spotlight & Newsletter */
.spotlight-banner {
  margin: 44px 0 16px;
  padding: 34px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent) 0%, #092627 100%);
  color: #FAF8F5;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  border: 1px solid rgba(182, 141, 64, 0.35);
}

.spotlight-banner h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 6px 0 10px;
}

.spotlight-banner p {
  margin: 0;
  color: rgba(250, 248, 245, 0.85);
  max-width: 58ch;
}

.spotlight-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.spotlight-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  font-weight: 500;
}
.spotlight-mini:hover { background: rgba(255, 255, 255, 0.14); }

.newsletter-band {
  margin-top: 38px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.newsletter-band h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 4px 0 6px;
}

.newsletter-band p { margin: 0; color: var(--text-secondary); max-width: 52ch; }

.newsletter-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-inline input {
  min-width: 240px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
}

/* ==========================================================================
   Article Reader View
   ========================================================================== */

.article-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.article-header-inner {
  max-width: 840px;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-title-main {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.14;
  margin: 10px 0 14px;
  letter-spacing: -0.02em;
}

.article-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 24px;
}

.article-byline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.byline-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.byline-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 1px solid var(--gold);
}

.byline-name { font-weight: 600; font-size: 0.95rem; }
.byline-meta { font-size: 0.8rem; color: var(--text-muted); }

.reader-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.article-hero-image {
  max-width: 980px;
  margin: 28px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 68ch);
  justify-content: center;
  gap: 48px;
  padding-top: 40px;
}

.article-layout.focus-mode {
  grid-template-columns: minmax(0, 70ch);
}
.article-layout.focus-mode .toc-sidebar { display: none; }

.toc-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}

.toc-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 0.83rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.toc-list a.level-3 { padding-left: 26px; font-size: 0.79rem; }
.toc-list a:hover, .toc-list a.active {
  color: var(--accent);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* Prose Typography */
.prose {
  font-family: var(--font-serif);
  font-size: var(--article-font-size);
  line-height: 1.76;
  color: var(--text-primary);
}

.prose.sans-body {
  font-family: var(--font-sans);
  line-height: 1.72;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 2.1em 0 0.7em;
  scroll-margin-top: 96px;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 1.7em 0 0.5em;
  scroll-margin-top: 96px;
}

.prose p { margin: 0 0 1.25em; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 1.4em auto;
}
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.45em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 600; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.prose pre.code-block {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  background: #14181F;
  color: #F3EFE6;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.6em 0;
  border: 1px solid #25303F;
}

.prose pre.code-block code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 8px 0 8px 22px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--text-secondary);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.6em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.45;
}

.prose th {
  background: var(--bg-subtle);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-strong);
}

.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.prose tr:last-child td { border-bottom: none; }

.callout {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  line-height: 1.6;
}
.callout-tip { border-left-color: var(--success); }
.callout-important { border-left-color: var(--gold); background: var(--gold-soft); }
.callout-warning, .callout-caution { border-left-color: var(--danger); }
.callout-title {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.callout-body p:last-child { margin-bottom: 0; }

/* Article Actions, Tags, Author Bio & Comments */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}

.tag-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }

.engagement-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin: 26px 0;
}

.clap-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.clap-btn:active { transform: scale(1.08); }

.author-bio-box {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin: 30px 0;
}

.author-bio-box img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.comments-section { margin-top: 38px; }
.comments-section h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.comment-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: grid;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
}

.comment-card {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.related-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Financial Desk (/tools)
   ========================================================================== */

.page-hero {
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  margin-bottom: 32px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  margin: 8px 0 10px;
}

.page-hero p {
  color: var(--text-secondary);
  max-width: 66ch;
  margin: 0;
}

.tools-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.desk-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.kpi-label { font-size: 0.76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-top: 4px; color: var(--accent); }

.svg-chart-wrap {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-page);
}

/* ==========================================================================
   About & Advisory (/about)
   ========================================================================== */

.about-hero-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: center;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 15%;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-md);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 34px 0;
}

.pillar-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.pillar-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
}

/* ==========================================================================
   Editorial Studio (/studio)
   ========================================================================== */

.studio-shell { padding: 32px 0; }

.studio-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.studio-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.studio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.studio-table th, .studio-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-published, .status-replied { background: rgba(15, 110, 74, 0.14); color: var(--success); }
.status-draft, .status-new { background: var(--gold-soft); color: var(--gold); }
.status-reviewed { background: var(--accent-soft); color: var(--accent); }

/* ==========================================================================
   Modals, Drawer, Footer & Toasts
   ========================================================================== */

.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.62);
  backdrop-filter: blur(4px);
  z-index: 150;
  display: grid;
  place-items: start center;
  padding: 72px 16px 24px;
}
.modal-backdrop[hidden], .drawer-backdrop[hidden] { display: none; }

.command-palette {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.command-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.command-header input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
}

.command-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.command-item:hover, .command-item.active { background: var(--bg-subtle); }
.command-item-title { font-weight: 600; font-size: 0.94rem; }
.command-item-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.command-empty { padding: 28px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.command-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-backdrop {
  place-items: stretch end;
  padding: 0;
}

.drawer-panel {
  width: 100%;
  max-width: 410px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-family: var(--font-display); margin: 4px 0 0; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.footer-desc { color: var(--text-secondary); font-size: 0.9rem; margin: 14px 0 10px; }
.footer-disclaimer { color: var(--text-muted); font-size: 0.78rem; margin: 0; }
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  color: var(--text-muted);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 0.88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-newsletter p { font-size: 0.88rem; color: var(--text-secondary); margin: 0 0 12px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: grid;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: #14181F;
  color: #FAF8F5;
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--gold);
}
.toast.error { border-left-color: var(--danger); }

.loading-shell { padding: 56px 24px; display: grid; gap: 14px; }
.skeleton-line { height: 22px; border-radius: 6px; background: var(--bg-subtle); width: 70%; }
.skeleton-line.wide { width: 92%; height: 34px; }
.skeleton-line.short { width: 45%; }

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
  .desk-grid, .studio-editor-grid, .spotlight-banner, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav, .nav-cta, .search-label, .kbd-hint { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .articles-grid, .pillars-grid, .form-row-2, .about-hero-grid { grid-template-columns: 1fr; }
  .edition-bar { display: none; }
  .lead-body { padding: 20px; }
  .newsletter-band, .spotlight-banner { padding: 24px; }
}

@media print {
  .edition-bar, .masthead, .toc-sidebar, .engagement-bar, .comments-section, .related-section, .site-footer, .reader-controls {
    display: none !important;
  }
  body { background: #FFFFFF; color: #000000; }
  .article-layout { display: block; }
}
