:root {
  --bg: #060b14;
  --surface: #0d1520;
  --surface2: #111c2e;
  --border: rgba(5, 150, 87, .14);
  --border2: rgba(5, 150, 87, .34);
  --green: #059657;
  --orange: #ff7800;
  --text: #e2eef0;
  --muted: #6f879f;
  --radius: 16px;
  --font-sans: Inter, Arial, sans-serif;
  --color-bg: var(--bg);
  --color-bg-soft: var(--surface);
  --color-surface: var(--surface);
  --color-surface-soft: var(--surface2);
  --color-surface-elevated: var(--surface2);
  --color-surface-inset: var(--bg);
  --color-border: var(--border2);
  --color-border-soft: var(--border);
  --color-border-strong: var(--green);
  --color-text: var(--text);
  --color-text-soft: #a7bbce;
  --color-text-muted: var(--muted);
  --color-accent: var(--green);
  --color-accent-hover: #07ad65;
  --color-brand: var(--green);
  --color-brand-alt: var(--orange);
  --color-float: var(--surface);
  --chart-bg: var(--bg);
  --chart-grid: var(--bg);
  --chart-label-bg: var(--surface2);
}
html[data-theme="light"] {
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface2: #edf4f0;
  --border: rgba(5, 150, 87, .2);
  --border2: rgba(5, 150, 87, .45);
  --text: #102019;
  --muted: #52685e;
  --color-bg: var(--bg);
  --color-bg-soft: var(--surface);
  --color-surface: var(--surface);
  --color-surface-soft: var(--surface2);
  --color-surface-elevated: var(--surface);
  --color-surface-inset: var(--surface2);
  --color-border: var(--border2);
  --color-border-soft: var(--border);
  --color-border-strong: var(--green);
  --color-text: var(--text);
  --color-text-soft: #3c5a4e;
  --color-text-muted: var(--muted);
  --color-accent: var(--green);
  --color-float: var(--surface);
  --chart-bg: #f7fbf9;
  --chart-grid: #f7fbf9;
  --chart-label-bg: var(--surface2);
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}
.q4-masthead { background: var(--surface); }
.q4-masthead .q4-shell {
  width: min(1440px, calc(100% - 40px));
  max-width: none;
}
.q4-masthead-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.q4-wordmark {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0;
}
.q4-wordmark .q4-mark { width: 34px; height: 34px; }
.q4-brand-name { font-size: 17px; font-weight: 700; letter-spacing: .05em; color: var(--green); white-space: nowrap; }
.q4-brand-orange { color: var(--orange); }
.q4-navigation { min-width: 0; justify-self: center; }
.q4-crumb { width: min(var(--read, 880px), calc(100% - 40px)); margin-inline: auto; text-align: center; }
.q4-crumb ol { justify-content: center; }
.q4-crumb li { min-width: 0; overflow-wrap: anywhere; }
.q4-journey {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px;
  list-style: none;
}
.q4-journey li { display: flex; align-items: center; flex: 0 0 auto; margin: 0; padding: 0; }
.q4-journey a { display: inline-flex; align-items: center; min-height: 38px; white-space: nowrap; letter-spacing: .07em; }
.q4-arrow { display: none; }
.q4-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.q4-back, .q4-theme, .q4-language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface2);
  color: var(--text);
  font: 700 12px var(--font-sans);
  line-height: 1.4;
  white-space: nowrap;
}
.q4-back { color: var(--green); }
.q4-theme { width: 40px; padding: 0; font-size: 18px; cursor: pointer; }
.q4-language { cursor: pointer; }
.q4-back:hover, .q4-theme:hover, .q4-language:hover { background: var(--surface); border-color: var(--green); text-decoration: none; }
.q4-masthead :focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.q4-logotype { display: inline-flex; gap: 0; letter-spacing: -.06em; }
.q4-logotype span { color: var(--orange); }
.q4-logotype b { color: var(--green); font-weight: inherit; }
.q4-footer { background: var(--surface); }
.q4-map { max-width: none; margin: 0; padding: 0; }
.q4-map-content { width: min(880px, calc(100% - 40px)); margin: 32px auto; }
.q4-map-content h1, .q4-map-content h2, .q4-map-content h3 { color: var(--text); }
.q4-map-content a { color: var(--green); }
.q4-map-content table, .q4-map-content th, .q4-map-content td { border-color: var(--border2); background: var(--surface); color: var(--text); }
.q4-map-content code { background: var(--surface2); color: var(--text); }
.control, .theme-toggle, .language-selector { font-family: var(--font-sans); }
html[data-theme="light"] .navigation a,
html[data-theme="light"] .hero-lead,
html[data-theme="light"] .card strong,
html[data-theme="light"] .reading-item,
html[data-theme="light"] .transparency-copy { color: #3c5a4e; }
@media (max-width: 1360px) {
  .q4-masthead-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .q4-navigation { grid-column: 1 / -1; grid-row: 2; width: 100%; }
}
@media (max-width: 620px) {
  .q4-masthead .q4-shell { width: calc(100% - 28px); }
  .q4-masthead-inner { gap: 12px; }
  .q4-actions { gap: 6px; }
  .q4-back { padding-inline: 9px; }
  .q4-journey a { min-height: 40px; }
  .q4-wordmark { grid-column: 1 / -1; justify-self: center; }
  .q4-navigation { grid-row: 2; }
  .q4-actions { grid-column: 1 / -1; grid-row: 3; justify-self: center; margin-left: 0; }
}
@media print {
  .q4-masthead, .q4-actions { display: none; }
}
