:root {
  --ink: #061416;
  --deep: #071c1e;
  --sea: #0b292c;
  --sea-light: #174247;
  --paper: #e9e1cf;
  --paper-dim: #a9a596;
  --brass: #c5a76c;
  --brass-bright: #e4c783;
  --signal: #df684d;
  --signal-soft: #f29673;
  --line: rgba(221, 207, 172, 0.2);
  --line-strong: rgba(221, 207, 172, 0.38);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 76% -12%, rgba(54, 102, 103, 0.3), transparent 30rem),
    linear-gradient(180deg, #081a1c 0%, #061416 70%);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}

button, select { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.055;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  background: var(--paper);
}

.skip-link:focus { transform: none; }

.masthead,
main,
footer {
  width: min(1480px, calc(100% - 64px));
  margin-inline: auto;
}

.masthead {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.wordmark-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass-bright);
  font: 700 11px/1 var(--serif);
  letter-spacing: 0.14em;
  position: relative;
}

.wordmark-mark::before,
.wordmark-mark::after {
  content: '';
  position: absolute;
  background: var(--brass);
}

.wordmark-mark::before { width: 52px; height: 1px; }
.wordmark-mark::after { width: 1px; height: 52px; }

.wordmark strong {
  display: block;
  font: 500 24px/1 var(--serif);
  letter-spacing: 0.02em;
}

.wordmark small {
  display: block;
  margin-top: 6px;
  color: var(--brass);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.server-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(197, 167, 108, 0.08);
}

.pulse.online {
  background: #84b99c;
  box-shadow: 0 0 0 4px rgba(132, 185, 156, 0.1), 0 0 14px rgba(132, 185, 156, 0.45);
}

.pulse.offline { background: var(--signal); }

.state-separator {
  width: 1px;
  height: 14px;
  margin-inline: 3px;
  background: var(--line-strong);
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: stretch;
  gap: 30px;
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}

.overview-copy {
  position: absolute;
  z-index: 3;
  top: clamp(44px, 8vw, 92px);
  left: clamp(28px, 5vw, 72px);
  max-width: 560px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.58);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brass);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font: 400 clamp(44px, 5vw, 76px)/0.92 var(--serif);
  letter-spacing: -0.035em;
}

h1 em { color: var(--signal-soft); font-weight: 400; }

.lede {
  max-width: 450px;
  margin: 0;
  color: rgba(238, 243, 230, 0.8);
  font: 400 14px/1.65 var(--sans);
}

.date-card {
  position: absolute;
  z-index: 3;
  left: clamp(28px, 5vw, 72px);
  bottom: 30px;
  display: flex;
  width: min(340px, calc(100% - 56px));
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  border-left: 1px solid var(--brass);
  background: linear-gradient(90deg, rgba(3, 15, 17, 0.82), rgba(3, 15, 17, 0.38));
  backdrop-filter: blur(8px);
}

.date-card-label {
  margin-bottom: 7px;
  color: var(--brass);
  font-size: 9px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.date-card strong {
  font: 400 26px/1.2 var(--serif);
  letter-spacing: 0.02em;
}

.date-card > span:last-child {
  margin-top: 6px;
  color: var(--paper-dim);
  font-size: 11px;
}

.sea-window {
  grid-row: 1;
  grid-column: 1;
  min-height: 570px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sea);
}

.sea-window::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 10, 11, 0.72) 0%, rgba(2, 10, 11, 0.42) 43%, rgba(2, 10, 11, 0.08) 78%),
    linear-gradient(180deg, rgba(2, 10, 11, 0.18) 35%, rgba(2, 10, 11, 0.88) 100%);
  pointer-events: none;
}

.sea-window video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.08) brightness(0.64);
  transition: transform 10s ease;
}

.sea-window:hover video { transform: scale(1.025); }

.sea-window-caption {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  color: var(--paper);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quick-stats {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.quick-stats div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.quick-stats dt {
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-stats dd {
  margin: 4px 0 0;
  font: 400 31px/1.1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.quick-stats dd small { color: var(--paper-dim); font-size: 15px; }

.plot-section { padding: 56px 0 60px; }

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

h2 {
  margin-bottom: 0;
  font: 400 32px/1.1 var(--serif);
  letter-spacing: -0.015em;
}

.plot-section h2 {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.plot-section .eyebrow { color: #6ee7ca; }

.plot-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.layer-button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(135, 201, 215, 0.22);
  border-radius: 999px;
  color: #b8d6db;
  background: rgba(13, 43, 53, 0.78);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 150ms ease, border-color 150ms ease,
    background 150ms ease, transform 150ms ease;
}

.layer-button:hover {
  color: #f5ffff;
  border-color: rgba(125, 222, 224, 0.48);
  background: rgba(25, 68, 78, 0.88);
  transform: translateY(-1px);
}

.layer-button.active {
  color: #03212a;
  border-color: #76e2cf;
  background: linear-gradient(135deg, #77e6c6, #75bfff);
}

.layer-button:focus-visible, select:focus-visible { outline: 2px solid var(--signal-soft); outline-offset: 3px; }

.plot-shell {
  min-height: clamp(560px, 48vw, 710px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 25px;
  overflow: hidden;
  border: 1px solid rgba(112, 202, 216, 0.22);
  border-radius: 28px;
  background: #071923;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.globe-view {
  position: relative;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 24%, rgba(91, 114, 255, 0.16), transparent 28%),
    radial-gradient(circle at 26% 72%, rgba(30, 208, 180, 0.11), transparent 27%),
    linear-gradient(145deg, #071c2b, #041119 70%);
}

.globe-view::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.62;
  background:
    radial-gradient(circle at 8% 14%, #b9edff 0 1px, transparent 1.5px),
    radial-gradient(circle at 23% 40%, #d9f6ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 9%, #fff3be 0 1px, transparent 1.5px),
    radial-gradient(circle at 58% 76%, #d9f6ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 79% 12%, #d9f6ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 92% 57%, #fff3be 0 1px, transparent 1.5px),
    radial-gradient(circle at 14% 82%, #d9f6ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 45%, #b9edff 0 1px, transparent 1.5px);
  pointer-events: none;
}

#world-plot {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#world-plot.dragging { cursor: grabbing; }
#world-plot:focus-visible { outline: 2px solid #75dfe0; outline-offset: -8px; }

.globe-help {
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 17px;
  padding: 9px 12px;
  border: 1px solid rgba(145, 224, 230, 0.2);
  border-radius: 999px;
  color: #b9dbe1;
  background: rgba(5, 27, 38, 0.78);
  backdrop-filter: blur(9px);
  font-size: 10px;
  letter-spacing: 0.025em;
  pointer-events: none;
}

.plot-empty {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.plot-empty[hidden] { display: none; }
.plot-empty strong { font: 400 21px/1.2 var(--serif); }
.plot-empty span { margin-top: 6px; color: var(--paper-dim); font-size: 12px; }

.plot-legend {
  position: absolute;
  z-index: 3;
  left: 17px;
  bottom: 15px;
  display: flex;
  gap: 20px;
  padding: 9px 12px;
  border: 1px solid rgba(145, 224, 230, 0.17);
  border-radius: 999px;
  color: #a8c9cf;
  background: rgba(5, 27, 38, 0.78);
  backdrop-filter: blur(9px);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.plot-legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff766c; box-shadow: 0 0 8px #ff766c; }
.legend-dot.fleet { width: 6px; height: 6px; border-radius: 2px; background: #ffd166; box-shadow: none; transform: rotate(45deg); }
.legend-ring { width: 11px; height: 11px; border: 1px solid #83dbff; border-radius: 50%; }

.coordinates {
  position: absolute;
  z-index: 3;
  right: 17px;
  bottom: 15px;
  padding: 9px 11px;
  border: 1px solid rgba(145, 224, 230, 0.17);
  border-radius: 999px;
  color: #b9dbe1;
  background: rgba(5, 27, 38, 0.78);
  backdrop-filter: blur(9px);
  font: 9px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.center-watch {
  min-width: 0;
  position: fixed;
  z-index: 20;
  right: 8px;
  bottom: 6px;
  width: 216px;
  height: 216px;
  pointer-events: none;
}

.center-watch-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.center-watch-heading span:first-child {
  display: block;
  margin-bottom: 4px;
  color: #85aab3;
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.center-watch h3 {
  margin: 0;
  color: #f3fbfc;
  font: 600 25px/1.1 var(--sans);
  letter-spacing: -0.02em;
}

.watch-sun-status {
  padding: 7px 9px;
  border-radius: 999px;
  color: #08212a;
  background: #ffd166;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.center-watch[data-light='night'] .watch-sun-status {
  color: #dce7ff;
  background: #475b91;
}

.watch-instrument {
  position: relative;
  width: 216px;
  height: 216px;
}

.watch-bow {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: 24px;
  height: 24px;
  border: 5px solid #8c7d63;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #24221d, 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

.watch-crown {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 50%;
  width: 18px;
  height: 13px;
  border: 2px solid #24221d;
  background: repeating-linear-gradient(90deg, #8d8169 0 2px, #413c32 2px 4px);
  transform: translateX(-50%);
}

.watch-face {
  position: relative;
  z-index: 2;
  top: 26px;
  width: 184px;
  height: 184px;
  margin: 0 auto;
  border: 4px solid #191914;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.65), transparent 27%),
    #e8e3d1;
  box-shadow:
    0 0 0 3px #8b7f67,
    0 0 0 7px #26231d,
    0 0 0 10px #5f5748,
    2px 8px 0 11px rgba(0, 0, 0, 0.25),
    0 17px 30px rgba(0, 0, 0, 0.42);
}

.watch-face::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(96, 88, 70, 0.55);
  pointer-events: none;
}

.watch-face::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 18px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -1deg,
    rgba(32, 30, 24, 0.88) 0 2deg,
    transparent 2deg 30deg
  );
  mask: radial-gradient(circle, transparent 0 61px, #000 62px);
  pointer-events: none;
}

.watch-dial {
  position: absolute;
  z-index: 1;
  inset: 18px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -0.5deg,
    rgba(32, 30, 24, 0.58) 0 1deg,
    transparent 1deg 6deg
  );
  mask: radial-gradient(circle, transparent 0 67px, #000 68px);
}

.watch-number {
  position: absolute;
  z-index: 2;
  color: #211f18;
  font: 500 12px/1 Georgia, serif;
}

.watch-12 { top: 30px; left: 50%; transform: translateX(-50%); }
.watch-1 { top: 36px; right: 58px; }
.watch-2 { top: 56px; right: 36px; }
.watch-3 { top: 50%; right: 27px; transform: translateY(-50%); }
.watch-4 { right: 36px; bottom: 54px; }
.watch-8 { left: 32px; bottom: 54px; }
.watch-9 { top: 50%; left: 27px; transform: translateY(-50%); }
.watch-10 { top: 56px; left: 36px; }
.watch-11 { top: 36px; left: 55px; }

.watch-maker {
  position: absolute;
  z-index: 2;
  top: 53px;
  left: 50%;
  color: rgba(33, 31, 24, 0.73);
  font: 700 7px/1 Georgia, serif;
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.watch-maker small {
  display: block;
  margin-top: 3px;
  font-size: 5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.watch-date-row {
  position: absolute;
  z-index: 3;
  top: 94px;
  left: 50%;
  display: flex;
  gap: 14px;
  transform: translateX(-50%);
}

.watch-date-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(33, 31, 24, 0.64);
}

.watch-date-group small {
  margin-top: 2px;
  font: 500 5px/1 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.watch-date-cells {
  height: 24px;
  display: block;
  overflow: hidden;
  color: #211f18;
  border-block: 1px solid rgba(106, 99, 82, 0.22);
  background-color: #f6f2e7;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 11px,
    rgba(116, 108, 89, 0.22) 11px 12px
  );
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.8),
    inset 0 -2px 1px rgba(91, 84, 67, 0.13);
  font: 500 12px/23px var(--mono);
  letter-spacing: 3px;
  text-align: center;
  text-indent: 2px;
}

.watch-date-two { width: 25px; }
.watch-date-four { width: 49px; }

.watch-year-group {
  position: absolute;
  z-index: 3;
  top: 137px;
  left: 50%;
  transform: translateX(-50%);
}

.watch-hand {
  position: absolute;
  z-index: 5;
  left: calc(50% - 1.5px);
  bottom: 50%;
  width: 3px;
  background: #1d211f;
  clip-path: polygon(50% 0, 100% 18%, 78% 100%, 22% 100%, 0 18%);
  transform: rotate(var(--angle, 0deg));
  transform-origin: 50% 100%;
}

.watch-hour-hand {
  height: 37px;
  width: 6px;
  left: calc(50% - 3px);
}

.watch-minute-hand {
  height: 51px;
}

.watch-pin {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid #28251e;
  border-radius: 50%;
  background: #766b57;
  transform: translate(-50%, -50%);
}

.watch-readout {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.watch-time {
  color: #f7ffff;
  font: 700 39px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.watch-period {
  margin-top: 7px;
  color: #e4c783;
  font-size: 11px;
  font-weight: 650;
}

.watch-location {
  margin-top: 6px;
  color: #8fb3bb;
  font: 9px/1.3 var(--mono);
  text-align: left;
  text-transform: uppercase;
}

.watch-facts {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 0;
}

.watch-facts div {
  padding: 12px;
  border: 1px solid rgba(136, 211, 219, 0.14);
  border-radius: 14px;
  background: rgba(4, 22, 31, 0.4);
}

.watch-facts dt {
  color: #789ba4;
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.watch-facts dd {
  margin: 4px 0 0;
  color: #eaf8f9;
  font-size: 11px;
  font-weight: 600;
}

.watch-note {
  max-width: 280px;
  margin: 17px 0 0;
  color: #6f929b;
  font-size: 9px;
  line-height: 1.5;
  text-align: left;
}

.log-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding-bottom: 70px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(10, 32, 34, 0.46);
}

.movements-panel { grid-column: 1; grid-row: 1; }
.captains-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 24px;
}
.standings-panel { grid-column: 1 / -1; }

.panel-heading {
  min-height: 106px;
  padding: 24px 26px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-count { color: var(--paper-dim); font: 10px/1 var(--mono); text-transform: uppercase; }
.panel-body { min-height: 210px; }

.list > * + * { border-top: 1px solid var(--line); }

.captain-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 13px 26px;
}

.captain-row:hover { background: rgba(255, 255, 255, 0.025); }

.ship-bearing {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.ship-bearing i {
  width: 4px;
  height: 14px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--signal) 0 45%, var(--paper-dim) 45% 100%);
  transform: rotate(var(--heading, 0deg));
}

.row-copy,
.row-reading { min-width: 0; }
.row-copy strong, .row-copy span, .row-reading strong, .row-reading span { display: block; }
.row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 16px/1.2 var(--serif); }
.row-copy span { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--paper-dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; }
.row-reading { text-align: right; font-variant-numeric: tabular-nums; }
.row-reading strong { color: var(--brass-bright); font: 12px/1.2 var(--mono); }
.row-reading span { margin-top: 5px; color: var(--paper-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }

.signal-book {
  min-height: 430px;
}

.signal-day {
  min-height: 250px;
  padding: 24px 26px 27px;
  border-top: 1px solid var(--line);
  opacity: 0.6;
  transition: opacity 180ms ease, background 180ms ease,
    box-shadow 180ms ease;
}

.signal-day:first-child { border-top: 0; }

.signal-day.active {
  opacity: 1;
  background: linear-gradient(90deg,
    rgba(228, 199, 131, 0.085), transparent 65%);
  box-shadow: inset 3px 0 0 var(--brass-bright);
}

.signal-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.signal-day-date {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.signal-day-date strong {
  color: var(--brass-bright);
  font: 400 32px/0.95 var(--serif);
}

.signal-day-date span {
  max-width: 95px;
  color: var(--paper-dim);
  font: 9px/1.35 var(--mono);
  letter-spacing: 0.08em;
}

.signal-day-age {
  margin-top: 4px;
  color: var(--paper-dim);
  font: 8px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.signal-events {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-event {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.signal-event-mark {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border: 1px solid var(--brass-bright);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(228, 199, 131, 0.2);
}

.signal-event[data-kind='weather'] .signal-event-mark {
  border-color: #75bfff;
  box-shadow: 0 0 10px rgba(117, 191, 255, 0.34);
}

.signal-event[data-kind='captain'] .signal-event-mark,
.signal-event[data-kind='passage'] .signal-event-mark {
  border-color: var(--signal-soft);
  background: rgba(242, 150, 115, 0.32);
}

.signal-event[data-kind='quiet'] .signal-event-mark {
  border-color: rgba(169, 165, 150, 0.5);
  box-shadow: none;
}

.signal-event-copy,
.signal-event-copy strong,
.signal-event-copy > span { display: block; }

.signal-event-copy strong {
  margin-bottom: 3px;
  color: var(--brass);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.signal-event-copy > span {
  color: #d8d5c7;
  font: 400 13px/1.45 var(--serif);
}

.signal-event[data-kind='quiet'] .signal-event-copy > span {
  color: var(--paper-dim);
  font-style: italic;
}

.metric-select-wrap { display: flex; align-items: center; gap: 9px; }
.metric-select-wrap label { color: var(--paper-dim); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; }

select {
  min-height: 36px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--paper);
  background: var(--deep);
  font-size: 11px;
}

.standing-row {
  min-height: 59px;
  display: grid;
  grid-template-columns: 44px minmax(150px, 1fr) repeat(4, minmax(90px, 0.45fr));
  align-items: center;
  column-gap: 14px;
  padding: 10px 26px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.standing-row:last-child { border-bottom: 0; }
.standing-row.active-metric { background: rgba(197, 167, 108, 0.04); }
.rank { color: var(--signal-soft); font: 400 18px/1 var(--serif); }
.standing-name strong { display: block; font: 400 14px/1.2 var(--serif); }
.standing-name span { display: block; margin-top: 3px; color: var(--paper-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.standing-stat { color: var(--paper); font: 10px/1.2 var(--mono); text-align: right; }
.standing-stat span { display: block; margin-top: 3px; color: var(--paper-dim); font: 8px/1 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; }
.standing-stat.primary { color: var(--brass-bright); }

.standings-current { border-bottom: 1px solid var(--line); }

.standings-archive-heading {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 26px;
  color: var(--paper-dim);
  background: rgba(3, 17, 18, 0.32);
}

.standings-archive-heading strong {
  color: var(--brass);
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.standings-archive-heading span {
  font: 9px/1.3 var(--mono);
  letter-spacing: 0.04em;
}

.standing-year {
  border-top: 1px solid var(--line);
  background: rgba(2, 14, 15, 0.18);
}

.standing-year:first-of-type { border-top: 0; }

.standing-year summary {
  min-height: 76px;
  display: grid;
  grid-template-columns: 80px minmax(150px, 0.65fr) minmax(180px, 1fr) 20px;
  align-items: center;
  gap: 16px;
  padding: 15px 26px;
  color: var(--paper-dim);
  cursor: pointer;
  list-style: none;
  font-size: 10px;
}

.standing-year summary::-webkit-details-marker { display: none; }

.standing-year summary::after {
  content: '+';
  color: var(--brass-bright);
  font: 400 20px/1 var(--serif);
  text-align: right;
}

.standing-year[open] summary::after { content: '−'; }
.standing-year summary:hover { background: rgba(255, 255, 255, 0.025); }
.standing-year summary:focus-visible { outline: 2px solid var(--signal-soft); outline-offset: -3px; }

.standing-year summary strong {
  color: var(--paper);
  font: 400 24px/1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.standing-year-leader {
  overflow: hidden;
  color: var(--brass);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-year[open] {
  background: linear-gradient(90deg,
    rgba(228, 199, 131, 0.065), rgba(2, 14, 15, 0.18) 55%);
  box-shadow: inset 3px 0 0 rgba(228, 199, 131, 0.7);
}

.standing-year-body {
  border-top: 1px solid var(--line);
  background: rgba(3, 16, 17, 0.28);
}

.standing-year-body .empty-state { min-height: 150px; }

.empty-state {
  min-height: 210px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px;
  text-align: center;
}

.empty-glyph { margin-bottom: 12px; color: var(--brass); font-size: 26px; }
.empty-state strong { font: 400 17px/1.2 var(--serif); }
.empty-state p { max-width: 330px; margin: 8px 0 0; color: var(--paper-dim); font-size: 11px; }

.loading-lines { display: grid; gap: 15px; padding: 28px 26px; }
.loading-lines i { display: block; height: 27px; background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.065), rgba(255,255,255,.025)); background-size: 200% 100%; animation: loading 1.6s linear infinite; }
.loading-lines i:nth-child(2) { width: 76%; }
.loading-lines i:nth-child(3) { width: 89%; }

footer {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@keyframes loading { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sea-window video, .loading-lines i { transition: none; animation: none; }
}

@media (max-width: 1100px) {
  .overview { grid-template-columns: 1fr; }
  .sea-window { grid-column: 1; grid-row: 1; }
  .quick-stats { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(4, 1fr); grid-template-rows: none; }
  .quick-stats div { min-height: 92px; }
}

@media (max-width: 800px) {
  .masthead, main, footer { width: min(100% - 32px, 1480px); }
  .masthead { min-height: 78px; }
  .server-state .state-separator, #last-contact { display: none; }
  .overview { grid-template-columns: 1fr; padding-top: 38px; }
  .sea-window, .quick-stats { grid-column: 1; grid-row: auto; }
  .sea-window { min-height: 540px; }
  .quick-stats { grid-template-columns: 1fr 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .plot-controls { width: 100%; justify-content: stretch; }
  .layer-button { flex: 1; padding-inline: 7px; }
  .plot-shell { min-height: 0; grid-template-columns: 1fr; }
  .globe-view { min-height: 520px; }
  .plot-legend { gap: 10px; }
  .log-grid { grid-template-columns: 1fr; }
  .movements-panel, .captains-panel { grid-column: auto; grid-row: auto; }
  .captains-panel { position: static; }
  .standings-panel { grid-column: auto; }
  .standing-row { grid-template-columns: 32px minmax(120px, 1fr) 85px; }
  .standing-stat { display: none; }
  .standing-stat.primary { display: block; }
  .standing-year summary { grid-template-columns: 70px minmax(130px, 1fr) 20px; }
  .standing-year-leader { display: none; }
}

@media (max-width: 520px) {
  .masthead, main, footer { width: min(100% - 24px, 1480px); }
  .wordmark strong { font-size: 20px; }
  .wordmark-mark { width: 34px; height: 34px; }
  .wordmark-mark::before { width: 44px; }
  .wordmark-mark::after { height: 44px; }
  .server-state { font-size: 9px; }
  h1 { font-size: 46px; }
  .overview { gap: 18px; }
  .overview-copy { top: 34px; left: 24px; right: 24px; }
  .date-card { left: 24px; bottom: 24px; width: calc(100% - 48px); }
  .sea-window { min-height: 520px; }
  .sea-window-caption { display: none; }
  .quick-stats dd { font-size: 25px; }
  .plot-section { padding-block: 45px; }
  .globe-view { min-height: 430px; }
  .globe-help { top: 12px; left: 12px; }
  .plot-legend { right: 12px; left: 12px; bottom: 12px; justify-content: space-around; }
  .coordinates { display: none; }
  .center-watch {
    right: max(8px, calc(env(safe-area-inset-right) + 6px));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    transform: scale(0.82);
    transform-origin: right bottom;
  }
  .panel-heading { padding-inline: 18px; }
  .captain-row { grid-template-columns: 34px minmax(0, 1fr); padding-inline: 18px; }
  .row-reading { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: center; margin-top: -8px; }
  .row-reading span { margin-top: 0; }
  .signal-book { min-height: 0; }
  .signal-day { min-height: 230px; padding-inline: 18px; }
  .signal-day-age { max-width: 88px; }
  .standing-row { padding-inline: 18px; }
  .standings-archive-heading, .standing-year summary { padding-inline: 18px; }
  .standings-archive-heading span { display: none; }
  .metric-select-wrap label { display: none; }
  footer { flex-direction: column; justify-content: center; align-items: flex-start; gap: 7px; }
}
