:root {
  --bg-parchment: #efe3c8;
  --bg-parchment-dark: #dfd0ae;
  --card-cream: #faf4e6;
  --ink: #241b13;
  --ink-muted: #5a4938;
  --gold: #d4a64a;
  --gold-hover: #c39234;
  --tan-btn: #dfcca2;
  --tan-btn-hover: #d1bc8d;
  --ring-blue: #1998d5;
  --shadow: 4px 4px 0px #241b13;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: #ead9b5;
  background-image:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 236, 0.55) 0%, rgba(182, 146, 88, 0.34) 100%),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22460%22%20height%3D%22460%22%20viewBox%3D%220%200%20460%20460%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22%235a3a1a%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3C%21--%20Nautical%20chart%20rhumb%20lines%20%26%20grid%20--%3E%0A%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%22230%22%20x2%3D%22460%22%20y2%3D%22230%22%20stroke-opacity%3D%220.16%22%20stroke-width%3D%221.2%22%20stroke-dasharray%3D%226%208%22/%3E%0A%20%20%20%20%3Cline%20x1%3D%22230%22%20y1%3D%220%22%20x2%3D%22230%22%20y2%3D%22460%22%20stroke-opacity%3D%220.16%22%20stroke-width%3D%221.2%22%20stroke-dasharray%3D%226%208%22/%3E%0A%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%22460%22%20y2%3D%22460%22%20stroke-opacity%3D%220.09%22%20stroke-width%3D%221%22%20stroke-dasharray%3D%223%2010%22/%3E%0A%20%20%20%20%3Cline%20x1%3D%22460%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%22460%22%20stroke-opacity%3D%220.09%22%20stroke-width%3D%221%22%20stroke-dasharray%3D%223%2010%22/%3E%0A%0A%20%20%20%20%3C%21--%20Map%20border%20ticks%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M16%2016%20H42%20M16%2016%20V42%20M444%2016%20H418%20M444%2016%20V42%20M16%20444%20H42%20M16%20444%20V418%20M444%20444%20H418%20M444%20444%20V418%22%20stroke-opacity%3D%220.34%22%20stroke-width%3D%222%22/%3E%0A%0A%20%20%20%20%3C%21--%20Coastline%20%26%20elevation%20contours%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M-20%2096%20C%2065%2064%2C%20130%20132%2C%20205%2098%20C%20280%2064%2C%20355%20124%2C%20480%2088%22%20stroke-opacity%3D%220.22%22%20stroke-width%3D%221.8%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M-20%20110%20C%2065%2078%2C%20130%20146%2C%20205%20112%20C%20280%2078%2C%20355%20138%2C%20480%20102%22%20stroke-opacity%3D%220.14%22%20stroke-width%3D%221.2%22%20stroke-dasharray%3D%224%206%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M-20%20368%20C%2075%20398%2C%20155%20332%2C%20245%20368%20C%20335%20404%2C%20395%20340%2C%20480%20370%22%20stroke-opacity%3D%220.22%22%20stroke-width%3D%221.8%22/%3E%0A%0A%20%20%20%20%3C%21--%20Dotted%20treasure%20trail%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M52%20162%20C%20118%20128%2C%20156%20205%2C%20226%20196%20C%20296%20187%2C%20326%20262%2C%20386%20292%22%20stroke-opacity%3D%220.38%22%20stroke-width%3D%222.5%22%20stroke-dasharray%3D%227%207%22/%3E%0A%20%20%20%20%3C%21--%20Trail%20arrowhead%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M376%20296%20L388%20293%20L383%20282%22%20stroke-opacity%3D%220.38%22%20stroke-width%3D%222.3%22/%3E%0A%0A%20%20%20%20%3C%21--%20X%20Marks%20the%20Spot%20--%3E%0A%20%20%20%20%3Cg%20transform%3D%22translate%28396%2C%20300%29%22%20stroke-opacity%3D%220.52%22%20stroke-width%3D%223.2%22%3E%0A%20%20%20%20%20%20%3Cline%20x1%3D%22-11%22%20y1%3D%22-11%22%20x2%3D%2211%22%20y2%3D%2211%22/%3E%0A%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%22-11%22%20x2%3D%22-11%22%20y2%3D%2211%22/%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%220%22%20cy%3D%220%22%20r%3D%2218%22%20stroke-width%3D%221.5%22%20stroke-dasharray%3D%224%204%22/%3E%0A%20%20%20%20%3C/g%3E%0A%0A%20%20%20%20%3C%21--%20Prominent%20Compass%20Rose%20--%3E%0A%20%20%20%20%3Cg%20transform%3D%22translate%28108%2C%20315%29%22%20stroke-opacity%3D%220.34%22%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%220%22%20cy%3D%220%22%20r%3D%2236%22%20stroke-width%3D%221.6%22/%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%220%22%20cy%3D%220%22%20r%3D%2228%22%20stroke-width%3D%221.1%22%20stroke-dasharray%3D%222%204%22/%3E%0A%20%20%20%20%20%20%3Cpolygon%20points%3D%220%2C-44%206%2C-7%200%2C0%20-6%2C-7%22%20fill%3D%22%239e5810%22%20fill-opacity%3D%220.28%22%20stroke-width%3D%221.2%22/%3E%0A%20%20%20%20%20%20%3Cpolygon%20points%3D%220%2C44%206%2C7%200%2C0%20-6%2C7%22%20fill%3D%22%235a3a1a%22%20fill-opacity%3D%220.16%22%20stroke-width%3D%221.2%22/%3E%0A%20%20%20%20%20%20%3Cpolygon%20points%3D%2244%2C0%207%2C6%200%2C0%207%2C-6%22%20fill%3D%22%235a3a1a%22%20fill-opacity%3D%220.16%22%20stroke-width%3D%221.2%22/%3E%0A%20%20%20%20%20%20%3Cpolygon%20points%3D%22-44%2C0%20-7%2C6%200%2C0%20-7%2C-6%22%20fill%3D%22%235a3a1a%22%20fill-opacity%3D%220.16%22%20stroke-width%3D%221.2%22/%3E%0A%20%20%20%20%20%20%3Ctext%20x%3D%220%22%20y%3D%22-48%22%20text-anchor%3D%22middle%22%20font-family%3D%22Bangers%2C%20sans-serif%22%20font-size%3D%2213%22%20fill%3D%22%235a3a1a%22%20fill-opacity%3D%220.45%22%20stroke%3D%22none%22%3EN%3C/text%3E%0A%20%20%20%20%3C/g%3E%0A%0A%20%20%20%20%3C%21--%20Treasure%20Island%20Silhouette%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M292%2058%20C%20318%2040%2C%20366%2046%2C%20376%2070%20C%20386%2094%2C%20344%20112%2C%20310%20102%20C%20282%2094%2C%20272%2072%2C%20292%2058%20Z%22%20fill%3D%22%23c89d54%22%20fill-opacity%3D%220.16%22%20stroke-opacity%3D%220.28%22%20stroke-width%3D%221.8%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M284%2050%20C%20316%2030%2C%20374%2036%2C%20386%2068%20C%20398%20100%2C%20348%20122%2C%20306%20110%22%20stroke-opacity%3D%220.18%22%20stroke-width%3D%221.2%22%20stroke-dasharray%3D%223%205%22/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E");
  background-size: 100% 100%, 460px 460px;
  background-attachment: fixed, scroll;
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 48px;
}

.site-header {
  background: var(--bg-parchment-dark);
  border-bottom: 2.5px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.avatar-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background-color: #d4a64a;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2229%22%20fill%3D%22%23d4a64a%22%20stroke%3D%22%23241b13%22%20stroke-width%3D%223.5%22/%3E%0A%20%20%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2223%22%20fill%3D%22%23faf4e6%22%20stroke%3D%22%23241b13%22%20stroke-width%3D%222%22%20stroke-dasharray%3D%223%202%22/%3E%0A%20%20%3Cpolygon%20points%3D%2232%2C8%2037%2C27%2032%2C32%2027%2C27%22%20fill%3D%22%23b42318%22%20stroke%3D%22%23241b13%22%20stroke-width%3D%221.5%22/%3E%0A%20%20%3Cpolygon%20points%3D%2232%2C56%2037%2C37%2032%2C32%2027%2C37%22%20fill%3D%22%23241b13%22/%3E%0A%20%20%3Cpolygon%20points%3D%2256%2C32%2037%2C37%2032%2C32%2037%2C27%22%20fill%3D%22%235a4938%22/%3E%0A%20%20%3Cpolygon%20points%3D%228%2C32%2027%2C27%2032%2C32%2027%2C37%22%20fill%3D%22%235a4938%22/%3E%0A%20%20%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%224.5%22%20fill%3D%22%23d4a64a%22%20stroke%3D%22%23241b13%22%20stroke-width%3D%222%22/%3E%0A%20%20%3Cpath%20d%3D%22M44%2014%20L52%2022%20M52%2014%20L44%2022%22%20stroke%3D%22%23b42318%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22/%3E%0A%3C/svg%3E");
  background-size: cover;
  background-position: center;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.avatar-img {
  opacity: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-ticker {
  font-family: 'Bangers', cursive;
  font-size: 1.38rem;
  letter-spacing: 0.06em;
  color: #9e5810;
  text-shadow: 1px 1px 0 rgba(36, 27, 19, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 4px 2px;
  border-bottom: 2.5px solid transparent;
  transition: border-color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  border-bottom-color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.icon-circle:hover {
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-gold {
  background: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-hover);
}

.btn-tan {
  background: var(--tan-btn);
}

.btn-tan:hover {
  background: var(--tan-btn-hover);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1.05rem;
}

.card {
  background: var(--card-cream);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(180, 109, 30, 0.14);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero-art-card {
  padding: 8px;
  background: #e6d6b5;
}

.hero-art-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
}

.hero-headline {
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.ca-box-wrapper {
  margin-bottom: 20px;
}

.ca-label {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.ca-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card-cream);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}

.ca-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  background: var(--tan-btn);
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  padding: 5px 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--gold);
}

.hero-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rope-divider {
  border: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0,
    var(--ink) 14px,
    transparent 14px,
    transparent 22px
  );
  opacity: 0.35;
  margin: 38px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 900;
  font-style: italic;
  text-align: center;
  margin-bottom: 20px;
}

.section-header .section-title {
  margin-bottom: 0;
  text-align: left;
}

.dispatch-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.x-card-topbar {
  background: var(--bg-parchment-dark);
  border-bottom: 2px solid var(--ink);
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.live-pill {
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 900;
}

.cam-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  background: var(--card-cream);
  padding: 2px 7px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px;
}

.telemetry-stat {
  background: var(--bg-parchment);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-label {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.telemetry-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
}

.telemetry-sub {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-muted);
}

.pct-up {
  color: #15803d;
}

.pct-down {
  color: #b91c1c;
}

.telemetry-footer {
  padding: 0 16px 14px;
}

.telemetry-note {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card,
.step-card {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.stat-heading,
.step-heading {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.stat-emoji,
.step-emoji {
  font-size: 3rem;
  margin: 10px 0 14px;
}

.stat-desc,
.step-desc {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.site-footer {
  background: var(--bg-parchment-dark);
  border-top: 2.5px solid var(--ink);
  padding: 20px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 8px;
}

.footer-link {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-btn {
  background: none;
  border: none;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  padding: 0;
}

.footer-link:hover {
  color: #9e5b12;
}

.footer-note {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, 0.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  background: var(--card-cream);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 480px;
  width: 100%;
  padding: 26px 24px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ink);
  cursor: pointer;
}

.ring-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e3f4fc;
  border: 2px solid var(--ring-blue);
  color: #0c5c85;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.ring-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ring-blue);
}

.modal-heading {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.modal-bold {
  color: var(--ink);
  font-weight: 900;
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .hero-grid,
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .telemetry-grid,
  .grid-4,
  .grid-3,
  .hero-cta-row {
    grid-template-columns: 1fr;
  }

  .main-nav {
    gap: 18px;
  }
}
