/* Layout: the chart (map) fills the screen, a logbook panel is docked on the right; on phones it stacks under the map. */
:root {
  --bg: #e9eef1;
  --surface: #f7f9fa;
  --raised: #ffffff;
  --ink: #0f2233;
  --ink-2: #475a69;
  --ink-3: #6f8291;
  --rule: #d4dde3;
  --accent: #df5410;          /* Pavel: his track, boat, distance */
  --accent-wash: rgba(223, 84, 16, .12);
  --sea: #2467b4;             /* weather data */
  --sea-wash: rgba(36, 103, 180, .14);
  --barb: #10273b;
  --isobar: rgba(16, 39, 59, .55);
  --warn: #b57400;
  --crit: #d03b3b;
  --f-display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --f-read: 'Newsreader', 'Iowan Old Style', Georgia, serif;   /* the blog: a soft reading serif */
  --paper: #faf8f4;                                            /* the blog's warm paper */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a131b;
    --surface: #0f1b26;
    --raised: #142331;
    --ink: #e3ebf1;
    --ink-2: #a2b3c1;
    --ink-3: #74889a;
    --rule: #223443;
    --accent: #ff7a3d;
    --accent-wash: rgba(255, 122, 61, .16);
    --sea: #62a2ec;
    --sea-wash: rgba(98, 162, 236, .2);
    --barb: #e4edf4;
    --isobar: rgba(228, 237, 244, .5);
    --warn: #f0ae2a;
    --crit: #f07070;
    --paper: #10181f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* components that set display must still hide */
html, body { height: 100%; }
/* phones: a quick second tap on a button must not zoom the whole page (iPhone Safari does that otherwise) */
html { touch-action: manipulation; }
/* iPhone Safari zooms into text fields smaller than 16px when you tap them */
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--f-body);
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  height: 100dvh;
}
.mapwrap { position: relative; min-width: 0; }
.map { position: absolute; inset: 0; background: var(--bg); }
.panel {
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--rule);
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) 20px;
  min-width: 0;
}
@media (max-width: 880px) {
  .app { display: block; height: auto; }
  .mapwrap { height: 60dvh; }
  .panel { border-left: 0; border-top: 1px solid var(--rule); overflow: visible; padding-left: 16px; padding-right: 16px; }
}

/* ---------- header ---------- */
.hd { padding-block: 18px 14px; border-bottom: 1px solid var(--rule); }
.hd-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow {
  margin: 0; font: 600 12px/1.2 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
}
h1 { margin: 2px 0 0; font: 600 34px/1.05 var(--f-display); letter-spacing: .005em; text-wrap: balance; }
h1.boat { font-size: 46px; line-height: 1; letter-spacing: .06em; }
.skipper { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.skipper b { color: var(--ink); font-weight: 600; }
.fixline { margin: 10px 0 2px; color: var(--ink-2); font-size: 14px; }
.fixline .stale { color: var(--warn); font-weight: 600; }
.pos { margin: 0; font: 500 19px/1.3 var(--f-mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--rule); font-size: 13px; color: var(--ink-2);
}
.chip b { font: 600 15px/1 var(--f-display); color: var(--ink); letter-spacing: .02em; }

.btn {
  border: 1px solid var(--rule); background: var(--raised); color: var(--ink);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.small { padding: 3px 8px; font-size: 13px; }
.btn.danger { color: var(--crit); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--sea); cursor: pointer; font-size: 13px; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px;
  padding-block: 16px; border-bottom: 1px solid var(--rule);
}
.stat { min-width: 0; }
.stat .lab { font: 600 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.stat .val { font: 600 30px/1.05 var(--f-display); font-variant-numeric: tabular-nums; margin-top: 3px; }
.stat .val small { font: 500 15px var(--f-display); color: var(--ink-2); margin-left: 2px; letter-spacing: .02em; }
.stat .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.stat.accent .val { color: var(--accent); }
@media (max-width: 360px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- sections ---------- */
.sec { padding-block: 16px; border-bottom: 1px solid var(--rule); }
h2 { margin: 0 0 10px; font: 600 15px/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.h2-note { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

.wxgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.wx { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 8px; align-items: start; }
.wx .ico { grid-row: span 2; width: 30px; height: 30px; color: var(--sea); }
.wx .lab { font: 600 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wx .v { font: 600 21px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.wx .v small { font: 500 14px var(--f-display); color: var(--ink-2); }
.wx .d { grid-column: 2; font-size: 13px; color: var(--ink-2); }
.wx.warn .v { color: var(--warn); }
.wx.crit .v { color: var(--crit); }
.sky { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.sky b { color: var(--ink); font-weight: 600; }

/* ---------- charts ---------- */
.ch-title { margin: 10px 0 4px; font: 500 13px/1.2 var(--f-body); color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.key { display: inline-flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: 12px; }
.key i { display: inline-block; width: 14px; margin-right: 4px; vertical-align: middle; }
.k-line { height: 2px; background: var(--sea); }
.k-band { height: 9px; background: var(--sea-wash); border-top: 1px solid var(--sea); }
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 11px var(--f-body); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .day { stroke: var(--rule); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--sea); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .band { fill: var(--sea-wash); stroke: none; }
.chart .now { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .mark { stroke: var(--ink); stroke-width: 1; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .dot { fill: var(--sea); stroke: var(--surface); stroke-width: 2; }
.chart .arr { stroke: var(--ink-2); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .bar { fill: var(--accent); }
.chart .bar.part { fill: var(--accent-wash); stroke: var(--accent); stroke-width: 1; }
.chart .bar.est { fill: url(#hatch); stroke: var(--accent); stroke-width: 1; }
.chart .barlab { fill: var(--ink-2); font-weight: 500; }
.chart .hit { fill: transparent; cursor: crosshair; }
.proj-txt { margin: 0 0 14px; color: var(--ink-2); }
.proj-txt b { color: var(--ink); font-weight: 600; }
.chart.polar .pc { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart.polar .pc1 { stroke: color-mix(in srgb, var(--sea) 45%, var(--surface)); }
.chart.polar .pc2 { stroke: color-mix(in srgb, var(--sea) 63%, var(--surface)); }
.chart.polar .pc3 { stroke: color-mix(in srgb, var(--sea) 82%, var(--surface)); }
.chart.polar .pc4 { stroke: var(--sea); }
.chart.polar .leg { fill: var(--ink-3); fill-opacity: .5; stroke: var(--surface); stroke-width: 1; }
.chart.polar .now-angle { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.chart.polar .wind-in path { stroke: var(--ink-2); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart.polar .dot { fill: var(--accent); }
.zones-img { image-rendering: auto; }
.zone-lab span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 600 11px/1 var(--f-body);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink); opacity: .8;
  text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface), 0 0 4px var(--surface); }
.zone-lab.z-squall span, .zone-lab.z-gale span { opacity: 1; }
.zsw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.zsw.dold { background: rgba(227, 169, 43, .6); }
.zsw.trade { background: rgba(31, 158, 132, .55); }
.zsw.squall { background: rgba(139, 70, 196, .65); }
.zsw.gale { background: rgba(208, 59, 59, .7); }
.lg-sep { border-top: 1px solid var(--rule); margin: 6px 0; }
.ahead-lab span { position: absolute; left: 9px; top: -7px; white-space: nowrap; font: 500 11px/1.2 var(--f-body); color: var(--ink-2);
  text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface), 0 0 3px var(--surface); }
.ahead-lab.chg span { color: var(--ink); }
.ahead-lab b { font-weight: 700; }

.tip {
  position: fixed; z-index: 2000; pointer-events: none; max-width: 240px;
  background: var(--raised); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14); padding: 7px 10px; font-size: 13px; line-height: 1.4;
}
.tip b { font-weight: 600; }
.tip .t { color: var(--ink-3); font-size: 12px; }

/* ---------- nearest ---------- */
.near { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.near li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: baseline;
  padding-block: 7px; border-top: 1px solid var(--rule);
}
.near li:first-child { border-top: 0; padding-top: 0; }
.near .nm { font-weight: 600; min-width: 0; }
.near .grp { color: var(--ink-3); font-size: 13px; }
.near .dist { font: 600 19px/1 var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.near .dist small { font: 500 13px var(--f-display); color: var(--ink-2); }
.near .brg { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }

/* ---------- log ---------- */
.log { display: grid; gap: 6px; }
.day-h {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%;
  background: none; border: 0; padding: 8px 0 4px; cursor: pointer; text-align: left; border-top: 1px solid var(--rule);
}
.log > .day:first-child .day-h { border-top: 0; padding-top: 0; }
.day-h .dn { font: 600 18px/1.1 var(--f-display); }
.day-h .dd { color: var(--ink-3); font-size: 13px; margin-left: 6px; font-family: var(--f-body); font-weight: 400; }
.day-h .dr { font: 600 17px/1 var(--f-display); color: var(--accent); white-space: nowrap; }
.day-h .dr small { font: 500 13px var(--f-display); color: var(--ink-2); }
.fix { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 2px 10px; padding: 5px 0; font-size: 13.5px; align-items: baseline; }
.fix .tm { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fix .ps { font: 400 13px var(--f-mono); min-width: 0; overflow-wrap: anywhere; }
.fix .sp { color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fix .note { grid-column: 2 / -1; font-style: italic; color: var(--ink); }
.fix .note::before { content: '“'; } .fix .note::after { content: '”'; }
.fix .wxl { grid-column: 2 / -1; color: var(--ink-3); font-size: 12.5px; }
.fix .acts { grid-column: 2 / -1; display: flex; gap: 12px; flex-wrap: wrap; }
.fix .src { color: var(--ink-3); font-size: 12px; }
.fix .noteed { grid-column: 2 / -1; display: flex; gap: 6px; }
.fix .noteed input { flex: 1; min-width: 0; }
.more { justify-self: start; }

/* ---------- forms ---------- */
.fold summary { cursor: pointer; font: 600 15px/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; list-style-position: outside; }
.fold[open] summary { margin-bottom: 10px; }
label, legend { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
input[type=text], input[type=url], input[type=number], input[type=datetime-local], textarea {
  width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised);
}
textarea { font-family: var(--f-mono); font-size: 14px; resize: vertical; }
fieldset { border: 1px solid var(--rule); border-radius: 10px; padding: 2px 12px 12px; margin: 12px 0 0; min-width: 0; }
legend { padding: 0 4px; margin: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
@media (max-width: 420px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
code { font: 12.5px var(--f-mono); background: var(--raised); border: 1px solid var(--rule); border-radius: 4px; padding: 0 3px; }
.preview { margin: 10px 0; font-size: 13px; display: grid; gap: 4px; }
.preview .ok { color: var(--ink); } .preview .ok span { font-family: var(--f-mono); }
.preview .bad { color: var(--crit); }
.fold .btn.primary { margin-top: 12px; }

/* ---------- posts from Pavel ---------- */
.latest { padding-block: 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 10px; }
.lt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lt-head .eyebrow { color: var(--accent); }
.lt-when { color: var(--ink-3); font-size: 13px; }
.lt-text { margin: 0; font-size: 16px; line-height: 1.5; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.lt-meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.lt-meta a { color: var(--sea); text-decoration: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; border-radius: 10px; overflow: hidden; }
.pgrid button { position: relative; padding: 0; border: 0; background: var(--rule); cursor: zoom-in; aspect-ratio: 4 / 3; min-width: 0; }
.pgrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgrid .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font: 600 22px var(--f-display); }
.post { display: grid; gap: 6px; padding: 8px 0 8px 10px; margin: 4px 0; border-left: 3px solid var(--accent); }
.post .ph { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.post .ph b { font-weight: 600; color: var(--accent); }
.post p { margin: 0; white-space: pre-line; font-size: 14.5px; }
.post .pgrid { max-width: 320px; border-radius: 8px; }
.post .acts { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.post .acts a { color: var(--sea); text-decoration: none; }
.pthumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pthumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.post-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0, 0, 0, .35); background: var(--accent);
}
/* pins grow with the zoom: a dot when the whole passage is in view, the photo when zoomed in */
.map.pins-s .post-pin { width: 14px; height: 14px; border-width: 2px; box-shadow: 0 0 0 1.5px var(--accent); }
.map.pins-s .post-pin img, .map.pins-s .post-pin.text { visibility: hidden; font-size: 0; }
.map.pins-m .post-pin { width: 24px; height: 24px; border-width: 2px; }
.map.pins-m .post-pin.text { font-size: 12px; }
.pin-count {
  position: absolute; right: -4px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--ink); color: var(--surface); font: 600 11px/18px var(--f-body); text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.map.pins-m .pin-count { right: 2px; top: 2px; }
.map.pins-s .pin-count { display: none; }
.pp-sep { border-top: 1px solid var(--rule); margin: 10px 0; }
.post-pin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-pin.text { display: grid; place-items: center; color: #fff; font: 600 15px var(--f-display); }
.pp-photo { display: block; width: 220px; max-width: 100%; height: 140px; object-fit: cover; border-radius: 6px; margin: 6px 0; cursor: zoom-in; }
.pp-text { max-width: 240px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 12, 18, .94); display: flex; align-items: center; justify-content: center; padding: env(safe-area-inset-top, 0px) 8px env(safe-area-inset-bottom, 0px); }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 100%; max-height: 80dvh; object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #e3ebf1; font-size: 14px; max-width: 70ch; text-align: center; white-space: pre-line; }
.lightbox figcaption .t { color: #a2b3c1; font-size: 12.5px; display: block; margin-bottom: 2px; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); }

/* ---------- blog: his posts as a story, oldest first ---------- */
.hd-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.blog-btn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
body.blog-open { overflow: hidden; }
.blog { position: fixed; inset: 0; z-index: 2500; overflow-y: auto; background: var(--paper); -webkit-overflow-scrolling: touch; }
.blog-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--paper); border-bottom: 1px solid var(--rule);
}
.blog-bar-t { font: 600 13px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); flex: none; }
.blog-days { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%); padding-left: 12px; }
.blog-days::-webkit-scrollbar { display: none; }
.blog-days .lab { flex: none; font: 600 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.bday { flex: none; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--f-body); font-variant-numeric: tabular-nums; color: var(--ink-2); text-decoration: none; border: 1px solid var(--rule); background: var(--raised); }
.bday:hover { border-color: var(--ink-3); color: var(--ink); }
.bday.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bday.latest { margin-left: 6px; padding: 0 12px; }
.blog-in { max-width: 1040px; margin: 0 auto; padding: 28px 20px calc(48px + env(safe-area-inset-bottom, 0px)); }
.blog-hero { padding-bottom: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.blog-hero h2 { margin: 10px 0 0; font: 300 54px/1.05 var(--f-read); letter-spacing: .14em; text-transform: none; }
.eyebrow .nw { white-space: nowrap; }
.blog-hero .vision { margin: 22px 0 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--accent); max-width: 58ch; }
.blog-hero .vision p { margin: 0; font: italic 300 22px/1.5 var(--f-read); color: var(--ink); }
.blog-hero .vision cite { display: block; margin-top: 8px; font: 400 13px/1.3 var(--f-body); font-style: normal; color: var(--ink-3); }
.blog-hero .vision cite::before { content: '— '; }
.blog-hero .vision a { color: var(--sea); text-decoration: none; }
.blog-hero .sub { margin: 18px 0 0; font: 300 18px/1.65 var(--f-read); color: var(--ink-2); max-width: 60ch; }
.blog-hero .nums { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.blog-hero .nums b { font: 400 21px/1 var(--f-read); font-variant-numeric: lining-nums; color: var(--ink); margin-right: 4px; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) 236px; column-gap: 44px; padding-block: 44px; }
.bd + .bd { border-top: 1px solid var(--rule); }
.bd-hd { grid-column: 1 / -1; margin: 0 0 22px; font: italic 400 34px/1.1 var(--f-read); font-variant-numeric: lining-nums; }
.bd-hd span { margin-left: 14px; font: 400 12.5px/1 var(--f-body); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); vertical-align: 6px; }
.bd-posts { display: grid; gap: 40px; min-width: 0; align-content: start; }
.bp { min-width: 0; }
.bp + .bp { padding-top: 0; }
.bp + .bp::before { content: ''; display: block; width: 44px; margin: 0 0 34px; border-top: 1px solid var(--rule); }
.bp-time { margin: 0 0 12px; font: 500 19px/1.1 var(--f-read); color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.bp-time small { margin-left: 10px; font: 400 12.5px var(--f-body); color: var(--ink-3); }
.bp-text { font: 350 19.5px/1.72 var(--f-read); color: color-mix(in srgb, var(--ink) 90%, var(--paper)); max-width: 62ch; overflow-wrap: anywhere; text-wrap: pretty; }
.bp-text p { margin: 0; }
.bp-text p + p { margin-top: .75em; }
.bp-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.bp-photos button { padding: 0; border: 0; background: var(--rule); cursor: zoom-in; aspect-ratio: 1; border-radius: 6px; overflow: hidden; min-width: 0; }
.bp-photos button:first-child { grid-column: 1 / -1; aspect-ratio: auto; border-radius: 12px; box-shadow: 0 10px 30px -18px rgba(8, 20, 30, .55); }
.bp-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-photos button:first-child img { height: auto; max-height: 72vh; object-fit: contain; background: #0b1218; }
.bp-src { margin: 12px 0 0; font-size: 13px; }
.bp-src a { color: var(--sea); text-decoration: none; }
.tr-note { color: var(--ink-3); }
.bf { align-self: start; position: sticky; top: 72px; display: grid; gap: 16px; padding: 18px 16px; border: 1px solid color-mix(in srgb, var(--rule) 70%, var(--paper));
  border-radius: 14px; background: color-mix(in srgb, var(--raised) 55%, var(--paper)); }
.bf dl { margin: 0; display: grid; gap: 12px; }
.bf dt { font: 400 12px/1.2 var(--f-body); letter-spacing: .02em; color: var(--ink-3); }
.bf dd { margin: 3px 0 0; font: 400 18px/1.25 var(--f-read); font-variant-numeric: lining-nums tabular-nums; }
.bf dd small { font: 400 12.5px var(--f-body); color: var(--ink-2); margin-left: 2px; }
.bf dd .mono { font: 500 13.5px var(--f-mono); }
.bf-note { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.bf-events { margin: 0; padding: 0 0 0 16px; display: grid; gap: 8px; font: 400 13px/1.45 var(--f-body); color: var(--ink-2); }
.bf-events li::marker { color: var(--accent); }
.blog-end { padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 14px; justify-items: start; color: var(--ink-2); }
@media (max-width: 760px) {
  .blog-in { padding: 20px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .blog-bar { gap: 10px; }
  .blog-bar-t { display: none; }
  .blog-hero h2 { font-size: 40px; letter-spacing: .1em; }
  .blog-hero .sub { font-size: 17px; }
  .bp-text { font-size: 18px; line-height: 1.68; }
  .bd-hd { font-size: 30px; }
  .bd { grid-template-columns: minmax(0, 1fr); row-gap: 18px; padding-block: 24px; }
  .bd-hd { margin: 0; font-size: 30px; }
  .bf { position: static; grid-template-columns: minmax(0, 1fr); }
  .bf dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .bf dl .wide { grid-column: 1 / -1; }
  .bf-note { grid-column: 1 / -1; }
  .bf-events { grid-column: 1 / -1; }
}

.foot { padding-top: 16px; font-size: 13px; color: var(--ink-3); display: grid; gap: 8px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot a { color: var(--sea); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .err { color: var(--crit); }
.foot .credits { padding-top: 8px; border-top: 1px solid var(--rule); line-height: 1.6; }
.blog-end .copy { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------- map ---------- */
.leaflet-container { font: 13px var(--f-body); background: var(--bg); }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--raised); color: var(--ink); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; line-height: 1.45; }
.leaflet-popup-content .pp-t { color: var(--ink-3); font-size: 12px; }
.leaflet-popup-content .pp-p { font-family: var(--f-mono); font-size: 12.5px; }
.leaflet-tooltip.place-lab {
  background: none; border: 0; box-shadow: none; padding: 0 0 0 2px; color: var(--ink);
  font: 600 11px/1 var(--f-body); text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface), 0 0 2px var(--surface);
}
.leaflet-tooltip.place-lab::before { display: none; }
.place-lab span {
  display: inline-block; transform: translate(6px, -50%); white-space: nowrap; color: var(--ink);
  font: 600 11px/1 var(--f-body); text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface), 0 0 2px var(--surface);
}
.place-lab.minor span { font-weight: 500; color: var(--ink-2); }
.ghost-ic .hull { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.boat-ic svg { overflow: visible; }
.boat-ic .ring { fill: none; stroke: var(--accent); stroke-width: 2; transform-origin: center; animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .boat-ic .ring { animation: none; opacity: .5; } }
.est-lab, .iso-lab, .hl-lab { background: none; border: 0; }
.iso-lab span {
  display: inline-block; transform: translate(-50%, -50%); font: 500 10.5px/1 var(--f-body); color: var(--ink-2);
  background: var(--surface); padding: 1px 3px; border-radius: 3px; opacity: .85; white-space: nowrap;
}
.hl-lab span {
  display: inline-block; transform: translate(-50%, -50%); text-align: center; font: 600 20px/0.9 var(--f-display); color: var(--ink);
  text-shadow: 0 0 4px var(--surface), 0 0 4px var(--surface);
}
.hl-lab span small { display: block; font: 500 10.5px var(--f-body); color: var(--ink-2); }
.hl-lab.hi span { color: var(--sea); }
.hl-lab.lo span { color: var(--crit); }
.barb-ic svg { overflow: visible; display: block; }
.mapctl {
  background: var(--raised); color: var(--ink); border-radius: 10px; border: 1px solid var(--rule);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12); padding: 6px; display: grid; gap: 2px; font-size: 13px;
}
.mapctl label { display: flex; align-items: center; gap: 7px; margin: 0; padding: 3px 6px; font-weight: 500; color: var(--ink); cursor: pointer; font-size: 13px; }
.mapctl .ctl-sep { border-top: 1px solid var(--rule); margin: 3px 2px; }
.mapctl .legend { padding: 2px 6px 3px; color: var(--ink-2); font-size: 11.5px; display: grid; gap: 3px; max-width: 170px; }
.mapctl .legend svg { vertical-align: middle; margin-right: 4px; }
.scrub {
  position: absolute; z-index: 800; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(480px, calc(100% - 32px)); display: flex; align-items: center; gap: 8px;
  background: var(--raised); border: 1px solid var(--rule); border-radius: 12px; padding: 6px 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
@media (max-width: 880px) { .scrub { bottom: 14px; } }
.scrub-mid { flex: 1; min-width: 0; position: relative; }
.nowtick { position: absolute; bottom: -3px; width: 2px; height: 8px; border-radius: 1px; background: var(--accent); transform: translateX(-1px); pointer-events: none; }
.ibtn.now { width: auto; padding: 0 9px; font-size: 13px; font-weight: 600; }
#frPlay { font-size: 14px; }
.scrub label { margin: 0 0 2px; font-size: 12.5px; color: var(--ink); font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrub input { width: 100%; accent-color: var(--sea); margin: 0; }
.ibtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; flex: none; }

/* map glyphs */
.boat-ic .hull { fill: var(--accent); stroke: var(--surface); stroke-width: 1.6; stroke-linejoin: round; }
.dest-ic .pole { stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.dest-ic .flag { fill: var(--accent); stroke: var(--surface); stroke-width: 1; }
.barb-ic .st { stroke: var(--barb); stroke-width: 1.4; fill: none; stroke-linecap: round; }
.barb-ic .halo { stroke: var(--surface); stroke-width: 3.4; fill: none; stroke-linecap: round; opacity: .55; }
.barb-ic .pen, .barb-ic .stn { fill: var(--barb); }
.barb-ic .calm { fill: none; stroke: var(--barb); stroke-width: 1.3; }
.barb-ic.warn .st, .barb-ic.warn .calm { stroke: var(--warn); }
.barb-ic.warn .pen, .barb-ic.warn .stn { fill: var(--warn); }
.barb-ic.crit .st { stroke: var(--crit); stroke-width: 1.7; }
.barb-ic.crit .pen, .barb-ic.crit .stn { fill: var(--crit); }
.mapctl .legend > div { display: flex; align-items: center; gap: 2px; }
.mapctl .legend svg { margin: -6px 2px -6px -6px; }
.mapctl .legend .st { stroke: var(--ink); stroke-width: 1.3; fill: none; stroke-linecap: round; }
.mapctl .legend .halo { display: none; }
.mapctl .legend .pen, .mapctl .legend .stn { fill: var(--ink); }
.lg-dot { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; }
.lg-dot.warn { background: var(--warn); }
.lg-dot.crit { background: var(--crit); }
.ctl-tog {
  border: 0; background: none; font: 600 12px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); text-align: left; padding: 3px 6px; cursor: pointer;
}
@media (max-width: 480px) {
  #frPrev, #frNext { display: none; }   /* the slider and ▶ are enough on a phone */
  .scrub { gap: 6px; padding: 6px; }
  .scrub label { font-size: 12px; }
}

/* countdown to his next fix */
.chip.nextfix { align-items: center; font-variant-numeric: tabular-nums; }
.chip.nextfix b { min-width: 3.6em; }
.chip.nextfix.late { border-color: var(--warn); }
.chip.nextfix.late b { color: var(--warn); }
.cd { width: 14px; height: 14px; flex: none; }
.cd-bg { fill: none; stroke: var(--rule); stroke-width: 2.2; }
.cd-fg { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
