:root {
  color-scheme: light;
  --ink: #101010;
  --light: #f2f2f2;
  --white: #fcfcfc;
  --signal: #43ff71;
  --signal-line: #43ff7175;
  --line: #dadada;
  --muted: #5b5b5b;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--ink); color: var(--white); font: 16px/1.5 Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #148036; outline-offset: 4px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 12; top: 1rem; left: 1rem; background: var(--white); color: var(--ink); padding: .7rem 1rem; }

/* Phone feel: no grey tap flash, controls answer on press, taps fire at once, and control labels can't be selected by a
   long press. Hover styles are gated to mouse-capable screens throughout, so a tap never leaves one stuck on. */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, select, label, [role="button"] { touch-action: manipulation; }
button, .button, .box-rail a, summary { -webkit-user-select: none; user-select: none; }
button, .box-rail a, .freight-chat-launcher { transition: scale 140ms cubic-bezier(.23, 1, .32, 1); }
:is(button, .button, .box-rail a):not(:disabled):active { scale: .97; }
.freight-chat-launcher:active { scale: .94; }

.header {
  position: absolute; z-index: 5; top: 0; left: 0; width: 100%; min-height: 75px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 0 4.1vw; border-bottom: 1px solid #eaeaea2b;
  background: linear-gradient(#161616ba, #16161624);
}
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font-weight: 900; font-size: 20px; line-height: .88; letter-spacing: -.035em; width: fit-content; }
.brand-sub { display: block; font: 700 9px/1 var(--mono); letter-spacing: .25em; margin-top: 5px; }
.mark { display: flex; gap: 3px; transform: skew(-24deg); padding: 0 5px; }
.mark i { height: 26px; width: 5px; background: var(--signal); }
.mark i:last-child { height: 15px; }
.header nav, footer nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 48px); font-size: 14px; }
.header nav a, footer nav a { padding: .4rem 0; }
@media (hover: hover) and (pointer: fine) { .header nav a:hover, footer nav a:hover { color: var(--signal); } }
.mobile-plan { display: none; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: .67rem 1.25rem; border: 1px solid transparent; border-radius: 5px;
  font-size: .92rem; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background .2s, border-color .2s, scale 140ms cubic-bezier(.23, 1, .32, 1);
}
.button-accent { background: var(--signal); color: #111111; }
@media (hover: hover) and (pointer: fine) { .button-accent:hover { background: #b0ffc3; } }
.button-light { background: var(--white); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .button-light:hover { background: var(--signal); } }
.button-glass { border-color: #f4f4f463; background: #1a1a1a80; color: var(--white); }
@media (hover: hover) and (pointer: fine) { .button-glass:hover { background: #343434; border-color: #f4f4f4b0; } }

.story { position: relative; isolation: isolate; }
.stage { position: sticky; z-index: 1; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #313131; pointer-events: none; }
.terminal, .stage-shade, #freight-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.terminal {
  background: url("terminal.webp") 50% 60% / cover, linear-gradient(#363636, #646464 64%, #242424 66%, #171717);
  transform: scale(1.08) translateX(calc(var(--pan, 0%) + var(--road-shift, 0%)));
}
.stage-shade {
  background: linear-gradient(180deg, #11111194, #18181814 33%, transparent 61%, #0f0f0fe8 100%),
              radial-gradient(ellipse at center, transparent 29%, #10101075 100%);
}
#freight-scene { z-index: 1; }
.chapters { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.chapter { height: 115vh; height: 115svh; display: flex; position: relative; padding: 0 7vw; }
.hero { height: 100vh; height: 100svh; }
.chapter-copy {
  position: sticky; top: 31svh; align-self: flex-start; margin-top: 25svh;
  max-width: min(30vw, 400px); padding: 12px 0 18px; text-shadow: 0 2px 16px #0f0f0f, 0 1px 5px #0f0f0f;
}
.chapter-copy h2 { font: 740 clamp(2.65rem, 4.85vw, 5.35rem)/.94 var(--display); letter-spacing: -.072em; margin: 0 0 17px; }
.chapter-copy p { max-width: 32ch; margin: 0 0 16px; color: #efefef; font-size: 1.06rem; }
.chapter-copy a { pointer-events: auto; display: inline-block; padding: .22rem 0; font-weight: 700; color: var(--signal); border-bottom: 1px solid var(--signal-line); }
@media (hover: hover) and (pointer: fine) { .chapter-copy a:hover { border-color: var(--signal); } }
.transfer { justify-content: flex-end; }
.transfer .chapter-copy { top: 23svh; margin-top: 23svh; }
.dispatch { height: 120vh; height: 120svh; }
.dispatch .chapter-copy { top: 24svh; margin-top: 21svh; max-width: min(42vw, 525px); }

.light-section, .planner-section { padding: clamp(64px, 8.3vw, 130px) max(7vw, calc((100vw - 1320px) / 2)); }
.light-section { background: var(--light); color: var(--ink); color-scheme: light; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-head h2 { margin: 0; font: 750 clamp(2.65rem, 5.4vw, 5.8rem)/.96 var(--display); letter-spacing: -.073em; }
.service-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #bbbbbb; }
.service-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 13px 5px; font-weight: 650; }
@media (hover: hover) and (pointer: fine) { .service-tabs button:hover { background: #ebebeb; color: var(--ink); } }
.service-tabs [aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); }
.service-panel {
  margin-top: 24px;
  background: var(--white); overflow: hidden; border-radius: 8px;
}
.service-copy { padding: clamp(25px, 3.6vw, 60px); }
.service-copy h3, .brief h3 { font: 730 clamp(1.65rem, 3vw, 2.65rem)/1 var(--display); margin: 0; letter-spacing: -.055em; }
.service-copy dl { margin: 24px 0; }
.service-copy dl div { padding: 12px 0; border-top: 1px solid var(--line); }
.service-copy dt { font-weight: 750; }
.service-copy dd { margin: 3px 0 0; color: var(--muted); }
.service-copy a { font-weight: 700; border-bottom: 1px solid #8b8b8b; padding: 3px 0; }
@media (hover: hover) and (pointer: fine) { .service-copy a:hover { border-color: var(--ink); } }

.planner-section { background: #1d1d1d; color: var(--white); color-scheme: dark; border-top: 1px solid #313131; }
.planner-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 62px); align-items: start; }
.shipment-form, .brief { padding: clamp(21px, 3vw, 36px); border: 1px solid #464646; border-radius: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-bottom: 24px; }
.form-grid label { display: block; font-size: .9rem; font-weight: 700; min-width: 0; }
.optional { color: #b8b8b8; font-weight: 400; }
.form-wide { grid-column: 1 / -1; }
.form-grid :is(input, select, textarea) {
  display: block; width: 100%; min-width: 0; min-height: 46px; margin-top: 6px;
  border: 1px solid #575757; border-radius: 4px; padding: 9px 10px;
  background: #161616; color: var(--white); font-size: 1rem; font-weight: 400;
}
.form-grid :is(input, textarea)::placeholder { color: #aeaeae; }
.form-grid textarea { resize: vertical; }
.brief { background: #262626; min-height: 258px; }
.brief-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.brief-empty { color: #d0d0d0; max-width: 36ch; }
.brief-route { margin: 25px 0 17px; display: grid; gap: 14px; }
.brief-route > div { overflow-wrap: anywhere; }
.brief-route span { display: block; font-size: .84rem; color: #cbcbcb; }
.brief-data { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; border-top: 1px solid #525252; padding-top: 16px; }
.brief-data dt { color: #cbcbcb; font-size: .84rem; }
.brief-data dd { margin: 0; overflow-wrap: anywhere; }
.brief-data .brief-notes { grid-column: 1 / -1; }
.brief-checks { margin-top: 21px; }
.brief-checks h4 { margin: 0; }
.brief-checks ul { padding-left: 18px; margin: 7px 0 0; color: #dddddd; }

.faq { background: #ebebeb; }
.questions { border-block-start: 1px solid #bfbfbf; }
.questions details { border-bottom: 1px solid #bfbfbf; }
.questions summary {
  padding: 18px 36px 18px 0; min-height: 59px; list-style: none; cursor: pointer; position: relative; font-weight: 700;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; position: absolute; right: 7px; top: 12px; font-size: 1.45rem; font-weight: 400; }
.questions details[open] summary::after { content: "−"; }
.questions details p { margin: 0 0 21px; color: #4b4b4b; max-width: 70ch; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 35px 7vw; }
footer p { margin: 0; color: #c0c0c0; font-size: .88rem; }

@media (max-width: 760px) {
  .header { min-height: 65px; grid-template-columns: 1fr auto; padding: 0 5vw; }
  .header nav { gap: 13px; }
  .header nav a { font-size: .85rem; }
  .header-faq { display: none; }
  .mobile-plan { display: inline-block; }
  .chapter-copy, .dispatch .chapter-copy, .transfer .chapter-copy { top: 13svh; margin-top: 10svh; max-width: 100%; }
  .chapter-copy h2 { font-size: clamp(2.45rem, 9.2vw, 4rem); }
  .chapter-copy p { font-size: 1rem; }
  .transfer { justify-content: flex-start; }
  .section-head { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }
  .planner-grid { grid-template-columns: 1fr; }
  .service-tabs button { font-size: .875rem; }
  footer nav { gap: 16px; }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 367px) {
  .header { gap: 8px; }
  .header nav { gap: 8px; }
}
@media (max-height: 525px) and (orientation: landscape) {
  .header { min-height: 54px; }
  .chapter-copy, .dispatch .chapter-copy { top: 14svh; margin-top: 11svh; }
  .chapter-copy h2 { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter { height: 100svh; }
  .terminal { transform: scale(1.08); }
  .button { transition: none; }
}

:root { accent-color: var(--signal); }
.stage, .network-section, .planner-section, footer { color-scheme: dark; }
.header, .story, .network-section, .planner-section, footer { --focus-color: var(--signal); }
:focus-visible { outline-color: var(--focus-color, #178037); }

.network-section {
  background: #080808;
  color: var(--white);
  padding: clamp(74px, 8vw, 122px) max(5vw, calc((100vw - 1440px) / 2));
  border-top: 1px solid #373737;
}
.network-section .section-head { margin-bottom: clamp(24px, 3.6vw, 52px); }
.network-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .34fr);
  border: 1px solid #303e36;
  background: #101813;
}
.network-viewport { min-width: 0; display: flex; flex-direction: column; background: #101813; }
.map-toolbar, .map-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 9px 16px; padding: 12px clamp(14px, 1.8vw, 25px);
}
.map-toolbar { border-bottom: 1px solid #2f3b33; }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: #d2dcd5; font-size: .82rem; }
.map-key span { display: inline-flex; gap: 7px; align-items: center; }
.map-key span::before { content: ""; display: block; background: #71e49b; }
.key-port::before { width: 7px; height: 7px; border-radius: 50%; }
.key-lane::before { width: 15px; height: 2px; }
.find-ports:disabled { opacity: .55; cursor: default; }
.find-ports[aria-busy="true"] { cursor: progress; }
.port-finder { padding: 14px; border-bottom: 1px solid #34453b; background: #18251e; }
.port-finder-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.port-finder-head p { margin: 0; font-size: .86rem; color: #d2dfd7; }
.nearby-ports { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); gap: 8px; margin-top: 12px; }
.nearby-port { text-align: left; background: #101a14; color: #f0faf3; border: 1px solid #40594a; border-radius: 5px; padding: 9px 11px; font-size: .88rem; font-weight: 650; }
@media (hover: hover) and (pointer: fine) { .nearby-port:hover { border-color: var(--signal); } }
.nearby-port span { display: block; color: #a1c9ad; font-size: .84rem; font-weight: 400; }
.network-chart {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr); align-content: center;
  overflow: hidden; flex: 1; min-height: 100px;
  background: radial-gradient(ellipse at 46% 45%,#172a23,#0d1813 72%,#0d1511);
}
#network-map, #network-motion { display: block; width: 100%; height: auto; aspect-ratio: 25 / 12; grid-area: 1 / 1; }
#network-map { cursor: pointer; }
.network-chart.is-zoomed #network-map { cursor: grab; touch-action: none; }
.network-chart.is-zoomed #network-map:active { cursor: grabbing; }
.network-chart #network-map.is-picking-location { cursor: crosshair; }
#network-motion { pointer-events: none; }
.map-camera { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 4px; padding: 4px; border-radius: 7px; background: #111c16; border: 1px solid #34443a; }
.map-camera button { min-height: 38px; min-width: 38px; padding: 0 8px; border: 0; color: #eef8f0; background: #203027; border-radius: 4px; font-size: .83rem; }
@media (hover: hover) and (pointer: fine) { .map-camera button:hover:not(:disabled) { background: #304b39; } }
.map-camera button:disabled { color: #7c8b82; cursor: default; }
.map-footer { border-top: 1px solid #2f3b33; color: #b7c7bd; font-size: .8rem; }
@media (hover: hover) and (pointer: fine) { .map-credit:hover { color: var(--white); text-decoration: underline; } }
.network-inspector { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid #344038; }
.lane-controls, #network-details { padding: 18px clamp(14px,1.65vw,23px); border-bottom: 1px solid #303a34; }
.lane-controls { display: grid; gap: 5px; }
.lane-controls h3 { margin: 0 0 6px; font-size: 1.04rem; }
.lane-controls label { margin-top: 4px; color: #cbd8ce; font-size: .82rem; }
.lane-controls select { width: 100%; min-width: 0; min-height: 42px; padding: 5px 9px; border: 1px solid #455a4c; border-radius: 5px; background: #101813; color: #ecf5ee; font: inherit; font-size: .88rem; }
/* iOS zooms into any field under 16px on focus; touch screens get 16px. */
@media (pointer: coarse) { .lane-controls select { font-size: 16px; } }
.lane-controls select:disabled { opacity: .64; }
#network-details { min-height: 72px; background: #132019; }
#network-details h3 { font-size: 1.21rem; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 6px; overflow-wrap: anywhere; }
#network-details p { margin: 0; }
.network-help { color: #c1d1c6; font-size: .86rem; }
.network-plan { display: inline-block; margin-top: 9px; color: var(--signal); font-size: .87rem; text-underline-offset: 4px; text-decoration: underline; }
.route-index { padding-top: 12px; }
.route-index h3 { padding: 0 clamp(14px,1.65vw,23px); margin: 0 0 9px; font-size: .86rem; }
#route-list { max-height: 216px; overflow-y: auto; scrollbar-color: #496252 #151d18; }
.route-option {
  width: 100%; padding: 8px clamp(14px,1.65vw,23px); min-height: 38px; text-align: left;
  background: transparent; border: 0; border-top: 1px solid #2d382f; color: #e3ede6;
  font-size: .85rem; line-height: 1.25; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.lane-distance { flex: none; color: #a4c2ae; font-size: .78rem; font-variant-numeric: tabular-nums; }
.route-option[aria-pressed="true"] { background: #20382a; color: #f6fff8; }
@media (hover: hover) and (pointer: fine) { .route-option:hover { background: #20382a; color: #f6fff8; } }
.route-option:focus-visible { outline-offset: -3px; }
.access-lock {
  display: inline-block; position: relative; width: 1em; height: .77em; transform: translateY(.13em);
  border: .08em solid currentColor; border-radius: .16em; flex: none;
}
.access-lock::before {
  content: ""; position: absolute; width: .48em; height: .53em; top: -.51em; left: 50%;
  transform: translateX(-50%); border: .08em solid currentColor; border-bottom: 0; border-radius: .5em .5em 0 0;
}
.access-lock::after {
  content: ""; position: absolute; inset: 35% 44% 25%; border-radius: 1em; background: currentColor;
}
.shipping-advisories {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px;
  margin-top: 18px; padding: 14px clamp(15px,2vw,24px);
  border: 1px solid #365341; border-radius: 5px; background: #111b15;
  scroll-margin-top: 0;
}
.shipping-advisories h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .94rem; }
.shipping-advisories h3 .access-lock { color: #b5efc5; }
.shipping-advisories p { margin: 0; color: #c3d4c8; font-size: .87rem; }
.access-dialog {
  width: min(100% - 28px, 510px); max-height: calc(100dvh - 28px); padding: clamp(24px,5vw,42px);
  border: 1px solid #4c7d59; border-radius: 12px; margin: auto; color: #f2fbf4;
  background: radial-gradient(ellipse at top left,#1b3825,#101913 65%);
  box-shadow: 0 24px 100px #000b;
}
.access-dialog::backdrop { background: #070a08cc; backdrop-filter: blur(5px); }
body:has(.access-dialog[open]) { overflow: hidden; }
.access-dialog h2 { font-size: clamp(1.75rem,5vw,2.75rem); max-width: 12ch; line-height: 1.03; letter-spacing: -.045em; margin: 0; }
.access-dialog p { margin: 14px 0 20px; color: #d0e2d5; max-width: 34ch; }
.access-close { position: absolute; top: 12px; right: 12px; }
.access-close button {
  width: 42px; height: 42px; background: #14231a; color: #effff2; border: 1px solid #42634c;
  border-radius: 5px; font-size: 1.45rem; line-height: 1;
}
@media (hover: hover) and (pointer: fine) { .access-close button:hover { background: #293f30; } }
@media (max-width: 560px) {
  .access-dialog .button { width: 100%; }
}
@media (max-width: 900px) {
  .network-dashboard { grid-template-columns: 1fr; }
  .network-inspector { display: grid; grid-template-columns: 1fr 1fr; border-left: 0; border-top: 1px solid #344038; }
  .route-index { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .network-section { padding-inline: 5vw; }
  .network-inspector { grid-template-columns: 1fr; }
  .map-key { gap: 7px 11px; }
  .map-toolbar .button { min-height: 40px; padding-inline: 9px; }
  .network-chart { padding-bottom: 48px; }
  .map-camera { bottom: 7px; right: 8px; }
}
@media (max-width: 760px) { .header-journey { display: none; } }

.harbor {
  position: absolute;
  inset: 0;
  background: #1a1a1a url("harbor.webp") center 44% / cover;
  opacity: var(--harbor-opacity, 0);
}
.dock { height: 140svh; }
.ocean { height: 155svh; }
.dock .chapter-copy, .ocean .chapter-copy {
  top: 12svh;
  margin-top: 12svh;
  max-width: min(80vw, 440px);
  padding-bottom: 26px;
}
.ocean .chapter-copy { top: 11svh; }
.dispatch .chapter-copy { top: 16svh; margin-top: 16svh; }
@media (max-width: 760px) {
  .dock .chapter-copy, .ocean .chapter-copy, .dispatch .chapter-copy {
    top: 9svh;
    margin-top: 9svh;
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dock, .ocean, .dispatch { height: 100svh; }
}

.story[data-chapter]:not([data-chapter="dispatch"]) .dispatch .chapter-copy:not(:focus-within),
.story[data-chapter]:not([data-chapter="dock"]) .dock .chapter-copy,
.story[data-chapter]:not([data-chapter="ocean"]) .ocean .chapter-copy:not(:focus-within) {
  opacity: 0;
  visibility: hidden;
}
