/* Shared header: switch stays beside the brand in both appearances. */
html[data-design] .app-shell > .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
html[data-design] .topbar > .brand { grid-column: 1; grid-row: 1; min-width: 0; justify-self: start; }
html[data-design] .topbar > .design-preference { grid-column: 2; grid-row: 1; justify-self: end; }
html[data-design] .topbar > .topbar-actions { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; display: block; }
html[data-design] .topbar .topbar-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; }
html[data-design] .topbar .primary-navigation { flex: 1 1 640px; min-width: 0; max-width: 100%; }
html[data-design] .topbar .primary-navigation-links { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; min-width: 0; }
html[data-design] .topbar .language-switcher { flex: 0 0 auto; max-width: 100%; }
html[data-design] .topbar > :is(.header-forecast-grid,.header-forecast-banner) { grid-column: 1 / -1; grid-row: 3; min-width: 0; width: 100%; }
.design-preference { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; max-width: 100%; color: var(--ink); font-size: 14px; white-space: nowrap; cursor: pointer; }
.topbar .design-preference input { appearance: none; width: 42px; min-width: 42px; height: 24px; min-height: 24px; padding: 0; margin: 0; border: 1px solid #777; border-radius: 20px; background: #777; cursor: pointer; position: relative; flex: 0 0 42px; }
.design-preference input::after { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: #fff; }
.topbar .design-preference input:checked { background: #bb2027; border-color: #bb2027; }
.design-preference input:checked::after { left: 20px; }
.design-preference input:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* New theme changes visual treatment, retaining the classic content and layout. */
html[data-design="editorial"] { --bg: #f6f3ee; --surface: #fcfaf7; --surface-soft: #eeeae4; --surface-tint: #f5e7e4; --ink: #22211f; --muted: #625e59; --line: #d8d3cd; --line-strong: #b5ada4; --accent: #bb2027; --accent-strong: #a41920; --shadow: none; }
html[data-design="editorial"] body { background: var(--bg); }
html[data-design="editorial"] .brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 600; letter-spacing: -.035em; }
html[data-design="editorial"] :is(h1,h2) { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
html[data-design="editorial"] :is(input,select) { accent-color: var(--accent); }
html[data-design="editorial"] :is(button,a,input,select,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
html[data-design="editorial"] :is(.terminal,.market-section,.history-section,.summary-section,.official-section,.methodology-section,.seo-block,.growth-section,.currency-detail-section,.decision-card,.rate-card,.converter-workspace,.converter-results,.converter-faq,.converter-best-offer,.converter-hero,.converter-trust-note,.site-menu-panel,.city-menu-panel) { background: var(--surface); box-shadow: none; border-color: var(--line); }
html[data-design="editorial"] :is(.terminal,.converter-hero)::after { display: none; }
html[data-design="editorial"] .decision-card.primary { color: var(--ink); background: var(--surface); }
html[data-design="editorial"] .decision-card.primary :is(.card-label,small,strong,b) { color: var(--ink); }
html[data-design="editorial"] .decision-grid > .decision-card:not(.bcse-decision-card) { background: var(--good-bg); border-color: #b9dcca; }
html[data-design="editorial"] :is(#bestSellRate,#bestBuyRate) { color: var(--good); }
html[data-design="editorial"] .converter-amount-control { border-color: var(--line); background: var(--surface); }
html[data-design="editorial"] .converter-amount-control input { color: var(--ink); font-variant-numeric: tabular-nums; }
html[data-design="editorial"] .converter-swap { background: var(--surface-soft); color: var(--ink); border-color: var(--line); }
html[data-design="editorial"] .sort-button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
html[data-design="editorial"] .primary-nav-link[aria-current="page"] { background: var(--surface-tint); color: var(--accent-strong); border-color: var(--line-strong); }

/* Forecasts: three equal editorial links, title above the action, no competing pill. */
html[data-design="editorial"] .topbar .header-forecast-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
html[data-design="editorial"] .topbar .header-forecast-grid .header-forecast-banner {
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
  gap: 16px; height: auto; min-height: 150px; min-width: 0; margin: 0; padding: 20px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: none;
}
html[data-design="editorial"] .topbar .header-forecast-grid .header-forecast-banner::before,
html[data-design="editorial"] .topbar .header-forecast-grid .header-forecast-banner::after { display: none; }
html[data-design="editorial"] .topbar .header-forecast-banner-copy { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
html[data-design="editorial"] .topbar .header-forecast-banner-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
html[data-design="editorial"] .topbar .header-forecast-banner-copy strong { color: var(--ink); font-size: 17px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
html[data-design="editorial"] .topbar .header-forecast-banner-cta { display: block; align-self: flex-start; min-height: 24px; padding: 0; color: var(--accent-strong); background: transparent; border: 0; border-radius: 0; font-size: 13px; line-height: 1.6; }
html[data-design="editorial"] .topbar .header-forecast-banner:hover { border-color: var(--accent); background: #fffdfa; }
html[data-design="editorial"] .topbar > .header-forecast-banner { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
html[data-design="editorial"] .topbar > .header-forecast-banner .header-forecast-banner-icon { background: var(--surface-soft); color: var(--accent); }
@media (max-width: 900px) {
  html[data-design="editorial"] .topbar .header-forecast-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  html[data-design="editorial"] .topbar .header-forecast-grid .header-forecast-banner { min-height: 0; padding: 16px 18px; gap: 10px; }
}
@media (max-width: 640px) {
  html[data-design] .app-shell > .topbar { column-gap: 10px; row-gap: 14px; }
  html[data-design] .topbar .brand { gap: 8px; }
  html[data-design] .topbar .brand-mark { width: 32px; height: 32px; flex: 0 0 32px; }
  html[data-design] .topbar .brand strong { font-size: 22px; }
  html[data-design] .topbar .brand small { font-size: 10px; }
  html[data-design] .topbar .design-preference { gap: 7px; font-size: 12px; }
  html[data-design] .topbar .design-preference span { max-width: 55px; white-space: normal; line-height: 1.35; }
  html[data-design] .topbar .topbar-nav { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
  html[data-design] .topbar .primary-navigation { width: 100%; }
  html[data-design] .topbar .primary-navigation-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  html[data-design] .topbar .language-switcher { justify-self: end; }
}
@media (forced-colors: active) {
  .topbar .design-preference input { appearance: auto; }
  .design-preference input::after { display: none; }
}
