/* SafetySave — FEDA IT Consulting theme. Mobile first: big touch targets for gloved hands, high contrast for sunlight. */
:root {
  --navy: #071b3a; --navy-2: #102341; --navy-line: #24375a; --brand: #05367b; --orange: #fd6500; --orange-ink: #b54800; --orange-soft: #feece0;
  --bg: #f3f6fb; --surface: #ffffff; --sunk: #eaeff6; --ink: #0d1b2e; --muted: #5b6577; --line: #e2e8f0;
  --good: #1d8456; --good-soft: #e3f4ec; --warn: #a96500; --warn-soft: #fdf1dc;
  --good-fill: #1d8456; --good-fill-ink: #fff; --good-fill-line: #1d8456; --good-fill-border: none; --good-fill-ring: none;
  --good-tint: #e3f4ec; --good-tint-ink: #1b7b50; --good-tint-border: none; --good-tint-icon: #1b7b50;
  --warn-tint: #fdf1dc; --warn-tint-ink: #9d5e00; --warn-tint-border: none; --warn-tint-icon: #9d5e00;
  --good-chip-ink: #1b7b50; --warn-chip-ink: #9d5e00; --n-fill: #5b6577; --n-fill-ink: #fff; --n-fill-ring: none; --bad: #c3352b; --bad-soft: #fbe7e5; --bad-fill: #c3352b; --bad-fill-ink: #fff; --bad-fill-border: none; --bad-fill-ring: none; --bad-fill-icon: #fff;
  --rk-l: #62c94f; --rk-m: #f2d63a; --rk-h: #f4a51c; --rk-vh: #d9372b; --rk-c: #7b3fa6;
  --radius: 12px; --tap: 48px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #071226; --surface: #0e1d36; --sunk: #13264a; --ink: #e6edf7; --muted: #9fb0c9; --line: #22375c; --brand: #8fb3ff;
  --orange-soft: #3a2310; --orange-ink: #ff9a52; --good: #3fbf86; --good-soft: #10301f; --warn: #e2aa3e; --warn-soft: #34270f; --bad: #ef6a5e; --bad-soft: #3a1714;
  /* FEDA Console dark (Mohamed 15 Nov 09:54): #ff6b6b at 16 % over #04112a, its border and icon, ink #eef3fa */
  /* the console's good #3cc6a8 and warn #f5c451 at 16 % over #04112a, the same treatment (ORCH-SAFETY 15 Nov) */
  --good-fill: #0d2e3e; --good-fill-ink: #eef3fa; --good-fill-line: #3cc6a8; --good-fill-border: 1px solid #3cc6a8; --good-fill-ring: inset 0 0 0 1px #3cc6a8;
  --good-tint: #0d2e3e; --good-tint-ink: #eef3fa; --good-tint-border: 1px solid #3cc6a8; --good-tint-icon: #3cc6a8;
  --warn-tint: #2b2e30; --warn-tint-ink: #eef3fa; --warn-tint-border: 1px solid #f5c451; --warn-tint-icon: #f5c451;
  --good-chip-ink: #3fbf86; --warn-chip-ink: #e2aa3e; --n-fill: #1b2943; --n-fill-ink: #eef3fa; --n-fill-ring: inset 0 0 0 1px #93a8c8;
  --bad-fill: #2c1f34; --bad-fill-ink: #eef3fa; --bad-fill-border: 1px solid #ff6b6b; --bad-fill-ring: inset 0 0 0 1px #ff6b6b; --bad-fill-icon: #ff6b6b;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #071226; --surface: #0e1d36; --sunk: #13264a; --ink: #e6edf7; --muted: #9fb0c9; --line: #22375c; --brand: #8fb3ff;
  --orange-soft: #3a2310; --orange-ink: #ff9a52; --good: #3fbf86; --good-soft: #10301f; --warn: #e2aa3e; --warn-soft: #34270f; --bad: #ef6a5e; --bad-soft: #3a1714;
  /* FEDA Console dark (Mohamed 15 Nov 09:54): #ff6b6b at 16 % over #04112a, its border and icon, ink #eef3fa */
  /* the console's good #3cc6a8 and warn #f5c451 at 16 % over #04112a, the same treatment (ORCH-SAFETY 15 Nov) */
  --good-fill: #0d2e3e; --good-fill-ink: #eef3fa; --good-fill-line: #3cc6a8; --good-fill-border: 1px solid #3cc6a8; --good-fill-ring: inset 0 0 0 1px #3cc6a8;
  --good-tint: #0d2e3e; --good-tint-ink: #eef3fa; --good-tint-border: 1px solid #3cc6a8; --good-tint-icon: #3cc6a8;
  --warn-tint: #2b2e30; --warn-tint-ink: #eef3fa; --warn-tint-border: 1px solid #f5c451; --warn-tint-icon: #f5c451;
  --good-chip-ink: #3fbf86; --warn-chip-ink: #e2aa3e; --n-fill: #1b2943; --n-fill-ink: #eef3fa; --n-fill-ring: inset 0 0 0 1px #93a8c8;
  --bad-fill: #2c1f34; --bad-fill-ink: #eef3fa; --bad-fill-border: 1px solid #ff6b6b; --bad-fill-ring: inset 0 0 0 1px #ff6b6b; --bad-fill-icon: #ff6b6b;
  color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.5rem; font-weight: 700; color: var(--brand); }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .6em; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
header.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; text-decoration: none; color: #fff; }
.brand .logo { width: 32px; height: 32px; flex: none; display: grid; place-items: center; }
.logo img { width: 100%; height: auto; display: block; border-radius: 22%; } /* icon v2 (15 Nov 2026): the hard hat on its #B93A0B ground, one image for light and dark */
.brand b { font-size: 1.1rem; letter-spacing: .02em; }
.brand span { color: #a9bbd9; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.syncpill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--navy-line); border-radius: 999px; padding: 4px 10px; font-size: .78rem; color: #cfe0ff; background: transparent; cursor: pointer; min-height: 32px; }
.syncpill.off { color: #ffd2b0; border-color: #7a3a10; }
.syncpill.bad { color: #ffb4ad; border-color: #7c2620; }
.syncpill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fbf86; }
.syncpill.off .dot { background: var(--orange); }
.syncpill.bad .dot { background: #ef6a5e; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); }
nav.side { display: none; }
main#view { min-width: 0; padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); max-width: 1100px; width: 100%; margin: 0 auto; }
nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom, 0px); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 500; position: relative; }
nav.bottom a[aria-current="page"] { color: var(--brand); }
nav.bottom a.new { color: #fff; }
nav.bottom a.new .bubble { width: 48px; height: 48px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; margin-top: -18px; box-shadow: 0 4px 14px rgb(253 101 0 / .4); }
nav.bottom a.new .bubble svg { width: 26px; height: 26px; stroke: #fff; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--orange); color: #fff; font-size: .68rem; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
nav.bottom .badge { position: absolute; top: 6px; left: calc(50% + 6px); }

@media (min-width: 900px) {
  .layout { grid-template-columns: 232px minmax(0, 1fr); }
  nav.side { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; position: sticky; top: 60px; height: calc(100dvh - 60px); overflow: auto; border-right: 1px solid var(--line); background: var(--surface); }
  nav.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; min-height: 44px; }
  nav.side a:hover { background: var(--sunk); }
  nav.side a[aria-current="page"] { background: var(--orange-soft); color: var(--orange-ink); }
  nav.side a .badge { margin-left: auto; }
  nav.side .sep { height: 1px; background: var(--line); margin: 8px 6px; }
  nav.bottom { display: none; }
  main#view { padding: 24px 28px 48px; }
}

/* ---------- building blocks ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.page-head .bar { width: 46px; height: 4px; background: var(--orange); border-radius: 2px; margin-top: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.good { background: var(--good-fill); border-color: var(--good-fill-line); color: var(--good-fill-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label.f { display: block; font-weight: 600; font-size: .85rem; margin: 14px 0 6px; }
label.f .muted { font-weight: 400; }
.input, select.input, textarea.input { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgb(5 54 123 / .15); }
.formgrid { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .formgrid { grid-template-columns: 1fr 1fr; } .formgrid .full { grid-column: 1 / -1; } }
.actions-bar { position: sticky; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); margin: 18px -16px -16px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 10px; z-index: 5; }
@media (min-width: 900px) { .actions-bar { bottom: 0; } }
.actions-bar .btn { flex: 1; }

/* checklist answers: big segmented buttons */
.check { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .q { font-weight: 500; }
.check .q .crit { color: var(--bad); font-size: .75rem; font-weight: 700; margin-left: 6px; letter-spacing: .04em; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { min-height: 44px; min-width: 72px; border: 0; border-left: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; color: var(--muted); padding: 0 10px; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"].s, .seg button[aria-pressed="true"].p { background: var(--good-fill); color: var(--good-fill-ink); box-shadow: var(--good-fill-ring); }
.seg button[aria-pressed="true"].r, .seg button[aria-pressed="true"].f { background: var(--bad-fill); color: var(--bad-fill-ink); box-shadow: var(--bad-fill-ring); }
.seg button[aria-pressed="true"].n { background: var(--n-fill); color: var(--n-fill-ink); box-shadow: var(--n-fill-ring); }
@media (min-width: 700px) { .check { grid-template-columns: 1fr auto; align-items: center; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--sunk); color: var(--ink); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good-chip-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-chip-ink); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.brand { background: var(--orange-soft); color: var(--orange-ink); }
.chip button { border: 0; background: transparent; cursor: pointer; padding: 0; font-weight: 700; color: inherit; min-width: 20px; min-height: 20px; }
.togglechips { display: flex; flex-wrap: wrap; gap: 8px; }
.togglechips button { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .85rem; }
.togglechips button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.banner { border-radius: 10px; padding: 12px 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.banner.good { background: var(--good-tint); color: var(--good-tint-ink); border: var(--good-tint-border); }
.banner.good svg.i { color: var(--good-tint-icon); }
.banner.warn { background: var(--warn-tint); color: var(--warn-tint-ink); border: var(--warn-tint-border); }
.banner.warn svg.i { color: var(--warn-tint-icon); }
.banner.bad { background: var(--bad-fill); color: var(--bad-fill-ink); border: var(--bad-fill-border); } /* dark: the FEDA Console style (CHECK3 09:35, Mohamed 09:54) */
.banner.bad svg.i { color: var(--bad-fill-icon); }
.banner.info { background: var(--sunk); color: var(--ink); font-weight: 500; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list a.item, .list .item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; text-decoration: none; color: inherit; min-height: 56px; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list .item .s { color: var(--muted); font-size: .82rem; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs button, .tabs a { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; min-height: 44px; text-decoration: none; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--brand); border-bottom-color: var(--orange); }

/* KPI tiles */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .v { font-size: 1.8rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.kpi .l { font-size: .8rem; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.meter.good i { background: var(--good); } .meter.warn i { background: var(--orange); } .meter.bad i { background: var(--bad); }
.index { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.index .v { font-size: 3.4rem; font-weight: 700; line-height: 1; }
.index .bandl { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.index .bandl i { width: 10px; height: 10px; border-radius: 50%; }
.index .muted { color: #a9bbd9; }

/* risk ranks */
.rk { display: inline-block; min-width: 40px; text-align: center; border-radius: 6px; padding: 2px 6px; font-weight: 700; font-size: .8rem; color: #17220f; }
.rk-L { background: var(--rk-l); } .rk-M { background: var(--rk-m); } .rk-H { background: var(--rk-h); } .rk-VH { background: var(--rk-vh); color: #fff; } .rk-C { background: var(--rk-c); color: #fff; }

.step { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; background: var(--surface); }
.step .lc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }

/* detail */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .85rem; }
dl.kv dd { margin: 0; font-weight: 500; }
.thread { display: grid; gap: 10px; }
.msg { background: var(--sunk); border-radius: 10px; padding: 10px 12px; }
.msg .who { font-size: .78rem; color: var(--muted); }
.photo { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.scroll-x { overflow-x: auto; max-width: 100%; }
/* On a phone nothing may widen the page: cards and grid cells shrink, their wide content scrolls inside (13 Nov 2026). */
.card, .grid > * { min-width: 0; }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.login .card { width: min(440px, 100%); }
.login .logo { width: 52px; flex: none; display: grid; place-items: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .25); transition: opacity .3s, transform .3s; }
.toast.good { background: var(--good-fill); color: var(--good-fill-ink); border: var(--good-fill-border); } .toast.bad { background: var(--bad-fill); color: var(--bad-fill-ink); border: var(--bad-fill-border); }
.toast.out { opacity: 0; transform: translateY(8px); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.grid > .card + .card, .grid > .card { margin-top: 0; }
#board { margin-top: 12px; }
@media (min-width: 900px) { .layout { background: linear-gradient(to right, var(--surface) 231px, var(--line) 231px, var(--line) 232px, transparent 232px); } nav.side { border-right: 0; background: transparent; } }
@media (min-width: 700px) { .span2 { grid-column: span 2; } }
main#view:focus { outline: none; }

/* invites (CHECK3 Q1, Q5): cards instead of the table on phones; big quiz answers */
.inv-cards { display: none; }
@media (max-width: 600px) { .inv-table { display: none; } }
@media (max-width: 600px) { .inv-cards { display: block; } }
.quiz-opt { min-height: 56px; justify-content: flex-start; text-align: left; white-space: normal; font-size: 1.02rem; }
/* the phone quiz (CHECK3 Q9, Q10): the chosen answer selected, not an action; the card fills the screen, buttons at the bottom */
.quiz-opt.selected { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand); font-weight: 600; }
.quiz-opt .i { flex: none; }
@media (max-width: 600px) { .quiz-step { min-height: calc(100dvh - 32px); display: flex; flex-direction: column; } }
.quiz-step .actions-bar { margin-top: auto; }
/* the gate result scrolled into view clears the top bar and the notch (REVIEW2 L1) */
#result { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 80px); }

/* Reference photos on checklist items (Mohamed via ORCH-SAFETY, 15 Nov 2026): a glove-size thumbnail left of the item
   text, full screen on tap; the checklist editor lists one row per item. An item without a photo keeps its plain row. */
.check .q.withref { display: flex; gap: 12px; align-items: flex-start; }
.check .q.withref .qt { flex: 1; min-width: 0; }
.picto { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; color: var(--ink); }
.picto svg { width: 100%; height: 100%; }
.refthumb { flex: none; width: 64px; height: 64px; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); color: var(--muted); display: inline-grid; place-items: center; overflow: hidden; cursor: zoom-in; font: inherit; }
.refthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.refthumb.missing, .refthumb.empty { border-style: dashed; }
.refthumb.empty { cursor: default; }
.refthumb:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.refview { position: fixed; inset: 0; z-index: 100; background: rgba(4, 10, 24, .95); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.refview-body { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.refview-img { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; cursor: zoom-out; }
.refview-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.refview-cap { color: #eef3fa; font-weight: 600; font-size: 1.05rem; text-align: center; max-width: 60ch; margin: 0; }
.refview-close { min-width: 180px; min-height: 52px; }
.refview-wait, .refview-none { color: #93a8c8; display: grid; justify-items: center; gap: 10px; text-align: center; margin: 0; }
.refpanel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.refpanel h3 { margin: 0; }
.reflist { list-style: none; margin: 0; padding: 0; }
.refrow { display: grid; grid-template-columns: 64px 1fr; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.refrow:first-child { border-top: 0; }
.refrow-text { min-width: 0; font-weight: 500; }
.refacts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.refrow.busy { opacity: .6; }
@media (min-width: 700px) { .refrow { grid-template-columns: 64px 1fr auto; } .refacts { grid-column: auto; justify-content: flex-end; } }

/* Fleet board on phones (CHECK3 15:27 Q1): each unit is a card below 600 px, the table above. */
.fleet-cards { display: none; margin: 8px 0 0; padding: 0; list-style: none; }
@media (max-width: 600px) { .fleet-table { display: none; } .fleet-cards { display: block; } }
.fleet-card { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.fleet-card:first-child { border-top: 0; }
.fleet-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fleet-unit { white-space: nowrap; font-size: 1.05rem; }
.fleet-last { overflow-wrap: anywhere; }
.seg.invalid { outline: 2px solid var(--bad); outline-offset: 2px; }
/* the pictogram control in Admin › Checklists (16 Nov 2026): the chosen drawing beside its list */
.refpic { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.refpic select { max-width: 260px; }

/* FEDA inside the app (Mohamed 16 Nov 2026 10:50; feda-inside-v1/RULE.md): the sign-in lock-up « Kisili by FEDA », and the
   « by FEDA » endorsement at the foot of the side menu and on More. 20 px high (the cube), never under 14 px, half the cube
   of clear space; BRANDING's light file on light, its dark file on dark; never recoloured, never a link. */
.lockup { display: flex; justify-content: center; padding: 8px 0 4px; }
.lockup img { width: 100%; max-width: 320px; height: auto; } /* its aspect ratio at every width; its « by FEDA » cube is 14 px or more down to 319 px screens (CHECK3 17:58 M1) */
.lockup-narrow { display: none; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 4px; }
.lockup-narrow > img { width: 44px; height: 44px; border-radius: 22%; }
.lockup-narrow b { font-size: 1.6rem; color: var(--brand); }
.lockup-narrow .byfeda { margin: 0; padding: 7px; }
/* narrower than 319 px the lock-up's cube would drop under 14 px: the icon, the name and the endorsement at 14 px instead (RULE: never under 14) */
@media (max-width: 318px) { .lockup { display: none; } .lockup-narrow { display: flex; } .lockup-narrow .byfeda img { height: 14px; } }
.byfeda { padding: 10px; margin-top: auto; display: flex; align-items: center; }
.byfeda img { height: 20px; min-height: 14px; width: auto; }
.fi-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fi-light { display: none; } :root:not([data-theme="light"]) .fi-dark { display: inline-block; } }
:root[data-theme="dark"] .fi-light { display: none; }
:root[data-theme="dark"] .fi-dark { display: inline-block; }
