/* Created by Avlonitis assisted by AI. */
/* Plain, tidy styling for both the platform and the offline editor. */
:root {
  --bg: #f4f6f9; --panel: #fff; --ink: #1c2733; --muted: #6a7787; --line: #dde3ea;
  --brand: #1d3b5c; --brand-ink: #fff; --accent: #2667b0;
  --yes: #2e8b57; --no: #c0392b; --na: #7f8c8d; --warn: #b9770e; --warn-bg: #fff6e0;
  --obs-bg: #fdf3f2; --note-bg: #eef4fb; --warn-ink: #6b4a07; --warn-ink2: #9a6700; --danger-bg: #fdecea; --danger-ink: #7b241c;
  --danger-line: #e8b4ae; --th-bg: #f0f3f7; --hover-bg: #f7fafd; --hover-bg2: #eaf2fb; --chip-bg: #eef2f7; --chip-ink: #1d3b5c;
  --ok-bg: #e6f4ec; --ok-bg2: #f2faf5; --soft: #f6f8fb; --sticky-bg: rgba(244,246,249,.96); --link: #2667b0; --brand-text: #1d3b5c;
  --radius: 8px; font-size: 16px; color-scheme: light;
}
/* dark theme (D17) — chosen per user (Light / Dark / Automatic); "Automatic" is resolved to light/dark by theme.js */
:root[data-theme="dark"] {
  --bg: #10161d; --panel: #19222c; --ink: #e3e9ef; --muted: #96a3b1; --line: #2e3b48;
  --brand: #152b44; --accent: #3a7bd5; --link: #8dbcf2;
  --yes: #3a9e69; --no: #d65a4f; --na: #7c8a8b; --warn: #e2a640; --warn-bg: #3a2f15;
  --obs-bg: #2d1e1d; --note-bg: #1a2a3c; --warn-ink: #f3d28a; --warn-ink2: #e6b450; --danger-bg: #3a1d1b; --danger-ink: #f2b0a8;
  --danger-line: #6e3a35; --th-bg: #202b37; --hover-bg: #212d3a; --hover-bg2: #25364a; --chip-bg: #24364a; --chip-ink: #b9d3f0;
  --ok-bg: #173320; --ok-bg2: #16301f; --soft: #202b37; --sticky-bg: rgba(16,22,29,.96); --brand-text: #8dbcf2;
  color-scheme: dark;
}
:root[data-theme="dark"] img { opacity: .95; }
button { color: inherit; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.4; }
h1, h2, h3 { line-height: 1.2; margin: .2em 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
a { color: var(--link); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: .3em; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: .5em .9em; border-radius: var(--radius); font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: var(--no); border-color: var(--no); color: #fff; }
.btn.big { font-size: 1.1rem; padding: .8em 1.4em; }
.btn.small { padding: .3em .6em; font-size: .9rem; }
button.icon { border: 0; background: none; cursor: pointer; font-size: 1rem; padding: .2em; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; flex-wrap: wrap; }
.topbar .brand { display: flex; flex-direction: column; font-size: 1rem; }
.topbar .brand span { font-size: .85rem; opacity: .8; }
.topbar a { color: #fff; }
.topbar .actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.topbar nav a { color: #fff; text-decoration: none; padding: .3em .6em; border-radius: 6px; }
.topbar nav a.on, .topbar nav a:hover { background: rgba(255,255,255,.15); }
.save-state { font-size: .85rem; padding: .2em .6em; border-radius: 99px; }
.save-state.dirty { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.save-state.clean { opacity: .85; }
.menu { position: relative; }
.menu summary { list-style: none; } .menu summary::-webkit-details-marker { display: none; }
.menu > div { position: absolute; right: 0; top: 110%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); display: flex; flex-direction: column; min-width: 200px; padding: .3rem; z-index: 30; }
.menu > div .btn { border: 0; justify-content: flex-start; }

.progress { display: flex; align-items: center; gap: .8rem; padding: .5rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); font-size: .9rem; flex-wrap: wrap; }
.bar { flex: 1 1 160px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 420px; }
.bar i { display: block; height: 100%; background: var(--yes); }

.layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; padding: 1rem; max-width: 1300px; margin: 0 auto; }
.layout > main { min-width: 0; }
.chapters { position: sticky; top: 4.5rem; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 6rem); overflow: auto; }
.chapters button { display: grid; grid-template-columns: 2em 1fr auto; gap: .4em; text-align: left; border: 0; background: none; padding: .5em .6em; border-radius: 6px; font: inherit; cursor: pointer; color: var(--ink); }
.chapters button.on { background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.chapters button .count { color: var(--muted); font-size: .85rem; }
.chapters button.complete .count { color: var(--yes); font-weight: 600; }
.chapter-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; margin-bottom: .6rem; }
.chapter-select { display: none; }
.pager { display: flex; justify-content: space-between; margin: 1.2rem 0 3rem; }

.qcard { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .8rem; }
.qcard.done { border-left-color: var(--yes); }
.qcard.obs { border-left-color: var(--no); }
.qcard header { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; }
.qnum { font-weight: 700; color: var(--brand-text); min-width: 3em; }
.qtext { font-weight: 500; }
.qstate { color: var(--yes); font-weight: 700; }
.flag { font-size: .75rem; padding: .1em .5em; border-radius: 99px; background: var(--chip-bg); color: var(--chip-ink); margin-left: .3em; white-space: nowrap; }
.flag.warn { background: var(--warn-bg); color: var(--warn); }
.guidance { margin: .4rem 0 .6rem; font-size: .9rem; color: var(--muted); }
.guidance summary { cursor: pointer; color: var(--accent); }
.guidance p { margin: .4rem 0; font-style: italic; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.seg button { border: 1px solid var(--line); background: var(--panel); padding: .55em 1.1em; border-radius: var(--radius); font: inherit; cursor: pointer; min-width: 4.5em; }
.seg.small button { padding: .3em .8em; min-width: 3.5em; }
.seg button.on { color: #fff; border-color: transparent; background: var(--accent); }
.seg button.yes.on { background: var(--yes); } .seg button.no.on { background: var(--no); } .seg button.na.on { background: var(--na); }
.field { display: flex; flex-direction: column; gap: .2rem; margin: .5rem 0; font-size: .9rem; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; gap: .6rem; }
.field.check { cursor: pointer; }
.field textarea, input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select {
  font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: .45em .6em; width: 100%; background: var(--panel); }
.field textarea { resize: vertical; }
.obs-box { background: var(--obs-bg); border-radius: 6px; padding: .2rem .7rem; margin: .4rem 0; }
.obs-box .row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.photos { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .4rem; }
.photos figure { margin: 0; width: 140px; }
.photos img { width: 140px; height: 105px; object-fit: cover; border-radius: 6px; display: block; background: var(--line); }
.photos figcaption { display: flex; gap: .2rem; margin-top: .2rem; }
.photos figcaption input { font-size: .8rem; padding: .2em .4em; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.home { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
.note { padding: .7rem 1rem; border-radius: var(--radius); background: var(--note-bg); }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.note.error { background: var(--danger-bg); color: var(--danger-ink); }
.page { max-width: 1300px; margin: 0 auto; padding: 1rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--th-bg); font-size: .85rem; color: var(--muted); font-weight: 600; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: var(--hover-bg); }
table.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: .25rem 1rem .25rem 0; vertical-align: top; white-space: nowrap; }
table.kv td { padding: .25rem 0; }
.badge { display: inline-block; font-size: .78rem; padding: .1em .6em; border-radius: 99px; background: var(--chip-bg); color: var(--chip-ink); white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.ok { background: var(--ok-bg); color: var(--yes); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.form-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: var(--muted); }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0 1rem; }
.toolbar .spacer { flex: 1; }

/* conflict screen */
.conflict { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; }
.conflict .sides { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .6rem; }
.conflict .side { border: 2px solid var(--line); border-radius: var(--radius); padding: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.conflict .side.chosen { border-color: var(--yes); background: var(--ok-bg2); }
.conflict .side h4 { margin: 0; font-size: .95rem; }
.conflict .side .meta { font-size: .8rem; color: var(--muted); }
.conflict .side table { font-size: .9rem; }
.conflict .side .btn { align-self: flex-start; margin-top: auto; }
.sticky-actions { position: sticky; bottom: 0; background: var(--sticky-bg); padding: .8rem 0; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,25,35,.45); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: var(--panel); border-radius: 10px; padding: 1.2rem 1.4rem; max-width: 560px; width: 100%; max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column; }
.modal > *:not(h2):not(.modal-actions) { overflow: auto; min-height: 0; }
.modal-actions { flex: none; }
.modal p { white-space: pre-line; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%) translateY(150%); background: #22303f; color: #fff;
  padding: .7rem 1.1rem; border-radius: 8px; transition: transform .25s; z-index: 200; width: max-content; max-width: min(92vw, 34rem); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { background: #1f6f45; } .toast.error { background: #a93226; } .toast.warn { background: #9a6408; }
.login { max-width: 380px; margin: 4rem auto; }
.login form { display: flex; flex-direction: column; gap: .8rem; }
.login label { display: flex; flex-direction: column; gap: .25rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; padding: .6rem; }
  .chapters { display: none; }
  .chapter-select { display: block; }
  .chapter-head h2 { display: none; }
  .conflict .sides { grid-template-columns: 1fr; }
  .photos figure, .photos img { width: 120px; } .photos img { height: 90px; }
  .seg button { flex: 1 1 auto; }
}

/* editor: recent files */
.recent { display: flex; flex-direction: column; gap: .4rem; }
.recent-item { display: flex; align-items: center; gap: .3rem; }
.recent-item .icon { flex: none; padding: .5rem; }
.recent-open { flex: 1; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; font: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; cursor: pointer; color: var(--ink); }
.recent-open:hover { border-color: var(--accent); }

/* chapter tabs under the banner (editor + platform) */
.sticky-head { position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.sticky-head .topbar { position: static; }
.sticky-tabs { position: sticky; top: var(--topbar-h, 0px); z-index: 15; margin: 0 -1rem; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .45rem .8rem; background: var(--panel); border-bottom: 1px solid var(--line);
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tab { flex: none; display: inline-flex; align-items: center; gap: .4rem; max-width: 17rem; padding: .4rem .75rem; border-radius: 99px;
  border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.tab .num { font-weight: 700; color: var(--brand-text); }
.tab .t { overflow: hidden; text-overflow: ellipsis; }
.tab .count { font-size: .75rem; color: var(--muted); }
.tab.complete .count { color: var(--yes); font-weight: 700; }
.tab.on { background: var(--brand); border-color: var(--brand-text); color: #fff; }
.tab.on .num, .tab.on .count { color: #fff; }
.layout.single { grid-template-columns: 1fr; max-width: 980px; }
.sticky-head .progress, .sticky-tabs .progress { padding: .35rem 1rem; font-size: .85rem; border-bottom: 0; }
.sticky-tabs .progress { background: var(--panel); gap: .4rem .8rem; }
.sticky-tabs .progress .save-state { margin-left: auto; }
@media (max-width: 820px) {
  .platform-page .topbar, body:not(.editor) .topbar { position: static; }
  .tab { max-width: 11rem; font-size: .85rem; padding: .35rem .6rem; }
  .chapter-head h2 { display: block; font-size: 1.05rem; }
}

/* critical question marker */
.critical { display: inline-flex; vertical-align: -4px; margin-left: .3rem; }
.qnum { white-space: nowrap; }

/* phones: wide tables scroll sideways instead of making the whole page wider */
@media (max-width: 820px) {
  table.list { display: block; overflow-x: auto; white-space: nowrap; }
  table.list td { white-space: normal; min-width: 7rem; }
}

/* chapter drop-down under the banner (replaces the tab strip) */
.chapter-bar { display: flex; align-items: center; gap: .4rem; padding: .45rem .8rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.chapter-picker { flex: 1; min-width: 0; font: inherit; font-weight: 600; color: var(--brand-text); padding: .55em .7em; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--soft); text-overflow: ellipsis; }
.chapter-bar .btn.step { flex: none; padding: .5em .75em; }
.chapter-bar .btn.step:disabled { opacity: .35; }

.btn.danger-outline { color: var(--no); border-color: var(--danger-line); }
.btn.danger-outline:hover { border-color: var(--no); background: var(--obs-bg); }

/* observations */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.tile .v { font-size: 1.6rem; font-weight: 700; color: var(--brand-text); }
.tile .l { font-size: .85rem; color: var(--muted); }
.tile.warn .v { color: var(--warn); } .tile.danger .v { color: var(--no); } .tile.ok .v { color: var(--yes); }
.filters select { width: auto; }
.badge.danger { background: var(--danger-bg); color: var(--no); }
.btn.ok { background: var(--yes); border-color: var(--yes); color: #fff; }
.nowrap { white-space: nowrap; }
.followup { margin: .5rem 0 .2rem; font-size: .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.followup > .fu-head { padding: .45rem .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; border-bottom: 1px solid var(--line); }
.followup-inline { padding: .6rem .8rem; }
.followup-inline h3 { font-size: 1rem; margin: .8rem 0 .4rem; }
.followup-body .next-step { margin-top: .6rem; padding-top: .4rem; border-top: 1px dashed var(--line); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
.timeline .ev { position: relative; padding: .2rem 0 .9rem 1rem; }
.timeline .ev::before { content: ''; position: absolute; left: -8px; top: .45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.timeline .ev.raised::before { background: var(--no); } .timeline .ev.rectification::before { background: var(--accent); }
.timeline .ev.accepted::before { background: var(--yes); } .timeline .ev.rejected::before { background: var(--no); }
.timeline .ev.rejected .head b { color: var(--no); } .timeline .ev.comment::before { background: var(--muted); }
.timeline .comment { white-space: pre-line; margin: .3rem 0; }
.timeline .quote { font-style: italic; margin: .3rem 0; }
.timeline .changes { margin: .3rem 0; padding-left: 1.2rem; }
.metrics { font-size: .9rem; color: var(--muted); }
input.due { width: auto; }

/* port type-ahead (D16) */
.port-picker .pp-box { position: relative; }
.port-picker input { width: 100%; }
.pp-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: .2rem 0; list-style: none;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 18rem; overflow-y: auto; }
.pp-list li { padding: .45rem .7rem; cursor: pointer; line-height: 1.3; }
.pp-list li.on, .pp-list li:hover { background: var(--hover-bg2); }
.pp-list li.none { cursor: default; }
.pp-hint { min-height: 1.1em; margin-top: .2rem; font-weight: normal; }
.pp-hint.warn { color: var(--warn-ink2); }
.form-grid .wide { grid-column: 1 / -1; }
.modal:has(.edit-details), .modal > .edit-details { overflow: visible; }

/* visible credit line at the bottom of every page (owner, 2026-11-09) */
.credit { text-align: center; font-size: .78rem; color: var(--muted); padding: 1.2rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.theme-pick select { font: inherit; padding: .15em .3em; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.theme-pick label { display: inline-flex; align-items: center; gap: .4em; }
.theme-pick select { width: auto; }

/* D18: report a problem + admin Activity page */
.nav-count:empty { display: none; }
.nav-count { display: inline-block; min-width: 1.3em; margin-left: .35em; padding: 0 .35em; border-radius: 99px; background: var(--no); color: #fff;
  font-size: .75rem; font-weight: 700; line-height: 1.3em; text-align: center; }
.report-form textarea { width: 100%; }
.report { margin-bottom: .8rem; }
.report.closed { opacity: .8; }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.report-head .badge { margin-left: auto; }
.report-msg { white-space: pre-wrap; margin: .5rem 0; }
.report-shot { max-width: 100%; max-height: 22rem; border: 1px solid var(--line); border-radius: 6px; display: block; margin: .4rem 0; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1 1 14rem; font: inherit; padding: .45em .6em; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.console { background: #0d1117; color: #c9d1d9; border-radius: var(--radius); padding: .6rem .8rem; max-height: 70vh; overflow: auto;
  font: .82rem/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; border: 1px solid #30363d; }
.con-line { display: flex; flex-wrap: wrap; gap: 0 .8rem; padding: .1rem 0; border-bottom: 1px solid #161b22; }
.con-time { color: #8b949e; }
.con-tag { font-weight: 700; min-width: 7.5em; }
.con-tag.ok { color: #3fb950; } .con-tag.warn { color: #d29922; } .con-tag.bad { color: #f85149; } .con-tag.info { color: #58a6ff; }
.con-who { color: #e6edf3; font-weight: 600; }
.con-text { color: #c9d1d9; }
.con-meta { color: #6e7681; }
.toolbar select { width: auto; font: inherit; padding: .4em .5em; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }

/* D19: dashboard + fleet */
button.tile { font: inherit; text-align: left; color: inherit; cursor: pointer; }
.tile.click:hover { border-color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-list { display: flex; flex-direction: column; }
.dash-row { display: flex; align-items: center; gap: .8rem; padding: .55rem .2rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.dash-row:first-child { border-top: 0; }
.dash-row:hover { background: var(--hover-bg); }
.dash-main { flex: 1; min-width: 0; }
.dash-main .badge { margin-left: .4rem; }
.dash-progress { display: flex; align-items: center; gap: .5rem; flex: 0 0 9.5rem; }
.dash-progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dash-progress .bar i { display: block; height: 100%; background: var(--yes); }
.dash-activity { list-style: none; margin: 0; padding: 0; }
.dash-activity li { padding: .4rem 0; border-top: 1px solid var(--line); line-height: 1.35; }
.dash-activity li:first-child { border-top: 0; }
.dash-activity .when { display: inline-block; min-width: 5.5em; }
.txt-warn { color: var(--warn); } .txt-danger { color: var(--no); }
table.fleet .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .dash-row { flex-wrap: wrap; } .dash-progress { flex-basis: 100%; } }

/* D23: documents attached to follow-up steps */
.file-list { list-style: none; padding: 0; margin: .4rem 0; display: flex; flex-direction: column; gap: .25rem; }
.file-list li { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; word-break: break-word; }

/* D24: photo viewer — full screen, or pinned beside the page on wide screens */
.photos img, .timeline .photos img { cursor: zoom-in; }
.pv { position: fixed; inset: 0; z-index: 90; background: #0b0f14; color: #e8edf2; display: flex; flex-direction: column; }
.pv.pinned { left: auto; width: min(46vw, 1000px); border-left: 1px solid #2a3542; box-shadow: -6px 0 20px rgba(0,0,0,.25); }
body.pv-pinned { padding-right: min(46vw, 1000px); }
body.pv-pinned .topbar { margin-right: 0; }
.pv-bar { display: flex; align-items: center; gap: .3rem; padding: .4rem .6rem; background: #141b23; flex: none; }
.pv-count { font-weight: 600; white-space: nowrap; }
.pv-title { color: #9fb0c0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pv-space { flex: 1; }
.pv-btn { background: transparent; color: inherit; border: 1px solid #334252; border-radius: 6px; min-width: 2.4rem; height: 2.4rem;
  font-size: 1.15rem; cursor: pointer; padding: 0 .5rem; }
.pv-btn:hover { background: #22303e; }
.pv-fit { font-size: .85rem; }
.pv-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; user-select: none; display: grid; place-items: center; }
.pv-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: center center;
  transition: transform .08s ease-out; cursor: zoom-in; -webkit-user-drag: none; }
.pv-stage.zoomed .pv-img { cursor: grab; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 4.5rem; font-size: 2.2rem; line-height: 1;
  background: rgba(20,27,35,.55); border-color: transparent; }
.pv-prev { left: .4rem; } .pv-next { right: .4rem; }
.pv-foot { flex: none; padding: .5rem .7rem calc(.5rem + env(safe-area-inset-bottom)); background: #141b23; }
.pv-cap { width: 100%; font: inherit; color: #e8edf2; background: #0f151c; border: 1px solid #334252; border-radius: 6px; padding: .45em .6em; }
.pv-cap-text { min-height: 1.2em; color: #c9d4de; }
@media (max-width: 820px) { .pv-nav { display: none; } .pv-bar .pv-btn:not(.pv-close) { min-width: 2.2rem; } }

/* D25: inspection register, inactive vessels, department */
/* side-scrolling only on small screens: elsewhere the page scrolls, so a table's header row can stay visible (sticky) */
@media (max-width: 1000px) { .table-wrap { overflow-x: auto; } }
/* register: everything centred; fits the page width (headers may wrap), scrolls sideways only on small screens */
table.list.register { width: 100%; overflow: visible; } /* (not clipped: lets the header row stick) */
table.list.register th, table.list.register td { text-align: center; vertical-align: middle; padding: .45rem .45rem; }
table.list.register th { white-space: normal; line-height: 1.2; position: sticky; top: var(--topbar-h, 0px); z-index: 5;
  box-shadow: inset 0 -1px 0 var(--line); } /* header row stays at the top while scrolling */
table.list.register td { white-space: nowrap; }
table.list.register td.wrap { white-space: normal; min-width: 6.5rem; }
table.register tr.group-start td { border-top: 2px solid var(--line); }
table.register tr.history { cursor: default; } /* before the platform: shown like the others, just not clickable */
table.register tr.totals td { border-top: 2px solid var(--ink); background: var(--bg); }
.list .num { text-align: right; }
tr.inactive td { opacity: .55; }
tr.inactive:hover td { opacity: .85; }
.changes-week { margin-top: .8rem; }
.changes-week summary { cursor: pointer; font-weight: 600; }
.followup-body .dept { margin: .2rem 0 .6rem; }
.followup-body .dept select { margin-left: .3rem; }

/* Transmed house flag */
.brand-row { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.brand-flag { height: 34px; width: auto; flex: none; }
/* the flag on a white rounded tile in the navy menu bar (owner, 2026-11-12) */
.brand-tile { flex: none; width: 40px; height: 40px; background: #fff; border-radius: 7px; display: grid; place-items: center; }
.brand-tile img { width: 32px; height: auto; display: block; }
.login-logo { text-align: center; margin: .2rem 0 .8rem; }
.login-logo img { height: 96px; width: auto; }
.login-logo .logo-dark { display: none; }
:root[data-theme="dark"] .login-logo .logo-light { display: none; }
:root[data-theme="dark"] .login-logo .logo-dark { display: inline; }
@media (max-width: 820px) { .brand-flag { height: 28px; } .brand-tile { width: 34px; height: 34px; border-radius: 6px; } .brand-tile img { width: 27px; } }

/* register: the vessel's name as one merged cell over its rows */
table.list.register td.vessel-cell { vertical-align: middle; background: var(--panel); border-right: 1px solid var(--line); cursor: pointer; }
table.list tr.click:hover td.vessel-cell { background: var(--panel); }

/* register colours: brand header, tinted vessel column, open rows bold on amber, days by age */
table.list.register th { background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 -1px 0 var(--brand); }
table.list.register td.vessel-cell, table.list tr.click:hover td.vessel-cell { background: var(--chip-bg); color: var(--chip-ink); }
table.list.register td.vessel-cell a { color: var(--chip-ink); }
table.register tr.has-open td { font-weight: 700; background: var(--warn-bg); }
table.register tr.has-open.click:hover td:not(.vessel-cell) { background: #ffedc2; }
:root[data-theme="dark"] table.register tr.has-open.click:hover td:not(.vessel-cell) { background: #4a3c1a; }
table.register .days { display: inline-block; min-width: 2.4em; padding: .05rem .4rem; border-radius: 999px; }
table.register .days.mid { background: var(--warn-bg); color: var(--warn-ink); box-shadow: inset 0 0 0 1px var(--warn); }
table.register .days.old { background: var(--danger-bg); color: var(--danger-ink); box-shadow: inset 0 0 0 1px var(--danger-line); }
table.register tr.totals td { background: var(--th-bg); }
table.register td.high-risk { color: var(--no); } /* the whole high-risk column red (zeros and the * too) */

/* D26: inspection details block — first on the inspection page, above the chapter list */
.ins-actions { margin-bottom: .6rem; }
.ins-head .ins-head-top { display: flex; gap: .8rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .8rem; }
.ins-head h1 { margin: 0 0 .2rem; }
.ins-fields { display: grid; grid-template-columns: 2fr 1fr 2fr 1.4fr; gap: .7rem 1rem; align-items: start; }
.ins-fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
.ins-fields label input, .ins-fields label select { width: 100%; }
.ins-fields .save-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.ins-fields .save-row:has(button[hidden]) { display: none; }
.ins-fields.ro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ins-head .fact { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.ins-head .fact span { color: var(--muted); } .ins-head .fact b { font-size: 1rem; color: var(--ink); }
.ins-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0 .8rem; }
.ins-totals .tile { padding: .5rem .7rem; display: flex; flex-direction: column; gap: .1rem; }
.ins-totals .tile b { font-size: 1.45rem; color: var(--brand-text); line-height: 1.1; }
.ins-totals .tile span { font-size: .8rem; color: var(--muted); }
.ins-totals .tile.hr b { color: var(--no); } .ins-totals .tile.open b { color: var(--warn); }
.ins-reports { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; border-top: 1px solid var(--line); padding-top: .8rem; }
.ins-reports > b { margin-right: .3rem; color: var(--brand-text); }
@media (max-width: 900px) {
  .ins-fields, .ins-fields.ro { grid-template-columns: 1fr 1fr; }
  .ins-fields .wide { grid-column: 1 / -1; }
  .ins-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .ins-fields { grid-template-columns: 1fr; } .ins-fields.ro { grid-template-columns: 1fr 1fr; } .ins-totals { grid-template-columns: 1fr 1fr; } .ins-reports .btn { flex: 1 1 45%; } }

/* D26: reports — an A4 sheet on screen, printed by the browser ("Save as PDF") */
.rp-toolbar { flex-wrap: wrap; gap: .5rem; align-items: center; }
.rp-cur { padding: .3em .6em; color: var(--brand-text); }
.report { --rp-ink: #1c2733; --rp-muted: #5f6b78; --rp-line: #d5dce4; --rp-brand: #1d3b5c;
  background: #fff; color: var(--rp-ink); max-width: 210mm; margin: .8rem auto 2rem; padding: 14mm 13mm; box-shadow: 0 2px 14px rgba(0,0,0,.15);
  font: 10pt/1.4 Arial, Helvetica, sans-serif; color-scheme: light; }
.report h1 { font-size: 17pt; margin: .5rem 0 1rem; color: var(--rp-brand); }
.rp-brand { display: flex; align-items: center; gap: 10px; }
.rp-brand img { height: 46px; }
.rp-company { font: 900 21pt/1 Arial, sans-serif; color: var(--rp-brand); letter-spacing: .5px; }
.rp-group { font: bold 8.5pt Arial, sans-serif; color: var(--rp-brand); letter-spacing: 1.2px; }
.rp-cover { break-after: page; }
.rp-cover-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 9mm; align-items: start; }
.report table { border-collapse: collapse; width: 100%; }
.rp-facts th { text-align: left; font-weight: normal; color: var(--rp-muted); padding: 2px 8px 2px 0; width: 38%; vertical-align: top; }
.rp-facts td { padding: 2px 0; font-weight: bold; }
.rp-totals th, .rp-totals td { border: 1px solid var(--rp-line); padding: 5px 8px; }
.rp-totals th { text-align: left; font-weight: normal; background: #f4f6f9; }
.rp-totals td { text-align: center; font-weight: bold; width: 18%; }
.rp-totals td.hr { color: #c0392b; } .rp-totals td.open { color: #b9770e; }
.rp-totals tr.sep th, .rp-totals tr.sep td { border-top: 2px solid var(--rp-brand); }
.rp-note { font-size: 8.5pt; color: var(--rp-muted); }
.rp-contents { margin-top: 9mm; }
.rp-contents th { text-align: left; border-bottom: 2px solid var(--rp-brand); padding: 4px 6px; color: var(--rp-brand); }
.rp-contents td { padding: 3px 6px; border-bottom: 1px solid var(--rp-line); }
.rp-contents td:first-child { width: 8mm; text-align: center; color: var(--rp-muted); }
.rp-contents th:nth-child(n+3), .rp-contents td:nth-child(n+3) { text-align: center; width: 24mm; }
.rp-contents tr.has-obs td:last-child { font-weight: bold; color: #c0392b; }
.rp-ch-title { background: var(--rp-brand); color: #fff; font-size: 11pt; padding: 5px 9px; margin: 6mm 0 2mm; break-after: avoid; }
.rp-chapter:first-child .rp-ch-title { margin-top: 0; }
.rp-q { padding: 5px 0 6px; border-bottom: 1px solid var(--rp-line); }
.rp-q-head { display: flex; gap: 8px; align-items: flex-start; break-inside: avoid; break-after: avoid; }
.rp-num { min-width: 11mm; font-weight: bold; color: var(--rp-brand); }
.rp-qtext { flex: 1; }
.rp-flags { display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.rp-ans { display: inline-block; min-width: 13mm; text-align: center; font: bold 8.5pt Arial, sans-serif; padding: 2px 6px; border-radius: 3px; color: #fff;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-ans.yes { background: #2e8b57; } .rp-ans.no { background: #c0392b; } .rp-ans.na { background: #7f8c8d; } .rp-ans.none { background: #fff; color: var(--rp-muted); border: 1px solid var(--rp-line); }
.rp-hr { font: bold 8pt Arial, sans-serif; color: #c0392b; border: 1px solid #e8b4ae; background: #fdecea; padding: 1px 5px; border-radius: 3px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.rp-body { margin: 3px 0 0 calc(11mm + 8px); }
.rp-body p { margin: 2px 0; }
.rp-guidance { font-style: italic; color: var(--rp-muted); font-size: 9pt; }
.rp-text { white-space: pre-wrap; }
.rp-meta { color: var(--rp-muted); font-size: 9pt; }
.rp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin: 3mm 0 1mm calc(11mm + 8px); }
.rp-photos figure { margin: 0; break-inside: avoid; }
.rp-photos img { display: block; width: 100%; height: 44mm; object-fit: cover; background: #eef1f4; border: 1px solid var(--rp-line); }
.rp-photos figcaption { font-size: 8pt; color: var(--rp-muted); margin-top: 1px; }
.rp-missing { height: 44mm; display: grid; place-items: center; background: #f4f6f9; color: var(--rp-muted); font-size: 8pt; }
.rp-followup { margin: 3mm 0 1mm calc(11mm + 8px); border-left: 3px solid var(--rp-brand); padding: 1mm 0 1mm 4mm; }
.rp-fu-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; break-after: avoid; }
.rp-status { font-weight: bold; } .rp-status.closed { color: #2e8b57; } .rp-status.open { color: #b9770e; }
.rp-dept { color: var(--rp-muted); font-size: 9pt; }
.rp-step { margin-top: 2mm; }
.rp-step-head { font-size: 9pt; color: var(--rp-muted); break-after: avoid; }
.rp-step-head b { color: var(--rp-ink); }
.rp-step.accepted .rp-step-head b { color: #2e8b57; } .rp-step.rejected .rp-step-head b { color: #c0392b; }
.rp-step p { margin: 1px 0; }
.rp-step .rp-photos { margin-left: 0; }
.rp-sign { break-inside: avoid; margin-top: 12mm; display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
.rp-sign div { display: flex; flex-direction: column; gap: 3px; }
.rp-sign span { color: var(--rp-muted); font-size: 9pt; }
.rp-sign i { display: block; border-bottom: 1px solid var(--rp-ink); height: 14mm; }
.rp-generated { grid-column: 1 / -1; font-size: 8pt; color: var(--rp-muted); margin-top: 6mm; }
.report a { color: inherit; }
@media (max-width: 800px) { .report { padding: 6mm 5mm; } .rp-cover-grid { grid-template-columns: 1fr; } .rp-photos { grid-template-columns: 1fr 1fr; } }
@media print {
  html, body { background: #fff !important; }
  .topbar, .no-print, #toast, .credit { display: none !important; }
  .page { max-width: none; padding: 0; margin: 0; }
  .report { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .rp-photos { grid-template-columns: repeat(3, 1fr); }
}

/* D26: close-outs of one inspection — list by chapter (left) + the selected observation (right) */
.co-layout { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 1rem; align-items: start; }
.co-list { position: sticky; top: calc(var(--topbar-h, 0px) + .5rem); max-height: calc(100vh - var(--topbar-h, 0px) - 1.5rem); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.co-filter { margin: 0 0 .6rem; }
.co-chapter { background: var(--th-bg); font-weight: 600; padding: .4rem .6rem; border-radius: 6px; margin: .5rem 0 .3rem; font-size: .9rem; }
.co-chapter span { color: var(--muted); font-weight: normal; }
.co-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--warn); border-radius: 6px; padding: .5rem .6rem; margin-bottom: .35rem; cursor: pointer; }
.co-item.ok { border-left-color: var(--yes); } .co-item.danger { border-left-color: var(--no); }
.co-item:hover { background: var(--hover-bg); } .co-item.on { background: var(--hover-bg2); border-color: var(--accent); }
.co-item-head { display: flex; gap: .3rem; justify-content: flex-end; margin-bottom: .25rem; }
.co-q { font-size: .88rem; } .co-obs { font-size: .82rem; color: var(--muted); margin-top: .2rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.co-detail h2 { margin: 0; display: flex; gap: .4rem; align-items: center; }
@media (max-width: 900px) { .co-layout { grid-template-columns: 1fr; } .co-list { position: static; max-height: 55vh; } }
.ins-totals .tile b small.grey { font-size: .8rem; font-weight: normal; color: var(--muted); }
.rp-totals th .grey { color: var(--rp-muted); font-size: 8.5pt; }

/* D27: rectification evidence (Rectified during inspection: Yes) — its own box, apart from the finding's photos */
.evidence { border: 1px solid var(--line); border-left: 4px solid var(--yes); border-radius: var(--radius); background: var(--ok-bg2);
  padding: .6rem .8rem; margin: .6rem 0; }
.evidence .ev-head { margin-bottom: .3rem; }
.evidence .photos { margin-top: .3rem; }
.evidence .file-list { margin: .3rem 0; }
.rp-evidence { margin: 2mm 0 1mm calc(11mm + 8px); border-left: 3px solid #2e8b57; padding: 1mm 0 1mm 4mm; }
.rp-ev-head { font-size: 9pt; color: #2e8b57; break-after: avoid; }
.rp-evidence .rp-photos { margin-left: 0; }
.rp-evidence p { margin: 1px 0; }

/* dashboard register: one line per vessel, its inspections underneath when opened (owner, 2026-11-12) */
.reg-tools { justify-content: flex-end; gap: .4rem; margin: -.2rem 0 .4rem; }
table.register.by-vessel tr.vessel-sum { cursor: pointer; }
table.register.by-vessel tr.vessel-sum td.vessel-cell { text-align: left; white-space: nowrap; }
table.register.by-vessel tr.vessel-sum:hover td { background: var(--hover-bg2); }
table.register.by-vessel tr.vessel-sum.expanded td { background: var(--chip-bg); }
table.register.by-vessel .chev { display: inline-block; width: 1em; color: var(--brand-text); }
table.register.by-vessel .vessel-link { margin-left: .4rem; text-decoration: none; opacity: .7; }
table.register.by-vessel .vessel-link:hover { opacity: 1; }
table.register.by-vessel tr.vessel-sum .badge { margin-left: .4rem; }
table.register.by-vessel tr.vessel-ins td { font-size: .92em; background: var(--soft); }
table.register.by-vessel tr.vessel-ins td.ins-where { text-align: left; padding-left: 2rem; white-space: normal; }
table.register.by-vessel tr.vessel-ins.has-open td { background: var(--warn-bg); }
table.register.by-vessel tr.vessel-ins.click:hover td { background: var(--hover-bg2); }
/* vessel line: last inspection under the name; each vessel a block with a thin border in the name's colour (owner, 2026-11-12) */
table.register.by-vessel td.vessel-cell .vrow { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
table.register.by-vessel td.vessel-cell .vlast { font-size: .76rem; color: var(--muted); line-height: 1.25; text-align: center; font-weight: normal; }
table.register.by-vessel td.vessel-cell .vlast span { display: block; font-weight: normal; }
table.register.by-vessel td.vessel-cell .vlast span + span { color: var(--ink); }
/* each vessel a box with a thin rounded border in the name's colour, apart from the header and from each other */
table.list.register.by-vessel { border-collapse: separate; border-spacing: 0; border: none; border-radius: 0; }
table.register.by-vessel tbody.vgroup tr:first-child td { border-top: 1.5px solid var(--chip-ink); }
table.register.by-vessel tbody.vgroup tr:last-child td { border-bottom: 1.5px solid var(--chip-ink); }
table.register.by-vessel tbody.vgroup td:first-child { border-left: 1.5px solid var(--chip-ink); }
table.register.by-vessel tbody.vgroup td:last-child { border-right: 1.5px solid var(--chip-ink); }
table.register.by-vessel tbody.vgroup tr:first-child td:first-child { border-top-left-radius: 9px; }
table.register.by-vessel tbody.vgroup tr:first-child td:last-child { border-top-right-radius: 9px; }
table.register.by-vessel tbody.vgroup tr:last-child td:first-child { border-bottom-left-radius: 9px; }
table.register.by-vessel tbody.vgroup tr:last-child td:last-child { border-bottom-right-radius: 9px; }
table.register.by-vessel tbody.vgap td { padding: 0; height: 7px; border: none; background: var(--panel); }

/* phones (owner, 2026-11-13): the register and the Vessels table as cards — no sideways scrolling */
.vcards, .vlist-m { display: none; }
@media (max-width: 760px) {
  .vtable, .reg-tools { display: none !important; }
  .vcards, .vlist-m { display: block; }
}
.vcard { border: 1.5px solid var(--chip-ink); border-radius: 12px; margin-bottom: .55rem; background: var(--panel); overflow: hidden; }
.vcard-head { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--chip-bg); border: 0; padding: .6rem .75rem; cursor: pointer; }
.vcard.has-open .vcard-head { background: var(--warn-bg); }
.vcard-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.vcard .vname { color: var(--chip-ink); font-size: 1.02rem; }
.vcard .vname .badge { margin-left: .35rem; }
.vcard .chev { display: inline-block; width: 1em; }
.vcard .vlast { font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.25; flex: none; }
.vcard .vlast span { display: block; } .vcard .vlast span + span { color: var(--ink); }
.vfigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .5rem 0 .3rem; }
.vfig { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .4rem; text-align: center; }
.vfig b { display: block; font-size: 1.15rem; line-height: 1.2; }
.vfig span { font-size: .72rem; color: var(--muted); }
.vfig.hr b { color: var(--no); } .vfig.open b { color: var(--warn); }
.vmore { font-size: .78rem; color: var(--muted); }
.vcard.inactive .vcard-head { opacity: .7; }
.vcard-ins { padding: .5rem .6rem .6rem; display: flex; flex-direction: column; gap: .4rem; }
.icard { display: block; border: 1px solid var(--line); border-radius: 9px; padding: .45rem .6rem; background: var(--soft); color: inherit; text-decoration: none; }
.icard.has-open { background: var(--warn-bg); }
.icard.click:active { background: var(--hover-bg2); }
.icard-top { display: flex; align-items: center; gap: .4rem; }
.icard-top .spacer { flex: 1; }
.icard-figs { font-size: .84rem; margin-top: .2rem; }
.icard .days { font-size: .78rem; }
.vcard-link { align-self: flex-end; font-size: .85rem; }
.vcard-total { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; background: var(--th-bg); }
.vlist-m .vrow-m { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: .6rem; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: .55rem .2rem; cursor: pointer; }
.vrow-figs { display: flex; flex-direction: column; align-items: flex-end; font-size: .82rem; gap: .05rem; flex: none; }
.icard .days { display: inline-block; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--line); }
.icard .days.mid { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn); }
.icard .days.old { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-line); }
