/* Layout: full-bleed 3D port at night; a glass HUD floats 16px from the edges in a
   3-column grid (rail · open water · detail). Single dark theme by design. */
:root {
  color-scheme: dark;
  --bg: #07090c;
  --text: #eceef0;
  --muted: #98a0a8;
  --faint: #6b737c;
  --glass: rgba(16, 19, 23, 0.74);
  --glass-strong: rgba(18, 21, 26, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --chip: rgba(255, 255, 255, 0.06);
  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, 0.12);
  --warn: #f5a524;
  --warn-bg: rgba(245, 165, 36, 0.14);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.14);
  --teal: #5eead4;
  --info-bg: rgba(94, 234, 212, 0.12);
  --tick: #a9cfe0;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 14px;
  --rail: 330px;
  --side: 340px;
  --top: calc(env(safe-area-inset-top, 0px) + 16px);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 8px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
[data-v], .big, .mid { font-variant-numeric: tabular-nums; }
.ic { flex: none; display: block; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }

/* `clip` (not just `hidden`) so focusing a field, a phone keyboard or scrollIntoView can never shift the whole app */
.app { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: var(--bg); }
#stage { position: absolute; inset: 0; }
#gl { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }

/* ---------- glass */
.panel, .chip, .tabs, .live-pill, .icon-btn, .pin .tag, .tooltip, .menu, .pal-box {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
}
.panel {
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 34px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

/* ---------- top bar */
.topbar {
  position: absolute; z-index: 20;
  top: var(--top); left: var(--gl); right: var(--gr);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; justify-self: start; }
.brand svg { width: 24px; height: 18px; }
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; }
.tab { height: 30px; padding: 0 15px; border-radius: 999px; color: var(--muted); font-size: 12.5px; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.status { justify-self: end; display: flex; align-items: center; gap: 8px; }
.live-pill { height: 38px; border-radius: 999px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 12px; white-space: nowrap; }
.live-pill .lv { display: flex; align-items: center; gap: 7px; color: var(--ok); }
#clock { font-weight: 500; color: var(--text); }
#date, .wx { color: var(--muted); }
.wx { display: flex; align-items: center; gap: 6px; }
.sep { width: 1px; height: 14px; background: var(--line-2); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; position: relative; transition: background 0.2s; }
.icon-btn:hover { background: rgba(40, 44, 50, 0.85); }
.badge { position: absolute; top: 5px; right: 6px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #15110a; font-size: 9.5px; font-weight: 600; display: grid; place-items: center; }

/* ---------- HUD grid */
.hud {
  position: absolute; z-index: 10;
  top: calc(var(--top) + 52px); left: var(--gl); right: var(--gr);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--side);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "rail kpis side" "rail . side" "rail bottom meta";
  column-gap: 14px; row-gap: 12px;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#rail { grid-area: rail; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
#rail::-webkit-scrollbar { display: none; }
#rail > * { pointer-events: auto; }
#kpis { grid-area: kpis; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-self: start; min-width: 0; }
#side { grid-area: side; min-height: 0; max-height: 100%; overflow-y: auto; align-self: start; display: flex; flex-direction: column; gap: 10px; border-radius: var(--r); }
#bottom { grid-area: bottom; align-self: end; min-width: 0; }
.meta { grid-area: meta; align-self: end; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font: 10.5px var(--mono); color: var(--muted); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.scale { display: flex; align-items: center; gap: 8px; }
#scalebar { display: block; height: 6px; width: 100px; border: 1px solid rgba(255, 255, 255, 0.6); border-top: 0; transition: width 0.3s; }
.sheet-handle { display: none; }

.panel, .chips, .mini-row, .vcards { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- shared pieces */
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.p-title { font-size: 13px; font-weight: 500; }
.p-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.p-sub.inline { display: inline; }
.ghost-ic { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: none; transition: color 0.2s, background 0.2s; }
.ghost-ic:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.ghost-ic.sm { width: 22px; height: 22px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.chip.sm { height: 24px; padding: 0 9px; font-size: 11px; gap: 5px; background: var(--chip); backdrop-filter: none; -webkit-backdrop-filter: none; }
button.chip.sm:hover { color: var(--text); border-color: var(--line-2); }
.big { font-size: 46px; font-weight: 300; letter-spacing: -0.035em; line-height: 1; white-space: nowrap; }
.mid { font-size: 28px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.big small, .mid small { font-size: 0.5em; color: var(--muted); letter-spacing: 0; }
.big .unit { font-size: 15px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.mid .unit { font-size: 12px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.big-row { display: flex; align-items: flex-end; gap: 14px; margin-top: 10px; }
.delta { font-size: 11px; white-space: nowrap; }
.delta.ok { color: var(--ok); } .delta.bad { color: var(--bad); } .delta.mute { color: var(--muted); }
.delta.stack { display: flex; flex-direction: column; gap: 1px; padding-bottom: 4px; }
.delta.stack small { color: var(--muted); font-size: 10.5px; }
.divider { height: 1px; background: var(--line); margin: 14px 0 12px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(245, 165, 36, 0.5); }
.dot.bad { background: var(--bad); }
.dot.info { background: var(--teal); box-shadow: 0 0 8px rgba(94, 234, 212, 0.5); }
.dot.sel { background: var(--text); }
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; white-space: nowrap; background: var(--chip); color: var(--muted); }
.pill .ic { width: 11px; height: 11px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--teal); }
.pill.blank { background: none; color: var(--faint); }
.bump { animation: bump 0.6s ease; }
@keyframes bump { 30% { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.5); } }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.kv > span { color: var(--muted); }
.kv b { font-weight: 400; display: flex; align-items: center; gap: 6px; text-align: right; }
.kv b small { color: var(--muted); font-size: 10.5px; }
.kpi-lbl { font-size: 11.5px; color: var(--muted); }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.kpi-val { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.kpi-spark { color: var(--text); opacity: 0.9; flex: none; line-height: 0; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stats4 > div > span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.stats4 b { font-size: 18px; font-weight: 300; white-space: nowrap; }
.stats4 b small { font-size: 10.5px; color: var(--muted); margin-left: 2px; }
.axis { fill: var(--faint); font: 9px var(--font); }
.axis.lbl { font-family: var(--mono); fill: var(--muted); }
.grid { stroke: var(--line); stroke-width: 1; }
.target { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }

/* ---------- rail */
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 8px 6px; text-align: left; padding: 12px 14px; min-height: 86px; }
.mini-ic { grid-column: 1 / -1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.mini-ic.ok { color: var(--ok); background: var(--ok-bg); }
.mini-ic.warn { color: var(--warn); background: var(--warn-bg); }
.mini-ic .ic { width: 13px; height: 13px; }
.mini-lbl { font-size: 12px; align-self: end; display: flex; flex-direction: column; }
.mini-lbl small { font-size: 10.5px; color: var(--muted); }
.mini-num { font-size: 32px; font-weight: 300; line-height: 1; align-self: end; letter-spacing: -0.03em; }
.mini:hover, .vcard:hover { border-color: var(--line-2); }
.eff-target { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin: 12px 0 2px; }
.eff { color: var(--text); display: block; }
.eff .line { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.9; }
.eff .line.below { stroke: var(--warn); opacity: 1; }
.eff .end { fill: currentColor; }
.eff .end-ring { fill: none; stroke: currentColor; opacity: 0.35; }
.vcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vcard { padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; min-width: 0; transition: border-color 0.2s; }
.vc-head { display: flex; justify-content: space-between; gap: 6px; }
.vc-name { font-size: 12.5px; font-weight: 500; }
.vc-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.vc-ship { color: var(--text); }
.ship-side { display: block; }
.ship-side .hull { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.4); stroke-width: 0.8; }
.ship-side .sup { fill: rgba(255, 255, 255, 0.45); }
.ship-side .boxes rect { fill: var(--text); }
.ship-side .wl { stroke: var(--line-2); stroke-dasharray: 2 3; }
.vc-imo { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10.5px; color: var(--muted); padding: 3px 0; border: 1px solid var(--line); border-radius: 6px; }
.vc-badges { display: flex; align-items: center; justify-content: space-between; }
.vc-icons { display: flex; gap: 6px; color: var(--muted); }
.minimap { display: block; background: rgba(0, 0, 0, 0.28); border-radius: 8px; }
.minimap .dots circle { fill: rgba(255, 255, 255, 0.2); }
.minimap .route { fill: none; stroke: var(--text); stroke-width: 1.3; opacity: 0.85; }
.minimap .start { fill: none; stroke: var(--muted); }
.minimap .mm-pin { fill: var(--text); }
.minimap .mm-ring { fill: none; stroke: var(--text); opacity: 0.35; }
.tl-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.tl-bar { position: relative; height: 12px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 5px) center / 100% 7px no-repeat; }
.tl-bar .fill { position: absolute; left: 0; top: 50%; height: 2px; width: var(--p, 0%); background: var(--text); transform: translateY(-50%); transition: width 0.6s; }
.tl-bar .knob { position: absolute; left: var(--p, 0%); top: 50%; width: 10px; height: 10px; border-radius: 3px; background: var(--text); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); transition: left 0.6s; }

/* ---------- KPI strip */
.kpi { padding: 12px 14px; min-width: 0; container-type: inline-size; }
.kpi-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 210px) {
  .kpi .kpi-spark { display: none; }
}
@container (max-width: 150px) {
  .kpi .delta { display: none; }
}
.app[data-tab="berths"] .hud, .app[data-tab="analytics"] .hud {
  grid-template-areas: "rail kpis side" "rail . side" "rail bottom bottom";
}
.app[data-tab="berths"] .meta, .app[data-tab="analytics"] .meta { display: none; }

/* ---------- side panels */
.detail { padding: 16px; }
.d-head { display: flex; justify-content: space-between; gap: 10px; }
.d-title { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
.d-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0; }
.twin { background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px 8px; }
.twin-lbl { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.twin-dim { text-align: right; font-size: 10px; color: var(--muted); }
.ship-top { display: block; }
.ship-top .hull { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.42); stroke-width: 0.8; }
.ship-top .sup { fill: rgba(255, 255, 255, 0.55); }
.ship-top .bay { fill: rgba(169, 207, 224, 0.42); }
.ship-top .bay.done { fill: rgba(255, 255, 255, 0.06); }
.ship-top .bay.work { fill: rgba(94, 234, 212, 0.38); stroke: var(--teal); stroke-width: 0.8; }
.ship-top .row { stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.6; }
.d-sec { margin-top: 14px; }
.d-lbl { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.spec { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line); }
.spec > div { padding: 10px 0; display: flex; flex-direction: column; gap: 3px; }
.spec > div:nth-child(odd) { border-right: 1px solid var(--line); }
.spec > div:nth-child(even) { padding-left: 14px; }
.spec > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.spec span { font-size: 10.5px; color: var(--muted); }
.spec b { font-size: 21px; font-weight: 300; letter-spacing: -0.02em; }
.spec b small { font-size: 10.5px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kvs { display: flex; flex-direction: column; }
.cargo { margin-top: 4px; }
.cargo .kv.head span { color: var(--text); font-weight: 500; }
.bar-row { margin-top: 8px; }
.bar-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.bar-lbl b { color: var(--text); font-weight: 400; }
.tickbar { position: relative; height: 10px; margin-top: 6px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 4px); border-radius: 1px; }
.tickbar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: repeating-linear-gradient(90deg, var(--tick) 0 2px, transparent 2px 4px); transition: width 0.6s; }
.vlist { list-style: none; margin: 10px 0 0; padding: 0; }
.vlist button { width: 100%; display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); text-align: left; border-radius: 6px; }
.vlist button:hover { background: rgba(255, 255, 255, 0.05); }
.vlist .idx { color: var(--faint); font-size: 11px; }
.vlist .nm { font-size: 12.5px; display: flex; flex-direction: column; }
.vlist .nm small { font-size: 10.5px; color: var(--muted); }
.vlist .st { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.trio .lbl { display: block; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.blocks { display: grid; gap: 4px; margin-top: 14px; }
.block-row { display: grid; grid-template-columns: 14px 1fr 36px; gap: 10px; align-items: center; padding: 4px 6px; border-radius: 6px; text-align: left; }
.block-row:hover { background: rgba(255, 255, 255, 0.05); }
.block-row.sel { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line-2); }
.block-row .blk { font-size: 11px; color: var(--muted); }
.block-row .pct { font-size: 11px; text-align: right; }
.block-row .pct.warn { color: var(--warn); }
.seg { display: flex; gap: 2px; }
.seg i { flex: 1; height: 9px; border-radius: 1.5px; background: rgba(255, 255, 255, 0.09); }
.seg i.on { background: rgba(236, 238, 240, 0.72); }
.seg.warn i.on { background: var(--warn); }
.block-info .p-title { margin-bottom: 6px; }
.lanes { display: flex; flex-direction: column; }
.lane { display: grid; grid-template-columns: 24px 28px 1fr 16px 58px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.lane .dir { color: var(--muted); font-size: 11px; }
.lane-q { display: flex; gap: 2px; }
.lane-q i { width: 7px; height: 10px; border-radius: 2px; background: rgba(236, 238, 240, 0.6); }
.lane .q { text-align: right; color: var(--muted); }
.lane .pill { justify-self: end; }

/* ---------- bottom panels */
.wide { padding: 14px 16px; }
.sched-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sched { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; margin-top: 10px; }
.sched-sum { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.sched-sum .lbl { font-size: 11px; color: var(--muted); }
.sched-table { overflow-x: auto; min-width: 0; }
.tr { display: grid; grid-template-columns: minmax(128px, 1.4fr) repeat(5, minmax(68px, 1fr)); gap: 6px; align-items: center; padding: 4px 8px; border-radius: 8px; width: 100%; min-width: 520px; text-align: left; font-size: 12px; }
.tr.th { color: var(--faint); font-size: 10.5px; padding-block: 0 4px; }
button.tr:hover { background: rgba(255, 255, 255, 0.05); }
.tr.sel { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line-2); }
.berth { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.bid { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; max-width: 40ch; }
.bars { display: block; margin-top: 10px; }
.bars .bar { fill: rgba(236, 238, 240, 0.5); }
.bars .bar.today { fill: var(--teal); }
.hbars { display: block; }
.hbars .hbar { fill: rgba(236, 238, 240, 0.6); }
.hbars .hbar.below { fill: var(--warn); }

/* ---------- pins, tooltip, inspect card */
#pins { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; transition: opacity 0.6s; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; transform: translate3d(-9999px, 0, 0); transition: opacity 0.3s; will-change: transform; }
.pin .anchor { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15); }
.pin .stem { position: absolute; left: 0; top: -28px; width: 1px; height: 28px; background: linear-gradient(to top, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.12)); }
.pin .tag { position: absolute; left: 0; top: -28px; transform: translate(-50%, -100%); height: 26px; padding: 0 10px; border-radius: 999px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; white-space: nowrap; transition: background 0.2s, border-color 0.2s; }
.pin .tag .sub { color: var(--muted); }
.pin:hover .tag, .pin.sel .tag { background: var(--glass-strong); border-color: var(--line-2); }
.tooltip { position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; padding: 7px 10px; border-radius: 8px; font-size: 11.5px; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.tooltip span { color: var(--muted); font-size: 10.5px; }
.tooltip b { font-weight: 500; }
.inspect { position: absolute; left: 0; top: 0; z-index: 25; width: 292px; padding: 14px 16px; background: var(--glass-strong); will-change: transform; }
.inspect.in { animation: pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes pop { from { opacity: 0; } }
.ins-head { display: flex; justify-content: space-between; gap: 10px; }
.ins-kind { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.ins-id { font-size: 18px; margin-top: 4px; letter-spacing: 0.01em; }
.ins-id b { color: var(--teal); font-weight: 500; padding: 0 3px; border: 1px solid rgba(94, 234, 212, 0.4); border-radius: 4px; }
.ins-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn { height: 30px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-2); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; transition: background 0.2s; }
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn.ghost { background: transparent; }

/* ---------- menus & palette */
.menu { position: absolute; z-index: 40; top: calc(var(--top) + 48px); right: var(--gr); width: 330px; max-width: calc(100vw - 32px); padding: 6px; border-radius: var(--r); background: var(--glass-strong); }
.menu-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 6px; font-size: 12.5px; font-weight: 500; }
.alert { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 8px; text-align: left; }
.alert .dot { margin-top: 5px; }
.alert:hover { background: rgba(255, 255, 255, 0.06); }
.alert b { display: block; font-size: 12.5px; font-weight: 500; }
.alert small { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.alert .t { font-size: 10.5px; color: var(--faint); }
.switch-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 8px; text-align: left; }
.switch-row:hover { background: rgba(255, 255, 255, 0.05); }
.switch-row b { display: block; font-size: 12.5px; font-weight: 400; }
.switch-row small { display: block; font-size: 11px; color: var(--muted); }
.switch { position: relative; width: 32px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.16); flex: none; transition: background 0.2s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.2s; }
[aria-checked="true"] .switch { background: var(--teal); }
[aria-checked="true"] .switch i { left: 16px; }
.palette { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 9, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; place-items: start center; padding: 14vh max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.pal-box { width: min(580px, 100%); border-radius: var(--r); overflow: hidden; padding: 0; background: var(--glass-strong); }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: 15px var(--font); }
.pal-input input::placeholder { color: var(--faint); }
kbd { font: 10px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 5px; }
.pal-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-group { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 10px 4px; }
.pal-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 13px; text-align: left; }
.pal-item small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item.act, .pal-item:hover { background: rgba(255, 255, 255, 0.08); }
.pal-empty { color: var(--muted); padding: 14px 10px; margin: 0; font-size: 12.5px; }

/* ---------- intro & boot */
.intro { position: absolute; inset: 0; z-index: 15; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.is-intro .intro { visibility: visible; transition: opacity 0.9s ease; }
.intro::before, .intro::after { content: ""; position: absolute; left: 0; right: 0; height: 9vh; background: #000; transition: transform 1s cubic-bezier(0.6, 0, 0.2, 1); }
.intro::before { top: 0; transform: translateY(-100%); }
.intro::after { bottom: 0; transform: translateY(100%); }
.is-intro .intro { opacity: 1; }
.is-intro .intro::before, .is-intro .intro::after { transform: none; }
.intro-brand { position: absolute; left: max(32px, env(safe-area-inset-left, 0px)); bottom: calc(9vh + 32px); display: flex; flex-direction: column; gap: 10px; }
.intro-word { display: flex; align-items: center; gap: 14px; font-size: 44px; font-weight: 300; letter-spacing: -0.035em; line-height: 1; }
.intro-word svg { width: 44px; height: 32px; }
.intro-cap { font: 12px var(--mono); color: var(--muted); }
.skip { pointer-events: auto; position: absolute; right: max(32px, env(safe-area-inset-right, 0px)); bottom: calc(9vh + 32px); }
.is-intro .topbar, .is-intro .hud { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.is-intro .hud { transform: translateY(8px); }
.is-intro #pins { opacity: 0; }
.boot { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 12.5px; transition: opacity 0.4s ease; text-align: center; padding: 24px; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-bar { width: 120px; height: 2px; margin: 14px auto 0; background: var(--line); overflow: hidden; border-radius: 1px; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--text); animation: load 1.2s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- responsive */
@media (max-width: 1280px) {
  :root { --rail: 296px; --side: 316px; }
  .big { font-size: 40px; }
  .tab { padding: 0 11px; }
}
@media (max-width: 1100px) {
  .live-pill .wx, .live-pill .sep, #date { display: none; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: 10px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .hud {
    top: auto; left: 0; right: 0; bottom: 0;
    max-height: 42%;
    display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(12px, env(safe-area-inset-left, 0px));
    background: linear-gradient(to top, rgba(7, 9, 12, 0.94) 75%, rgba(7, 9, 12, 0));
    pointer-events: auto;
    transition: max-height 0.4s ease, opacity 0.8s ease, transform 0.8s ease;
  }
  .sheet-open .hud { max-height: 78%; }
  .sheet-handle { display: flex; position: sticky; top: 0; z-index: 2; justify-content: center; padding: 10px 0 4px; flex: none; }
  .sheet-handle span { width: 44px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
  #side { order: 1; overflow: visible; max-height: none; flex: none; }
  #bottom { order: 2; flex: none; }
  #kpis { order: 3; display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(190px, 70%); overflow-x: auto; flex: none; }
  #rail { order: 4; overflow: visible; flex: none; }
  .meta { display: none; }
  .sched { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .inspect { top: calc(var(--top) + 96px); left: 12px; right: 12px; width: auto; transform: none !important; }
  .menu { right: 12px; left: 12px; width: auto; max-width: none; }
  .pin .tag { font-size: 10.5px; height: 22px; padding: 0 8px; }
  .pin .tag .sub { display: none; }
  .brand span { font-size: 14px; }
  .intro-word { font-size: 32px; }
  .skip { bottom: calc(9vh + 90px); }
}
@media (max-width: 420px) {
  .live-pill { padding: 0 10px; }
  .icon-btn { width: 34px; height: 34px; }
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vcards { grid-template-columns: 1fr; }
}
/* ---------- data panel */
.admin {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(4, 6, 9, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.adm-box {
  width: min(1120px, 100%); height: min(800px, 100%); display: flex; flex-direction: column; overflow: hidden;
  background: #101318; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: pop 0.3s ease;
}
.adm-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.adm-head > div:first-child { flex: 1; min-width: 0; }
.adm-title { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.adm-sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.adm-discard { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--warn); }
.adm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.adm-nav { border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.adm-tab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); text-align: left; }
.adm-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.adm-tab[aria-selected="true"] { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.adm-tab .cnt { font: 11px var(--mono); color: var(--faint); }
.adm-main { overflow-y: auto; padding: 18px 22px 0; outline: none; }
.adm-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.adm-toolbar h3 { margin: 0; font-size: 19px; font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
.adm-toolbar p { margin: 5px 0 0; font-size: 12px; color: var(--muted); max-width: 72ch; line-height: 1.45; }
.adm-actions { display: flex; gap: 8px; flex: none; }
.btn.primary { background: var(--text); color: #0b0d10; border-color: transparent; font-weight: 500; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); }
.btn.ghost.danger { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: default; }
.adm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.adm-table th, .adm-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.adm-table thead th { font-size: 11px; color: var(--muted); font-weight: 500; background: rgba(255, 255, 255, 0.02); }
.adm-table tbody th { font-weight: 500; }
.adm-table tbody tr:last-child > * { border-bottom: 0; }
.adm-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.adm-table td small { display: block; color: var(--faint); font-size: 10.5px; margin-top: 2px; }
.adm-table.grid td { padding: 6px 8px; }
.adm-table.grid input[type="number"] { min-width: 72px; }
.adm-table.grid input[type="text"] { min-width: 120px; }
.lnk { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-align: left; }
.lnk:hover { text-decoration-color: var(--text); }
.back { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.back:hover { color: var(--text); }
.adm-empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.adm-note, .adm-stale { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px; background: var(--warn-bg); color: var(--warn); }
.adm-saved { font-size: 11.5px; color: var(--faint); margin: 12px 0 20px; }
.grp { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 0 0 12px; min-width: 0; }
.grp legend { padding: 0 6px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.grp > .hint { margin: 0 0 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fl { font-size: 11.5px; color: var(--muted); }
.fl i { color: var(--warn); font-style: normal; }
.admin input[type="text"], .admin input[type="number"], .admin input[type="time"], .admin select, .admin textarea {
  width: 100%; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3); color: var(--text); font: 13px var(--font);
}
.admin textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.4; }
.admin input[type="number"] { font-family: var(--mono); font-size: 12.5px; }
.admin input:focus, .admin select:focus, .admin textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15); }
.admin [aria-invalid="true"] { border-color: var(--bad) !important; }
.admin input:disabled, .admin select:disabled, .admin textarea:disabled { opacity: 0.55; }
.admin input[type="color"] { width: 56px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; }
.fld.check { flex-direction: row; align-items: center; gap: 8px; }
.fld.check input { width: 16px; height: 16px; accent-color: var(--teal); flex: none; }
.fld.check .fl { color: var(--text); font-size: 12.5px; }
.hint { font-size: 10.5px; color: var(--faint); line-height: 1.35; }
.hint.warn { color: var(--warn); }
.err { font-size: 11px; color: var(--bad); }
.form-err { display: block; margin-top: 10px; }
.adm-savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; margin-top: 4px; background: linear-gradient(to top, #101318 72%, rgba(16, 19, 24, 0)); }
.adm-status { font-size: 12px; color: var(--muted); }
.adm-status.bad { color: var(--bad); }
.adm-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bad-bg); font-size: 12.5px; }
.adm-confirm span { flex: 1; min-width: 200px; }
.adm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: start; }
.adm-cols h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; }
.adm-cols .adm-table { border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; }
.occ { display: flex; align-items: center; gap: 8px; }
.occ input[type="range"] { flex: 1; min-width: 90px; accent-color: var(--teal); }
.occ input[type="number"] { width: 72px; }
.adm-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.adm-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.adm-list li:last-child { border-bottom: 0; }
.adm-list .lnk { flex: 1; }
.muted { color: var(--muted); }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 9px 14px; border-radius: 999px; background: #161a20; border: 1px solid var(--line-2); font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: rise 0.3s ease; transition: opacity 0.4s, transform 0.4s; white-space: nowrap; }
.toast.ok::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: middle; }
.toast.out { opacity: 0; transform: translateY(6px); }
.no-anim .panel, .no-anim .chips, .no-anim .mini-row, .no-anim .vcards { animation: none !important; }
.panel.empty { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.vlist .empty { color: var(--muted); font-size: 12px; padding: 12px 6px; border-top: 1px solid var(--line); }
.free { color: var(--faint); }
@media (max-width: 760px) {
  .adm-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .adm-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-tab { flex: none; }
  .adm-head { flex-wrap: wrap; padding: 14px 16px; }
  .adm-discard { order: 3; width: 100%; flex-wrap: wrap; }
  .adm-main { padding: 14px 14px 0; }
  .adm-box { height: 100%; }
  .adm-toolbar { flex-direction: column; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}

/* =================================================================== freight site */
:root { --gold: #f2c46d; --gold-bg: rgba(242, 196, 109, 0.14); --site-w: 1240px; }
.app[data-mode="site"] .hud, .app[data-mode="site"] #pins, .app[data-mode="site"] .port-only,
.app[data-mode="site"] .inspect, .app[data-mode="site"] .tooltip { display: none !important; }
.app[data-mode="port"] .site, .app[data-mode="port"] .site-only, .app[data-mode="port"] .compare-tray { display: none !important; }
.is-intro .site { opacity: 0; pointer-events: none; }
.site { position: absolute; inset: 0; z-index: 8; transition: opacity 0.5s ease; }
.site::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.9) 0%, rgba(5, 7, 10, 0.62) 34%, rgba(5, 7, 10, 0.08) 62%, rgba(5, 7, 10, 0) 100%),
    linear-gradient(to top, rgba(5, 7, 10, 0.9) 0%, rgba(5, 7, 10, 0) 38%);
}
.site-main { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; scroll-padding-top: 90px; }
.site-main { transition: background-color 0.6s ease; }
.site-inner.enter { animation: page-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
/* inner pages keep the live port visible behind the content, darker on the reading side */
.site-main[data-page="schedules"], .site-main[data-page="offers"] { background: linear-gradient(90deg, rgba(6, 8, 11, 0.78) 0%, rgba(6, 8, 11, 0.6) 55%, rgba(6, 8, 11, 0.42) 100%); }
.site-inner {
  max-width: var(--site-w); margin: 0 auto; padding-top: calc(var(--top) + 84px); padding-bottom: 56px;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.eyebrow { margin: 0 0 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); font-weight: 500; }
.muted { color: var(--muted); }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.sel { user-select: all; }

/* top bar: main navigation */
.mainnav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%); }
.nav-btn { height: 30px; padding: 0 15px; border-radius: 999px; color: var(--muted); font-size: 12.5px; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.nav-btn:hover { color: var(--text); }
.nav-btn[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.app[data-mode="port"] .tabs { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); }
.app[data-mode="port"] .hud { top: calc(var(--top) + 100px); }
.app[data-mode="port"] .menu { top: calc(var(--top) + 96px); }
.quote-btn { height: 38px; border-radius: 999px; padding: 0 16px; }
/* a soft backdrop behind the top bar so scrolled site content never runs under the navigation */
.app[data-mode="site"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(-1 * var(--gl)); right: calc(-1 * var(--gr)); top: calc(-1 * var(--top)); bottom: -12px;
  background: linear-gradient(to bottom, rgba(6, 8, 11, 0.94), rgba(6, 8, 11, 0.78));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity 0.3s;
}
.app[data-mode="site"].scrolled .topbar::before { opacity: 1; }

/* hero */
.hero { min-height: min(94vh, 900px); display: flex; flex-direction: column; justify-content: flex-end; gap: 26px; }
.hero-copy { max-width: 620px; }
.hero-title { margin: 0; font-size: clamp(34px, 4.6vw, 58px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
.lede { margin: 18px 0 0; font-size: 15.5px; line-height: 1.55; color: #c5cad0; max-width: 56ch; }
.msg-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; max-width: 600px; }
.msg-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); }
.msg-list .ic { color: var(--teal); }
.search-card { padding: 18px 20px 16px; background: rgba(13, 16, 20, 0.78); }

/* search form */
.sf-title { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.sf-grid { display: grid; grid-template-columns: 1.15fr 1.15fr 0.9fr 1.3fr; gap: 12px 14px; align-items: end; }
.sform.compact .sf-grid { grid-template-columns: 1.1fr 1.1fr 0.85fr 1.25fr; }
.sf { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.sf > span, .sf > legend { font-size: 11px; color: var(--muted); padding: 0; }
.sf-go { grid-column: span 2; height: 42px; justify-content: center; font-size: 13.5px; }
.seg-row { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-2); }
.seg-opt { flex: 1; position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt span { display: grid; place-items: center; height: 34px; border-radius: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; padding: 0 6px; transition: background 0.2s, color 0.2s; }
.seg-opt input:checked + span { background: var(--text); color: #0b0d10; font-weight: 500; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 1px; }
.seg-opt.off span { opacity: 0.35; text-decoration: line-through; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.3); }
.stepper button { width: 36px; font-size: 16px; color: var(--muted); }
.stepper button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0 !important; background: transparent !important; box-shadow: none !important; }
port-picker { position: relative; display: block; min-width: 0; }
/* each panel is its own layer, so the open port list needs its panel lifted above the panels after it */
.panel:has(.pp-list:not([hidden])) { position: relative; z-index: 30; }
.pp-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 280px; max-height: min(300px, 45vh); margin: 0; padding: 4px; overflow-y: auto; list-style: none; border: 1px solid var(--line-2); border-radius: 10px; background: #101318; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.pp-item { padding: 7px 9px; border-radius: 7px; font-size: 13px; line-height: 1.3; color: var(--text); cursor: pointer; }
.pp-item:hover, .pp-item.active { background: rgba(255, 255, 255, 0.08); }
.pp-item[aria-selected="true"] { color: var(--teal); }
.pp-group { padding: 9px 9px 4px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.pp-none { padding: 9px; font-size: 12.5px; color: var(--muted); }
.sf-hint { margin: 10px 0 0; font-size: 11.5px; color: var(--warn); }
.sf-hint:empty { display: none; }
.sf-err { margin: 10px 0 0; font-size: 12px; color: var(--bad); }
.sform select, .sform input[type="date"], .sform input[type="number"], .sform port-picker input,
.modal input, .modal select, .modal textarea {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.32); color: var(--text); font: 13.5px var(--font);
}
.modal textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.sform :is(select, input):focus, .modal :is(input, select, textarea):focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15); }
.modal [aria-invalid="true"] { border-color: var(--bad) !important; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* sections */
.sec { margin-top: 76px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 30px; font-weight: 300; letter-spacing: -0.025em; }
.sec-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 44ch; }
.banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 40px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; background: linear-gradient(120deg, rgba(94, 234, 212, 0.1), rgba(16, 19, 23, 0.72) 55%); }
.banner h3 { margin: 0; font-size: 16px; font-weight: 500; }
.banner p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.banner .btn { flex: none; }

/* offer cards */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.offer { display: flex; flex-direction: column; gap: 10px; padding: 18px; position: relative; overflow: hidden; }
.offer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent 70%); }
.offer-top { display: flex; align-items: center; gap: 8px; }
.offer-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.offer h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.offer-route { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.offer-route span { color: var(--muted); display: flex; }
.offer-meta { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.offer-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.offer-price b { font-size: 30px; font-weight: 300; letter-spacing: -0.03em; }
.offer-price s, .price s { color: var(--faint); font-size: 14px; }
.offer-price .pct { font-size: 11.5px; font-weight: 600; color: #15110a; background: var(--gold); padding: 2px 7px; border-radius: 999px; }
.offer-price small { width: 100%; font-size: 11px; color: var(--muted); }
.countdown { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--gold); background: var(--gold-bg); border-radius: 8px; padding: 7px 10px; }
.countdown b { font-family: var(--mono); font-weight: 500; }
.offer-dl { margin: 0; display: grid; gap: 6px; font-size: 12px; }
.offer-dl div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.offer-dl dt { color: var(--muted); }
.offer-dl dd { margin: 0; }
.terms summary, .charges summary, .rule summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.terms summary::-webkit-details-marker, .charges summary::-webkit-details-marker, .rule summary::-webkit-details-marker { display: none; }
.terms summary::after, .charges summary::after { content: "+"; margin-left: auto; font-size: 14px; }
.terms[open] summary::after, .charges[open] summary::after { content: "–"; }
.terms p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.offer-cta { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.offer-cta .btn { flex: 1; justify-content: center; height: 36px; }

/* featured routes */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.route-card { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; transition: border-color 0.2s, transform 0.2s; }
.route-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.rc-ports { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.rc-ports b { font-weight: 500; }
.rc-ports .ic { color: var(--muted); }
.rc-note { font-size: 11.5px; color: var(--muted); }
.rc-price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.rc-price span, .rc-price small { font-size: 11.5px; color: var(--muted); }
.rc-price b { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
.rc-stats { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

/* how it works, contact, footer */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { counter-increment: s; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(13, 16, 20, 0.6); display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 12px var(--mono); color: var(--teal); }
.steps b { font-size: 15px; font-weight: 500; }
.steps span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.contact-card p { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.contact-card p .ic { color: var(--muted); }
.contact-card.cta p { color: var(--muted); line-height: 1.5; display: block; }
.cc-row { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; font-size: 13.5px; }
.cc-row > .ic { color: var(--teal); margin-top: 2px; }
.cc-row > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cc-row a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; overflow-wrap: anywhere; }
.cc-row a:hover { text-decoration-color: var(--teal); }
.cc-row b { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cc-addr { line-height: 1.5; color: var(--text); }
.cc-mail { display: flex; align-items: center; gap: 8px; }
.map-btn { align-self: flex-start; margin-top: 4px; gap: 6px; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.foot-contact a { color: var(--text); text-decoration: none; }
.foot-contact a:hover { color: var(--teal); }
.foot-contact span { color: var(--faint); }
.foot-link { color: inherit; }
.foot-link:hover { color: var(--teal); }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.site-foot { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.site-foot p { margin: 0 0 6px; max-width: 90ch; }
.btn.wa { background: rgba(37, 211, 102, 0.12); border-color: rgba(37, 211, 102, 0.35); color: #7ee2a8; text-decoration: none; }
.btn.wa:hover { background: rgba(37, 211, 102, 0.2); }
.btn.sm { height: 28px; font-size: 11.5px; padding: 0 10px; }
.btn.ghost { background: transparent; }
a.btn { color: inherit; }

/* results page */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 300; letter-spacing: -0.03em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .arrow { color: var(--muted); display: flex; }
.page-head .arrow .ic { width: 22px; height: 22px; }
.page-lede { color: var(--muted); font-size: 13px; max-width: 70ch; margin: -6px 0 20px; line-height: 1.5; }
.search-wide { padding: 16px 18px; margin-bottom: 18px; background: rgba(13, 16, 20, 0.85); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hl { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; transition: border-color 0.2s; }
.hl:not(:disabled):hover { border-color: var(--line-2); }
.hl:first-child:not(.empty) { border-color: rgba(94, 234, 212, 0.45); background: linear-gradient(135deg, rgba(94, 234, 212, 0.1), rgba(16, 19, 23, 0.75) 60%); }
.hl-k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.hl:first-child .hl-k { color: var(--teal); }
.hl b { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
.hl b small { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.hl > span:last-child { font-size: 12px; color: var(--muted); }
.rule { margin: 12px 0 20px; }
.rule p { font-size: 12px; color: var(--muted); line-height: 1.55; max-width: 100ch; margin: 8px 0 0; }
.res-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.res-filters { position: sticky; top: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.res-filters h3 { margin: 8px 0 2px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.res-filters h3:first-child { margin-top: 0; }
.filt { display: block; }
.filt > summary { display: none; }
.filt .chk { margin: 7px 0; }
.filt h3 { margin: 14px 0 4px; }
.filt h3:first-of-type { margin-top: 0; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.chk input { accent-color: var(--teal); width: 15px; height: 15px; }
.res-count { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.res-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.empty-state { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.empty-state span { color: var(--muted); font-size: 13px; }
.disclaimer { font-size: 11.5px; color: var(--muted); margin: 24px 0 0; line-height: 1.55; max-width: 100ch; }

/* sailing card */
.sail { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.sail.is-best { border-color: rgba(94, 234, 212, 0.5); box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.15), 0 14px 34px rgba(0, 0, 0, 0.32); }
.sail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sail-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sail-line b { font-size: 14px; font-weight: 500; }
.sail-line small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.line-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 600 12px var(--mono); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); flex: none; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badges > span, .sm[class^="badge-"] { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.badges .ic { width: 12px; height: 12px; }
.badge-best { background: var(--teal); color: #06231f; }
.badge-fast { background: var(--warn-bg); color: var(--warn); }
.badge-direct { background: var(--ok-bg); color: var(--ok); }
.badge-ts { background: var(--chip); color: var(--muted); }
.badge-offer { background: var(--gold-bg); color: var(--gold); }
.sm[class^="badge-"] { height: 18px; padding: 0 7px; font-size: 10px; }
.pill.sample { font-weight: 500; }
.sail-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: center; }
.leg { display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; align-items: center; gap: 14px; }
.leg-pt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.leg-pt b { font-size: 18px; font-weight: 400; letter-spacing: -0.01em; }
.leg-pt span { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.leg-pt small { font-size: 12px; color: #c5cad0; }
.leg-pt small i { font-style: normal; color: var(--faint); font-size: 10.5px; }
.leg-pt.end { text-align: right; align-items: flex-end; }
.leg-line { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; }
.leg-line i { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: linear-gradient(90deg, var(--teal), rgba(94, 234, 212, 0.35)); border-radius: 2px; }
.leg-line i::before, .leg-line i::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.leg-line i::before { left: -2px; }
.leg-line i::after { right: -2px; background: transparent; border: 2px solid var(--teal); top: -4px; width: 6px; height: 6px; }
.leg-line span { position: relative; top: -14px; font-size: 11.5px; color: var(--text); background: #12161b; padding: 0 8px; border-radius: 999px; }
.leg-line.ts i { background: repeating-linear-gradient(90deg, var(--teal) 0 8px, transparent 8px 13px); }
.leg-ts { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 6px); font-style: normal; font-size: 10.5px; color: var(--warn); white-space: nowrap; }
.leg-ts::before { content: ""; position: absolute; left: 50%; top: -10px; width: 8px; height: 8px; background: var(--warn); transform: translateX(-50%) rotate(45deg); }
.sail-price { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.price b { font-size: 28px; font-weight: 300; letter-spacing: -0.03em; }
.price small { width: 100%; font-size: 11px; color: var(--muted); }
.price.none b { font-size: 18px; font-weight: 400; }
.total { font-size: 12px; color: #c5cad0; }
.validity, .offer-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.validity b { color: var(--text); font-weight: 500; }
.offer-note { color: var(--gold); }
.not-compared { display: flex; gap: 6px; align-items: flex-start; margin: 2px 0 0; font-size: 11px; color: var(--warn); line-height: 1.4; }
.ts-detail { margin: 0; font-size: 11.5px; color: var(--muted); }
.charges { border-top: 1px solid var(--line); padding-top: 10px; }
.charges table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.charges td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.charges td:nth-child(2) { text-align: right; white-space: nowrap; }
.charges tr.sum td { font-weight: 500; color: var(--text); border-bottom-color: var(--line-2); }
.charges tr.grp th { padding: 12px 8px 5px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11.5px; font-weight: 500; color: var(--text); }
.charges p { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.charges p b { color: var(--text); font-weight: 500; }
.sail-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.cmp { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.cmp input { accent-color: var(--teal); width: 15px; height: 15px; }
.closed-note { font-size: 12px; color: var(--bad); align-self: center; }

/* compare tray & table */
.compare-tray { position: fixed; z-index: 30; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; font-size: 12.5px; background: var(--glass-strong); white-space: nowrap; }
.cmp-wrap { overflow-x: auto; }
.cmp-table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 170px; }
.cmp-table thead th { font-size: 13px; font-weight: 500; }
.cmp-table thead th small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.cmp-table tbody th { color: var(--muted); font-weight: 400; min-width: 150px; position: sticky; left: 0; background: #12161b; }

/* modals */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(4, 6, 9, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal-box { width: min(680px, 100%); max-height: 100%; overflow-y: auto; background: #101318; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); outline: none; animation: pop 0.3s ease; }
.modal.wide .modal-box { width: min(1120px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #101318; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.modal-body { padding: 18px 20px 20px; }
.enq-ctx { margin: 0 0 16px; display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: rgba(94, 234, 212, 0.06); border: 1px solid rgba(94, 234, 212, 0.18); font-size: 12.5px; }
.enq-ctx div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.enq-ctx dt { color: var(--muted); }
.enq-ctx dd { margin: 0; }
.enq-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.enq-form .fld .fl { font-size: 11.5px; }
.fine { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; }
.enq-form .wide { grid-column: 1 / -1; }
.enq-sec { margin: 8px 0 -4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.bk-shipper { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.enq-ack { padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.mr-ack { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; }
.ec-booking { display: grid; gap: 6px; margin: 8px 0 10px; font-size: 12px; }
.ec-booking div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.ec-booking dt { color: var(--muted); }
.ec-booking dd { margin: 0; white-space: normal; }
.enq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.enq-actions .btn { height: 38px; }
.enq-status { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.enq-status:empty { display: none; }
.enq-done { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.enq-done > .ic { width: 28px; height: 28px; color: var(--ok); }
.enq-done h3 { margin: 0; font-size: 20px; font-weight: 400; }
.enq-done p { margin: 0; font-size: 13px; color: #c5cad0; line-height: 1.55; }

/* data panel additions */
.adm-group { padding: 12px 10px 4px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.adm-group:first-child { padding-top: 2px; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.adm-filters input[type="search"] { flex: 1; min-width: 180px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); color: var(--text); font: 13px var(--font); }
.adm-filters select { width: auto !important; }
.adm-table tr.inactive td { opacity: 0.55; }
.adm-table td small { white-space: normal; }
.enq-table td { white-space: normal; min-width: 120px; vertical-align: top; }
.switch-btn { display: inline-flex; }
.switch-btn[aria-checked="true"] .switch { background: var(--teal); }
.switch-btn[aria-checked="true"] .switch i { left: 16px; }
.switch-btn:disabled { opacity: 0.5; cursor: default; }
.chk-flag { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; font: 600 10.5px var(--mono); cursor: help; }
.chk-flag.bad { background: var(--bad-bg); color: var(--bad); }
.chk-flag.warn { background: var(--warn-bg); color: var(--warn); }
.chk-flag.info { background: var(--info-bg); color: var(--teal); }
.sr { font-size: 0; }
.adm-note.info { background: var(--info-bg); color: #b9efe5; line-height: 1.55; }
.adm-note .mono { font-size: 11.5px; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ov-tile { text-align: left; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.ov-tile b { font-size: 28px; font-weight: 300; }
.ov-tile span { font-size: 11.5px; color: var(--muted); }
.ov-h { margin: 22px 0 10px; font-size: 13px; font-weight: 500; }
.warn-list { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.warn-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.warn-list li:last-child { border-bottom: 0; }
.warn-list .lnk { font-size: 11.5px; white-space: nowrap; }
.sample-box .btn { margin-top: 8px; }
.charges-ed .chg-rows { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.chg-table { container-type: inline-size; }
.chg-row { display: grid; grid-template-columns: minmax(150px, 1fr) 88px 116px 70px 90px 56px 26px; gap: 8px; align-items: center; }
.chg-table.multi .chg-row { grid-template-columns: minmax(150px, 1fr) 88px 116px 70px repeat(3, 72px) 56px 26px; }
.chg-head { margin-top: 8px; font-size: 11px; color: var(--muted); }
.chg-add { display: flex; gap: 8px; flex-wrap: wrap; }
/* too narrow for one line: name, then group, then the amounts */
@container (max-width: 790px) {
  .chg-row, .chg-table.multi .chg-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .chg-head { display: none; }
  .chg-name { grid-column: 1 / -1; }
  .chg-amt { grid-row: 3; }
  .chg-inc { grid-area: 4 / 1 / 5 / 3; }
  .chg-row > :last-child { grid-area: 4 / 3; justify-self: end; }
}
.chg-row input[type="text"], .chg-row input[type="number"], .chg-row select { height: 32px !important; }
.chg-inc { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chg-inc input { accent-color: var(--teal); }
.import-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.cv-table td { vertical-align: top; }
.cv-table input, .cv-table select { height: 30px !important; min-width: 118px; }
.cv-table .cv-port { min-width: 200px; }
.cv-table input[type="checkbox"] { min-width: 0; height: auto !important; accent-color: var(--teal); }
.cv-table tr.cv-bad td { background: rgba(248, 113, 113, 0.07); }
.cv-note { min-width: 190px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.cv-note b { color: var(--bad); font-weight: 500; }
.cv-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; font-size: 12.5px; }
.cv-bulk input { max-width: 300px; }
.btn.disabled { opacity: 0.6; pointer-events: none; }
.cv-map { margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cv-map summary { cursor: pointer; font-size: 12.5px; }
.cv-map .hint { margin: 8px 0; }
.cv-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.cv-map-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.import-sum p { font-size: 13px; }
.import-errs { margin: 0 0 12px; padding-left: 18px; font-size: 12px; color: var(--bad); line-height: 1.6; max-height: 260px; overflow-y: auto; }
.row-sep { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--line); }
.row-sep:last-of-type { border-bottom: 0; }
.adm-mini { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.7; color: #c5cad0; }
.admin input[type="date"], .admin input[type="datetime-local"], .admin input[type="email"] {
  width: 100%; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); color: var(--text); font: 13px var(--font);
}
.admin input[readonly] { opacity: 0.7; }

/* site: tablet and phone */
@media (max-width: 1100px) {
  .sf-grid, .sform.compact .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sail-body { grid-template-columns: 1fr; }
  .sail-price { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .res-layout { grid-template-columns: 1fr; }
  .res-filters { position: static; padding: 12px 14px; }
  .filt > summary { display: flex; cursor: pointer; font-size: 13px; list-style: none; align-items: center; justify-content: space-between; }
  .filt > summary::-webkit-details-marker { display: none; }
  .filt > summary::after { content: "+"; color: var(--muted); }
  .filt[open] > summary::after { content: "–"; }
  .filt[open] > summary { margin-bottom: 8px; }
  .filt .chk { display: inline-flex; margin: 5px 16px 5px 0; }
  .filt h3 { margin: 10px 0 2px; }
  .steps { grid-template-columns: 1fr; }
  .app[data-mode="port"] .tabs { position: static; transform: none; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .mainnav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .nav-btn { flex: none; }
  .app[data-mode="port"] .tabs { grid-row: 3; }
  .quote-btn { height: 34px; padding: 0 12px; font-size: 12px; }
  .site::before { background: linear-gradient(to bottom, rgba(5, 7, 10, 0.55) 0%, rgba(5, 7, 10, 0.25) 30%, rgba(5, 7, 10, 0.88) 62%, rgba(5, 7, 10, 0.94) 100%); }
  .site-inner { padding-top: calc(var(--top) + 118px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero { min-height: auto; padding-top: 34vh; }
  .msg-list { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .enq-form { grid-template-columns: 1fr; }
  .enq-ctx div { grid-template-columns: 1fr; gap: 2px; }
  .offer-grid, .route-grid, .banners { grid-template-columns: 1fr; }
  .sec { margin-top: 52px; }
  .sec-head h2 { font-size: 24px; }
  .compare-tray { left: 12px; right: 12px; transform: none; justify-content: space-between; }
}
@media (max-width: 560px) {
  .sf-grid, .sform.compact .sf-grid { grid-template-columns: 1fr; }
  .sf-go { grid-column: auto; }
  .pp-list { min-width: 0; }
  port-picker input { font-size: 16px !important; }
  .leg { grid-template-columns: 1fr; gap: 8px; }
  .leg-pt.end { text-align: left; align-items: flex-start; }
  .leg-line { height: 30px; }
  .sail-cta .cta-row { width: 100%; }
  .sail-cta .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  /* phones: keep the brand name and the quote button in the header, and fit all five menu
     items across the screen instead of cutting the last one off */
  .quote-btn { height: 32px; padding: 0 11px; font-size: 11.5px; }
  .app[data-mode="site"] .brand span { display: inline; font-size: 14px; }
  .mainnav { justify-content: space-between; }
  .nav-btn { padding: 0 9px; font-size: 12px; }
  .banner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =================================================================== performance */
/* Over the near-solid inner pages a blur adds nothing visible but still costs a full
   re-blur every time the scene behind redraws. */
.site-main[data-page="schedules"] *, .site-main[data-page="offers"] * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* without the blur, cards there use a near-solid fill so text stays easy to read over the scene */
.site-main[data-page="schedules"] .panel, .site-main[data-page="offers"] .panel { background: rgba(14, 17, 21, 0.9); }
/* Set by main.js when the device can't hold the frame rate even at the lowest resolution. */
.app.lite { --glass: rgba(16, 19, 23, 0.88); }
.app.lite *, .app.lite *::before { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* =================================================================== accounts */
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #06201c; background: linear-gradient(140deg, #8ff5e4, #3fb9a8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; margin-right: 8px; vertical-align: middle; }
.av.lg { width: 54px; height: 54px; font-size: 18px; }
.av.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.role-pill { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.role-pill.admin { color: var(--gold); border-color: rgba(242, 196, 109, 0.35); background: var(--gold-bg); }
.role-pill.sales { color: var(--teal); border-color: rgba(94, 234, 212, 0.35); background: rgba(94, 234, 212, 0.1); }

/* top bar: account button and menu */
.acct { position: relative; }
.acct-btn { height: 38px; padding: 0 14px 0 12px; border-radius: 999px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: var(--glass); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%); transition: background 0.2s, border-color 0.2s; }
.acct-btn:hover { background: rgba(40, 44, 50, 0.85); }
.acct-btn.in { padding: 0 12px 0 5px; }
.acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: 270px; padding: 6px; border-radius: var(--r); background: var(--glass-strong); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: pop-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); transform-origin: top right; }
.acct-menu[hidden] { display: none; }
.am-head { display: flex; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.am-head .av { width: 36px; height: 36px; font-size: 13px; }
.am-head div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.am-head b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-head small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-head .role-pill { align-self: flex-start; }
.acct-menu [role="menuitem"] { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text); text-align: left; }
.acct-menu [role="menuitem"]:hover, .acct-menu [role="menuitem"]:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
.acct-menu [role="menuitem"] .ic { color: var(--muted); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }

/* sign-in screen */
.auth { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); background: rgba(3, 5, 8, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade-in 0.3s ease; overflow-y: auto; }
.auth[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.auth-box { width: min(940px, 100%); min-height: min(640px, calc(100dvh - 32px)); display: grid; grid-template-columns: 1fr 1.08fr; border-radius: 22px; overflow: hidden; background: #0c0f13; border: 1px solid var(--line-2); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(94, 234, 212, 0.04); animation: card-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.auth.compact .auth-box { width: min(560px, 100%); grid-template-columns: 1fr; }
.auth.compact .auth-art { display: none; }
.auth-art { position: relative; overflow: hidden; min-height: 280px; }
.aa { position: absolute; inset: 0; width: 100%; height: 100%; }
.aa-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 30px 30px; background: linear-gradient(to top, rgba(4, 7, 11, 0.97) 62%, rgba(4, 7, 11, 0)); }
.aa-copy h3 { margin: 14px 0 14px; font-size: 22px; line-height: 1.22; font-weight: 400; letter-spacing: -0.015em; max-width: 340px; }
.aa-copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; color: var(--muted); }
.aa-copy li { display: flex; gap: 8px; align-items: center; }
.aa-copy li .ic { color: var(--teal); }
.aa-ship { animation: aa-bob 6s ease-in-out infinite; transform-origin: 230px 400px; }
@keyframes aa-bob { 50% { transform: translateY(3px) rotate(-0.6deg); } }
.aa-smoke circle { animation: aa-smoke 4.5s ease-out infinite; opacity: 0; transform-box: fill-box; transform-origin: center; }
.aa-smoke circle:nth-child(2) { animation-delay: 1.5s; }
.aa-smoke circle:nth-child(3) { animation-delay: 3s; }
@keyframes aa-smoke { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 25% { opacity: 0.45; } 100% { opacity: 0; transform: translate(-26px, -34px) scale(1.8); } }
.aa-hook { animation: aa-lift 7s ease-in-out infinite; }
@keyframes aa-lift { 0%, 100% { transform: translate(0, 0); } 35% { transform: translate(0, -46px); } 60% { transform: translate(28px, -46px); } 80% { transform: translate(28px, 0); } }
.aa-glint rect { animation: aa-glint 2.6s ease-in-out infinite; animation-delay: var(--d); opacity: 0.25; }
@keyframes aa-glint { 50% { opacity: 0.9; } }
.aa-city circle { animation: aa-twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes aa-twinkle { 50% { opacity: 0.35; } }
.aa-wave { animation: aa-wave 7s ease-in-out infinite; }
@keyframes aa-wave { 50% { transform: translateX(-14px); } }

.auth-card { position: relative; padding: 30px 34px 26px; display: flex; flex-direction: column; overflow-y: auto; max-height: calc(100dvh - 32px); }
.auth-x { position: absolute; top: 16px; right: 16px; z-index: 2; width: 30px; height: 30px; }
.auth-in { display: flex; flex-direction: column; gap: 12px; }
.auth-in.enter { animation: view-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes view-in { from { opacity: 0; transform: translateX(14px); } }
.au-brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }
.au-brand svg { width: 26px; height: 20px; color: var(--teal); }
.auth-card .au-brand { margin-bottom: 4px; }
.auth-in h2 { margin: 2px 0 0; font-size: 25px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }
.au-sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.au-sub b { color: var(--text); font-weight: 500; }
.au-demo, .au-error { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; font-size: 11.5px; line-height: 1.45; }
.au-demo { background: rgba(242, 196, 109, 0.09); border: 1px solid rgba(242, 196, 109, 0.25); color: #f4d9a2; }
.au-demo.code { background: rgba(94, 234, 212, 0.08); border-color: rgba(94, 234, 212, 0.3); color: var(--text); }
.au-demo.code b { color: var(--teal); font-size: 14px; letter-spacing: 0.12em; }
.au-error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca; }
.au-error[hidden] { display: none; }
.au-demo .ic, .au-error .ic { flex: none; margin-top: 1px; }
.au-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-top: 4px; }
.au-tabs button { position: relative; z-index: 1; height: 34px; border-radius: 9px; font-size: 13px; color: var(--muted); transition: color 0.25s; }
.au-tabs button[aria-selected="true"] { color: var(--text); }
.au-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transform: translateX(calc(var(--x) * 100%)); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.au-google { height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; font-size: 13.5px; font-weight: 500; transition: transform 0.15s, box-shadow 0.2s; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); }
.au-google:hover { box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.au-or { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.12em; }
.au-or::before, .au-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.au-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.au-seg button { height: 38px; border-radius: 10px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; color: var(--muted); transition: all 0.2s; }
.au-seg button[aria-checked="true"] { color: var(--text); border-color: rgba(94, 234, 212, 0.55); background: rgba(94, 234, 212, 0.08); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.08); }
.au-seg.sm button { height: 32px; font-size: 12px; }
.au-form { display: grid; gap: 11px; }
.au-form.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.auth input:not([type="checkbox"]), .auth select { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text); font: 14px var(--font); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.auth input:focus, .auth select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.16); background: rgba(255, 255, 255, 0.05); }
.auth input[readonly] { color: var(--muted); background: rgba(255, 255, 255, 0.02); }
.auth [aria-invalid="true"] { border-color: var(--bad) !important; }
.auth .fld.good input { border-color: rgba(74, 222, 128, 0.6); }
.au-phone { display: grid; grid-template-columns: 116px 1fr; gap: 6px; position: relative; }
.au-phone select { padding: 0 8px; font-size: 13px; }
.au-verified { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--ok); }
.au-pw { position: relative; display: block; }
.au-pw input { padding-right: 42px; }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.au-eye.on, .au-eye:hover { color: var(--text); }
.au-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.au-meter i { height: 3px; border-radius: 2px; background: var(--line-2); transition: background 0.3s; }
.au-meter[data-score="1"] i:nth-child(-n + 1) { background: var(--bad); }
.au-meter[data-score="2"] i:nth-child(-n + 2) { background: var(--warn); }
.au-meter[data-score="3"] i:nth-child(-n + 3) { background: #a3e635; }
.au-meter[data-score="4"] i { background: var(--ok); }
.au-forgot { justify-self: end; margin-top: -4px; font-size: 12px; }
.au-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.au-consent input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--teal); flex: none; }
.au-go { height: 44px; border-radius: 12px; font-size: 14px; justify-content: center; position: relative; overflow: hidden; }
.au-go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-100%); }
.au-go:hover::after { animation: shine 0.9s ease; }
@keyframes shine { to { transform: translateX(100%); } }
.au-go.loading { color: transparent !important; pointer-events: none; }
.au-go.loading::before { content: ""; position: absolute; width: 18px; height: 18px; left: calc(50% - 9px); top: calc(50% - 9px); border-radius: 50%; border: 2px solid rgba(11, 13, 16, 0.25); border-top-color: #0b0d10; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.au-fine { margin: 2px 0 0; font-size: 11.5px; color: var(--faint); text-align: center; }
.au-back { align-self: flex-start; font-size: 12px; color: var(--muted); }
.au-back:hover { color: var(--text); }
.au-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(94, 234, 212, 0.1); color: var(--teal); border: 1px solid rgba(94, 234, 212, 0.25); }
.au-icon .ic { width: 22px; height: 22px; }
.au-icon.g { background: #fff; border-color: transparent; }
#au-recaptcha { margin-top: 8px; }

/* human check: drag the container onto the ship */
.hc { display: grid; gap: 5px; }
.hc-track { position: relative; height: 48px; border-radius: 12px; border: 1px dashed var(--line-2); background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(94, 160, 220, 0.06)); overflow: hidden; touch-action: none; transition: border-color 0.3s, background 0.3s; }
.hc-hint { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 56px; font-size: 11.5px; color: var(--faint); pointer-events: none; transition: opacity 0.2s; }
.hc.drag .hc-hint, .hc.ok .hc-hint { opacity: 0; }
.hc-ship { position: absolute; bottom: 6px; width: 64px; height: 16px; margin-left: -12px; border-radius: 2px 2px 10px 10px; background: #1b222b; box-shadow: inset 0 -3px 0 #6d1f1b; }
.hc-ship::before { content: ""; position: absolute; right: 6px; bottom: 15px; width: 12px; height: 15px; background: #d6d2c8; border-radius: 1px; }
.hc-ship i { position: absolute; left: 10px; bottom: 15px; width: 34px; height: 13px; border: 1.5px dashed rgba(94, 234, 212, 0.75); border-radius: 2px; animation: hc-pulse 1.4s ease-in-out infinite; }
@keyframes hc-pulse { 50% { opacity: 0.35; } }
.hc-box { position: absolute; top: 8px; width: 40px; height: 22px; margin-left: 4px; border-radius: 3px; background: linear-gradient(#36a497, #237a71); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.18); cursor: grab; touch-action: none; transition: top 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), transform 0.2s; }
.hc-box span { position: absolute; inset: 4px 5px; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 5px); border-radius: 1px; }
.hc-box:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.hc.drag .hc-box { cursor: grabbing; transform: scale(1.06) rotate(-2deg); transition: transform 0.2s; }
.hc.ok .hc-track { border-style: solid; border-color: rgba(74, 222, 128, 0.55); background: rgba(74, 222, 128, 0.06); }
.hc.ok .hc-box { top: 15px; cursor: default; }
.hc.ok .hc-ship i { opacity: 0; animation: none; }
.hc.bad .hc-track { animation: shake 0.35s; border-color: rgba(248, 113, 113, 0.6); }
.hc-msg { min-height: 14px; font-size: 11px; color: var(--muted); }
.hc.ok .hc-msg { color: var(--ok); }
.hc.bad .hc-msg { color: var(--bad); }

/* one-time code */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.auth .otp input { height: 54px; padding: 0; text-align: center; font: 500 22px var(--mono); border-radius: 12px; }
.auth .otp input.filled { border-color: rgba(94, 234, 212, 0.6); background: rgba(94, 234, 212, 0.06); animation: digit 0.2s ease; }
@keyframes digit { 50% { transform: scale(1.08); } }

/* success */
.au-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 40px 0 10px; }
.au-done svg { width: 76px; height: 76px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.au-done circle { stroke: var(--teal); stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.7s ease forwards; }
.au-done path { stroke: var(--teal); stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.45s 0.55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.au-done .btn { margin-top: 8px; height: 40px; padding: 0 22px; border-radius: 12px; }

/* my account */
.acct-hero { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.acct-hero h2 { font-size: 21px; }
.acct-hero p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wide-btn { width: 100%; height: 40px; border-radius: 12px; justify-content: center; }
.my-reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mr { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); display: grid; gap: 8px; animation: rise 0.4s ease both; }
.mr-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.mr-route { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.mr-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.mr-steps::before { content: ""; position: absolute; left: 7px; right: 7px; top: 6px; height: 2px; background: var(--line-2); }
.mr-steps::after { content: ""; position: absolute; left: 7px; top: 6px; height: 2px; background: var(--teal); width: calc((100% - 14px) * var(--s) / 3); transition: width 0.6s ease; }
.mr-steps li { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; color: var(--faint); }
.mr-steps li:nth-child(2), .mr-steps li:nth-child(3) { align-items: center; }
.mr-steps li:last-child { align-items: flex-end; }
.mr-steps i { width: 14px; height: 14px; border-radius: 50%; background: #0c0f13; border: 2px solid var(--line-2); }
.mr-steps li.on { color: var(--text); }
.mr-steps li.on i { border-color: var(--teal); background: var(--teal); box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.15); }
.mr-exec { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.mr.lost { opacity: 0.7; }
.mr-lost { font-size: 11.5px; color: var(--muted); }

/* booking form: sign-in prompt */
.enq-signin { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(94, 234, 212, 0.3); background: rgba(94, 234, 212, 0.06); margin-top: 6px; }
.enq-signin > .ic { color: var(--teal); }
.enq-signin div { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.enq-signin b { color: var(--text); font-weight: 500; font-size: 13px; }

/* =================================================================== console: sales and owner */
.admin input[type="search"], .admin input[type="date"], .admin input:not([type]) {
  width: 100%; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3); color: var(--text); font: 13px var(--font);
}
.admin input[type="search"]:focus, .admin input[type="date"]:focus, .admin input:not([type]):focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.small { font-size: 11px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 15px; border-radius: 14px; text-align: left; transition: border-color 0.2s, transform 0.2s; animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.kpi-tile:nth-child(2) { animation-delay: 40ms; } .kpi-tile:nth-child(3) { animation-delay: 80ms; } .kpi-tile:nth-child(4) { animation-delay: 120ms; } .kpi-tile:nth-child(5) { animation-delay: 160ms; } .kpi-tile:nth-child(6) { animation-delay: 200ms; }
button.kpi-tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.kpi-tile b { font-size: 28px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-tile span { font-size: 12px; color: var(--text); }
.kpi-tile small { font-size: 10.5px; color: var(--faint); }
.kpi-tile.hot b { color: var(--teal); }
.kpi-tile.good b { color: var(--ok); }
.kpi-tile.warn b { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dash-card { padding: 15px 16px; border-radius: 14px; min-width: 0; animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 120ms; }
.dash-card.wide { grid-column: 1 / -1; }
.dash-card h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 500; }
.dash-card.starter { margin-bottom: 14px; border-color: rgba(242, 196, 109, 0.35); }
.dash-card.starter p { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.day-bars .db rect { fill: rgba(94, 234, 212, 0.55); transform-box: fill-box; transform-origin: bottom; animation: grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 35ms); }
.day-bars .db:last-child rect { fill: var(--teal); }
.day-bars .db-n { font-size: 10px; fill: var(--text); }
.day-bars .db-l { font-size: 9.5px; fill: var(--faint); }
.day-bars .db-base { stroke: var(--line-2); }
@keyframes grow { from { transform: scaleY(0); } }
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.funnel li { display: grid; grid-template-columns: 72px 1fr 28px; gap: 10px; align-items: center; font-size: 12px; }
.fn-l { color: var(--muted); }
.fn-bar { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.fn-bar i { display: block; height: 100%; width: var(--w); border-radius: 5px; animation: widen 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes widen { from { width: 0; } }
.funnel b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.stage-new { --stage: #5eead4; } .stage-contacted { --stage: #60a5fa; } .stage-quoted { --stage: #f2c46d; } .stage-booked { --stage: #4ade80; } .stage-lost { --stage: #6b737c; }
.fn-bar i { background: var(--stage); }
.due-list, .route-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12px; }
.due-list li, .route-rank li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.route-rank b { font-weight: 500; }
.team-table td { vertical-align: middle; }
.team-table small { display: block; font-size: 10.5px; color: var(--muted); }
.team-table tr.off { opacity: 0.55; }

.pipe-bar { display: grid; grid-template-columns: 1fr 220px; gap: 8px; margin-bottom: 10px; }
.chips-f { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-f { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
.chip-f span { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.chip-f.on { color: #0b0d10; background: var(--text); border-color: transparent; }
.chip-f.on span { background: rgba(0, 0, 0, 0.12); }
.enq-list { display: grid; gap: 10px; }
.enq-card { border: 1px solid var(--line); border-left: 3px solid var(--stage); border-radius: 12px; background: rgba(255, 255, 255, 0.025); padding: 12px 14px; display: grid; gap: 10px; animation: rise 0.35s ease both; }
.ec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ec-id { display: flex; gap: 10px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.ec-id .kind { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.ec-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin .ec-ctl select { width: auto; height: 28px; font-size: 12px; padding: 0 8px; }
.admin .stage-sel { border-color: var(--stage) !important; color: var(--stage); font-weight: 500; }
.who-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11.5px; }
.who-chip .av.sm { margin-right: 6px; }
.who-chip.me { border-color: rgba(94, 234, 212, 0.45); }
.ec-body { display: grid; grid-template-columns: 1.1fr 1.4fr 150px; gap: 14px; font-size: 12px; }
.ec-cust, .ec-req { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ec-cust b, .ec-req b { font-size: 13px; font-weight: 500; }
.ec-cust span, .ec-req span { color: var(--muted); overflow-wrap: anywhere; }
.ec-links a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.ec-msg { font-style: italic; }
.ec-fu { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.ec-fu small { font-size: 10.5px; }
.ec-fu.overdue input { border-color: var(--bad) !important; } .ec-fu.overdue small { color: var(--bad); }
.ec-fu.today input { border-color: var(--warn) !important; } .ec-fu.today small { color: var(--warn); }
.ec-notes summary { cursor: pointer; font-size: 11.5px; color: var(--muted); list-style: none; }
.ec-notes summary::before { content: "+ "; }
.ec-notes[open] summary::before { content: "− "; }
.ec-notes ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.ec-notes li { display: grid; gap: 2px; font-size: 12px; padding: 7px 9px; border-radius: 8px; background: rgba(0, 0, 0, 0.2); }
.ec-notes li .muted { font-size: 10.5px; }
.note-add { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.note-add textarea { flex: 1; }
.cust-table td { vertical-align: middle; }
.cust-table td small { display: block; font-size: 10.5px; color: var(--muted); }
.cust-table a { color: var(--text); }
.invite { padding: 15px 16px; border-radius: 14px; margin-bottom: 16px; }
.invite h4 { margin: 0 0 4px; font-size: 13px; font-weight: 500; }
.invite p { margin: 0 0 12px; font-size: 12px; }
.inv-fields { display: grid; grid-template-columns: 1fr 1.3fr 170px auto; gap: 10px; align-items: end; }
.inv-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.inv-list li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 12px; flex-wrap: wrap; }
.inv-list .lnk { margin-left: auto; }
.lnk.danger { color: var(--bad); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 32px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

@media (max-width: 900px) {
  .auth-box { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { min-height: 168px; max-height: 168px; }
  .aa-copy { padding: 18px 20px; }
  .aa-copy h3, .aa-copy ul { display: none; }
  .auth-card .au-brand { display: none; }
  .auth.compact .auth-card .au-brand { display: flex; }
  .auth-card { max-height: none; overflow: visible; }
  .auth { place-items: start center; }
  .dash-grid { grid-template-columns: 1fr; }
  .ec-body { grid-template-columns: 1fr; }
  .inv-fields { grid-template-columns: 1fr 1fr; }
  .pipe-bar { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .auth { padding: 0; }
  .auth-box { border-radius: 0; border: 0; min-height: 100dvh; }
  .auth-card { padding: 22px 18px 28px; }
  .auth-in h2 { font-size: 22px; }
  .acct-btn .acct-name { display: none; }
  .acct-btn { width: 38px; padding: 0; justify-content: center; }
  .acct-btn.in { padding: 0; }
  .enq-signin { grid-template-columns: 1fr; }
  .enq-signin > .ic { display: none; }
  .inv-fields { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .otp { gap: 6px; }
  .auth .otp input { height: 48px; font-size: 20px; }
}
