:root {
  color-scheme: light;
  --ucm-blue: #005587;
  --ucm-blue-strong: #003f66;
  --ucm-gold: #ffc72c;
  --accent-teal: #007c72;
  --accent-red: #9f1d20;
  --page: #f6f8f1;
  --surface: #ffffff;
  --surface-soft: #eef5f4;
  --ink: #17212f;
  --muted: #5a6675;
  --line: #d6dfdf;
  --focus: #007c72;
  --shadow: 0 16px 40px rgba(15, 32, 42, 0.1);
  --radius: 8px;
  --header-height: 74px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #111417;
  --surface: #1b2228;
  --surface-soft: #202d31;
  --ink: #f1f5f2;
  --muted: #bac7c8;
  --line: #3a474a;
  --focus: #ffc72c;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

body.map-expanded {
  overflow: hidden;
}

img,
svg,
canvas,
iframe {
  max-width: 100%;
}

img {
  display: block;
}

a {
  color: var(--ucm-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

html[data-theme="dark"] a {
  color: #8bd3ff;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 35%);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  background: var(--ucm-gold);
  color: #13202a;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  background: color-mix(in srgb, var(--surface), transparent 5%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  width: 2.4rem;
  height: 2.4rem;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: var(--radius);
}

.brand__name,
.brand__tag {
  display: block;
  line-height: 1.1;
}

.brand__name {
  font-weight: 900;
}

.brand__tag {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}

.site-nav__link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.5rem 0.65rem;
  font-weight: 850;
}

.theme-switcher {
  justify-self: end;
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(44px, auto));
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.theme-switcher__button {
  min-width: 44px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
}

.theme-switcher__button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.page-main {
  min-height: 70vh;
}

.page-intro {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.page-intro--compact {
  border-bottom: 0;
  background: var(--page);
}

.page-intro__inner,
.content-band__inner,
.map-section,
.notice-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-intro__inner {
  padding: 3rem 0 2.5rem;
}

.page-intro--compact .page-intro__inner {
  padding: 1.5rem 0 1rem;
}

.narrow {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 2.45rem;
  line-height: 1.08;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.55rem;
  line-height: 1.18;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  line-height: 1.25;
}

h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
}

p {
  margin: 0 0 1rem;
}

.page-intro p:last-child,
.content-band p:last-child,
.map-shell p:last-child,
.article-card p:last-child {
  margin-bottom: 0;
}

.page-intro__inner > p:not(.eyebrow),
.content-band__inner > p,
.section-heading p,
.article-card p,
.detail-card p,
.embed-note,
.list-status,
.updated {
  color: var(--muted);
}

.map-first {
  margin-top: 0.35rem;
}

.map-section {
  padding: 0.5rem 0 2rem;
}

.map-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(78vh, 820px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-shell__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.map-shell__bar h2 {
  margin-bottom: 0.15rem;
  font-size: 1.15rem;
}

.map-shell__bar p {
  max-width: 76ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-shell__actions,
.button-row,
.status-row,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.map-shell__status {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.9rem;
}

.map-frame {
  width: 100%;
  min-height: 540px;
  flex: 1 1 auto;
  border: 0;
  background: #dde7ea;
}

.embed-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.map-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}

.map-shell.is-fallback-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}

.map-shell.is-native-fullscreen .map-frame,
.map-shell.is-fallback-fullscreen .map-frame,
.map-shell:fullscreen .map-frame {
  min-height: 0;
}

.button,
.chip,
.slide-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0.62rem 0.82rem;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
}

.button--primary {
  border-color: color-mix(in srgb, var(--ucm-gold), #936c00 18%);
  background: var(--ucm-gold);
  color: #182332;
}

.button--secondary,
.chip,
.slide-button {
  background: var(--surface);
  color: var(--ink);
}

.button:hover,
.chip:hover,
.slide-button:hover {
  transform: translateY(-1px);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent-teal);
  background: color-mix(in srgb, var(--accent-teal), transparent 86%);
  color: var(--ink);
}

.content-band {
  padding: 2rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 30%);
}

.content-band__inner > h2 {
  margin-bottom: 1rem;
}

.card-grid,
.detail-grid,
.action-grid,
.stats-grid,
.chart-grid {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-grid,
.stats-grid,
.chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.detail-card,
.article-card,
.stat,
.notice,
.toolbar,
.event-card,
.chart-grid figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 32, 42, 0.06);
}

html[data-theme="dark"] .info-card,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .chart-grid figure {
  box-shadow: none;
}

.info-card,
.article-card,
.stat,
.notice,
.toolbar {
  padding: 1rem;
}

.info-card h3 a,
.detail-card h3 a {
  color: inherit;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.section-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.notice-band {
  padding: 0 0 1rem;
}

.notice {
  color: var(--muted);
}

.notice strong {
  color: var(--ink);
}

.notice-warning {
  border-color: color-mix(in srgb, var(--ucm-gold), var(--line) 35%);
  background: color-mix(in srgb, var(--ucm-gold), var(--surface) 82%);
  color: #4a3b12;
}

html[data-theme="dark"] .notice-warning {
  color: #ffe7a3;
}

.status-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: color-mix(in srgb, var(--accent-teal), transparent 84%);
  color: var(--accent-teal);
  font-size: 0.86rem;
  font-weight: 850;
}

.status-pill--muted {
  background: var(--surface-soft);
  color: var(--muted);
}

.status-pill--warn {
  background: color-mix(in srgb, var(--ucm-gold), var(--surface) 78%);
  color: #5f4610;
}

.stats-grid {
  margin: 1rem 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat span,
.stat strong {
  display: block;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stat strong {
  color: var(--ucm-blue);
  font-size: 1.8rem;
  line-height: 1.1;
}

html[data-theme="dark"] .stat strong {
  color: #8bd3ff;
}

.toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  background: var(--surface-soft);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.event-card {
  overflow: hidden;
}

.event-card__media {
  min-height: 140px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ucm-blue), var(--accent-teal));
  color: white;
  font-weight: 900;
  text-align: center;
}

.event-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.event-card__body {
  padding: 1rem;
}

.event-card__host {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 0.55rem;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-meta {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.detail-card {
  overflow: hidden;
}

.detail-card__body {
  padding: 1rem;
}

.slideshow {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.slideshow img,
.slideshow .slide-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.slideshow img {
  object-fit: cover;
}

.slideshow .slide-link {
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 900;
  text-align: center;
}

.slideshow img.is-active,
.slideshow .slide-link.is-active {
  display: flex;
}

.slide-button {
  position: absolute;
  top: 50%;
  min-width: 48px;
  padding-inline: 0.55rem;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--surface), transparent 12%);
  color: var(--ink);
}

.slide-button--prev {
  left: 0.5rem;
}

.slide-button--next {
  right: 0.5rem;
}

.fact-list {
  display: grid;
  gap: 0.3rem;
  padding-left: 1.1rem;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 0.86rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.chart-grid {
  margin-top: 1rem;
}

.chart-grid figure {
  margin: 0;
  padding: 1rem;
}

.chart-grid canvas {
  width: 100%;
  height: auto;
}

.chart-grid figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-card + .article-card {
  margin-top: 1rem;
}

.article-card h2:not(:first-child),
.legal-article h2:not(:first-child) {
  margin-top: 1.75rem;
}

.article-card ul,
.detail-card ul {
  margin: 0.45rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.details-body {
  padding: 0 0 1rem;
}

details {
  border-top: 1px solid var(--line);
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--accent-teal);
  font-size: 1.2rem;
  font-weight: 900;
}

details[open] summary::after {
  content: "-";
}

.action-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.action-card span {
  font-weight: 900;
}

.action-card small {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-article h3 {
  margin-top: 1.2rem;
}

.site-footer {
  margin-top: 2rem;
  border-top: 4px solid var(--ucm-gold);
  background: #123044;
  color: #eaf2f4;
}

.site-footer a {
  color: #eaf2f4;
}

.site-footer__inner,
.site-footer__bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.6rem 0 1rem;
}

.site-footer__inner p {
  max-width: 68ch;
  margin: 0.35rem 0 0;
  color: #c8d8dd;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 0.5rem 0.9rem;
}

.site-footer__links a {
  font-weight: 750;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__bottom {
  padding: 0 0 1.4rem;
  color: #c8d8dd;
  font-size: 0.88rem;
}

.compat-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--page);
}

@media (max-width: 1040px) {
  .site-header__inner {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: none;
    justify-self: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav__link {
    justify-content: center;
  }
}

@media (max-width: 920px) {
  .card-grid,
  .detail-grid,
  .chart-grid,
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-shell__bar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .map-shell__actions {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 66px;
  }

  .site-header__inner,
  .page-intro__inner,
  .content-band__inner,
  .map-section,
  .notice-band,
  .site-footer__inner,
  .site-footer__bottom {
    width: min(100% - 22px, 1180px);
  }

  .site-header__inner {
    gap: 0.55rem;
  }

  .brand__tag,
  .theme-switcher__button span {
    display: none;
  }

  .theme-switcher {
    grid-template-columns: repeat(3, 44px);
  }

  .site-nav.is-open,
  .card-grid,
  .detail-grid,
  .action-grid,
  .stats-grid,
  .chart-grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .page-intro__inner {
    padding: 2rem 0 1.5rem;
  }

  .page-intro--compact .page-intro__inner {
    padding-top: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .button,
  .chip {
    width: 100%;
  }

  .filter-row,
  .map-shell__actions,
  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 460px;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
