/* Datisa Forwarders - "Port Journal". Editorial layout: masthead, map band, port journal + facts column. */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/oswald-latin.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plexmono-500-latin.woff2") format("woff2"); }

:root {
  --paper: #ffffff; --tint: #f8f8f8; --ink: #1e1e1e; --text: #333333; --muted: #5c5c5c; --rule: #d9d9d9; --rule-soft: #e7e7e7;
  --blue: #048dba;      /* measured from the Datisa logo */
  --blue-ink: #03688a;  /* same hue, darkened for text contrast (6.3:1 on white) */
  --head: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: 32px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.55 var(--sans); }
img { max-width: 100%; }
a { color: var(--blue-ink); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.wrap { max-width: 1264px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* ---------- masthead ---------- */
.mast { background: #fff; border-bottom: 1px solid var(--ink); position: relative; z-index: 6; }
.mast-in { max-width: 1264px; margin: 0 auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mast-logo { display: flex; align-items: center; min-height: 44px; flex: none; }
.mast-logo img { height: 40px; width: auto; display: block; }
.mast-nav { display: flex; align-items: center; gap: 2px; min-width: 0; margin-right: -12px; }
.mast-nav a, .mast-nav button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer;
  font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #444; text-decoration: none; white-space: nowrap;
}
.mast-nav a:hover, .mast-nav button:hover { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 6px; }

/* ---------- map band ---------- */
.band { position: relative; height: 340px; background: #eef1f3; border-bottom: 1px solid var(--ink); }
.band .map { position: absolute; inset: 0; }
.map.no-map { background: repeating-linear-gradient(90deg, #eef1f3 0 39px, #e3e7ea 39px 40px); }
.map-key {
  position: absolute; left: max(12px, calc((100% - 1264px) / 2 + var(--pad))); top: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0;
  padding: 7px 10px; background: rgba(255, 255, 255, .95); max-width: calc(100% - 84px);
  font: 700 10.5px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.map-key:empty { display: none; }
.map-key li { display: flex; align-items: center; white-space: nowrap; }
.map-key i { display: inline-block; width: 22px; height: 0; margin-right: 6px; }
.k-sailed { border-top: 3px solid var(--blue); }
.k-remaining { border-top: 2px dashed var(--ink); }
.k-onward { border-top: 3px dotted #6f6f6f; }
.map-key i.k-vessel { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--ink); margin-right: 8px; }
.band .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.band .maplibregl-ctrl-top-right { right: max(0px, calc((100% - 1264px) / 2 + var(--pad) - 10px)); }
.maplibregl-ctrl-group { border-radius: 0; box-shadow: none; border: 1px solid var(--ink); }
.maplibregl-ctrl-attrib { font-size: 10.5px; }
.maplibregl-ctrl-attrib a { color: #333; }

.pin { width: 0; height: 0; }
.pin i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); }
.pin-load i { background: var(--ink); }
.pin-final i { left: -8px; top: -8px; width: 16px; height: 16px; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 2.5px var(--ink); }
.pin-ts i { border-radius: 1px; transform: rotate(45deg); background: #fff; }
.pin-call i { left: -4px; top: -4px; width: 8px; height: 8px; border-width: 2px; border-color: #4a4a4a; }
.pin .lab {
  position: absolute; white-space: nowrap; background: rgba(255, 255, 255, .95); padding: 2px 6px 3px; pointer-events: none;
  font: 600 13px/1.25 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.pin .lab small { font: 500 11px/1 var(--mono); color: #4a4a4a; letter-spacing: 0; }
.pin-call .lab { font-weight: 500; font-size: 12px; }
.pin[data-side="right"] .lab { left: 10px; top: 0; transform: translateY(-50%); }
.pin[data-side="left"] .lab { right: 10px; top: 0; transform: translateY(-50%); }
.pin[data-side="above"] .lab { bottom: 9px; left: 0; transform: translateX(-50%); }
.pin[data-side="below"] .lab { top: 9px; left: 0; transform: translateX(-50%); }
.pin.dot-only .lab { display: none; }
.pin.dot-hidden { visibility: hidden; }
.pin.compact .lab b { display: none; }
.ship { width: 0; height: 0; z-index: 3; }
.ship .hull { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; transform-origin: 50% 50%; display: block; overflow: visible; }
.ship-tip {
  position: absolute; white-space: nowrap; background: var(--ink); color: #fff; padding: 3px 7px; pointer-events: none;
  font: 600 12px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase;
}
.ship-tip[data-side="right"], .ship-tip:not([data-side]) { left: 16px; top: 0; transform: translateY(-50%); }
.ship-tip[data-side="left"] { right: 16px; top: 0; transform: translateY(-50%); }
.ship-tip[data-side="above"] { bottom: 16px; left: 0; transform: translateX(-50%); }
.ship-tip[data-side="below"] { top: 16px; left: 0; transform: translateX(-50%); }
.ship-tip.tip-hidden { display: none; }

/* limited: no map, a typographic route band */
.band-plain { height: 150px; background: var(--tint); display: flex; align-items: center; }
.band-route { display: flex; align-items: center; gap: 18px; width: 100%; }
.br-port { font: 700 clamp(20px, 4.4vw, 40px)/1.05 var(--head); text-transform: uppercase; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.br-line { flex: 1 1 40px; min-width: 24px; border-top: 2px dashed var(--ink); }

/* ---------- lead ---------- */
.lead { grid-area: lead; min-width: 0; padding: 34px 0 6px; }
.kicker { margin: 0 0 10px; font: 700 12px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-ink); }
.headline { margin: 0 0 14px; font: 600 clamp(34px, 5.4vw, 62px)/1.04 var(--head); color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; max-width: 24ch; }
.deck { margin: 0 0 22px; font-size: 19px; line-height: 1.5; color: var(--text); max-width: 70ch; }
.lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding: 8px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.blno { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.blno-k { font: 700 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.blno-v { font-size: 17px; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.copy {
  min-height: 44px; min-width: 64px; padding: 0 14px; background: #fff; border: 1px solid var(--ink); color: var(--ink); cursor: pointer;
  font: 700 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; border-radius: 0;
}
.copy:hover { background: var(--ink); color: #fff; }
.age { display: flex; align-items: center; gap: 9px; margin: 0; min-height: 44px; font-size: 14px; color: var(--text); }
.age-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #8a8a8a; }
.age-ok .age-dot { background: #1c7c47; }
.age-warn .age-dot { background: #b87900; }
.age-old .age-dot, .age-lost .age-dot { background: #fff; border: 2px solid var(--ink); }
.age-lost { color: var(--ink); font-weight: 700; }
.age-done .age-dot { background: var(--blue); }
.age-off .age-dot { background: #fff; border: 2px solid #8a8a8a; }
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; margin-top: 20px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; background: var(--ink); color: #fff;
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none; font: 600 15px/1 var(--head); letter-spacing: .14em; text-transform: uppercase;
}
.btn-primary:hover { background: var(--blue-ink); }
#read-latest::after { content: "\2193"; margin-left: 12px; font-family: var(--sans); font-weight: 700; }
.btn-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer; color: var(--blue-ink);
  font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.btn-text:hover { color: var(--ink); }

/* ---------- paper: journal + facts ---------- */
.paper { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; grid-template-areas: "lead facts" "journal facts"; gap: 0 64px; padding: 0 0 72px; align-items: start; }
.journal { padding-top: 34px; }
.facts { margin-top: 24px; }
.facts-static { margin-top: 34px; }
.journal { grid-area: journal; min-width: 0; }
.facts, .facts-static { grid-area: facts; min-width: 0; }
.col-h { margin: 0; font: 600 15px/1.2 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.j-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.j-list, .pg-events { list-style: none; margin: 0; padding: 0; }
.pg { padding: 26px 0 4px; border-bottom: 1px solid var(--ink); }
.pg-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pg-name { margin: 0; font: 700 clamp(30px, 4vw, 46px)/1 var(--head); text-transform: uppercase; letter-spacing: .005em; color: var(--ink); overflow-wrap: anywhere; }
.pg-call .pg-name { font-size: clamp(24px, 2.8vw, 32px); font-weight: 600; }
.pg-sea .pg-name, .pg-note .pg-name { color: var(--blue-ink); font-size: clamp(24px, 2.8vw, 32px); font-weight: 600; }
.pg-sub { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font: 700 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pg-code { color: var(--ink); letter-spacing: .02em; font-size: 13px; }
.pg-sub { gap: 2px 0; }
.pg-sub span { margin-right: 18px; }
.ev { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 4px 28px; padding: 14px 0 12px; border-top: 1px solid var(--rule); scroll-margin: 90px; }
.ev:focus { outline: none; }
.ev:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ev.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0% { background: #dff1f8; } 100% { background: transparent; } }
.ev-when { font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.ev-when time { display: block; }
.when-to { display: block; font-weight: 400; color: var(--muted); }
.when-tba { color: var(--muted); font-weight: 400; }
.ev-now .ev-when { color: var(--blue-ink); }
.ev-what { min-width: 0; }
.ev-what h4 { margin: 0 0 3px; font: 700 17px/1.3 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.ev-what p { margin: 0 0 4px; font-size: 15px; max-width: 62ch; }
.ev-what .ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 8px 0 0; }
.ev-src { font: 700 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ev-pln h4 { color: #3a3a3a; }

.tag { display: inline-flex; align-items: center; gap: 7px; margin: 0; font: 700 11.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.tag::before { content: ""; width: 10px; height: 10px; flex: none; }
.tag.act::before { background: var(--ink); }
.tag.est { color: var(--blue-ink); }
.tag.est::before { border: 1.5px solid var(--blue-ink); background: linear-gradient(90deg, var(--blue-ink) 50%, transparent 50%); }
.tag.pln { color: var(--muted); }
.tag.pln::before { border: 2px solid var(--muted); }
.tag.now { color: var(--ink); }
.tag.now::before { border-radius: 50%; background: var(--blue); }
.tag.now-ok::before { background: #1c7c47; }
.tag.now-warn::before { background: #b87900; }
.tag.now-old::before, .tag.now-lost::before { background: #fff; border: 2px solid var(--ink); }

/* facts column */
.facts-sum { display: flex; align-items: flex-start; min-height: 44px; padding: 10px 20px 12px; list-style: none; pointer-events: none; background: var(--tint) linear-gradient(var(--ink), var(--ink)) no-repeat 20px 100% / calc(100% - 40px) 3px; font: 600 15px/1.2 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.facts-sum::-webkit-details-marker { display: none; }
.j-head { min-height: 44px; align-items: flex-end; }
.facts-body, .facts-static .dl { background: var(--tint); padding: 2px 20px 18px; }
.facts-static .col-h { padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.fs { padding: 14px 0 12px; border-top: 1px solid var(--ink); }
.fs:first-child { border-top: 0; }
.fs-h { margin: 0 0 6px; font: 600 14px/1.2 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.dl { margin: 0; }
.dl > div { padding: 7px 0 8px; border-bottom: 1px solid var(--rule-soft); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { font: 700 11.5px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.dl dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.dl dd .tag { margin-right: 6px; }
.dd-port { display: block; font-weight: 700; margin-bottom: 2px; }
.srcs { list-style: none; margin: 0; padding: 0; }
.srcs li { padding: 2px 0; font-size: 14px; }
.srcs li b { font-weight: 700; color: var(--ink); }
.srcs small { display: block; color: var(--muted); font-size: 12.5px; }
.vls { list-style: none; margin: 0; padding: 0; }
.vl { padding: 8px 0 9px; border-bottom: 1px solid var(--rule-soft); }
.vl:last-child { border-bottom: 0; }
.vl p { margin: 0; }
.vl-k { font: 700 11px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vl-n { font: 600 19px/1.2 var(--head); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin: 2px 0 !important; }
.vl-m { font-size: 13.5px; color: var(--text); }
.vl-m span { display: inline-block; margin-right: 12px; white-space: nowrap; }
.vl-s { font: 700 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-ink); margin-top: 3px !important; }
.vl-on .vl-n::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 2px; border-radius: 50%; background: var(--blue); border: 2px solid var(--ink); }
.boxes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
.boxes li:nth-child(n+7) { display: none; }
.boxes.open li { display: block; }
.box { width: 100%; min-height: 44px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; border-bottom: 1px solid #bdbdbd; color: var(--ink); font-size: 15px; cursor: copy; border-radius: 0; }
.box-c { padding: 6px 8px; border: 1px solid var(--ink); font: 700 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: #fff; }
.box:hover { border-bottom-color: var(--ink); }
.boxes li:last-child .box { border-bottom: 0; }
.box:hover .box-c { background: var(--ink); color: #fff; }
.btn-more { margin-top: 8px; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--blue-ink); font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; }
.dest-co { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.fs p { margin: 0; }
.tel { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--blue-ink); text-underline-offset: 4px; }

/* limited page */
.j-empty { padding: 26px 0; border-bottom: 1px solid var(--ink); }
.j-empty-big { margin: 0 0 8px; font: 600 20px/1.2 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.j-empty p { max-width: 60ch; }
.paper-limited .journal .col-h { padding-bottom: 10px; border-bottom: 3px solid var(--ink); }

/* ---------- search / not found ---------- */
.front { padding-top: 76px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "k k" "t t" "main aside"; gap: 0 64px; }
.front > .kicker { grid-area: k; }
.front-title { grid-area: t; }
.front-main { grid-area: main; min-width: 0; }
.front-aside { grid-area: aside; align-self: start; border-top: 3px solid var(--ink); padding-top: 12px; }
.front-aside h2 { margin: 0 0 8px; font: 600 15px/1.2 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.front-aside p { margin: 0 0 10px; font-size: 15px; }
.bl-sketch { margin: 14px 0 4px; border: 1px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; font: 700 10.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bl-sketch span { padding: 8px 10px; border-left: 1px solid var(--ink); border-top: 1px solid var(--ink); min-height: 34px; }
.bl-sketch span:nth-child(odd) { border-left: 0; }
.bl-sketch span:nth-child(-n+2) { border-top: 0; }
.bl-sketch .hit { background: var(--ink); color: #fff; }
.mast-tag { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0 12px; white-space: nowrap; }
.front-title { margin: 0 0 30px; font: 700 clamp(52px, 10vw, 124px)/.92 var(--head); text-transform: uppercase; letter-spacing: -.005em; color: var(--ink); }
.front-deck { margin: 0; font-size: 19px; line-height: 1.5; max-width: 60ch; }
.nf-q { color: var(--ink); background: var(--tint); padding: 1px 6px; overflow-wrap: anywhere; }
.ed-form { max-width: 820px; margin-top: 40px; }
.ed-label { display: block; margin-bottom: 4px; font: 700 12px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ed-row { display: flex; align-items: flex-end; gap: 20px; border-bottom: 3px solid var(--ink); }
.ed-row:focus-within { border-bottom-color: var(--blue); box-shadow: 0 2px 0 var(--blue); }
.ed-input { flex: 1; min-width: 0; padding: 10px 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 500 clamp(22px, 3.4vw, 34px)/1.25 var(--mono); text-transform: uppercase; }
.ed-input::placeholder { color: #767676; }
.ed-input:focus { outline: none; }
.ed-submit span { display: inline-block; transform: translateY(-2px); }
.ed-submit { flex: none; min-height: 52px; min-width: 44px; padding: 0 0 6px; background: none; border: 0; cursor: pointer; color: var(--blue-ink); font: 600 21px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; }
.ed-submit:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 8px; }
.ed-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.ed-error { margin: 12px 0 0; font-weight: 700; color: #9b1c1c; }
.sec-h { margin: 0 0 18px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); font: 600 15px/1.3 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.guide { padding-top: 32px; padding-bottom: 80px; }
.guide-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-col { padding: 4px 28px 0; border-left: 1px solid var(--rule); }
.guide-col:first-child { padding-left: 0; border-left: 0; }
.guide-col p { margin: 0 0 8px; max-width: 42ch; }
.guide-k { font: 600 18px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.guide-col .tag { margin-bottom: 10px; font-size: 12px; }
.guide-note { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.listing { padding-top: 16px; padding-bottom: 24px; }
.listing-note { margin: -6px 0 10px; color: var(--muted); font-size: 15px; }
.listing-rows { list-style: none; margin: 0; padding: 0; }
.listing-row { border-top: 1px solid var(--rule); }
.listing-row:last-child { border-bottom: 1px solid var(--ink); }
.listing-link { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: "route no open" "meta meta open"; gap: 4px 24px; align-items: center; padding: 16px 0; color: var(--text); text-decoration: none; min-height: 44px; }
.listing-link:hover .lr-open { text-decoration: underline; }
.lr-route { grid-area: route; display: flex; flex-wrap: wrap; gap: 0 10px; font: 600 26px/1.15 var(--head); text-transform: uppercase; color: var(--ink); }
.lr-arrow { color: var(--blue-ink); }
.lr-no { grid-area: no; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.lr-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 14px; color: var(--muted); }
.lr-status { font-weight: 700; color: var(--ink); }
.lr-open { grid-area: open; font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-ink); text-underline-offset: 5px; }

/* ---------- footer, toast ---------- */
.foot { border-top: 1px solid var(--ink); background: #fff; }
.foot-in { max-width: 1264px; margin: 0 auto; padding: 20px var(--pad) 30px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 28px; font-size: 13px; color: var(--muted); }
.foot-contact { margin: 0; font-style: normal; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.foot-contact strong { font: 600 14px/1.3 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.foot-time { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* folded vessel stops (completed): one line, entries behind a native toggle */
.pg.pg-fold { padding: 0; border-bottom-color: #9a9a9a; }
.fold-sum:hover { background: var(--tint); }
.fold-meta .pg-code { margin-right: 6px; }
.fold-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-height: 44px; padding: 14px 0 12px; cursor: pointer; list-style: none; }
.fold-sum::-webkit-details-marker { display: none; }
.fold-sum .pg-name { font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; }
.fold-meta { font: 700 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fold-meta b { color: var(--ink); letter-spacing: .08em; }
.fold-hint { margin-left: auto; }
.fold-hint::after { content: "Show +"; font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-ink); }
.fold[open] .fold-hint::after { content: "Hide \2212"; }
.fold-sum:hover .pg-name { color: var(--blue-ink); }
.fold > .pg-sub { margin: -4px 0 8px; }
.fold[open] { padding-bottom: 4px; }
.when-passed { font-style: italic; }
.dd-passed { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* facts column on wide screens: whole column sticky when it fits, otherwise Arrival + Vessel stay in view */
@media (min-width: 960px) {
  .facts-body { background: none; padding: 0; }
  .fs-key, .fs-rest { background: var(--tint); padding: 2px 20px 0; }
  .fs-rest { padding-bottom: 18px; }
  .fs-key:empty { display: none; }
  .fs-rest .fs:first-child { border-top: 1px solid var(--ink); }
  .fs-key:empty + .fs-rest .fs:first-child { border-top: 0; }
  .facts.stick-all { position: sticky; top: 24px; }
  .stick-key .facts-sum { background-image: none; }
  .stick-key .fs-key { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--ink); background: var(--tint) linear-gradient(var(--ink), var(--ink)) no-repeat 20px 0 / calc(100% - 40px) 3px; padding-top: 5px; }
  .stick-key .fs-rest .fs:first-child { border-top: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 959px) {
  .paper { display: block; padding-top: 0; }
  .facts, .facts-static { margin-top: 0; }
  .facts-sum { pointer-events: auto; background-image: none; }
  .j-head { min-height: 0; }
  .facts { margin: 0 calc(-1 * var(--pad)) 8px; border-bottom: 1px solid var(--ink); }
  .facts-sum {
    display: flex; align-items: center; letter-spacing: .16em; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 var(--pad); cursor: pointer; list-style: none;
    font: 600 17px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: var(--tint);
  }
  .facts-sum::-webkit-details-marker { display: none; }
  .facts-sum-hint::after { content: "Show +"; font: 700 11px/1 var(--sans); letter-spacing: .16em; color: var(--blue-ink); }
  .facts[open] .facts-sum-hint::after { content: "Hide \2212"; }
  .boxes { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .facts-sum { padding: 0 var(--pad); }
  .facts-body { padding: 0 var(--pad) 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
  .fs-key, .fs-rest { display: contents; }
  .fs:first-child { margin: 0; padding: 14px 0 12px; border-top: 1px solid var(--ink); }
  .facts-static { margin-top: 28px; }
  .journal { padding-top: 26px; }
}
@media (max-width: 767px) {
  .band { height: auto; }
  .band .map { position: relative; inset: auto; height: 220px; }
  .map-key { position: static; max-width: none; background: #fff; padding: 8px var(--pad); border-top: 1px solid var(--rule); }
  .facts-body { display: block; }
  .guide-cols { grid-template-columns: 1fr; }
  .front { display: block; }
  .front-aside { margin-top: 36px; }
  .guide-col, .guide-col:first-child { padding: 14px 0 6px; border-left: 0; border-top: 1px solid var(--rule); }
  .guide-col:first-child { border-top: 0; padding-top: 0; }
  .listing-link { grid-template-columns: minmax(0, 1fr); grid-template-areas: "route" "no" "meta" "open"; }
  .lr-open { min-height: 32px; display: flex; align-items: center; }
  .front { padding-top: 48px; }
  .deck, .front-deck { font-size: 17px; }
}
@media (max-width: 639px) {
  :root { --pad: 16px; }
  .mast-in { height: 56px; }
  .mast-logo img { height: 32px; }
  .mast-nav a[href^="#"] { display: none; }
  .mast-tag { padding: 0 4px; font-size: 11px; letter-spacing: .1em; }
  .mast-nav { margin-right: -9px; }
  .mast-nav a, .mast-nav button { padding: 0 9px; letter-spacing: .1em; font-size: 11px; }
  .ev { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .j-head { flex-direction: column; align-items: flex-start; }
  .ev-when { font-size: 13.5px; }
  .lead { padding-top: 24px; }
  .blno-v { font-size: 15px; }
  .lead-meta { gap: 4px 20px; }
  .lead-actions { gap: 4px 20px; }
  .btn-primary { width: 100%; }
  .map-key { font-size: 9.5px; gap: 2px 10px; padding: 5px 8px; }
  .ed-row { gap: 10px; }
  .ed-submit { font-size: 18px; }
}
@media (max-width: 379px) {
  .mast-logo img { height: 28px; }
  .mast-nav a, .mast-nav button { padding: 0 7px; letter-spacing: .06em; }
  .blno-v { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- r5 states (CONTRACT 9) ---------- */
/* container-token view: an editor's note under the meta strip; masked B/L number has no copy button */
.cview-hint { margin: 16px 0 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--blue); max-width: 62ch; font-size: 15px; line-height: 1.5; color: var(--text); font-style: italic; }
.cview-k { display: block; margin-bottom: 2px; font: 700 11px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-ink); font-style: normal; }
/* 44 px touch target without opening up the line spacing of the note */
.cview-hint a { display: inline-block; padding: 12px 2px; margin: -12px 0; line-height: 20px; font-style: normal; font-weight: 700; }
.blno-masked .blno-v { color: var(--muted); letter-spacing: .02em; }
/* closing date: a reference date, set in the muted "Planned" voice */
.dd-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.dd-note .tag { font-style: normal; }
