/* ================================================================
   Norlys Kystlinjen — Annual Report 2026 (web edition)
   Nordic editorial. Cool neutrals, one warm accent.
   ----------------------------------------------------------------
   Type system — declared once, used nowhere else:
     base 16 px, perfect-fifth (1.25) scale, steps below.
   Spacing — 8 px baseline grid, steps below.
   Fonts — local system stacks only: serif / grotesque / mono.
   Contrast pairs checked (WCAG): see RATIONALE.md.
   ================================================================ */

:root {
  /* palette */
  --paper: #F4F6F5;
  --panel: #EDF1F0;
  --ink: #17222E;
  --ink-2: #3E4E5C;
  --muted: #5D6C77;
  --line: #C9D3D0;
  --sea: #EAF0EF;
  --land: #DCE4DE;
  --land-line: #B9C7BE;
  --board: #1B2630;
  --board-line: #33414E;
  --board-muted: #8FA1AC;
  --accent: #C4561E;        /* large text / graphical only */
  --accent-deep: #9A3D0E;   /* small text on paper */
  --accent-soft: #F6E8DC;
  --accent-bright: #E0854B; /* on dark board only */

  /* type scale — perfect fifth from 16 px */
  --step--3: 0.5rem;        /* 8     marginal notes */
  --step--2: 0.64rem;       /* 10.24 instrument labels: SVG ticks, tags, mobile row heads */
  --step--1: 0.8rem;        /* 12.8  captions, tables, labels */
  --step-0:  1rem;          /* 16    body */
  --step-1:  1.25rem;       /* 20    lede, subheads, detail */
  --step-2:  1.5625rem;     /* 25    h3-ish display */
  --step-3:  1.9531rem;     /* 31.25 h2 */
  --step-4:  2.4414rem;     /* 39    section display */
  --step-5:  3.0518rem;     /* 48.8   small dominant figures */
  --step-6:  3.8147rem;     /* 61     dominant figure */
  --step-7:  4.768rem;      /* 76.4   masthead h1 */

  /* fonts */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;

  /* spacing — 8 px baseline */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;

  /* layout */
  --measure: 68ch;
  --anchor-pad: 112px;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--anchor-pad); }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
p { margin: 0 0 var(--s2); }

::selection { background: var(--accent-soft); }

a { color: var(--accent-deep); }
a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s1) var(--s2);
  font-family: var(--mono);
  font-size: var(--step--1);
  text-decoration: none;
}
.skip:focus { left: var(--s2); top: var(--s2); }

/* ---------- header / navigation ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.head-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s2) var(--s4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--mono);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.mark { width: 22px; height: 22px; flex: none; }
.mark path { fill: none; stroke: var(--accent-deep); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.head-progress {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}
.head-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s4) var(--s2);
  display: flex;
  gap: var(--s1);
  overflow-x: auto;
  scrollbar-width: none;
}
.head-nav::-webkit-scrollbar { display: none; }
.head-nav a {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.head-nav a:hover { color: var(--ink); }
.head-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.head-progressbar { height: 2px; background: var(--line); }
.head-progressbar #progressBar { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ---------- shared section chrome ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); }
.noscript-note {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--accent-deep);
  border: 1px solid var(--accent-deep);
  padding: var(--s2);
  margin: var(--s3) 0;
}
.sec { padding: var(--s6) 0; border-top: 1px solid var(--line); }
.sec h2 {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  flex-wrap: wrap;
  margin: 0 0 var(--s3);
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.25;
  font-weight: 600;
}
.sec-no {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--accent-deep);
  letter-spacing: 0.1em;
}
.sec-intro { max-width: var(--measure); color: var(--ink-2); margin-bottom: var(--s4); }
h3 {
  font-family: var(--sans);
  font-size: var(--step-1);
  font-weight: 600;
  margin: var(--s4) 0 var(--s2);
  letter-spacing: 0.01em;
}

/* ---------- cover ---------- */
.cover { padding: var(--s5) 0 var(--s4); }
.board {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: var(--step--1);
  background: var(--board);
  color: var(--paper);
  margin-bottom: var(--s5);
}
.board th, .board td { text-align: left; padding: var(--s1) var(--s2); }
.board thead th {
  color: var(--board-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  border-bottom: 1px solid var(--board-line);
}
.board td { border-bottom: 1px solid var(--board-line); }
.board tbody tr:last-child td { border-bottom: 0; }
.board-row.is-next { background: #243240; }
.board-row.is-next td:first-child { border-left: 3px solid var(--accent-bright); }
.board-status { color: var(--board-muted); }
.board-row.is-next .board-status { color: var(--accent-bright); font-weight: 600; }
.board-foot td {
  border-top: 1px solid var(--board-line);
  color: var(--board-muted);
  letter-spacing: 0.06em;
}
.masthead { max-width: 860px; }
.kicker {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 var(--s3);
}
h1 {
  margin: 0 0 var(--s3);
  font-family: var(--serif);
  font-size: var(--step-7);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.h1-year { color: var(--accent-deep); font-style: italic; }
.lede {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: var(--s3);
}
.meta {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
  max-width: 62ch;
}
.crossing { margin: var(--s5) 0 0; }
.crossing svg { width: 100%; height: auto; display: block; }
.crossing figcaption { display: none; }
.sea-line { stroke: var(--line); stroke-width: 1.5; fill: none; }
.sea-line-faint { opacity: 0.55; }
.crossing-arc { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 9 6; fill: none; }
.crossing-label { font-family: var(--mono); font-size: var(--step--2); fill: var(--muted); letter-spacing: 0.12em; }
.crossing-caption { font-family: var(--mono); font-size: var(--step--2); fill: var(--ink-2); letter-spacing: 0.04em; }
.crossing-dot { fill: var(--accent); }
.crossing .port-main { fill: var(--ink); }

/* ---------- key figures ---------- */
.kf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.kf-card {
  grid-column: span 3;
  background: var(--paper);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.kf-dominant { grid-column: span 8; padding: var(--s4); }
.kf-second { grid-column: span 4; }
.kf-label {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.kf-value {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kf-dominant .kf-value { font-size: var(--step-6); }
.kf-delta { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.kf-delta.up { color: var(--accent-deep); }
.kf-delta.down { color: var(--ink-2); }

/* ---------- letter / reading experience ---------- */
.letter-body {
  font-family: var(--serif);
  max-width: var(--measure);
}
.letter-body p { line-height: 1.5; }
.letter-salutation { margin-bottom: var(--s3); }
.letter-sign { margin-top: var(--s4); font-style: italic; }
sup a {
  font-family: var(--mono);
  font-size: 0.68em;
  color: var(--accent-deep);
  text-decoration: none;
  vertical-align: super;
}
sup a:hover { text-decoration: underline; }
.footnotes {
  font-family: var(--sans);
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  margin: var(--s4) 0 0;
  padding: var(--s2) 0 0;
}
.footnotes li { margin-bottom: var(--s1); }
.footnotes a { color: var(--accent-deep); text-decoration: none; }
.footnotes a:hover { text-decoration: underline; }
.fn-back { margin-left: var(--s1); }

/* ---------- map ---------- */
.map-figure { margin: var(--s4) 0 0; }
.map-svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--sea);
  border: 1px solid var(--line);
}
.sea { fill: var(--sea); }
.land { fill: var(--land); stroke: var(--land-line); stroke-width: 1.2; }
.island { fill: var(--land); stroke: var(--land-line); stroke-width: 1; }
.port { fill: var(--ink); }
.port-island, .port-stop { fill: var(--ink-2); }
.port-label {
  font-family: var(--mono);
  font-size: var(--step--2);
  fill: var(--ink-2);
  letter-spacing: 0.05em;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.arc { fill: none; stroke: var(--ink-2); }
.arc-hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.arc-express { stroke-width: 2.4; }
.arc-hopper { stroke-width: 1.5; stroke-dasharray: 7 4; }
.arc-cruiser { stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.arc-g { cursor: pointer; outline: none; }
.arc-g:hover .arc-express,
.arc-g:focus-visible .arc-express { stroke-width: 3.4; }
.arc-g:hover .arc-hopper,
.arc-g:focus-visible .arc-hopper,
.arc-g:hover .arc-cruiser,
.arc-g:focus-visible .arc-cruiser { stroke-width: 2.4; }
.arc-g:hover .arc { stroke: var(--ink); }
.arc.is-selected { stroke: var(--accent) !important; }
.arc-g.is-selected .arc-express { stroke-width: 3.2; }
.arc-g.is-selected .arc-hopper,
.arc-g.is-selected .arc-cruiser { stroke-width: 2.6; }
.arc-layer.has-sel .arc:not(.is-selected) { opacity: 0.28; }
.arc-layer.has-sel .arc-g:not(.is-selected) { cursor: default; }
.arc-g:focus-visible .arc-hit { stroke: var(--accent); stroke-opacity: 0.4; }
.compass-ring { fill: none; stroke: var(--line); }
.compass-needle { fill: var(--ink-2); }
.compass-n { font-family: var(--mono); font-size: var(--step--2); fill: var(--muted); }
.map-note { font-family: var(--mono); font-size: var(--step--3); fill: var(--muted); letter-spacing: 0.14em; }
.map-caption {
  font-size: var(--step--1);
  color: var(--muted);
  margin: var(--s2) 0 0;
}
.legend { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s1); }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.lg-stroke { fill: none; stroke-width: 2.4; }
.lg-express { stroke: var(--ink-2); }
.lg-hopper { stroke: var(--ink-2); stroke-dasharray: 7 4; }
.lg-cruiser { stroke: var(--ink-2); stroke-dasharray: 2 5; stroke-linecap: round; }
.lg-selected { stroke: var(--accent); }
.map-noscript { font-family: var(--mono); font-size: var(--step--1); color: var(--accent-deep); margin-top: var(--s2); }

/* ---------- routes layout ---------- */
.routes-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: var(--s5);
  margin-top: var(--s4);
  align-items: start;
}
.routes-table-wrap h3, .top5 h3, .detail h3 { margin-top: 0; }
.table-scroll { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: var(--s1) var(--s2);
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.data-table td {
  padding: 7px var(--s2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table .num, .data-table th.num { text-align: right; }
.data-table td.num { font-family: var(--mono); font-size: var(--step--1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.route-name { white-space: nowrap; }
.route-row.is-selected { background: var(--accent-soft); }
.route-row.is-selected .row-pick { border-color: var(--accent-deep); color: var(--accent-deep); }
.row-pick {
  font-family: var(--mono);
  font-size: var(--step--1);
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 1px 8px;
  cursor: pointer;
}
.row-pick:hover { border-color: var(--ink); color: var(--ink); }
.trow-total td {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-weight: 600;
}
.trow-total td.num { font-weight: 600; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  white-space: nowrap;
}
.tag-express { border-color: var(--ink-2); }
.tag-hopper { border-style: dashed; }
.tag-cruiser { border-style: dotted; }

.top5 {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: var(--s3);
}
.top5-list { list-style: none; margin: 0; padding: 0; }
.top5-pick {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--s2);
  align-items: baseline;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  padding: var(--s1) var(--s1) var(--s1) 0;
  cursor: pointer;
}
.top5-pick:hover { border-left-color: var(--ink-2); }
.top5-pick.is-selected { border-left-color: var(--accent); background: var(--accent-soft); }
.top5-rank { font-family: var(--mono); font-size: var(--step--1); color: var(--accent-deep); }
.top5-name { flex: 1; }
.top5-val { font-family: var(--mono); font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.top5-bar { flex-basis: 100%; height: 4px; background: var(--line); margin-top: 4px; }
.top5-fill { display: block; height: 100%; background: var(--ink-2); }
.top5-pick.is-selected .top5-fill { background: var(--accent); }
.top5-note { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); margin: var(--s2) 0 0; }

.detail {
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  background: var(--paper);
  padding: var(--s3);
}
.detail.is-active { border-top-color: var(--accent); }
.detail-empty { color: var(--muted); font-style: italic; }
.detail-title {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.35;
  margin: 0 0 var(--s2);
}
.detail-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 var(--s2);
}
.detail-chips li {
  font-family: var(--mono);
  font-size: var(--step--1);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1px 8px;
  color: var(--ink-2);
}
.detail-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s1) var(--s2);
  margin: 0 0 var(--s2);
}
.detail-nums dt {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-nums dd {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
}
.detail-chart { width: 100%; height: auto; display: block; margin-bottom: var(--s2); }
.detail-note { font-size: var(--step--1); color: var(--ink-2); margin-bottom: var(--s2); }
.btn-clear {
  font-family: var(--mono);
  font-size: var(--step--1);
  background: none;
  border: 1px solid var(--ink-2);
  color: var(--ink);
  padding: var(--s1) var(--s2);
  cursor: pointer;
}
.btn-clear:hover { border-color: var(--ink); background: var(--panel); }

/* ---------- fleet ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s3) 0 var(--s2);
}
html.no-js .controls { display: none; }
.ctl {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
}
.ctl select {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink-2);
  padding: 3px 6px;
}
.ctl-count { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); margin-left: auto; }
.sort-btn {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
}
.sort-ind { display: inline-block; width: 1.1em; text-align: center; }
th.is-asc .sort-btn, th.is-desc .sort-btn { color: var(--ink); }
th.is-asc .sort-ind::after { content: "↑"; }
th.is-desc .sort-ind::after { content: "↓"; }
.fleet-row.is-selected { background: var(--accent-soft); }
.ship-name { font-weight: 600; white-space: nowrap; }
.fleet-route { font-family: var(--mono); font-size: var(--step--1); color: var(--ink-2); white-space: nowrap; }

/* ---------- ship profiles ---------- */
.profiles { margin: var(--s4) 0 0; }
.profiles-svg { width: 100%; height: auto; display: block; }
.profiles figcaption { font-size: var(--step--1); color: var(--muted); margin-top: var(--s2); max-width: var(--measure); }
.pl-water { stroke: var(--line); stroke-width: 1.5; fill: none; }
.pl-hull { fill: var(--ink); }
.pl-super, .pl-deck { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.pl-bridge { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.pl-funnel { fill: var(--accent); }
.pl-pod, .pl-batt { fill: var(--ink-2); }
.pl-windows { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2.5 4; fill: none; }
.pl-stripe { fill: var(--accent); }
.pl-name { font-family: var(--serif); font-size: var(--step-0); fill: var(--ink); }
.pl-spec { font-family: var(--mono); font-size: var(--step--1); fill: var(--muted); }
.pl-scale-line { stroke: var(--ink-2); stroke-width: 1.5; }
.pl-scale-num { font-family: var(--mono); font-size: var(--step--1); fill: var(--muted); }

/* ---------- charts ---------- */
.chart { margin: var(--s4) 0 0; }
.chart figcaption {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0 0 var(--s2);
  max-width: var(--measure);
}
.chart-svg { width: 100%; height: auto; display: block; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-axis { stroke: var(--ink-2); stroke-width: 1.5; fill: none; }
.c-tick { font-family: var(--mono); font-size: var(--step--1); fill: var(--muted); }
.c-value { font-family: var(--mono); font-size: var(--step--1); fill: var(--ink); }
.c-value-acc { fill: var(--accent-deep); }
.c-bar-rev { fill: var(--ink); }
.c-bar-ebitda { fill: var(--accent); }
.c-bar-total { fill: var(--ink); }
.c-bar-up { fill: var(--ink-2); }
.c-bar-down { fill: var(--accent); }
.c-bar-24 { fill: var(--ink-2); opacity: 0.45; }
.c-bar-25 { fill: var(--ink-2); }
.c-bar-26 { fill: var(--accent); }
.c-bar-mini { fill: var(--ink-2); }
.c-connector { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; fill: none; opacity: 0.7; }
.c-band { fill: var(--accent-soft); }
.c-band-lg { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.c-line { fill: none; stroke-width: 2.4; }
.c-line-now { stroke: var(--ink); }
.c-line-prev { stroke: var(--ink-2); stroke-dasharray: 6 4; }
.c-dot { fill: var(--ink); }
.data-table.small th { padding: 6px 10px; font-size: var(--step--1); }
.data-table.small td { padding: 5px 10px; font-size: var(--step--1); }
.table-note { font-size: var(--step--1); color: var(--muted); margin: var(--s1) 0 0; }

.multiples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s2);
}
.multi svg { width: 100%; height: auto; display: block; }
.multi-title {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- governance ---------- */
.board-directory {
  list-style: none;
  margin: var(--s3) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.board-directory li {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: start;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line);
  gap: 0 var(--s2);
}
.bd-no { grid-column: 1; font-family: var(--mono); font-size: var(--step--1); color: var(--accent-deep); }
.bd-name { grid-column: 2; grid-row: 1; font-family: var(--serif); font-size: var(--step-1); }
.bd-role { grid-column: 2; grid-row: 2; font-size: var(--step--1); color: var(--ink-2); }
.bd-since { grid-column: 3; grid-row: 1; font-family: var(--mono); font-size: var(--step--1); color: var(--muted); white-space: nowrap; }
.gov-note { font-size: var(--step--1); color: var(--muted); margin-top: var(--s3); max-width: var(--measure); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--ink);
  margin-top: var(--s6);
  padding: var(--s5) var(--s4) var(--s6);
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}
.site-foot p { font-family: var(--mono); font-size: var(--step--1); color: var(--ink-2); margin-bottom: var(--s2); }
.foot-wave { color: var(--accent-deep); letter-spacing: 0.5em; margin-bottom: var(--s3); }
.colophon { line-height: 1.5; max-width: 76ch; }

/* ---------- motion (orientation only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .arc, .arc-g .arc { transition: stroke 0.15s ease, opacity 0.25s ease, stroke-width 0.15s ease; }
  .top5-pick, .row-pick, .btn-clear, .head-nav a, .board-directory li { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
  #progressBar { transition: width 0.1s linear; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .kf-card { grid-column: span 6; }
  .kf-dominant { grid-column: span 12; }
  .kf-second { grid-column: span 6; }
  .routes-layout { grid-template-columns: 1fr; }
  .top5, .detail { max-width: 560px; }
}
@media (max-width: 640px) {
  :root { --anchor-pad: 150px; }
  .head-top { padding: var(--s2) var(--s3); }
  .head-nav { padding: 0 var(--s3) var(--s2); }
  main { padding: 0 var(--s3); }
  .site-foot { padding: var(--s4) var(--s3) var(--s5); }
  .board td:nth-child(3), .board th:nth-child(3),
  .board td:nth-child(4) { display: none; }
  h1 { font-size: var(--step-5); }
  .kf-dominant .kf-value { font-size: var(--step-5); }
  .sec { padding: var(--s5) 0; }
  .kf-card, .kf-dominant, .kf-second { grid-column: span 12; }
  .detail-nums { grid-template-columns: 1fr; }
  .board-directory li { grid-template-columns: 2.5rem 1fr; }
  .bd-since { grid-column: 2; grid-row: 3; }
  .controls { flex-wrap: wrap; }
  .ctl-count { margin-left: 0; }

  /* stacked tables */
  .route-table thead, .fleet-table thead { display: none; }
  .route-table, .route-table tbody, .route-table tr, .route-table td,
  .fleet-table, .fleet-table tbody, .fleet-table tr, .fleet-table td { display: block; width: 100%; }
  .route-table tr, .fleet-table tr {
    border: 1px solid var(--line);
    border-left: 3px solid transparent;
    margin-bottom: var(--s2);
    padding: var(--s1) 0;
    background: var(--paper);
  }
  .route-table td, .fleet-table td {
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s2);
    padding: 4px var(--s3);
  }
  .route-table td::before, .fleet-table td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: var(--step--2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  .fleet-table td.ship-name { display: block; padding-top: 6px; }
  .fleet-table td.ship-name::before { display: none; }
  .route-table tr.is-selected, .fleet-table tr.is-selected { border-left-color: var(--accent); background: var(--accent-soft); }
  .trow-total { display: none; }
  .trow-total td::before { display: none; }
  .route-name { white-space: normal; }
}

/* ---------- print (A4) ---------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000; overflow: visible; }
  .site-head, .head-progressbar, .controls, .btn-clear, .noscript-note, .skip { display: none !important; }
  main, .site-foot { max-width: none; margin: 0; padding: 0; }
  body { font-size: 10.5pt; }
  .sec { padding: 6mm 0; border-top-color: #999; }
  #letter, #routes, #fleet, #financials, #sustainability, #governance { break-before: page; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
  figure, .chart, .table-scroll, .multi, .board-directory li, .kf-card, .board { break-inside: avoid; }
  .kf-grid { border-color: #999; background: #fff; }
  .kf-card { background: #fff; }
  .board { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .board th, .board td { color: #000 !important; border-color: #999 !important; }
  .board-row.is-next { background: #fff !important; }
  .board-row.is-next td:first-child { border-left-color: #000; }
  .board-status, .board-foot td, .board thead th { color: #333 !important; }
  a { color: inherit; text-decoration: none; }
  .c-band, .c-band-lg, .multi svg, .map-svg, .data-table, .profiles-svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .map-svg, .chart-svg, .profiles-svg, .detail-chart { width: 100%; height: auto; }
  .map-figure { break-inside: avoid; }
  .map-svg { max-height: 195mm; }
  .map-figure svg { display: block; margin: 0 auto; }
  .table-scroll { overflow: visible; }
  .detail { border: 1px solid #999; }
  .top5 { background: #fff; border-color: #999; }
  .site-foot { border-top-color: #000; margin-top: 8mm; }
  .site-foot p, .colophon, .meta, .kicker, .map-note { color: #333; }
  .h1-year { color: #000; }
  .foot-wave { color: #000; }
}
