@font-face {
  font-family: Comfortaa;
  src: url("assets/comfortaa-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Comfortaa;
  src: url("assets/comfortaa-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Comfortaa, sans-serif;
  color: #fff;
  background: #000;
  font-synthesis: none;
  --muted: #929292;
  --line: #252525;
  --amber: #fa9f22;
  --green: #30d158;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 5px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:hover {
  color: var(--amber);
}
.masthead {
  height: 80px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.identity,
.date {
  display: flex;
  align-items: center;
  gap: 26px;
}
.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}
.wordmark > span {
  font-weight: 400;
  color: var(--muted);
}
.demo {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--amber);
  border-left: 1px solid #444;
  padding-left: 24px;
}
.date {
  font-size: 11px;
  color: var(--muted);
}
.date time {
  color: #ddd;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  height: calc(100dvh - 118px);
  min-height: 640px;
}
.map-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #111b20;
}
#map {
  height: 100%;
  width: 100%;
  background: #161d22;
  z-index: 0;
}
.leaflet-tile-pane {
  filter: grayscale(1) invert(1) brightness(1.5) contrast(0.85);
}
.leaflet-container {
  font-family: Comfortaa, sans-serif;
}
.map-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.8),
    transparent 28%,
    transparent 78%,
    rgba(0, 0, 0, 0.7)
  );
  z-index: 400;
}
.map-heading {
  position: absolute;
  z-index: 500;
  top: 30px;
  left: 32px;
  pointer-events: none;
}
.map-heading h1 {
  font-size: clamp(38px, 4.8vw, 74px);
  letter-spacing: -3px;
  line-height: 1.12;
  font-weight: 400;
  margin: 0;
  background: linear-gradient(#fff, #aaa);
  background-clip: text;
  color: transparent;
}
.map-heading p {
  font-size: 12px;
  color: #b4b8b8;
  margin: 16px 0 0;
}
.map-tools {
  position: absolute;
  top: 32px;
  right: 26px;
  z-index: 500;
  display: grid;
  gap: 18px;
  justify-items: end;
}
.map-tools button {
  background: #000b;
  padding: 12px 15px;
  border: 1px solid #ffffff38;
  border-radius: 4px;
  font-size: 11px;
}
.map-tools button span {
  font-size: 16px;
  margin-left: 12px;
}
.map-tools label {
  display: flex;
  gap: 8px;
  font-size: 10px;
  align-items: center;
  color: #bbb;
  cursor: pointer;
}
.map-tools input {
  accent-color: var(--amber);
  margin: 0;
  width: 13px;
  height: 13px;
}
.map-legend {
  position: absolute;
  z-index: 500;
  bottom: 46px;
  left: 32px;
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: #bbb;
  pointer-events: none;
}
.map-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.moving {
  background: var(--green);
}
.berthed {
  background: #8a8a8a;
}
.tile-error {
  position: absolute;
  z-index: 550;
  bottom: 90px;
  left: 24px;
  right: 24px;
  background: #201b11;
  padding: 16px;
  font-size: 12px;
  color: var(--amber);
}
.sidebar {
  border-left: 1px solid var(--line);
  padding: 27px 26px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 #000;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.section-heading h2 {
  font-size: 17px;
  letter-spacing: -0.5px;
  font-weight: 400;
  margin: 0;
}
.section-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.filter {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
.filter button {
  font-size: 11px;
  padding: 0 0 12px;
  color: var(--muted);
  position: relative;
}
.filter button.active {
  color: #fff;
}
.filter button.active::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--amber);
  bottom: -1px;
  left: 0;
  right: 0;
}
.vessel-row {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 12px;
  min-height: 65px;
  border-bottom: 1px solid #171717;
  padding: 10px 0;
  transition: background 0.15s;
}
.vessel-row.active {
  background: linear-gradient(90deg, #fa9f220c, transparent);
}
.vessel-row.active .row-name strong {
  color: var(--amber);
}
.row-icon {
  font-family: sans-serif;
  font-size: 28px;
  display: block;
  transform: rotate(var(--course));
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.green {
  --ship-color: #30d158;
}
.orange {
  --ship-color: #fa9f22;
}
.grey {
  --ship-color: #aaa;
}
.row-icon {
  color: var(--ship-color);
}
.row-name {
  display: grid;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.row-name strong {
  font-size: 11px;
  letter-spacing: 0.25px;
  white-space: nowrap;
}
.row-name > span {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.row-data {
  display: grid;
  text-align: right;
  gap: 6px;
}
.row-data strong {
  font-size: 16px;
  font-weight: 400;
}
.row-data > span {
  font-size: 10px;
  color: var(--muted);
}
.selected-section {
  padding: 25px 0 22px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.25px;
  color: var(--muted);
}
.selected-section h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -1px;
  margin: 13px 0;
}
.voyage {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #bbb;
}
.voyage > span:nth-child(2) {
  color: var(--amber);
}
.measurements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 0;
}
.measurements > div {
  display: grid;
  gap: 9px;
}
.measurements span {
  font-size: 9px;
  color: var(--muted);
}
.measurements strong {
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -1px;
}
.direction {
  font-size: 10px;
  color: var(--amber);
  margin: 14px 0 0;
}
.schedule-section {
  padding: 25px 0 18px;
  border-bottom: 1px solid var(--line);
}
.schedule-section .section-heading {
  margin-bottom: 12px;
}
.schedule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.schedule-row time {
  font-size: 17px;
  letter-spacing: -1px;
  color: #ccc;
}
.schedule-row > div {
  display: grid;
  gap: 7px;
  flex: 1;
}
.schedule-row strong {
  font-size: 10px;
  letter-spacing: 0.25px;
}
.schedule-row div > span {
  font-size: 9px;
  color: var(--muted);
}
.event-arrow {
  color: var(--amber);
  font-family: sans-serif;
  font-size: 22px;
}
.refresh-section {
  padding: 24px 0;
}
.refresh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.refresh-value {
  font-size: 21px;
  color: var(--amber);
}
.refresh-section p {
  font-size: 11px;
  color: #ccc;
  margin: 10px 0 14px;
}
.refresh-track {
  height: 2px;
  background: #282828;
  margin-bottom: 13px;
}
.refresh-track > span {
  display: block;
  height: 2px;
  width: 62%;
  background: var(--amber);
}
.muted {
  font-size: 9px;
  color: var(--muted);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 38px;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #777;
}
.ship-point {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: var(--ship-color);
}
.ship-shape {
  display: block;
  width: 15px;
  height: 25px;
  background: var(--ship-color);
  clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
  filter: drop-shadow(0 0 2px #000);
}
.moored-shape {
  width: 8px;
  height: 8px;
  display: block;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: #222;
}
.selected .ship-point {
  outline: 1px solid #fa9f2270;
  outline-offset: 7px;
  background: #fa9f220c;
}
.ship-label {
  position: absolute;
  left: 29px;
  top: -6px;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  background: #000b;
  border: 1px solid #ffffff16;
  border-radius: 3px;
  box-shadow: 0 2px 12px #0004;
  line-height: 1.4;
  color: #eee;
  min-width: 140px;
}
.ship-label strong {
  font-size: 12px;
  letter-spacing: 0.25px;
  font-weight: 700;
  display: block;
}
.ship-label > span {
  font-size: 11px;
  display: block;
  margin-top: 3px;
  color: #ddd;
}
.ship-label i {
  font-style: normal;
  color: #888;
  margin: 0 5px;
}
.ship-label b {
  font-size: 9px;
  color: #aaa;
  font-weight: 400;
  display: block;
  margin-top: 5px;
}
.selected .ship-label {
  border-color: #fa9f2266;
}
.selected .ship-label strong {
  color: var(--amber);
}
.grey .ship-label {
  top: 20px;
  left: 14px;
}
.grey .ship-label strong {
  font-size: 10px;
}
.grey .ship-label > span {
  font-size: 10px;
}
.leaflet-control-attribution {
  background: #0009 !important;
  color: #777 !important;
  font-size: 8px !important;
}
.leaflet-control-attribution a {
  color: #aaa !important;
}
.leaflet-control-zoom {
  border: 1px solid #ffffff30 !important;
  margin-bottom: 35px !important;
  margin-right: 22px !important;
}
.leaflet-control-zoom a {
  background: #0b0b0b !important;
  color: #ddd !important;
  border-color: #333 !important;
  font-weight: 400 !important;
}
.leaflet-control-scale {
  margin-bottom: 12px !important;
  margin-left: 32px !important;
}
.leaflet-control-scale-line {
  background: transparent !important;
  color: #aaa !important;
  text-shadow: none !important;
  border-color: #888 !important;
  font-family: Comfortaa, sans-serif !important;
  font-size: 9px !important;
}
.leaflet-top,
.leaflet-bottom {
  z-index: 500;
}
@media (min-height: 1000px) {
  .sidebar {
    padding-top: 32px;
  }
  .vessel-row {
    min-height: 76px;
  }
  .selected-section {
    padding: 32px 0;
  }
  .schedule-section {
    padding: 32px 0;
  }
  .refresh-section {
    padding: 32px 0;
  }
}
@media (max-width: 1100px) {
  main {
    grid-template-columns: minmax(0, 1fr) 318px;
  }
  .sidebar {
    padding-left: 20px;
    padding-right: 20px;
  }
  .masthead {
    padding: 0 24px;
  }
  .date > span {
    display: none;
  }
  .map-heading {
    left: 24px;
  }
  .map-heading h1 {
    font-size: 46px;
  }
  .map-tools {
    top: auto;
    bottom: 92px;
    right: 22px;
  }
  .map-legend {
    left: 24px;
    gap: 12px;
  }
  .map-legend > span:last-child {
    display: none;
  }
}
@media (max-width: 700px) {
  .masthead {
    height: 72px;
    padding: 14px 18px;
    align-items: flex-start;
  }
  .identity {
    display: grid;
    gap: 10px;
  }
  .wordmark {
    font-size: 17px;
  }
  .demo {
    border: 0;
    padding: 0;
    font-size: 8px;
  }
  .date {
    font-size: 9px;
    padding-top: 4px;
  }
  main {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .map-section {
    height: 66dvh;
    min-height: 430px;
  }
  .map-heading {
    top: 24px;
    left: 20px;
  }
  .map-heading h1 {
    font-size: 42px;
  }
  .map-heading p {
    font-size: 10px;
  }
  .map-tools {
    bottom: 85px;
    right: 16px;
  }
  .map-legend {
    bottom: 43px;
    left: 20px;
    font-size: 9px;
  }
  .sidebar {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 28px 22px 0;
  }
  .vessel-row {
    min-height: 71px;
  }
  .row-name strong {
    font-size: 12px;
  }
  .row-name > span {
    font-size: 10px;
  }
  .selected-section h2 {
    font-size: 30px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .selected-section,
  .schedule-section {
    padding: 28px 0;
  }
  .measurements strong {
    font-size: 36px;
  }
  .refresh-section {
    padding-bottom: 30px;
  }
  footer {
    height: auto;
    min-height: 50px;
    padding: 15px 20px;
    font-size: 8px;
    align-items: flex-start;
  }
  footer > span:first-child {
    max-width: 210px;
    line-height: 1.7;
  }
  .ship-label {
    min-width: 114px;
    padding: 6px 8px;
  }
  .ship-label strong {
    font-size: 10px;
  }
  .ship-label > span {
    font-size: 10px;
  }
  .ship-label b {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.vessel-botnica .ship-label {
  left: -155px;
  top: -12px;
}
.vessel-victoria .ship-label {
  left: 28px;
  top: 8px;
}

[hidden] {
  display: none !important;
}
.empty-state {
  font-size: 12px;
  line-height: 1.8;
  color: #ccc;
  padding: 25px 0;
}
.empty-state p,
.empty-events {
  font-size: 10px;
  line-height: 1.8;
  color: #999;
}
.ship-label > b {
  display: block;
  font-size: 9px;
  color: #aaa;
  font-weight: 400;
  margin-top: 5px;
}
.source-error {
  color: #ff776f;
}
.gate-label {
  background: #000b;
  color: #fa9f22;
  border: 0;
  box-shadow: none;
  font:
    10px Comfortaa,
    sans-serif;
  padding: 5px 8px;
}
.leaflet-tooltip-left.gate-label:before,
.leaflet-tooltip-right.gate-label:before {
  display: none;
}
.row-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}
.refresh-section {
  border-top: 0;
}
.sidebar .selected-section h2 {
  overflow-wrap: anywhere;
}
.masthead .demo {
  white-space: nowrap;
}
.map-heading h1 {
  font-size: clamp(34px, 4vw, 60px);
}
.map-heading {
  pointer-events: none;
}
.ship-label {
  max-width: 210px;
}
.ship-label strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-source {
  font-size: 9px;
  color: #aaa;
  text-decoration: none;
  white-space: nowrap;
}
.schedule-section .section-heading h2 {
  font-size: 15px;
}
.gate-label {
  white-space: nowrap;
}
