/* openwaves.craitr.no — ours, loaded after OpenBridge's openbridge.css. Every colour is an OpenBridge variable,
   so the brilliance menu (day · dusk · night · bright) recolours the whole page. Sizes follow OpenBridge's
   regular component size (12/16, 16/24, title 22/24, instrument 34/32). */
@font-face { font-family: "Noto Sans"; src: url(obc/NotoSans.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
:root { --gap: 6px; --r: 6px; --pad: 16px; font-family: "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--container-backdrop-color); color: var(--element-active-color); }
body { font-size: 16px; line-height: 24px; font-weight: 370; font-feature-settings: "liga" off, "clig" off, "ss04" on; min-height: 100vh; }
a { color: var(--instrument-enhanced-primary-color); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--instrument-enhanced-primary-color); outline-offset: 2px; }

obc-top-bar { position: sticky; top: 0; z-index: 40; display: block; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--instrument-enhanced-primary-color); }
.mark svg { width: 24px; height: 24px; }

/* flyouts: the navigation menu (left) and the brilliance / related menus (right) */
.scrim { position: fixed; inset: 48px 0 0 0; background: rgba(0,0,0,.35); z-index: 45; }
.flyout { position: fixed; top: 48px; bottom: 0; left: 0; width: min(320px, 86vw); z-index: 50; }
.popover { position: fixed; top: 52px; right: 8px; z-index: 50; max-width: calc(100vw - 16px); }
.apps { background: var(--container-global-color); border: 1px solid var(--border-outline-color); border-radius: var(--r); padding: 8px; width: 340px; display: grid; gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.pop-h { margin: 4px 10px 6px; font-size: 12px; line-height: 16px; font-weight: 570; letter-spacing: .06em; text-transform: uppercase; color: var(--element-neutral-color); }
.app { display: grid; gap: 0; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--element-active-color); min-height: 48px; }
.app:hover { background: var(--container-section-color); }
.app b { font-weight: 570; } .app span { font-size: 12px; line-height: 16px; color: var(--element-neutral-color); }
.navfoot { padding: 12px 16px; font-size: 12px; line-height: 16px; color: var(--element-neutral-color); }

/* pages */
main { padding: var(--gap); }
.page { display: block; }
obc-card.c { display: block; min-width: 0; }
obc-card.c > :not([slot="title"]) { width: 100%; align-self: stretch; }   /* the card centres its content; ours fills it */
.hscroll { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.hscroll > * { min-width: max-content; }
obc-card.c p { margin: 0 0 12px; padding-inline: 12px; }
obc-card.c .lbl { padding-inline: 12px; }
.lbl { font-size: 12px; line-height: 16px; color: var(--element-neutral-color); }
.fields { display: grid; gap: 8px 16px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* the conning */
.conning { display: grid; gap: var(--gap); grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.col { display: grid; gap: var(--gap); min-width: 0; }
.wide { grid-column: 1 / -1; }
.vtoggle, .modegroup { display: block; width: 100%; }
.vnote { font-size: 12px; line-height: 16px; color: var(--element-neutral-color); margin: 8px 0 4px !important; min-height: 32px; }
.compassbox { width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto 8px; }
.compassbox obc-compass, .windbox obc-wind, .rotbox obc-rate-of-turn, .pr obc-pitch-roll, .hv obc-heave, .me obc-main-engine, .rd obc-rudder, .gauge obc-gauge-radial { display: block; width: 100%; height: 100%; }
.windrow { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.windbox { width: 140px; height: 140px; }
.thr { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.thr obc-thruster { display: block; width: 140px; height: 160px; }
.motion, .prop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.pr, .hv, .me, .rd { height: 170px; min-width: 0; }

.camera .places { display: block; margin-bottom: 8px; overflow-x: auto; }
.feed { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.feed img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity .4s ease; }
.feed figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 28px 14px 10px;
  color: #e9e9e9; background: linear-gradient(transparent, rgba(0,0,0,.72)); font-size: 14px; line-height: 20px; }
.feed .rec { position: absolute; top: 10px; left: 10px; }
.strip { display: flex; gap: 4px; overflow-x: auto; padding-top: 6px; scrollbar-width: thin; }
.strip button { flex: none; padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; }
.strip button[aria-pressed="true"] { border-color: var(--instrument-enhanced-primary-color); }
.strip img { width: 76px; height: 57px; object-fit: cover; border-radius: 2px; }

.simline { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 16px; color: var(--element-neutral-color); margin-bottom: 10px; flex-wrap: wrap; }
.simline span { flex: 1 1 260px; }
.masters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.masters label { display: grid; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 570; letter-spacing: .04em; color: var(--element-neutral-color); }
.streams { display: grid; gap: 2px; }
.stream { display: grid; grid-template-columns: 112px minmax(0, 1fr) 96px 68px; gap: 10px; align-items: center; min-height: 48px; padding: 0 6px 0 10px; border-radius: 4px;
  background: var(--container-section-color); border-left: 4px solid var(--border-outline-color); }
.stream.vessel { border-left-color: var(--instrument-enhanced-primary-color); }
.stream.world { border-left-color: var(--element-neutral-color); }
.stream.exact { border-left-color: var(--alert-alarm-color); }
.stream .nm { font-weight: 570; font-size: 14px; line-height: 18px; }
.stream .nm small { display: block; font-weight: 370; font-size: 11.5px; line-height: 14px; color: var(--element-neutral-color); }
.stream obc-graph-mini { display: block; height: 32px; width: 100%; }
.stream obc-instrument-field { justify-self: end; }
.stream .move { grid-column: 1 / -1; font-size: 11.5px; line-height: 14px; color: var(--instrument-enhanced-primary-color); min-height: 0; }
.stream.lit { background: var(--container-global-color); box-shadow: inset 0 0 0 1px var(--instrument-enhanced-primary-color); }
.modes { margin-top: 12px; display: grid; gap: 6px; }
.modes .lbl { margin: 0; }
.advice { display: grid; gap: 6px; margin-bottom: 8px; }
.advice obc-advice-menu-item, .advice obc-alert-menu-item { opacity: .45; transition: opacity .3s ease; }
.advice obc-advice-menu-item.on, .advice obc-alert-menu-item.on { opacity: 1; }

.body .bodyrow { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: center; }
.gauge { display: grid; gap: 6px; justify-items: center; text-align: center; }
.gauge obc-gauge-radial { width: 180px; height: 180px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.more { margin-left: 4px; font-weight: 570; text-decoration: none; }
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.rooms obc-elevated-card { display: block; min-width: 0; height: 100%; }

/* reading pages */
.read { max-width: 1100px; margin: 0 auto; padding: 12px var(--pad) 32px; }
.read.wide { max-width: 1400px; }
.read > p, .read .lead p { max-width: 72ch; }
.lead { padding: 16px 0 8px; }
.overline { font-size: 12px; line-height: 16px; font-weight: 570; letter-spacing: .08em; text-transform: uppercase; color: var(--element-neutral-color); margin: 0 0 6px; }
h1 { font-size: 28px; line-height: 34px; font-weight: 570; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 22px; line-height: 24px; font-weight: 570; margin: 32px 0 12px; text-wrap: balance; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.tbl { display: block; margin: 8px 0 12px; overflow-x: auto; }
.recs { display: grid; gap: 6px; max-width: 720px; }
.rec-item { display: grid; gap: 2px; }
.rec-item b { font-weight: 570; font-size: 14px; }
.photorow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.photorow button, .log .ph button { padding: 0; border: 0; background: none; cursor: zoom-in; }
.photorow img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }

.log { display: grid; gap: var(--gap); }
.log .entry { background: var(--container-background-color); border-radius: var(--r); padding: 4px 12px 12px; }
.log .entry.now { box-shadow: inset 4px 0 0 var(--instrument-enhanced-primary-color); }
.log .entry obc-event-item { display: block; }
.log .ph { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 2px 12px; }
.log .ph img { height: 110px; width: auto; border-radius: 3px; }
.log .links { padding: 0 12px; font-size: 14px; margin: 0; }
.log .desc { padding: 0 12px; margin: 0 0 6px; font-size: 14px; line-height: 20px; color: var(--element-neutral-color); max-width: 80ch; }

.acc { display: grid; gap: var(--gap); }
.acc obc-accordion-card { display: block; }
.acc .prose { padding: 4px 4px 8px; max-width: 72ch; }
.acc .prose p { margin: 0 0 12px; }
.acc .prose pre { font: 13px/1.5 "Noto Sans Mono", ui-monospace, Menlo, monospace; white-space: pre; overflow-x: auto; background: var(--container-section-color); padding: 12px; border-radius: 4px; }

.gtabs { margin-bottom: 10px; }
.masonry { columns: 5 220px; column-gap: var(--gap); }
.masonry button { display: block; width: 100%; padding: 0; border: 0; background: none; margin-bottom: var(--gap); break-inside: avoid; cursor: zoom-in; position: relative; }
.masonry img { width: 100%; height: auto; border-radius: 3px; background: var(--container-section-color); }
.masonry .tagline { position: absolute; left: 6px; bottom: 6px; font-size: 11.5px; line-height: 16px; color: #e9e9e9; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 8px; opacity: 0; transition: opacity .2s; }
.masonry button:hover .tagline, .masonry button:focus-visible .tagline { opacity: 1; }

obc-modal-window#lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0,0,0,.6); }
.lb { display: grid; gap: 8px; justify-items: center; }
.lb img { max-width: min(92vw, 1400px); max-height: 74vh; object-fit: contain; border-radius: 3px; }
.lb-nav { display: flex; gap: 12px; align-items: center; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--element-neutral-color); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 16px var(--pad) 24px; font-size: 12px; line-height: 16px; color: var(--element-neutral-color); }

@media (max-width: 1280px) {
  .conning { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .conning .mid { grid-column: 1 / -1; order: -1; }
  .body .bodyrow { grid-template-columns: 200px minmax(0, 1fr); }
  .body .tags { grid-column: 1 / -1; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --pad: 12px; }
  .conning, .grid2, .grid3, .rooms { grid-template-columns: minmax(0, 1fr); }
  .body .bodyrow { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masters { grid-template-columns: minmax(0, 1fr); }
  .stream { grid-template-columns: 92px minmax(0, 1fr) 56px; }
  .stream obc-graph-mini { display: none; }
  .photorow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .masonry { columns: 2 140px; }
  h1 { font-size: 22px; line-height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .feed img, .advice obc-advice-menu-item { transition: none; } }
/* at night a bridge dims its pictures too: the field camera and every photo drop to the night palette's level */
[data-obc-theme="night"] img { filter: brightness(.55) sepia(.35); }
[data-obc-theme="dusk"] img { filter: brightness(.85); }

/* ---- 14 Oct: fifteen boats, the sound, Kraftverk ---- */
.boatstrip { background: var(--container-background-color); border-radius: var(--r); padding: 6px 10px 0; margin-bottom: var(--gap); }
.boatstrip .lbl { display: block; padding: 2px 2px 0; }
.boatname { margin: 4px 0 0 !important; font-size: 14px; line-height: 20px; }
.boatname b { font-weight: 570; }
.soundrow { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.soundrow .lbl { flex: 1 1 240px; }
.soundrow obc-progress-bar { flex: 1 1 100%; }
.masters.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stream { grid-template-columns: 112px minmax(0, 1fr) 96px 68px; min-height: 64px; }
.stream .sl { display: grid; gap: 0; min-width: 0; }
.stream .chr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 11.5px; line-height: 14px; color: var(--element-neutral-color); }
.stream .chr i { font-style: normal; }
.stream .chr obc-slider { --slider-height: 24px; }
.kstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 8px 0 16px; padding: 12px 16px; background: var(--container-background-color); border-radius: var(--r); }
.replay { margin-bottom: 16px; }
.kv-controls { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-bottom: 8px; }
.kv-seek { display: block; width: 100%; }
.kv-timeline { display: block; width: 100%; height: 28px; cursor: pointer; border-radius: 3px; background: var(--container-section-color); }
#kv-legend { margin: 6px 0 12px; }
#kv-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.kv-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 16px 24px; align-items: start; }
.kv-boat h2 { margin: 0 0 4px; }
.kv-instr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 6px; }
.kv-instr .ci { aspect-ratio: 1; min-width: 0; }
.kv-instr .ci > * { display: block; width: 100%; height: 100%; }
.kv-streams { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.kvs { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 6px 2px; border-radius: 4px; background: var(--container-section-color); border-top: 3px solid var(--border-outline-color); min-width: 0; }
.kvs.vessel { border-top-color: var(--instrument-enhanced-primary-color); } .kvs.exact { border-top-color: var(--alert-alarm-color); }
.kvs.lit { box-shadow: inset 0 0 0 1px var(--instrument-enhanced-primary-color); }
.kvs .gv { width: 66px; height: 190px; position: relative; overflow: hidden; }   /* OpenBridge 1.0.1 gauge-vertical draws at a fixed 132×384 px */
.kvs .gv obc-gauge-vertical { position: absolute; left: 0; top: 0; display: block; width: 132px; height: 384px; transform: scale(.495); transform-origin: 0 0; }
.kvs b { font-weight: 570; font-size: 12px; line-height: 16px; }
.kvs .mv { min-height: 16px; color: var(--instrument-enhanced-primary-color); }
.kboats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); margin-top: 8px; }
.kboats obc-elevated-card { display: block; cursor: pointer; }
@media (max-width: 760px) {
  .kv-grid { grid-template-columns: minmax(0, 1fr); }
  .kv-streams { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kvs .gv { transform: scale(.75); transform-origin: top center; height: 143px; }
  .masters.two { grid-template-columns: minmax(0, 1fr); }
  .stream { grid-template-columns: 92px minmax(0, 1fr) 56px; }
}

/* ---- 15 Oct: Overview first, the instrument inside Kraftverk · demo ---- */
.facts { margin: 8px 0 8px; }
.facts-dl { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 8px 20px; margin: 0; padding: 4px 12px 8px; }
.facts-dl dt { font-weight: 570; color: var(--element-neutral-color); font-size: 14px; line-height: 20px; }
.facts-dl dd { margin: 0; font-size: 15px; line-height: 22px; }
#p-overview .rooms { margin-top: 8px; }
#p-overview obc-card.c.wide { margin-top: 24px; display: block; }
.instrument { margin: 8px 0 24px; }
@media (max-width: 760px) { .facts-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .facts-dl dd { margin-bottom: 8px; } }
#instrument, [id] { scroll-margin-top: 60px; }

/* ===== 15 Oct · the minimal pass (Enek: "more minimal … more streamlined, more attention to the layout") =====
   Reading pages = ONE centred column (44rem) on one scale: 40 title · 20 dek · 19 lede · 20 section · 16 body · 13 notes · 12 kicker.
   Bridge parts (replay, instrument, photos) = full-width bands, where OpenBridge's cards and instruments belong. No other sizes. */
:root { --measure: 44rem; --wide: 84rem; --hair: 1px solid color-mix(in srgb, var(--element-neutral-color) 28%, transparent); }   /* OpenBridge's outline colour vanishes on its own backdrop in day palette */
main { padding: 0; }
.doc { max-width: calc(var(--measure) + 40px); margin: 0 auto; padding: 64px 20px 72px; }
.band { max-width: calc(var(--wide) + 40px); margin: 0 auto; padding: 0 20px 64px; }
.doc-head { margin: 0 0 36px; }
.kicker { margin: 0 0 16px; font-size: 12px; line-height: 16px; font-weight: 570; letter-spacing: .08em; text-transform: uppercase; color: var(--element-neutral-color); }
.doc h1, .band h1 { font-size: 40px; line-height: 46px; font-weight: 570; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.dek { margin: 10px 0 0; font-size: 20px; line-height: 28px; color: var(--element-neutral-color); text-wrap: balance; }
.doc p { margin: 0 0 16px; font-size: 16px; line-height: 26px; }
.doc .lede { font-size: 19px; line-height: 30px; margin-bottom: 20px; }
.doc .note { font-size: 13px; line-height: 20px; color: var(--element-neutral-color); }
.doc .pull { font-size: 20px; line-height: 28px; font-weight: 570; margin: 8px 0 0; }
.doc section { margin-top: 56px; padding-top: 28px; border-top: var(--hair); }
.doc h2, .band-head h2 { font-size: 20px; line-height: 28px; font-weight: 570; margin: 0 0 12px; text-wrap: balance; }
.doc section > h2:not(:first-child) { margin-top: 32px; }

.facts { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); margin: 36px 0 0; border-top: var(--hair); }
.facts dt, .facts dd { margin: 0; padding: 11px 0; border-bottom: var(--hair); }
.facts dt { padding-right: 16px; font-size: 13px; line-height: 22px; font-weight: 570; color: var(--element-neutral-color); }
.facts dd { font-size: 15px; line-height: 22px; }
.ideas { margin: 0; }
.ideas dt { font-size: 16px; line-height: 24px; font-weight: 570; margin-top: 18px; }
.ideas dt:first-child { margin-top: 0; }
.ideas dd { margin: 2px 0 0; font-size: 16px; line-height: 26px; color: var(--element-neutral-color); }

.toc { list-style: none; margin: 0; padding: 0; border-top: var(--hair); }
.toc a { position: relative; display: grid; gap: 2px; padding: 12px 32px 12px 0; border-bottom: var(--hair); text-decoration: none; color: var(--element-active-color); }
.toc a::after { content: "→"; position: absolute; right: 4px; top: 12px; color: var(--element-neutral-color); transition: transform .15s ease; }
.toc a:hover::after { transform: translateX(3px); color: var(--instrument-enhanced-primary-color); }
.toc a:hover b { color: var(--instrument-enhanced-primary-color); }
.toc b { font-size: 16px; line-height: 24px; font-weight: 570; }
.toc span { font-size: 14px; line-height: 20px; color: var(--element-neutral-color); }

.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 22px 24px; margin: 20px 0 20px; padding: 0; background: none; }
.fig b { display: block; font-size: 34px; line-height: 38px; font-weight: 370; color: var(--instrument-enhanced-primary-color); font-variant-numeric: tabular-nums; }
.fig b small { margin-left: 3px; font-size: 16px; color: var(--element-neutral-color); }
.fig span { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--element-neutral-color); }

.band-head { max-width: var(--measure); margin: 56px 0 16px; }
.band-head:first-child { margin-top: 64px; }
.band-head p { margin: 0; font-size: 16px; line-height: 26px; color: var(--element-neutral-color); }
.band > obc-card.replay { margin-top: 0; }
.instrument { margin: 0 0 8px; }
.doc .tbl { margin: 12px 0 20px; }
.doc .log { margin-top: 8px; }
.doc .acc { margin-top: 0; }
.doc .photorow { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.doc .recs { max-width: none; }
.foot { max-width: calc(var(--wide) + 40px); margin: 0 auto; border-top: var(--hair); padding: 20px 20px 32px; }

@media (max-width: 760px) {
  .doc { padding: 40px 16px 56px; }
  .band { padding: 0 12px 48px; }
  .doc h1, .band h1 { font-size: 30px; line-height: 36px; }
  .dek { font-size: 18px; line-height: 26px; }
  .doc .lede { font-size: 17px; line-height: 28px; }
  .doc section { margin-top: 40px; padding-top: 22px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding: 12px 0 0; border-bottom: 0; }
  .facts dd { padding: 2px 0 12px; }
  .fig b { font-size: 28px; line-height: 32px; }
}
