:root {
  --color-bg: #f3f7f8;
  --color-surface: #ffffff;
  --color-alt: #e9f1f3;
  --color-land: #e9efe9;
  --color-sea: #cfe6eb;
  --color-road: #ffffff;
  --color-teal: #0d6770;
  --color-teal-dark: #094d54;
  --color-coral: #c8463e;
  --color-navy: #142838;
  --color-muted: #465a68;
  --color-border: #cbd9de;
  --color-on-dark: #ffffff;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 8px;
  --max-width: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-navy);
  background: var(--color-bg);
  overflow-x: hidden;
}
svg { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--color-coral); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-navy); color: var(--color-on-dark); padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 40;
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 66px; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--color-navy); min-height: 44px; font-weight: 700;
}
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  text-decoration: none; color: var(--color-muted);
  min-height: 44px; display: inline-flex; align-items: center; font-weight: 500;
}
.site-nav a:hover { color: var(--color-teal); }
.menu-toggle {
  display: none; min-height: 44px; min-width: 68px;
  border: 1px solid var(--color-border); background: var(--color-bg);
  color: var(--color-navy); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer;
}

.map-hero { padding: 2rem 0 3.25rem; }
.map-intro {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; align-items: end;
  margin-bottom: 1.5rem;
}
.coord-tag {
  margin: 0 0 0.4rem; font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.08em; color: var(--color-teal);
}
h1, h2, h3 { margin: 0 0 0.6rem; line-height: 1.2; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
.intro-text { margin: 0; color: var(--color-muted); }

.explorer {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1.25rem;
  align-items: stretch;
}
.map-stage {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gulf-svg { width: 100%; height: auto; flex: 1; }
.map-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--color-navy);
}
.sea-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
  fill: var(--color-teal-dark);
}
.office-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  fill: var(--color-navy);
}
.pin-layer {
  position: absolute;
  inset: 0 0 42px 0;
  pointer-events: none;
}
.map-pin {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  background: var(--color-teal);
  color: var(--color-on-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.map-pin.is-active {
  background: var(--color-coral);
  transform: translate(-50%, -50%) scale(1.1);
}
.map-legend {
  background: var(--color-alt);
  border-top: 1px solid var(--color-border);
  padding: 0.6rem 1rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  font-size: 0.85rem; color: var(--color-muted);
}

.list-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.active-banner {
  background: var(--color-navy);
  color: var(--color-on-dark);
  padding: 1.25rem;
}
.active-code {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-sea);
}
.active-title { font-size: 1.35rem; margin: 0 0 0.4rem; }
.active-info { margin: 0 0 1rem; font-size: 0.95rem; color: var(--color-sea); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.55rem 1.25rem;
  border-radius: var(--radius); text-decoration: none;
  font-weight: 600; border: none; cursor: pointer;
}
.btn-teal { background: var(--color-teal); color: var(--color-on-dark); }
.btn-teal:hover { background: var(--color-teal-dark); }

.sync-list { list-style: none; margin: 0; padding: 0; }
.sync-list li + li { border-top: 1px solid var(--color-border); }
.sync-item {
  width: 100%;
  min-height: 56px;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  color: var(--color-navy);
  font: inherit;
}
.sync-item:hover { background: var(--color-bg); }
.sync-item.is-active { background: var(--color-alt); border-left: 4px solid var(--color-coral); }
.sync-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-teal);
  flex: none;
}
.sync-main { display: flex; flex-direction: column; }
.sync-main small { color: var(--color-muted); font-size: 0.88rem; }

.section { padding: 3.5rem 0; }
.section-alt { background: var(--color-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.index-grid, .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.index-card, .advisor {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.index-card p, .advisor p { margin: 0; color: var(--color-muted); }

.route-list {
  list-style: none; margin: 1.25rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
.route-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.node {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--color-sea);
  color: var(--color-navy);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.route-list p { margin: 0; color: var(--color-muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.authority { font-size: 0.92rem; color: var(--color-teal-dark); font-weight: 600; }

.accordion details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
  margin-bottom: 0.65rem;
}
.accordion summary {
  cursor: pointer; min-height: 46px; display: flex; align-items: center; font-weight: 600;
}
.accordion p { margin: 0 0 0.85rem; color: var(--color-muted); }

.map-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: grid; gap: 0.65rem;
}
.map-form label { font-size: 0.9rem; font-weight: 600; }
.map-form input, .map-form select, .map-form textarea {
  font: inherit; min-height: 44px; padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg);
}
.form-feedback { margin: 0; min-height: 1.4em; color: var(--color-teal-dark); font-weight: 600; }

.site-footer { background: var(--color-navy); color: var(--color-on-dark); padding: 1.5rem 0; font-size: 0.92rem; }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }

@media (max-width: 960px) {
  .explorer, .map-intro, .two-col { grid-template-columns: 1fr; }
  .route-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 66px;
    background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.25rem; flex-direction: column; gap: 0.25rem;
  }
  .site-nav.is-open { display: flex; }
  .route-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
