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

h1 {
  font-size: 2rem;
  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: 600;
  color: #111827;
  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-south-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-central-banks,
.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 {
  width: 100%;
  margin: 18px 0 28px 0;
}

.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"] .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-sales,
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-producer-prices,
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-central-banks,
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 18px 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;
  }
}

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

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