/* Fonts supplied by the Webflow export. */
@font-face {
  font-family: "Inter";
  src: url("./59-north.webflow/fonts/Inter-VariableFont_opszwght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Futura PT Heading";
  src: url("./59-north.webflow/fonts/FuturaStd-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
:root { font-family: "Inter", sans-serif; font-weight: 200; color: #172f40; background: #e3edf2; }
* { box-sizing: border-box; }
/* Typography reference: 59-north.webflow.css. Keep map-specific sizing. */
html, body { width: 100%; height: 100%; }
body { margin: 0; line-height: 1.5; }
/* Absolute positioning keeps map popups in the page stacking context, so
   they can sit above the body-level weather/sidebar panels. */
#map { position:absolute;inset:0; }
.mapboxgl-canvas-container { isolation:isolate; }
#map .mapboxgl-popup { z-index:30; }
#map .mapboxgl-marker { z-index:2; }
.masthead { position: absolute; top: 24px; left: 24px; display: flex; gap: 24px; align-items: center; padding: 18px 24px; background: #fff; border: 1px solid #dbe3e7; box-shadow: 0 4px 24px #12304312; border-radius: 4px; pointer-events: none; }
.brand { font-size: 21px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.brand span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .3em; margin-top: 3px; }
.heading { border-left: 1px solid #dbe3e7; padding-left: 24px; }
h1 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.heading > span { font-size: 12px; color: #586e7c; }
.passage-controls { position: absolute; top: 124px; left: 24px; display: flex; gap: 8px; max-width: calc(100% - 48px); }
button { font: inherit; cursor: pointer; }
.passage-controls button { min-height: 42px; padding: 10px 14px; background: white; border: 1px solid #c6d4dc; border-radius: 4px; font-size: 14px; color: #172f40; white-space: nowrap; }
button:hover { background: #eff5f8; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #e8a22a; outline-offset: 3px; }
.map-note { position: absolute; left: 24px; bottom: 40px; padding: 10px 13px; background: #ffffffed; border-radius: 3px; font-size: 12px; letter-spacing: .06em; }
.map-note span { display: block; margin-top: 5px; letter-spacing: 0; color: #586e7c; }
#status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 40px)); padding: 24px; border-radius: 6px; background: white; box-shadow: 0 8px 40px #172f4020; font-size: 16px; line-height: 1.6; }
[hidden] { display: none !important; }
.mapboxgl-popup-content { padding: 24px; border-radius: 6px; font-family: "Inter", sans-serif; font-weight: 200; color: #172f40; box-shadow: 0 8px 32px #172f4026; max-height: 70dvh; overflow-y: auto; }
.mapboxgl-popup-close-button { width: 32px; height: 32px; font-size: 22px; }
.popup-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; color: #586e7c; }
h2 { margin: 0 0 20px; font-size: 21px; line-height: 1.25; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; line-height: 1.5; }
dt { color: #586e7c; } dd { margin: 0; font-weight: 200; }
.passage-link { display: block; margin-top: 20px; padding: 12px 16px; border-radius: 3px; background: #173e55; color: white; text-align: center; text-decoration: none; font-size: 14px; font-weight: 600; }
.passage-link:hover { background: #1769a0; }
.mapboxgl-ctrl-bottom-right { position:fixed; bottom:28px; right:12px; z-index:5; }
noscript { position: absolute; top: 45%; left: 10%; background: white; padding: 24px; }
@media (max-width: 639px) {
  .masthead { top: 12px; left: 12px; right: 12px; padding: 14px; gap: 14px; }
  .brand { font-size: 18px; } .heading { padding-left: 14px; }
  .heading > span { font-size: 12px; } h1 { font-size: 16px; }
  .passage-controls { top: 109px; left: 12px; max-width: calc(100% - 24px); }
  .map-note { left: 12px; bottom: 38px; max-width: calc(100% - 75px); }
}

/* Match the supplied Webflow heading face: Futura ExtraBold. */
.mapboxgl-popup-content h2 { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; }
.mapboxgl-popup-content .passage-link { font-weight: 200; }

/* Webflow heading/utility hierarchy across all HTML overlays. */
.brand, .brand span, h1,
.passage-controls button, .popup-kicker, .map-note,
.mapboxgl-popup-content .passage-link {
  font-family: "Futura PT Heading", sans-serif;
  font-weight: 800;
  font-synthesis: none;
}
.heading > span, .map-note span, #status, dl {
  font-family: "Inter", sans-serif;
  font-weight: 200;
  line-height: 1.5;
}

/* Compact Webflow-inspired map controls; no passage list. */
/* Futura is always uppercase; retain normal casing for Inter body copy. */
.brand, .brand span, h1, .mapboxgl-popup-content h2,
.passage-controls button, :is(.map-controls, .chart-panel) button, .popup-kicker, .map-note,
.mapboxgl-popup-content .passage-link { text-transform: uppercase; }
.heading > span, .map-note span, #status, dl { text-transform: none; }
.map-controls { position: absolute; top: 16px; left: 16px; width: min(390px, calc(100% - 32px)); padding: 12px 16px; background: #fffffff2; border: 1px solid #0c0a091a; border-radius: 12px; color: #0c0a09; max-height: 40dvh; overflow-y: auto; }
.control-heading { display: flex; align-items: center; gap: 12px; }
.control-heading img { flex: none; }
.control-heading h1 { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-size: 24px; margin: 0; }
:is(.map-controls, .chart-panel) button { min-height: 36px; border: 1px solid transparent; border-radius: 999px; padding: 6px 10px; font-family: "Futura PT Heading", sans-serif; font-size: 13px; font-weight: 800; background: transparent; color: inherit; }
#fit-route { margin-left: auto; white-space: nowrap; }
:is(#filters, .chart-filters) fieldset { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
:is(#filters, .chart-filters) legend { font-family: "Inter", sans-serif; font-weight: 200; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 3px; }
.filter-options button { flex: 0 1 auto; max-width: 100%; overflow-wrap: anywhere; }
:is(.map-controls, .chart-panel) button:hover { background: #dae3e8; }
:is(.map-controls, .chart-panel) button[aria-pressed="true"] { background: #0c0a09; color: #fff; }
#filter-empty { font-size: 14px; font-weight: 200; margin: 10px 0 0; }
@media (max-width: 639px) { .map-controls { top: 12px; left: 12px; width: calc(100% - 24px); } .control-heading img { width: 40px; height: 40px; } }

/* Passage cards: Webflow neutral palette and uppercase Futura. */
.passage-popup { width: min(360px, calc(100vw - 32px)); }
.passage-popup .mapboxgl-popup-content { padding: 0; border-radius: 12px; color: #0c0a09; background: #fff; box-shadow: 0 8px 32px #0c0a0926; max-height: 72dvh; overflow-y: auto; overscroll-behavior: contain; }
.passage-popup .mapboxgl-popup-close-button { z-index: 2; top: 6px; right: 5px; width: 44px; height: 44px; border-radius: 50%; color: #0c0a09; font: 800 24px/1 "Futura PT Heading", sans-serif; }
.passage-card { border-top: 4px solid var(--passage-color); padding: 22px 22px 20px; overflow-wrap: anywhere; }
.passage-card h2 { padding-right: 27px; margin: 0 0 12px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.passage-card-route { margin: 0 0 18px; font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; text-transform: uppercase; font-size: 14px; line-height: 1.5; }
.passage-card dl { margin: 0; font-size: 13px; gap: 0; }
/* Keep field names available to screen readers, without visual labels. */
.passage-card dt { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.passage-card dd { color: #0c0a09; margin: 0; }
.passage-card-details { display: block; }
.passage-card-details .passage-card-field { margin: 6px 0; }
.passage-card, .passage-card dl, .passage-card dd { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; text-transform: uppercase; }
.passage-card-summary { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #dae3e8; font-size: 13px; line-height: 1.6; }
.passage-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 20px; }
.passage-card-bunks { display: flex; align-items: center; justify-content: center; margin: 0 0 0 auto; max-width: 50%; padding: 6px 10px; min-height: 36px; border: 1px solid transparent; border-radius: 999px; background: var(--passage-color); color: #fff; text-align: center; font-size: 13px; line-height: 1.5; }
.passage-card-patches { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; padding-left: 16px; min-width: 64px; margin: 0; }
.passage-card-patch-link { display: block; flex: none; width: 64px; height: 64px; margin-left: -16px; border-radius: 4px; }
.passage-card-patch-link:focus-visible { outline: 2px solid #006891; outline-offset: 3px; }
.passage-card-patch { display: block; width: 64px; height: 64px; object-fit: contain; }
.passage-card .passage-link { margin-top: 18px; padding: 14px 12px; min-height: 48px; border-radius: 6px; background: #0c0a09; color: #fff; font-size: 13px; line-height: 20px; transition: opacity .2s; }
.passage-card .passage-link:hover { background: #0c0a09; opacity: .7; }
@media (max-width: 639px) {
  /* Reuse the anchored popup component, pin its presentation to the map bottom. */
  body:has(.passage-popup) .map-note { visibility: hidden; }
  .passage-popup { transform: none !important; top: auto !important; bottom: 0; left: 0 !important; right: 0; width: 100%; max-width: none !important; z-index: 3; }
  .passage-popup .mapboxgl-popup-tip { display: none; }
  .passage-popup .mapboxgl-popup-content { width: 100%; max-height: 62dvh; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 30px #0c0a0926; }
  .passage-card { padding: 20px 24px max(20px, env(safe-area-inset-bottom)); }
  .passage-card h2 { font-size: 21px; }
  .passage-card dl, .passage-card-route { font-size: 14px; }
  .passage-card dt { font-size: 12px; }
}


@font-face {
  font-family: "Futura PT Heading";
  src: url("./59-north.webflow/fonts/FuturaStd-ExtraBoldOblique.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caligraf Port";
  src: url("./59-north.webflow/fonts/Caligraf-1435.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.port-popup .mapboxgl-popup-content .port-popup-title {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  text-transform: none;
  margin: 0 20px 14px 0;
}
.port-popup-about { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Shared light parchment for port stories and the map notice. */
.port-popup .mapboxgl-popup-content, .map-note, #status.is-loading, .map-controls, .chart-panel {
  padding: 28px;
  color: #493622;
  border: 1px solid #b99b66;
  border-radius: 5px 12px 6px 10px;
  background-color: #f8edd5;
  background-image:
    radial-gradient(ellipse at 5% 0%, #9b6b3018, transparent 55%),
    radial-gradient(ellipse at 100% 100%, #90622920, transparent 55%),
    repeating-linear-gradient(15deg, #ffffff08 0 1px, #86622b06 1px 3px);
  box-shadow: inset 0 0 28px #94652b18, 0 8px 28px #30201340;
}
.port-popup .mapboxgl-popup-content .port-popup-title {
  font-size: 42px;
  color: #493622;
  padding-bottom: 16px;
  border-bottom: 1px solid #96723d70;
}
.port-popup-about { font-weight: 400; line-height: 1.75; }
.port-popup .mapboxgl-popup-close-button { color: #493622; }
.port-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip { border-top-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip { border-bottom-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: #f1e3c6; }

/* Keep filter group names available to screen readers without visible headings. */
:is(#filters, .chart-filters) legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:is(.map-controls, .chart-panel) button.boat-filter:hover {
  background: color-mix(in srgb, var(--boat-color) 25%, transparent);
  color: #0c0a09;
}

.map-patch-logo {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 104px;
  object-fit: contain;
  pointer-events: none;
}
.map-controls #fit-route { background: rgba(130, 140, 148, .16); color: #647079; }
.map-controls #fit-route:hover { background: rgba(130, 140, 148, .28); }
@media (max-width: 940px) {
  .map-controls { top: 132px; }
}

.map-note {
  padding: 14px 18px;
  font-family: "Caligraf Port", cursive;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.map-note span {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #493622;
  margin-top: 8px;
}

#status.is-loading {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  font-size: 32px;
  line-height: 1.3;
  text-transform: none;
  color: #000000;
  text-align: center;
}

.map-controls { padding: 12px 16px; }
.control-heading { flex-wrap: wrap; }
.control-heading h1 {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-size: 54px;
  line-height: 1.2;
  text-transform: none;
}

/* Layered singed edges and an irregular paper silhouette, without clipping controls. */
.port-popup .mapboxgl-popup-content, .map-note, #status.is-loading, .map-controls, .chart-panel {
  border: 1px solid #987345;
  border-radius: 3px 9px 4px 7px;
  background-color: #f8edd5;
  background-image: var(--chart-paper-paint);
  box-shadow: var(--chart-paper-shadow);
  /* Small notches stay inside the padding, away from text and click targets. */
  clip-path: polygon(0% 2%, 5% 1%, 7% 4%, 8% 1%, 11% 2%, 17% 0%, 25% 1%, 34% 0%,
    43% 1%, 45% 4%, 46% 1%, 52% 0%, 61% 1%, 70% 0%, 81% 1%, 90% 0%, 99% 1%,
    100% 13%, 99% 25%, 100% 37%, 97% 40%, 100% 42%, 99% 49%, 100% 62%, 99% 75%,
    100% 88%, 99% 99%, 90% 100%, 80% 99%, 70% 100%, 68% 96%, 67% 100%, 61% 99%,
    51% 100%, 41% 99%, 31% 100%, 21% 99%, 11% 100%, 1% 99%,
    0% 88%, 1% 76%, 0% 64%, 1% 52%, 3% 49%, 0% 47%, 0% 40%, 1% 28%, 0% 16%);
}
@media (min-width: 941px) {
  .map-controls { width: min(510px, calc(50vw - 76px)); }
  .map-controls .filter-options { gap: 2px; }
  .map-controls .filter-options button { padding-inline: 8px; }
}

@media (max-width: 639px) {
  body:has(.port-popup) .map-note { visibility: hidden; }
  .port-popup {
    transform: none !important;
    top: auto !important;
    bottom: 0;
    left: 0 !important;
    right: 0;
    width: 100%;
    max-width: none !important;
    z-index: 3;
  }
  .port-popup .mapboxgl-popup-tip { display: none; }
  .port-popup .mapboxgl-popup-content {
    width: 100%;
    max-height: 62dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 24px max(24px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    /* Keep the sheet's close button and scrollable text clear of paper notches. */
    clip-path: none;
  }
  .port-popup .mapboxgl-popup-close-button {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    font-size: 26px;
    z-index: 2;
  }
  .port-popup .mapboxgl-popup-content .port-popup-title {
    margin-right: 28px;
    overflow-wrap: anywhere;
  }
}

/* Mobile keeps a compact parchment title; filters remain desktop-only. */
@media (max-width: 639px) {
  .map-note, .map-patch-logo, .map-controls #filters,
  .map-controls #fit-route, .map-controls #filter-empty { display: none; }
  .map-controls {
    display: block; top: 12px; left: 50%; transform: translateX(-50%);
    width: min(330px, calc(100% - 32px)); padding: 14px 22px;
    max-height: none; overflow: visible;
  }
  .control-heading { justify-content: center; }
  .control-heading h1 { width: 100%; margin: 0; text-align: center; font-size: 46px; }
}

/* Embeds keep only geographic context and Mapbox navigation. */
body.focus-mode .map-controls,
body.focus-mode .map-note,
body.focus-mode .map-patch-logo { display: none; }

/* An embedded chart never carries the standalone crew patch. */
body.is-embedded .map-patch-logo { display: none; }
@media (min-width: 640px) and (max-width: 940px) {
  body.is-embedded .map-controls { top: 16px; }
}

/* Desktop passage cards occupy a reserved column beside the selected route. */
@media (min-width: 640px) {
  .passage-popup {
    transform: none !important;
    top: 16px !important; bottom: auto !important;
    left: auto !important; right: 16px;
    width: min(360px, 40%); max-width: none !important;
    z-index: 3;
  }
  .passage-popup .mapboxgl-popup-tip { display: none; }
  .passage-popup .mapboxgl-popup-content { max-height: calc(100dvh - 100px); }
}

/* Selected boats use their solid Airtable color, including during hover. */
:is(.map-controls, .chart-panel) button.boat-filter[aria-pressed="true"],
:is(.map-controls, .chart-panel) button.boat-filter[aria-pressed="true"]:hover {
  background: var(--boat-color);
  color: var(--boat-text-color, #fff);
}

.mapboxgl-ctrl button.recenter-control { display: grid; place-items: center; color: #333; }

/* Shared chart controls: each mode uses the upcoming map's actual parchment and pills. */
.chart-panel { color: #493622; font: 400 13px/1.5 "Inter", sans-serif; }
.chart-panel :is(select,input,textarea) { font: inherit; color: inherit; }
.chart-panel select, .chart-panel input:not([type=range]), .chart-panel textarea { border: 1px solid #96723d70; border-radius: 4px; background: #fffaf0b3; padding: 8px 10px; min-height: 40px; }
.chart-panel :is(input,select,textarea):focus-visible { outline: 3px solid #e8a22a; outline-offset: 2px; }
.chart-panel h1, .chart-panel h2 { font-family: "Futura PT Heading", sans-serif; font-weight: 800; text-transform: uppercase; }
.chart-panel button.boat-filter[aria-pressed=true] { background: var(--boat-color); color: var(--boat-text-color, #fff); }
.map-modes { position: absolute; top: 16px; right: 20px; z-index: 6; display: flex; gap: 3px; padding: 6px 10px; }
.map-modes button { white-space: nowrap; }
.map-modes a { padding: 8px; color: inherit; font-size: 12px; }
@media(max-width:639px) { .map-modes { top: 12px; right: 12px; left: 12px; justify-content: center; } .chart-panel :is(select,input:not([type=range])) { font-size: 16px; } }

/* Shared paper shell: the fixed-depth tears belong only to decoration. */
:root { --chart-paper-paint: radial-gradient(ellipse at 0% 12%, #70451c48, transparent 22%),
    radial-gradient(ellipse at 100% 82%, #70451c40, transparent 24%),
    radial-gradient(ellipse at 22% 100%, #84532730, transparent 25%),
    radial-gradient(ellipse at 76% 0%, #84532730, transparent 23%),
    radial-gradient(ellipse at 40% 45%, #fffaf080, transparent 70%),
    repeating-linear-gradient(23deg, #ffffff1c 0 1px, #86622b0c 1px 2px, transparent 2px 5px),
    repeating-linear-gradient(113deg, #86622b08 0 1px, transparent 1px 4px); --chart-paper-shadow: inset 0 0 4px 2px #70451c70, inset 0 0 15px 5px #94652b30,
    inset 0 0 40px #94652b18, 0 8px 24px #30201340; }
.parchment-shell { isolation:isolate;filter:drop-shadow(0 5px 9px #30201330); }
.parchment-shell::before { content:"";position:absolute;inset:-3px;z-index:-1;pointer-events:none;background-color:#f8edd5;background-image:var(--chart-paper-paint);border:1px solid #987345;border-radius:3px 9px 4px 7px;box-shadow:var(--chart-paper-shadow);
 clip-path:polygon(0 4px,5% 2px,7% 8px,8% 2px,17% 0,25% 3px,34% 0,43% 2px,45% 8px,46% 2px,61% 0,70% 3px,81% 0,90% 3px,calc(100% - 2px) 2px,100% 13%,calc(100% - 3px) 25%,100% 37%,calc(100% - 7px) 40%,100% 42%,calc(100% - 2px) 62%,100% 88%,calc(100% - 3px) calc(100% - 2px),90% 100%,80% calc(100% - 3px),70% 100%,68% calc(100% - 8px),67% 100%,51% calc(100% - 2px),31% 100%,11% calc(100% - 3px),2px calc(100% - 2px),0 88%,3px 76%,0 64%,2px 52%,7px 49%,0 47%,0 28%,3px 16%);
}
.parchment-shell > .chart-panel { background:transparent!important;box-shadow:none!important;border-color:transparent!important;clip-path:none!important; }
.parchment-shell:has(> [hidden]) { display:none; }
.message-parchment { position:relative; }
.archive-frame { position:absolute;right:20px;top:76px;width:390px;max-height:calc(100dvh - 108px);z-index:4; }
.archive-frame > .archive-panel { position:relative;top:auto;right:auto;left:auto;bottom:auto;width:100%;max-height:inherit; }
.planning-route-frame { position:absolute;right:20px;top:76px;width:350px;max-height:calc(100dvh - 112px);z-index:4; }
.planning-route-frame > .planning-route-editor { position:relative;top:auto;right:auto;left:auto;bottom:auto;width:100%;max-height:inherit;clip-path:none;scrollbar-gutter:stable;overscroll-behavior:contain; }
@media(max-width:940px) { .archive-frame,.planning-route-frame { right:16px;width:310px; } }
@media(max-width:639px) {
 .archive-frame,.planning-route-frame { top:70px;right:12px;left:12px;width:auto;max-height:42dvh; }
 .archive-frame:has(.has-voyage) { top:auto;bottom:0;left:0;right:0;max-height:46dvh; }
}
@media(max-height:500px) and (min-width:640px) { .archive-frame,.planning-route-frame { top:70px;width:290px;max-height:calc(100dvh - 90px); } }
.archive-frame:has(.has-voyage)::after { content:"";position:absolute;top:0;left:10px;right:10px;height:3px;background:var(--passage-color);pointer-events:none; }

/* Reserve a clear map gutter for the shared Live controls and attribution. */
.archive-frame,.planning-route-frame { right:64px;max-height:calc(100dvh - 140px); }
@media(max-width:639px) {
 .archive-frame,.planning-route-frame { max-height:42dvh; }
 .archive-frame:has(.has-voyage) { right:64px;bottom:64px;max-height:46dvh; }
}

/* Direct crew signup, with Fillout hosted inside an accessible native modal. */
.passage-card .passage-signup { background: #006891; }
.passage-card .passage-signup:hover { background: #006891; }
.passage-card .passage-signup + .passage-link { margin-top: 8px; background: transparent; color: #0c0a09; border: 1px solid currentColor; }
.signup-dialog { width: min(960px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 12px; background: #fff; color: #0c0a09; }
.signup-dialog[open] { display: flex; flex-direction: column; }
.signup-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.signup-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; font: 600 14px/1.4 sans-serif; border-bottom: 1px solid #ddd; }
.signup-dialog-header button { flex: none; min-height: 44px; padding: 8px 16px; cursor: pointer; }
.signup-dialog iframe { width: 100%; flex: 1; min-height: 0; border: 0; }
.signup-dialog-fallback { padding: 10px; text-align: center; font: 12px/1.4 sans-serif; color: #006891; }
@media (max-width: 639px) { .signup-dialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; } }

.signup-dialog-header { border-top: 6px solid var(--passage-color, #344b5e); flex-shrink: 0; }
.signup-dialog-title { margin: 0; min-width: 0; font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-style: italic; font-synthesis: none; font-size: 24px; line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
@media (max-width: 639px) { .signup-dialog-title { font-size: 21px; } }
