/* Shared identity and appearance for the public site and member area. */
:root {
  color-scheme: dark;
  --bg: #111314;
  --surface: #1a1d1e;
  --panel: #1a1d1e;
  --ink: #f2f3f4;
  --text: var(--ink);
  --muted: #b1b9ba;
  --gold: #dfc077;
  --line: #383e3e;
  --accent-fill: #d4af37;
  --on-accent: #17201b;
  --accent-soft: #29271d;
  --status-ink: #b4d7cb;
  --logo-surface: var(--bg);
  --header-surface: #111314;
  --red: #8b1e21;
  --green: #0e4d3c;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8faf9;
  --surface: #eef2ef;
  --panel: #fff;
  --ink: #17231f;
  --muted: #53655d;
  --gold: #826217;
  --line: #c8d2ce;
  --accent-soft: #f2ecd9;
  --status-ink: #0e4d3c;
  --logo-surface: #fff;
  --header-surface: #fff;
}
[hidden] { display: none !important; }
.header { background: var(--header-surface); }
.brand.logo-link, .footer-brand .logo-link {
  display: block;
  width: 232px;
  padding: 6px 10px;
  background: var(--logo-surface);
  border-radius: 4px;
  flex-shrink: 0;
}
.itma-logo-frame { display: block; width: 100%; aspect-ratio: 3 / 1; isolation: isolate; background: var(--logo-surface); }
.itma-logo { display: block; width: 100%; height: 100%; overflow: hidden; }
/* Let the supplied dark artwork's black background blend into the page. */
.itma-logo-dark { mix-blend-mode: lighten; }
.itma-logo-light { display: none; }
:root[data-theme="light"] .itma-logo-dark { display: none; }
:root[data-theme="light"] .itma-logo-light { display: block; }
.footer-brand .logo-link { width: 215px; }
.site-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 56px;
  border-top: 1px solid var(--line);
  padding-block: 6px;
}
.site-preferences .language-nav { border: 0; padding: 0; margin-left: auto; }
.site-preferences .language-nav a { min-height: 44px; }
.theme-control { display: inline-flex; align-items: center; gap: 8px; }
.theme-control label { margin: 0; color: var(--muted); font: 500 .875rem/1.4 system-ui, sans-serif; }
.theme-control select {
  min-height: 44px;
  min-width: 92px;
  max-width: 160px;
  padding: 8px 10px;
  font: 500 1rem/1.4 system-ui, sans-serif;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.theme-control select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hero-media.brand-feature {
  background: var(--logo-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 26px;
  border-top: 3px solid var(--accent-fill);
}
.hero-media.brand-feature::after { display: none; }
.brand-feature .hero-logo { width: 100%; }
.brand-feature .media-topline { color: var(--muted); font-size: .875rem; }
.brand-feature figcaption { color: var(--ink); }
.brand-feature figcaption > span { color: var(--gold); font-size: 1.15rem; }
.public-site .button, .member-site .button, .member-site button {
  color: var(--on-accent);
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}
.public-site .button:hover, .member-site .button:hover, .member-site button:hover { background: #e5c365; border-color: #e5c365; filter: none; }
.member-site .secondary { color: var(--gold); background: transparent; border-color: var(--gold); }
.member-site .secondary:hover { background: var(--accent-soft); color: var(--gold); border-color: var(--gold); }
.method-band { background: var(--accent-fill); }
.desktop-nav a, .area-detail, .measure span, .secondary-content > div, .footer-brand p { color: var(--muted); }
.principles span { color: var(--gold); border-color: var(--gold); }
.area, .measurement-panel { border-color: var(--line); }
.status { color: var(--status-ink); border-color: var(--status-ink); }
.support-section { background: var(--surface); }
.campaign-card { border-color: var(--gold); }
.member-site header { flex-wrap: wrap; }
.member-site header nav { margin-left: auto; }
.member-site .member-preferences { display: flex; justify-content: flex-end; width: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
.member-site input:not([type=radio]):not([type=checkbox]), .member-site textarea { background: var(--bg); border-color: var(--muted); }
.member-site .participation { background: linear-gradient(120deg, var(--accent-soft), var(--panel)); }
.member-site .notice { background: var(--accent-soft); }
.member-site a:focus-visible, .member-site button:focus-visible, .member-site input:focus-visible, .member-site textarea:focus-visible, .member-site summary:focus-visible { outline-color: var(--gold); }
:root[data-theme="light"] .favor { border-color: #0e6a4e; }
:root[data-theme="light"] .against { border-color: #a43639; }
:root[data-theme="light"] .abstain { border-color: #56658c; }
@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .header-support { margin-left: auto; }
}
@media (max-width: 700px) {
  .member-site header nav { margin-left: 0; }
  .member-site .member-preferences { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .brand.logo-link { width: min(220px, calc(100vw - 114px)); }
  .hero-media.brand-feature { padding: 80px 22px; height: 310px; }
  .brand-feature .media-topline { font-size: .75rem; }
}
@media print { .site-preferences, .member-preferences { display: none; } }
