body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 40px auto;
  max-width: 900px;
  line-height: 1.45;
  color: #111827;
  background: #ffffff;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.wire-page > p {
  color: #6b7280;
  margin-bottom: 2rem;
}

.wire-list {
  list-style: none;
  padding-left: 0;
}

.wire-item {
  margin-bottom: 0.3rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #e5e7eb;
}

.wire-text {
  font-size: 0.95rem;
}

.wire-tags {
  margin-left: 0.4rem;
}

.tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
}

.tag:hover {
  text-decoration: underline;
}

.wire-source {
  margin-left: 0.4rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.wire-source a {
  color: #2563eb;
  text-decoration: none;
}

.wire-source a:hover {
  text-decoration: underline;
}

.wire-edition {
  margin-top: 2rem;
}

.wire-edition-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.archive-title {
  margin-top: 2.5rem;
  font-size: 1.1rem;
  color: #374151;
}

.wire-link {
  font-weight: 400;
  color: #2563eb;
  text-decoration: none;
}

.wire-link:hover {
  text-decoration: underline;
}



/* Region tags */
.tag-us,
.tag-canada {
  background: #768df5;
  color: #f9fcfb;
}

.tag-china {
  background: #fee2e2;
  color: #991b1b;
}

.tag-europe,
.tag-euro-area,
.tag-germany,
.tag-uk {
  background: #ede9fe;
  color: #5b21b6;
}

.tag-japan,
.tag-taiwan,
.tag-korea {
  background: #fef3c7;
  color: #92400e;
}

.tag-brazil {
  background: #dcfce7;
  color: #166534;
}

/* Macro topic tags */
.tag-inflation,
.tag-ppi {
  background: #ffedd5;
  color: #c2410c;
}

.tag-growth,
.tag-gdp,
.tag-consumption,
.tag-pmi {
  background: #dcfce7;
  color: #166534;
}

.tag-trade,
.tag-exports {
  background: #e0f2fe;
  color: #075985;
}

.tag-rates,
.tag-cb,
.tag-boe {
  background: #f3e8ff;
  color: #6b21a8;
}

.tag-manufacturing,
.tag-investment,
.tag-property {
  background: #fef3c7;
  color: #92400e;
}

.tag-oil,
.tag-energy,
.tag-commodities {
  background: #fef3c7;
  color: #92400e;
}

.tag-calendar {
  background: #f1f5f9;
  color: #475569;
}


.active-tags-box {
  margin: 1rem 0 1.5rem 0;
  color: #374151;
}

.clear-tags {
  margin-left: 0.75rem;
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
}

.clear-tags:hover {
  text-decoration: underline;
}

.no-results {
  margin: 1.5rem 0;
  color: #6b7280;
  font-style: italic;
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  margin: 0 0 6px 0;
  padding: 12px 0 12px 0;
  background: #fff4e6;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.site-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.language-switcher,
.theme-switcher {
  font-size: 1.0rem;
  line-height: 1.4;
}

.language-switcher a,
.theme-button {
  color: #2563eb;
  text-decoration: none;
}

.language-switcher a:hover,
.theme-button:hover {
  text-decoration: underline;
}

.language-switcher a.active {
  font-weight: 700;
  text-decoration: underline;
}

.theme-switcher {
  white-space: nowrap;
}

.theme-button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Theme colors */
body {
  background: #ffffff;
  color: #0f172a;
  transition: background 0.2s ease, color 0.2s ease;
}

body[data-theme="dark"] {
  background: #0f172a;
  color: #e5e7eb;
}

/* General text */
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3 {
  color: #f8fafc;
}

body[data-theme="dark"] p,
body[data-theme="dark"] .wire-text {
  color: #e5e7eb;
}

/* Links */
body[data-theme="dark"] a,
body[data-theme="dark"] .theme-button {
  color: #93c5fd;
}

body[data-theme="dark"] a:hover,
body[data-theme="dark"] .theme-button:hover {
  color: #bfdbfe;
}

/* Wire rows */
body[data-theme="dark"] .wire-item {
  border-bottom-color: #334155;
}

/* Source text */
body[data-theme="dark"] .wire-source {
  color: #cbd5e1;
}

/* Tag chips: keep existing colors, but soften them slightly in dark mode */
body[data-theme="dark"] .tag {
  opacity: 0.9;
}

/* Active theme hint */
body[data-theme="light"] .theme-button[data-theme-choice="light"],
body[data-theme="dark"] .theme-button[data-theme-choice="dark"] {
  font-weight: 700;
  text-decoration: underline;
}

/* Dark mode tag chips */
body[data-theme="dark"] .tag {
  background: rgba(148, 163, 184, 0.18) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(148, 163, 184, 0.28);
  opacity: 1;
}

body[data-theme="dark"] .tag:hover {
  background: rgba(148, 163, 184, 0.28) !important;
  color: #ffffff !important;
}

/* Dark mode: muted topic colors for tag chips */

body[data-theme="dark"] .site-header {
  background: #0f172a;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .tag-us,
body[data-theme="dark"] .tag-global,
body[data-theme="dark"] .tag-europe,
body[data-theme="dark"] .tag-china,
body[data-theme="dark"] .tag-japan,
body[data-theme="dark"] .tag-uk,
body[data-theme="dark"] .tag-germany,
body[data-theme="dark"] .tag-canada {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #bfdbfe !important;
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-theme="dark"] .tag-growth,
body[data-theme="dark"] .tag-gdp,
body[data-theme="dark"] .tag-consumption,
body[data-theme="dark"] .tag-retail,
body[data-theme="dark"] .tag-trade,
body[data-theme="dark"] .tag-exports,
body[data-theme="dark"] .tag-pmi,
body[data-theme="dark"] .tag-manufacturing,
body[data-theme="dark"] .tag-services {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #bbf7d0 !important;
  border-color: rgba(74, 222, 128, 0.32);
}

body[data-theme="dark"] .tag-inflation,
body[data-theme="dark"] .tag-ppi,
body[data-theme="dark"] .tag-raw-materials,
body[data-theme="dark"] .tag-energy,
body[data-theme="dark"] .tag-oil {
  background: rgba(249, 115, 22, 0.17) !important;
  color: #fed7aa !important;
  border-color: rgba(251, 146, 60, 0.34);
}

body[data-theme="dark"] .tag-rates,
body[data-theme="dark"] .tag-fed,
body[data-theme="dark"] .tag-boe,
body[data-theme="dark"] .tag-ecb,
body[data-theme="dark"] .tag-rba,
body[data-theme="dark"] .tag-cb,
body[data-theme="dark"] .tag-bonds,
body[data-theme="dark"] .tag-yields {
  background: rgba(168, 85, 247, 0.17) !important;
  color: #e9d5ff !important;
  border-color: rgba(192, 132, 252, 0.34);
}

body[data-theme="dark"] .tag-markets,
body[data-theme="dark"] .tag-equities,
body[data-theme="dark"] .tag-sp500,
body[data-theme="dark"] .tag-dow,
body[data-theme="dark"] .tag-nasdaq,
body[data-theme="dark"] .tag-russell-2000 {
  background: rgba(20, 184, 166, 0.16) !important;
  color: #99f6e4 !important;
  border-color: rgba(45, 212, 191, 0.32);
}

body[data-theme="dark"] .tag-forecast,
body[data-theme="dark"] .tag-sentiment,
body[data-theme="dark"] .tag-michigan,
body[data-theme="dark"] .tag-ifo,
body[data-theme="dark"] .tag-chicago-fed {
  background: rgba(99, 102, 241, 0.17) !important;
  color: #c7d2fe !important;
  border-color: rgba(129, 140, 248, 0.34);
}

body[data-theme="dark"] .tag-regulation,
body[data-theme="dark"] .tag-white-house,
body[data-theme="dark"] .tag-fiscal,
body[data-theme="dark"] .tag-debt,
body[data-theme="dark"] .tag-borrowing {
  background: rgba(236, 72, 153, 0.16) !important;
  color: #fbcfe8 !important;
  border-color: rgba(244, 114, 182, 0.32);
}

/* Tablet and mobile page padding */
@media (max-width: 900px) {
  body {
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
  }

  .site-header-inner {
    padding-left: 0;
    padding-right: 0;
  }
}


/* Mobile compact wire layout */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    line-height: 1.36;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .site-header {
    margin: 12px 0 12px 0;
  }

  .language-switcher,
  .theme-switcher {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.12;
    margin-top: 0;
    margin-bottom: 12px;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.36;
    margin-bottom: 20px;
  }

  h2,
  .wire-date-title {
    font-size: 0.96rem;
    line-height: 1.32;
    margin-top: 24px;
    margin-bottom: 9px;
  }

  .wire-edition-title {
    font-size: 0.96rem;
    line-height: 1.32;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 700;
  }

  .wire-list {
    padding-left: 0;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 18px;
  }

  .wire-item {
    font-size: 1.1rem;
    line-height: 1.32;
    padding: 1px 0 1px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .wire-text {
    display: block;
    margin-bottom: 1px;
  }

  html[lang="zh"] .wire-text {
    font-weight: 400;
  }

  html[lang="en"] .wire-text {
    font-weight: 500;
  }

  .wire-tags {
    display: inline;
    margin-left: 0;
    line-height: 1.08;
  }

  .tag {
    font-size: 0.7rem;
    line-height: 1.05;
    padding: 1px 4px;
    margin-right: 2px;
    margin-bottom: 1px;
    border-radius: 999px;
    opacity: 0.68;
  }

  .wire-source {
    font-size: 0.7rem;
    line-height: 1.08;
    opacity: 0.65;
    white-space: normal;
  }

  .wire-source a {
    font-size: 0.74rem;
  }
}


.external-arrow {
  font-family: inherit;
  font-size: 0.85em;
  line-height: 1;
  vertical-align: baseline;
}

@media (max-width: 600px) {
  .external-arrow {
    font-size: 0.75em;
    opacity: 0.75;
  }
}

@media (max-width: 600px) {
  .chart-grid-global {
    grid-template-columns: 1fr;
  }
}

/* Light mode warm paper background */
body {
  background: #fff4e6;
  color: #111827;
}

body[data-theme="light"] {
  background: #fff4e6;
  color: #111827;
}

/* Main section navigation */
.section-switcher {
  font-size: 1.0rem;
  line-height: 1.4;
  white-space: nowrap;
}

.section-switcher a {
  color: #2563eb;
  text-decoration: none;
}

.section-switcher a:hover {
  text-decoration: underline;
}

.section-switcher a.active {
  font-weight: 700;
  text-decoration: underline;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.header-divider {
  color: #6b7280;
}

/* Charts pages */
.charts-page {
  max-width: 1180px;
  margin: 0 auto;
}

.charts-page h1 {
  margin-bottom: 0.35rem;
}

.charts-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.charts-geo-nav,
.charts-economy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.5rem 0;
}

.chart-chip {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.2;
}

.chart-chip:hover {
  text-decoration: none;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.45);
}

.chart-chip.active {
  font-weight: 700;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.35);
  background: rgba(255, 255, 255, 0.65);
}

.charts-subsection {
  margin-top: 1.5rem;
}

.charts-subsection h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.charts-coming-soon {
  color: #6b7280;
  font-style: italic;
  margin-top: 1.5rem;
}

.charts-breadcrumb {
  margin: 0.2rem 0 1.2rem 0;
  font-size: 0.92rem;
  color: #6b7280;
}

.charts-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.charts-breadcrumb a:hover {
  text-decoration: underline;
}

.charts-breadcrumb span {
  margin-right: 0.35rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.0rem;
  margin-top: 1.2rem;
}


.chart-card {
  background: #fff4e6;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  padding: 0.75rem;
  overflow: hidden;
}

.chart-card-header h2 {
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0 0 0.18rem 0;
  color: #111827;
}

.chart-card-header p {
  font-size: 0.78rem;
  line-height: 1.25;
  margin: 0 0 0.55rem 0;
  color: #4b5563;
}

.chart-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin-top: 0.45rem;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.25;
}

.chart-note {
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1.25;
  margin: 0.35rem 0 0 0;
}

/* Dark mode for charts: keep chart cards as warm-paper inserts */
body[data-theme="dark"] .charts-description,
body[data-theme="dark"] .charts-coming-soon,
body[data-theme="dark"] .charts-breadcrumb,
body[data-theme="dark"] .chart-note {
  color: #cbd5e1;
}

body[data-theme="dark"] .chart-chip {
  color: #bfdbfe;
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(96, 165, 250, 0.28);
}

body[data-theme="dark"] .chart-chip:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.45);
}

body[data-theme="dark"] .chart-chip.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.32);
  border-color: rgba(147, 197, 253, 0.6);
}

body[data-theme="dark"] .chart-card {
  background: #fff4e6;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .chart-card-header h2 {
  color: #111827;
}

body[data-theme="dark"] .chart-card-header p {
  color: #4b5563;
}

@media (max-width: 1000px) {
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-header-inner {
    gap: 0.65rem;
  }

  .section-switcher,
  .language-switcher,
  .theme-switcher {
    font-size: 0.88rem;
  }

  .header-controls {
    gap: 0.3rem;
  }

  .chart-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chart-card {
    padding: 0.65rem;
    border-radius: 10px;
  }

  .chart-card-header h2 {
    font-size: 1.0rem;
  }

  .chart-card-header p {
    font-size: 0.82rem;
  }
}

/* Charts expandable sub-chip navigation */
.charts-geo-nav,
.charts-economy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 1rem 0 0.55rem 0;
}

/* One unified chip style for both links and buttons */
.chart-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.20rem 0.62rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: inherit;
  line-height: 1.15;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Remove browser-default button styling without changing chip size */
button.chart-chip,
.chart-chip-toggle {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  cursor: pointer;
}

.chart-chip:hover,
.chart-chip-toggle:hover {
  text-decoration: none;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.45);
}

.chart-chip.active,
.chart-chip-toggle.active {
  font-weight: 700;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.35);
  background: rgba(255, 255, 255, 0.65);
}

.chart-subchips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.28rem;
  margin: 0.05rem 0 1.2rem 0;
  padding-left: 0;
}

.chart-subchips[hidden] {
  display: none;
}

.economy-chip.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Dark mode chips */
body[data-theme="dark"] .chart-chip {
  color: #bfdbfe;
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(96, 165, 250, 0.28);
}

body[data-theme="dark"] .chart-chip:hover,
body[data-theme="dark"] .chart-chip-toggle:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.45);
}

body[data-theme="dark"] .chart-chip.active,
body[data-theme="dark"] .chart-chip-toggle.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.32);
  border-color: rgba(147, 197, 253, 0.6);
}

.chart-chip-toggle.expanded {
  color: #1d4ed8;
  font-weight: inherit;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.55);
}

body[data-theme="dark"] .chart-chip-toggle.expanded {
  color: #bfdbfe;
  font-weight: inherit;
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.55);
}

@media (max-width: 600px) {
  .chart-subchips {
    justify-content: flex-start;
    margin-left: 0;
  }
}


.chip-label-short {
  display: none;
}

@media (max-width: 600px) {
  .chip-label-full {
    display: none;
  }

  .chip-label-short {
    display: inline;
  }

  .chart-chip {
    padding: 0.16rem 0.46rem;
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .charts-geo-nav,
  .charts-economy-nav,
  .chart-subchips {
    gap: 0.22rem;
  }
}

/* Main section navigation accent */
.section-switcher a {
  color: #b91c1c;
  text-decoration: none;
}

.section-switcher a:hover {
  color: #991b1b;
  text-decoration: underline;
}

.section-switcher a.active {
  color: #991b1b;
  font-weight: 700;
  text-decoration: underline;
}

/* Dark mode */
body[data-theme="dark"] .section-switcher a {
  color: #fca5a5;
}

body[data-theme="dark"] .section-switcher a:hover {
  color: #fecaca;
}

body[data-theme="dark"] .section-switcher a.active {
  color: #fecaca;
  font-weight: 700;
  text-decoration: underline;
}


/* Tighter sticky header spacing */
body {
  margin: 0 auto;
}

.site-header {
  margin: 12px 0 24px 0;
  padding: 12px 0 12px 0;
}

@media (max-width: 600px) {
  body {
    margin: 0 auto;
  }

  .site-header {
    margin: 0px 0 18px 0;
    padding: 12px 0 12px 0;
  }
}
/* Charts home featured dashboard previews */
.featured-dashboard-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.35rem;
}

.featured-dashboard-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1fr);
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: transparent;
  overflow: hidden;
}

.featured-dashboard-text {
  align-self: center;
  max-width: 34rem;
}

.featured-dashboard-text h2 {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0 0 0.55rem 0;
  color: #111827;
}

.featured-dashboard-text p {
  font-size: 0.92rem;
  line-height: 1.42;
  margin: 0 0 0.95rem 0;
  color: #374151;
}

.featured-dashboard-link {
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.featured-dashboard-link:hover {
  text-decoration: underline;
}

.featured-dashboard-visual {
  width: 100%;
  max-width: 560px;
  justify-self: end;
  background: #fff4e6;
  border-radius: 12px;
  padding: 0.85rem;
  box-sizing: border-box;
  border: 1px solid rgba(17, 24, 39, 0.12);
}

.featured-dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0 0 0.55rem 0;
}

.featured-dashboard-chart-title {
  min-width: 0;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-dashboard-control-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.featured-dashboard-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #2563eb;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.featured-dashboard-button:hover {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.48);
}

.featured-dashboard-counter {
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 650;
  min-width: 2.4rem;
  text-align: center;
}

.featured-dashboard-frame {
  display: grid;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
}

.featured-dashboard-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1280ms ease, visibility 0s linear 420ms;
}

.featured-dashboard-image.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1280ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .featured-dashboard-image {
    transition: none;
  }
}

body[data-theme="dark"] .featured-dashboard-card {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

body[data-theme="dark"] .featured-dashboard-visual {
  background: #fff4e6;
}

body[data-theme="dark"] .featured-dashboard-text h2 {
  color: #f8fafc;
}

body[data-theme="dark"] .featured-dashboard-text p {
  color: #cbd5e1;
}

body[data-theme="dark"] .featured-dashboard-link {
  color: #93c5fd;
}

body[data-theme="dark"] .featured-dashboard-chart-title {
  color: #2563eb;
}

body[data-theme="dark"] .featured-dashboard-button {
  color: #2563eb;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(37, 99, 235, 0.28);
}

body[data-theme="dark"] .featured-dashboard-button:hover {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.48);
}

body[data-theme="dark"] .featured-dashboard-counter {
  color: #60a5fa;
}

@media (max-width: 640px) {
  .featured-dashboard-card {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 0.8rem;
  }

  .featured-dashboard-text {
    max-width: none;
  }

  .featured-dashboard-visual {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 600px) {
  .featured-dashboard-list {
    gap: 1rem;
    margin-top: 1.05rem;
  }

  .featured-dashboard-card {
    border-radius: 10px;
    padding: 0.65rem;
  }

  .featured-dashboard-text h2 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }

  .featured-dashboard-text p {
    font-size: 0.86rem;
    line-height: 1.38;
    margin-bottom: 0.7rem;
  }

  .featured-dashboard-visual {
    padding: 0.55rem;
    border-radius: 10px;
  }

  .featured-dashboard-controls {
    margin-bottom: 0.35rem;
  }

  .featured-dashboard-chart-title {
    font-size: 0.9rem;
  }

  .featured-dashboard-button {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.95rem;
  }

  .featured-dashboard-counter {
    font-size: 0.72rem;
  }
}

/* Header brand logo row */
.site-brand-row {
  max-width: 900px;
  margin: 0 auto 2px auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.site-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.site-brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: min(320px, 72vw);
  object-fit: contain;
}

.site-brand-logo-dark {
  display: none;
}

body[data-theme="dark"] .site-brand-logo-light {
  display: none;
}

body[data-theme="dark"] .site-brand-logo-dark {
  display: block;
}

@media (max-width: 600px) {
  .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-brand-row {
    margin-bottom: 2px;
  }

  .site-brand-logo {
    height: 38px;
    max-width: min(260px, 72vw);
  }
}

/* Charts chip accent override: match main section navigation red */
.chart-chip,
.chart-chip-toggle {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.25);
  background: rgba(255, 255, 255, 0.38);
}

.chart-chip:hover,
.chart-chip-toggle:hover {
  color: #991b1b;
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.45);
}

.chart-chip.active,
.chart-chip-toggle.active,
.chart-chip-toggle.expanded {
  color: #991b1b;
  border-color: rgba(153, 27, 27, 0.55);
  background: rgba(185, 28, 28, 0.12);
}

body[data-theme="dark"] .chart-chip,
body[data-theme="dark"] .chart-chip-toggle {
  color: #fca5a5;
  background: #0f172a;
  /*background: rgba(127, 29, 29, 0.18);*/
  border-color: rgba(252, 165, 165, 0.32);
}

body[data-theme="dark"] .chart-chip:hover,
body[data-theme="dark"] .chart-chip-toggle:hover {
  color: #fecaca;
  background: rgba(185, 28, 28, 0.26);
  border-color: rgba(254, 202, 202, 0.48);
}

body[data-theme="dark"] .chart-chip.active,
body[data-theme="dark"] .chart-chip-toggle.active,
body[data-theme="dark"] .chart-chip-toggle.expanded {
  color: #fecaca;
  background: rgba(185, 28, 28, 0.32);
  border-color: rgba(254, 202, 202, 0.60);
}


/* Weekly archive navigation */
.week-archive-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.week-archive-heading > h1 {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.week-archive-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.week-archive-nav-top {
  flex: 0 0 auto;
  min-width: 0;
  margin-top: 0.1rem;
  display: flex;
  gap: 0.5rem;
}
.week-archive-nav-top .week-archive-nav-side {
  flex: 0 0 auto;
}
.week-archive-nav-top .week-archive-nav-older {
  text-align: left;
}

.week-archive-nav-bottom {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.week-archive-nav-side {
  min-width: 0;
}

.week-archive-nav-older {
  text-align: right;
}

.week-archive-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.30);
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.week-archive-nav-link:hover {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.52);
  background: rgba(37, 99, 235, 0.09);
}

body[data-theme="dark"] .week-archive-nav-bottom {
  border-top-color: rgba(203, 213, 225, 0.22);
}

body[data-theme="dark"] .week-archive-nav-link {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(30, 64, 175, 0.12);
}

body[data-theme="dark"] .week-archive-nav-link:hover {
  color: #bfdbfe;
  border-color: rgba(191, 219, 254, 0.50);
  background: rgba(37, 99, 235, 0.24);
}

@media (max-width: 700px) {
  .week-archive-heading {
    display: block;
  }

  .week-archive-nav-top {
    min-width: 0;
    width: 100%;
    margin: 0.3rem 0 1.35rem;
  }

  .week-archive-nav-bottom {
    margin-top: 1.75rem;
  }

  .week-archive-nav-link {
    padding: 0.36rem 0.62rem;
    font-size: 0.78rem;
  }
}
