/* Colac Tenpin Bowl Staff App — one stylesheet, phone first (staff), with a desktop layout (manager). */

@font-face { font-family: "Soin Sans Neue"; font-weight: 400; font-display: swap; src: url(../fonts/soin-sans-neue-400.woff2) format("woff2"); }
@font-face { font-family: "Soin Sans Neue"; font-weight: 500; font-display: swap; src: url(../fonts/soin-sans-neue-500.woff2) format("woff2"); }
@font-face { font-family: "Soin Sans Neue"; font-weight: 700; font-display: swap; src: url(../fonts/soin-sans-neue-700.woff2) format("woff2"); }
@font-face { font-family: "Soin Sans Neue"; font-weight: 800; font-display: swap; src: url(../fonts/soin-sans-neue-800.woff2) format("woff2"); }

:root {
  /* Bowl brand colours (same as colactenpinbowl.com.au) */
  --navy: #0c3b5e;
  --navy-2: #0a3150;
  --teal: #1ea1bf;
  --teal-dark: #188aa4;
  --gold: #efac06;
  --gold-dark: #d69a05;
  --text: #33313a;
  --muted: #6c6875;
  --line: #e2dde9;
  --bg: #f5f3ef;
  --card: #ffffff;
  --red: #c4372d;
  --red-tint: #fbeceb;
  --green: #2e8540;
  --purple: #7a3fa6;
  --orange: #e8590c;

  --radius: 12px;
  /* Soin Sans Neue = the bowl's brand font (licensed). Weights: 400, 500, 700, 800. */
  --head: "Soin Sans Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Soin Sans Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tap: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.45 var(--body);
}
a { color: var(--teal-dark); }
img, svg { display: block; }
[hidden] { display: none !important; }
small { font-size: .85em; }
.muted { color: var(--muted); }

.icon { width: 22px; height: 22px; flex: none; }
.icon--sm { width: 14px; height: 14px; }

/* ---------- Top bar (matches the website's navy header) ---------- */
.topbar {
  background: var(--navy); color: #fff;
  padding-top: env(safe-area-inset-top);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.topbar__inner { max-width: 760px; margin: 0 auto; height: 66px; padding: 0 12px 0 16px; display: flex; align-items: center; gap: 8px; }
.topbar__back { color: #fff; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; border-radius: 50%; }
.topbar__back:hover { background: rgba(255,255,255,.12); }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand__logo { height: 52px; width: auto; }
.menu { position: relative; }
.menu__btn { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 10px 6px 6px; border-radius: 999px; }
.menu__btn::-webkit-details-marker { display: none; }
.menu__btn:hover, .menu[open] .menu__btn { background: rgba(255,255,255,.12); }
.menu__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font: 800 16px/1 var(--head); }
.menu__name { font: 800 15px/1 var(--head); text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
  background: #fff; color: var(--text); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(12,59,94,.25); padding: 8px; z-index: 20;
}
.menu__who { margin: 4px 10px 10px; font-weight: 700; line-height: 1.25; }
.menu__who small { color: var(--muted); font-weight: 400; }
.menu__panel a, .menu__panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px;
  border: 0; background: none; color: inherit; font: inherit; text-decoration: none; text-align: left;
  border-radius: 8px; cursor: pointer;
}
.menu__panel a:hover, .menu__panel button:hover { background: var(--bg); }
.menu__panel form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* ---------- Side menu (desktop only) ---------- */
.shell { flex: 1; display: flex; width: 100%; }
.sidenav { display: none; }
.sidenav__group { margin-bottom: 20px; }
.sidenav__label { font: 800 12px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 12px 8px; }
.sidenav a, .sidenav span.sidenav__item {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--navy); text-decoration: none; font-weight: 700; white-space: nowrap;
}
.sidenav a:hover { background: var(--bg); }
.sidenav a.is-on { background: var(--navy); color: #fff; }
.sidenav a.is-on .icon { color: var(--gold); }
.sidenav a.is-locked, .rowlink.is-locked { opacity: .62; }
.sidenav a.is-locked:hover, .rowlink.is-locked:hover { opacity: 1; }
.sidenav .sidenav__item.is-soon { color: #8b8794; font-weight: 500; font-size: 15px; cursor: default; min-height: 38px; }
.sidenav .sidenav__soon { margin-left: auto; font: 700 10px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: #a19dab; }

/* ---------- Page ---------- */
.page { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; min-width: 0; }
.narrow { max-width: 620px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .page-h { margin: 0; }
.page-h { font: 800 28px/1.15 var(--head); letter-spacing: -.01em; color: var(--navy); margin: 0 0 16px; }
.section-h { font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 32px 0 12px; }
.lead { margin: 0 0 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* ---------- Notices ---------- */
.notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; border-left: 4px solid; background: #fff; }
.notice--ok { border-color: var(--green); background: #edf6ef; }
.notice--error { border-color: var(--red); background: var(--red-tint); }
.notice--info { border-color: var(--teal); background: #e9f6f9; }

/* ---------- Forms ---------- */
.field { display: block; margin: 0 0 18px; border: 0; padding: 0; }
.field__label { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field__hint { display: block; color: var(--muted); font-size: 15px; margin: -2px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  font: inherit; color: inherit; background: #fff;
  border: 1.5px solid #cfc9d8; border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30,161,191,.2); }
.pin-input { font-size: 28px; letter-spacing: .5em; text-align: center; font-family: var(--head); }

.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--teal); background: #f1f9fb; }
.choice input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--teal); }
.choice small { display: block; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border-radius: 10px; border: 2px solid transparent;
  font: 600 17px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(.98); }
.btn--block { width: 100%; }
.btn--block:hover { transform: scale(1.02); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); }
.btn--ghost { background: #fff; color: var(--teal-dark); border-color: var(--teal); }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn--danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; }
.linkbtn { background: none; border: 0; color: var(--teal-dark); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; text-decoration: underline; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.actions form { margin: 0; }

/* ---------- Login ---------- */
html:has(body.is-bare), body.is-bare { background: var(--navy); }
.auth { width: 100%; max-width: 400px; margin: 0 auto; padding: calc(32px + env(safe-area-inset-top)) 0 24px; }
.auth__logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 4px auto 6px; }
.auth__title { font: 800 13px/1 var(--head); text-transform: uppercase; letter-spacing: .16em; text-align: center; color: var(--muted); margin: 0 0 20px; }
.auth .lead { color: var(--text); }
.auth__card { box-shadow: 0 16px 40px rgba(0,0,0,.25); border: 0; }
.auth__forgot { text-align: center; margin: 14px 0 0; font-size: 15px; }
.card form .choices { margin-bottom: 16px; }
.auth__help { color: rgba(255,255,255,.7); text-align: center; font-size: 15px; margin-top: 16px; }


.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg__opt { text-align: center; padding: 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.seg__opt.is-on { background: var(--navy); color: #fff; }

.who { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -4px 0 18px; }
.keypad button {
  min-height: 56px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  font: 600 24px/1 var(--head); color: var(--navy); cursor: pointer; touch-action: manipulation;
}
.keypad button:active { background: var(--bg); transform: scale(.97); }
.keypad .keypad__fn { font: 500 16px/1 var(--body); color: var(--muted); }

/* ---------- Home ---------- */
.hello { margin: 4px 0 20px; }
.hello__date { margin: 0; font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.hello__title { margin: 8px 0 0; font: 800 32px/1.1 var(--head); letter-spacing: -.015em; color: var(--navy); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  --tone: var(--teal);
  position: relative; display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px 14px; color: var(--text); text-decoration: none; min-height: 150px;
  overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tone); }
a.tile:hover { border-color: var(--tone); transform: translateY(-1px); }
.tile__icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, #fff); margin-bottom: 8px; }
.tile__title { font: 800 18px/1.15 var(--head); color: var(--navy); }
.tile__sub { font-size: 14px; color: var(--muted); line-height: 1.3; }
.tile__soon { margin-top: auto; padding-top: 8px; font: 700 11px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tile.is-soon .tile__icon { filter: grayscale(.6); opacity: .7; }
.tile.is-soon .tile__title { color: #5b6470; }
.tone-orange { --tone: var(--orange); }
.tone-purple { --tone: var(--purple); }
.tone-teal   { --tone: var(--teal); }
.tone-navy   { --tone: var(--navy); }
.tone-gold   { --tone: var(--gold-dark); }
.tone-green  { --tone: var(--green); }

.rowlinks { display: grid; gap: 8px; }
.rowlink { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); text-decoration: none; }
.rowlink:hover { border-color: var(--teal); }
.rowlink span { display: flex; flex-direction: column; }
.rowlink small { color: var(--muted); }

/* ---------- People ---------- */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.person:hover { border-color: var(--teal); }
.person.is-off { opacity: .6; }
.person__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 700 18px/1 var(--head); flex: none; }
.person__main { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.person__main small { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 600 13px/1 var(--body); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.tag--red { background: var(--red-tint); color: var(--red); }
.tag--gold { background: #fdf3d9; color: #8a6300; }
.tag--grey { background: #eceaf0; color: var(--muted); }

.facts { margin: 0; padding: 4px 20px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.secret { background: #fffaf0; border: 2px dashed var(--gold); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.secret__label { margin: 0; font-weight: 600; }
.secret__value { margin: 8px 0; font: 800 40px/1 var(--head); letter-spacing: .12em; color: var(--navy); }
.secret__note { margin: 0; font-size: 15px; }

/* ---------- Tables (desktop) ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 800 12px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 16px; background: #faf9f7; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.is-link { position: relative; cursor: pointer; }
.table tbody tr.is-link:hover td { background: #f7fbfc; }
.table .row-link { color: var(--navy); font-weight: 700; text-decoration: none; }
.table .row-link::after { content: ""; position: absolute; inset: 0; }
.table tr.is-off td { color: var(--muted); }
.cell-person { display: flex; align-items: center; gap: 12px; }
.cell-person .person__avatar { width: 34px; height: 34px; font-size: 15px; }
.only-desktop { display: none; }

/* ---------- Activity log ---------- */
.log { list-style: none; margin: 0; padding: 0; }
.log.card { padding: 4px 16px; }
.log li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log.forms-load li { display: block; line-height: 1.45; }
@media (max-width: 599px) { .forms-tools { display: grid; grid-template-columns: 1fr; width: 100%; } .forms-tools .btn { width: 100%; } }
.log.forms-load li .tag { margin-right: 6px; }
.log li:last-child { border-bottom: 0; }
.log li.is-warn .log__what { color: var(--red); }
.log__when { font-size: 13px; color: var(--muted); }
.log__what small { display: block; color: var(--muted); }

.empty { text-align: center; padding: 40px 0; }


/* ---------- Home quick buttons ---------- */
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
.look { margin-bottom: 18px; }
@media (max-width: 639px) {
  /* three buttons side by side on a phone: icon on top */
  .quick:has(> :nth-child(3)) .quick__btn { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
}
.quick__btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--navy); text-decoration: none; }
.quick__btn .icon { width: 26px; height: 26px; }
.quick__btn span { display: flex; flex-direction: column; line-height: 1.2; }
.quick__btn small { color: var(--muted); font-size: 13px; }
.quick__btn:hover { border-color: var(--teal); }
.quick__btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.quick__btn--red small { color: rgba(255,255,255,.85); }
.quick__btn--red:hover { background: #a92e25; border-color: #a92e25; }
.quick__btn--orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.quick__btn--orange small { color: rgba(255,255,255,.88); }
.quick__btn--orange:hover { filter: brightness(.94); border-color: var(--orange); }

/* ---------- Contacts ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.searchbox { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #cfc9d8; border-radius: 10px; padding: 0 12px; min-height: var(--tap); color: var(--muted); }
.searchbox:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30,161,191,.2); }
.searchbox input { min-width: 0; width: 100%; border: 0; outline: none; box-shadow: none !important; min-height: 44px; padding: 0; flex: 1; font: inherit; background: transparent; }
.contact-grid { display: grid; gap: 10px; }
.contact { position: relative; padding: 16px; display: flex; flex-direction: column; }
.contact-grid > .card.contact, .gallery > .card, .stats > .card { margin-top: 0; }
.contact__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.contact__name { margin: 0; font: 800 17px/1.2 var(--head); color: var(--navy); }
.contact__org { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.contact__tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.contact__notes { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.contact__lines { display: grid; gap: 2px; margin-top: 10px; }
.contact__line { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--teal-dark); text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.contact__line .icon { width: 18px; height: 18px; }
span.contact__line { font-weight: 400; color: var(--muted); }
.toolbar .btn { flex: none; }
.contact__edit { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--muted); }
textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.field-row { display: grid; gap: 0 12px; }

/* ---------- Uploader ---------- */
.uploader__drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 14px; border: 2px dashed #b9c9d6; border-radius: 12px; background: #f7fbfc; color: var(--teal-dark); font-weight: 700; cursor: pointer; text-align: center; }
.uploader__drop:hover { border-color: var(--teal); }
.uploader__drop { flex-wrap: wrap; }
.uploader__drop.is-dragover { border-color: var(--teal); border-style: solid; background: #e3f4f8; box-shadow: 0 0 0 4px rgba(30, 161, 191, .18); }
@media (hover: hover) and (pointer: fine) {
  .uploader__drop[data-drop-hint]::after { content: attr(data-drop-hint); font-weight: 500; font-size: 14px; color: var(--muted); }
}
.uploader__drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.uploader__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.uploader__item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.uploader__thumb { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; font-size: 20px; color: var(--navy); }
.uploader__thumb img { width: 100%; height: 100%; object-fit: cover; }
.uploader__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uploader__info strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uploader__info small { color: var(--muted); }
.uploader__bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.uploader__bar span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.uploader__item.is-done .uploader__bar span { background: var(--green); }
.uploader__item.is-error { border-color: var(--red); }
.uploader__item.is-error small { color: var(--red); }
.uploader__rm { width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 50%; }
.uploader__rm:hover { background: var(--bg); }
button:disabled { opacity: .6; cursor: wait; transform: none !important; }

/* ---------- "Are you sure?" before calling 000 ---------- */
.confirm-call > summary { list-style: none; cursor: pointer; }
.confirm-call > summary::-webkit-details-marker { display: none; }
.confirm-call__box { margin-top: 8px; padding: 14px; border: 2px solid var(--red); border-radius: 12px; background: var(--red-tint); display: grid; gap: 10px; }
.confirm-call__box p { margin: 0; }
.confirm-call__box .linkbtn { justify-self: center; }
.btn--danger-solid { background: var(--red); color: #fff; }
.btn--danger-solid:hover { background: #a92e25; }
.sos__000wrap[open] .sos__000 { border-radius: 14px; }

/* ---------- Emergency screen ---------- */
.sos { display: grid; gap: 12px; }
.sos__000, .sos__call { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; text-decoration: none; color: #fff; }
.sos__000 { background: var(--red); }
.sos__000:hover { background: #a92e25; }
.sos__call { background: var(--navy); }
.sos__call:hover { background: var(--navy-2); }
.sos__000 .icon, .sos__call .icon { width: 34px; height: 34px; flex: none; }
.sos__000 span, .sos__call span { display: flex; flex-direction: column; gap: 2px; }
.sos__000 strong, .sos__call strong { font: 800 24px/1.1 var(--head); }
.sos__000 small, .sos__call small { color: rgba(255,255,255,.88); font-size: 15px; }
.sos-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sos-list__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.sos-list__item:last-child { border-bottom: 0; }
.sos-list__item:hover { background: #f7fbfc; }
.sos-list__item span:first-child { display: flex; flex-direction: column; }
.sos-list__item small { color: var(--muted); font-size: 14px; }
.sos-list__num { display: flex; align-items: center; gap: 6px; color: var(--teal-dark); font-weight: 800; white-space: nowrap; }
.sos-tips { margin-top: 20px; }


/* ---------- General bits used by modules ---------- */
.eyebrow { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 700 13px/1 var(--head); color: var(--muted); letter-spacing: .04em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.page-head .btn-row { margin-bottom: 0; }
.btn--lg { min-height: 56px; font-size: 19px; }
.card__title { margin: 0 0 10px; font: 800 18px/1.2 var(--head); color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card + .card, .stack > .card + .card { margin-top: 12px; }
.card--warn { border-color: #f1b9b4; background: #fff7f6; }
.card--warn .card__title { color: var(--red); }
.stack { display: grid; gap: 10px; }
.stack > .card + .card { margin-top: 0; }
.tight { margin: 4px 0 8px; padding-left: 20px; }
.tight li { margin: 2px 0; }
.nowrap { white-space: nowrap; }
.small-note { font-size: 14px; margin: 8px 0 0; }
.inline-form { margin: 0; }
.inline-form select { min-height: 40px; padding: 6px 10px; width: auto; }
.empty-card { text-align: center; color: var(--muted); }
.tag--teal { background: #e3f4f8; color: #136f85; }
.tag--navy { background: #e2eaf1; color: var(--navy); }
.tag--green { background: #e6f3e9; color: var(--green); }
.facts--plain { padding: 0; }
.facts--plain div { padding: 8px 0; }
.facts--tight div { padding: 5px 0; }
.prose h3 { margin: 14px 0 4px; font: 800 15px/1.2 var(--head); color: var(--navy); }
.prose__text { margin: 0; white-space: normal; }

/* Forms: choice cards and checkboxes */
.choices { display: grid; gap: 8px; }
.choice--sm { padding: 10px 12px; margin: 0; }
.choice--sm small { font-size: 14px; line-height: 1.3; }
.choice--type strong { font-size: 18px; }
.choice--type.type-injury:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.choice--type.type-hazard:has(input:checked) { border-color: var(--gold-dark); background: #fff8e6; }
.checkline { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.checkline input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.checks { display: grid; gap: 0; }

/* Incident form */
.lane-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lane-picker__btn { position: relative; cursor: pointer; }
.lane-picker__btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lane-picker__btn span { display: grid; place-items: center; height: 52px; border: 1.5px solid #cfc9d8; border-radius: 10px; background: #fff; font: 800 20px/1 var(--head); color: var(--navy); }
.lane-picker__btn input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.lane-picker__btn input:focus-visible + span { box-shadow: 0 0 0 3px rgba(30,161,191,.35); }
.ohs-form { display: grid; gap: 14px; }
.form-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.form-step__title { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; font: 800 20px/1.2 var(--head); color: var(--navy); }
.form-step__title > span:first-child { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 15px; }
.form-step > .field:last-child { margin-bottom: 0; }
.injury-box > .field:last-child { margin-bottom: 14px; }
.form-foot { text-align: center; font-size: 14px; margin: 0; }
.people-list { display: grid; gap: 12px; margin-bottom: 12px; }
.person-card { margin: 0; border: 1.5px solid var(--line); background: #fbfaf8; }
.person-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.person-card__title { font: 800 17px/1 var(--head); color: var(--navy); padding: 0; }
.injury-box { border-left: 4px solid var(--red); background: #fff; border-radius: 8px; padding: 12px 14px 2px; margin-bottom: 16px; }
.injury-box__title { margin: 0 0 10px; font: 800 15px/1 var(--head); color: var(--red); text-transform: uppercase; letter-spacing: .06em; }
.alert-serious { background: var(--red-tint); border: 2px solid var(--red); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; margin-bottom: 14px; }
.alert-serious p { margin: 0; }
.alert-serious__title { display: flex; align-items: center; gap: 8px; font: 800 20px/1.2 var(--head); color: var(--red); }
.alert-serious__more { color: var(--red); font-weight: 700; }
.report-cta { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: var(--orange); color: #fff; text-decoration: none; margin-bottom: 12px; }
.report-cta:hover { background: #c94d0a; }
.report-cta .icon { width: 34px; height: 34px; }
.report-cta span { display: flex; flex-direction: column; }
.report-cta strong { font: 800 21px/1.15 var(--head); }
.report-cta small { color: rgba(255,255,255,.9); }

/* Incident list */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font: 800 28px/1 var(--head); color: var(--navy); }
.stat span { font-size: 14px; color: var(--muted); line-height: 1.25; }
.stat--warn { border-color: var(--gold); background: #fffaf0; }
.stat--bad { border-color: #f1b9b4; background: #fff7f6; }
.stat--bad strong { color: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seg--light { background: #fff; border: 1px solid var(--line); margin: 0; }
.seg--light .seg__opt { padding: 8px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.report-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); padding: 14px 16px; }
.report-card:hover { border-color: var(--teal); }
.report-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-card strong { color: var(--navy); }
.report-card__flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.table--register td { font-size: 15px; }

/* Incident page */
.person-view { padding: 14px 16px; }
.person-view.role-injured { border-left: 4px solid var(--red); }
.person-view__name { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-view__type { margin: 2px 0 6px; font-size: 15px; }
.person-view__statement { margin: 8px 0 0; font-style: italic; color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gallery__item { display: block; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.gallery__item img, .gallery__item video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.gallery__item--video video { object-fit: contain; }
.gallery__item--file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; font-size: 14px; color: var(--navy); text-decoration: none; }
.criteria { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #faf9f7; }
.criteria summary { cursor: pointer; font-weight: 700; color: var(--teal-dark); }
.criteria p { font-size: 14px; margin: 6px 0 0; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-row video { width: 100%; max-height: 260px; background: #000; border-radius: 8px; }
.file-row + form, .file-row:last-of-type { margin-bottom: 10px; }
.action { padding: 10px 0; border-bottom: 1px solid var(--line); }
.action__what { margin: 0; font-weight: 700; }
.action__meta { margin: 2px 0 6px; font-size: 14px; color: var(--muted); }
.action.is-done .action__what { text-decoration: line-through; color: var(--muted); }
.action.is-overdue .action__meta strong { color: var(--red); }
.action__form { display: flex; gap: 8px; align-items: center; margin: 0; }
.action__form input[type=text] { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.add-action { margin-top: 12px; }
.add-action > summary { list-style: none; display: inline-flex; margin-bottom: 10px; }
.add-action > summary::-webkit-details-marker { display: none; }
.uploader { margin-bottom: 12px; }

@media (min-width: 640px) {
  .choices--2 { grid-template-columns: 1fr 1fr; }
  .choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lane-picker { grid-template-columns: repeat(10, 1fr); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .page { padding-top: 28px; }
}

/* Desktop: side menu, wider pages, tables. Mainly for the manager on the office/home PC. */
@media (min-width: 1024px) {
  .topbar__inner { max-width: none; padding: 0 28px; height: 74px; }
  .brand__logo { height: 58px; }
  .topbar__back { display: none; }
  .shell { background: linear-gradient(to right, #fff 0, #fff 250px, var(--line) 250px, var(--line) 251px, transparent 251px); }
  .sidenav { display: block; flex: none; width: 251px; padding: 28px 14px; border-right: 1px solid var(--line); background: #fff; position: sticky; top: 74px; align-self: flex-start; max-height: calc(100vh - 74px); overflow-y: auto; }
  .page { max-width: none; margin: 0; padding: 32px 40px 48px; }
  .page-h { font-size: 32px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1100px; }
  .quick { max-width: 560px; }
  .report-cta { max-width: 560px; }
  .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile { min-height: 170px; padding: 20px 18px 16px; }
  .only-mobile { display: none !important; }
  .only-desktop { display: block; }
  table.only-desktop { display: table; }
  .split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; max-width: 1200px; }
  .split .section-h:first-child { margin-top: 0; }
  .split--report { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .stats { max-width: 1200px; }
  .wide { max-width: 1200px; }
  .actions { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover, a.tile:hover { transform: none; }
}

/* ---- Chemical register ---- */
.chem-list { display: grid; gap: 8px; }
.chem-list > .card + .card { margin-top: 0; }
.chem-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "pics main" "pics tags"; gap: 4px 14px; align-items: center; text-decoration: none; color: inherit; padding: 12px 14px; }
.chem-row:hover { border-color: var(--teal); }
.chem-row__pics { grid-area: pics; display: grid; grid-template-columns: repeat(2, 26px); gap: 2px; width: 54px; justify-content: start; align-content: center; }
.chem-row__pics img { width: 26px; height: 26px; }
.chem-row__none { grid-column: 1 / -1; font-size: 11px; color: var(--muted); text-align: left; line-height: 1.1; }
.chem-row__main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.chem-row__main strong { font-size: 17px; color: var(--navy); }
.chem-row__tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 4px; }
.chem-row__tags:empty { display: none; }
@media (min-width: 1024px) {
  .chem-row { grid-template-areas: "pics main tags"; }
  .chem-row__pics { grid-template-columns: repeat(4, 26px); width: auto; justify-content: start; }
  .chem-row { grid-template-columns: 116px 1fr auto; }
}
.chem-hazards__head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ghs-list { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 10px; }
.ghs-list li { display: flex; align-items: center; gap: 12px; }
.ghs-list img { width: 52px; height: 52px; flex: none; }
.ghs-list span { display: flex; flex-direction: column; }
.ghs-list small { color: var(--muted); }
.chem-block h3 { margin: 14px 0 4px; font: 700 15px/1.2 var(--head); color: var(--navy); }
.chem-block p { margin: 0; }
.prewrap { white-space: pre-wrap; }
.ppe-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.ppe-list li::marker { color: #1d6fb8; }
.chem-calls { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chem-calls .confirm-call { flex: 1 1 100%; }
.chem-qr { display: flex; gap: 14px; align-items: flex-start; }
.chem-qr__code { width: 110px; flex: none; }
.chem-qr__code svg { width: 100%; height: auto; display: block; }
.chem-qr p { margin: 0; overflow-wrap: anywhere; }
.small-gap { margin: 8px 0 0; }
.ghs-picker { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .ghs-picker { grid-template-columns: 1fr 1fr; } }
.ghs-picker__opt { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; background: #fff; }
.ghs-picker__opt input { width: 20px; height: 20px; flex: none; accent-color: var(--teal); }
.ghs-picker__opt img { width: 44px; height: 44px; flex: none; }
.ghs-picker__opt span { display: flex; flex-direction: column; line-height: 1.25; }
.ghs-picker__opt small { color: var(--muted); font-size: 13px; }
.ghs-picker__opt:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.card__head .card__title { margin: 0; }
.qty-list { list-style: none; margin: 10px 0 0; padding: 0; }
.qty-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qty-list li:last-child { border-bottom: 0; }
.qty-list label { display: flex; flex-direction: column; min-width: 0; }
.qty-list input { width: 84px; flex: none; text-align: center; }

/* Public QR page (no login) */
.pub { max-width: 560px; margin: 0 auto; padding: 16px 16px 32px; display: grid; gap: 12px; }
.pub__head { display: flex; align-items: center; gap: 12px; color: #fff; font: 700 15px/1.2 var(--head); }
.pub__head img { width: 92px; height: auto; }
.pub__card { margin: 0; }
.pub__name { margin: 0 0 4px; font: 800 26px/1.15 var(--head); color: var(--navy); }
.pub__signal { display: inline-block; margin: 6px 0 14px; padding: 4px 12px; border-radius: 6px; font: 800 18px/1.2 var(--head); letter-spacing: .06em; }
.pub__signal--danger { background: var(--red); color: #fff; }
.pub__signal--warning { background: var(--gold); color: #1e1a10; }
.pub .section-h { margin: 18px 0 8px; }
.pub__sds { margin: 0; }
.pub__foot { color: rgba(255,255,255,.75); text-align: center; font-size: 13px; margin: 6px 0 0; }
.pub__foot a { color: #fff; }

/* Section links at the top of a module (e.g. OH&S: Reports · Register of Injuries · Chemicals & SDS) */
.subnav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 18px; padding-bottom: 2px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav__item { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--navy); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.subnav__item .icon { width: 18px; height: 18px; }
.subnav__item:hover { border-color: var(--teal); }
.subnav__item.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Side menu: a module with sub-sections (e.g. OH&S) opens as a drop-down */
.sidenav__sub > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--navy); font-weight: 700; cursor: pointer; white-space: nowrap; }
.sidenav__sub > summary::-webkit-details-marker { display: none; }
.sidenav__sub > summary:hover { background: var(--bg); }
.sidenav__sub > summary.is-open { color: var(--navy); }
.sidenav__sub > summary.is-open > .icon:first-child { color: var(--orange); }
.sidenav__chev { margin-left: auto; width: 18px; height: 18px; transition: transform .15s; }
.sidenav__sub[open] .sidenav__chev { transform: rotate(180deg); }
.sidenav a.sidenav__child { min-height: 36px; margin-left: 22px; padding-left: 20px; border-left: 2px solid var(--line); border-radius: 0 10px 10px 0; font-weight: 500; font-size: 15px; }
.sidenav a.sidenav__child.is-on { border-left-color: var(--orange); }

/* OH&S overview */
.ohs-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.ohs-top .report-cta, .ohs-top .quick__btn { margin: 0; max-width: none; }
.ohs-top .report-cta { grid-column: 1 / -1; }
@media (min-width: 1024px) { .ohs-top { grid-template-columns: 2fr 1fr 1fr; } .ohs-top .report-cta { grid-column: auto; } }
.attention { display: grid; gap: 8px; }
@media (min-width: 640px) { .attention { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.attention__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); color: var(--text); text-decoration: none; }
.attention__item strong { font: 800 26px/1 var(--head); color: var(--navy); min-width: 28px; }
.attention__item--red { border-left-color: var(--red); }
.attention__item--red strong { color: var(--red); }
.attention__item:hover { border-color: var(--teal); }
.tile__badge { margin-top: auto; padding-top: 8px; font: 700 13px/1 var(--head); color: var(--orange); }
@media (min-width: 1024px) {
  .tiles--3 { grid-template-columns: repeat(3, 1fr); }
  .subnav { display: none; }
}
.inbox-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }

/* Buttons side by side in a page header are all the same size */
.page-head .btn-row .btn { min-height: 44px; padding: 0 16px; font-size: 16px; }
/* Call buttons on a chemical: one under the other, all the same size */
.chem-calls { display: grid; gap: 8px; }
.chem-calls .btn, .chem-calls .confirm-call > summary { width: 100%; min-height: var(--tap); font-size: 16px; }

/* Page header with buttons: title on one line, buttons wrap underneath when there isn't room.
   On phones and tablets the buttons sit in an even grid, all the same size, with the main one first. */
.page-head { flex-wrap: wrap; }
.page-head > :first-child { flex: 1 1 auto; }
.page-head .btn-row { justify-content: flex-end; }
@media (max-width: 1023px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
  /* the main button sits last in the page code; if that leaves an odd one out, it goes full width */
  .page-head .btn-row > :only-child,
  .page-head .btn-row > .btn:nth-last-child(2):nth-child(odd):not(.btn--primary) { grid-column: 1 / -1; }
  .page-head .btn-row .btn { width: 100%; padding: 0 10px; font-size: 15px; }
  .page-head .btn-row .btn--primary { grid-column: 1 / -1; order: -1; }
  .page-head .btn-row .inline-form select { width: 100%; }
}
.page-head .btn-row .inline-form select { min-height: 44px; }

/* ---- OH&S manual ---- */
.manual-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: 14px; background: #fff7e0; border: 2px solid var(--gold); color: var(--text); text-decoration: none; }
.manual-banner .icon { width: 30px; height: 30px; color: var(--gold-dark); flex: none; }
.manual-banner span { display: flex; flex-direction: column; }
.manual-banner strong { font: 800 17px/1.2 var(--head); color: var(--navy); }
.manual-banner small { color: var(--muted); }
.manual-banner:hover { border-color: var(--gold-dark); }
.card--attention { border: 2px solid var(--gold); background: #fffbef; }
.manual-toc { list-style: none; counter-reset: sec; margin: 10px 0 0; padding: 0; }
.manual-toc li { counter-increment: sec; border-bottom: 1px solid var(--line); }
.manual-toc li:last-child { border-bottom: 0; }
.manual-toc a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 2px; color: var(--navy); text-decoration: none; font-weight: 600; }
.manual-toc a::before { content: counter(sec); min-width: 26px; color: var(--muted); font-weight: 500; font-size: 14px; }
.manual-toc a span:first-child { flex: 1; }
.manual-toc a:hover { color: var(--teal-dark); }
.read-ok { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; margin: 12px 0 0; }
.signature { display: flex; flex-direction: column; margin: 0; }
.signature__name { font: italic 700 24px/1.2 Georgia, "Times New Roman", serif; color: var(--navy); }
.signature span:last-child { color: var(--muted); font-size: 14px; }
.signature-box { margin: 20px 0 0; padding: 14px 16px; border-top: 2px solid var(--line); }
.narrow-wide { max-width: 780px; }
.manual-page .page-h { margin-bottom: 14px; }
.manual-content { font-size: 17px; line-height: 1.6; }
.manual-content p { margin: 0 0 12px; }
.manual-content h3 { font: 800 20px/1.25 var(--head); color: var(--navy); margin: 26px 0 8px; }
.manual-content h4 { font: 700 17px/1.25 var(--head); color: var(--navy); margin: 18px 0 6px; }
.manual-content ul, .manual-content ol { margin: 0 0 14px; padding-left: 24px; }
.manual-content li { margin: 3px 0; }
.manual-content li > ul, .manual-content li > ol { margin: 4px 0; }
.manual-content a { color: var(--teal-dark); }
.manual-img { display: block; max-width: 100%; height: auto; margin: 10px 0; border-radius: 8px; }
.manual-diagram { background: #eef6f9; border-left: 4px solid var(--teal); border-radius: 8px; padding: 10px 14px; margin: 10px 0 14px; }
.manual-diagram ul { margin: 0; }
.manual-table-wrap { margin: 10px 0 16px; }
.manual-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; background: #fff; }
.manual-table th, .manual-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.manual-table th { background: #f1eef6; color: var(--navy); }
.manual-table p { margin: 0 0 6px; }
.manual-table p:last-child { margin-bottom: 0; }
.manual-table ul { margin: 0; padding-left: 18px; }
.manual-table .manual-img { margin: 0; max-height: 220px; width: auto; }
.manual-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.manual-nav .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding-top: 8px; padding-bottom: 8px; }
.notice--warn { border-color: var(--gold); background: #fff7e0; }
.change-box summary, .change-item summary { cursor: pointer; }
.linkish { color: var(--teal-dark); text-decoration: underline; }
.diff { margin: 10px 0 4px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; line-height: 1.6; font-size: 15px; }
ins { background: #d9f2df; color: #145a24; text-decoration: none; border-radius: 3px; padding: 0 2px; }
del { background: #fbe1df; color: #8c2219; border-radius: 3px; padding: 0 2px; }
.diff-key { font-size: 13px; margin: 8px 0 0; }
.change-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.change-item:last-of-type { border-bottom: 0; }
.change-item summary { font-weight: 600; color: var(--navy); }
.mini-h { font: 800 13px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 0 6px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.diff-gap { color: var(--muted); padding: 0 4px; }

/* ---- Plant & equipment ---- */
.icon--xs { width: 14px; height: 14px; vertical-align: -2px; }
.equip-group .section-h { margin-top: 22px; }
.equip-list { display: grid; gap: 8px; }
.equip-list > .card + .card { margin-top: 0; }
.equip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 14px; text-decoration: none; color: inherit; }
.equip-row:hover { border-color: var(--teal); }
.equip-row__main { display: flex; flex-direction: column; min-width: 0; }
.equip-row__main strong { color: var(--navy); font-size: 17px; }
.equip-row__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card--danger { border: 2px solid var(--red); background: var(--red-tint); }
.card--danger .card__title { color: var(--red); }
.lockout-now p { margin: 0 0 10px; }
.task { padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; padding-bottom: 0; }
.task__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.task__head strong { color: var(--navy); font-size: 17px; }
.task__meta { margin: 4px 0; font-size: 14px; }
.task__details { margin: 4px 0 10px; }
.records { list-style: none; margin: 0; padding: 0; }
.record { padding: 12px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.record p { margin: 4px 0; }
.record__nos { color: var(--red); font-weight: 600; }
.text-red { color: var(--red); }
.checklist { display: grid; gap: 4px; }
.check-q { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-q:last-child { border-bottom: 0; }
.check-q__label { font-weight: 600; line-height: 1.3; }
.yn { display: flex; gap: 6px; }
.yn__opt { position: relative; }
.yn__opt input { position: absolute; opacity: 0; inset: 0; }
.yn__opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; font-weight: 700; background: #fff; cursor: pointer; }
.yn__opt input:focus-visible + span { outline: 3px solid rgba(30,161,191,.4); }
.yn__opt--yes input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.yn__opt--no input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.task-edit { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px 4px; margin: 0 0 12px; }
.task-edit legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.task-edit--new { border-style: dashed; }
.table tr.is-open td { background: var(--red-tint); }
.return-form { margin-top: 6px; display: grid; gap: 4px; }

/* Spacing fixes (27 Oct) */
.choices + .field, .choices + .checkline { margin-top: 12px; }
@media (max-width: 1023px) {
  .page-head .btn-row .btn--danger-solid { grid-column: 1 / -1; order: -2; }
  .page-head .btn-row > .btn:nth-last-child(2):nth-child(odd):not(.btn--primary):not(.btn--danger-solid) { grid-column: 1 / -1; }
}
.lockout-card p { margin: 4px 0; }
.lockout-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.lockout-card__head a { color: var(--navy); }
.lockout-card.is-open { border: 2px solid var(--red); background: var(--red-tint); }
.lockout-card .return-form, .lockout-card > .btn { margin-top: 8px; }
.version-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.version-card__head { display: flex; align-items: center; gap: 8px; color: var(--navy); }

/* Even spacing between and inside cards (27 Oct) */
.stack { gap: 16px; }
.split { display: grid; gap: 16px; }
.split > * { min-width: 0; }
@media (min-width: 1024px) { .split { gap: 16px 24px; } }
.card > :last-child, .card > form:last-child > :last-child, .task > :last-child, .record > :last-child { margin-bottom: 0; }
.card > :first-child { margin-top: 0; }
.page-head p.muted { margin: 4px 0 0; }
.page-head .eyebrow { margin-bottom: 2px; }
.static-value { margin: 0; min-height: var(--tap); display: flex; align-items: center; gap: 6px; font-weight: 600; }

/* Date boxes only need to be as wide as a date */
input[type=date].input--date { width: 100%; max-width: 13rem; }
.card > .field-row:last-child > .field:last-child { margin-bottom: 0; }
.field > .static-value { min-height: 0; padding-top: 4px; }
@media (min-width: 640px) { .card > .field-row:last-child > .field { margin-bottom: 0; } }

/* Monthly pinspotter check (all lanes) */
.round-progress { margin: 0; position: sticky; top: calc(env(safe-area-inset-top) + 80px); z-index: 5; justify-self: center; }
.round-progress span { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 999px; box-shadow: 0 2px 8px rgba(12,59,94,.2); }
.lane { border-left: 5px solid var(--line); }
.lane.is-ready, .lane--saved { border-left-color: #2e8b57; }
.lane__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lane__head .card__title { margin: 0; }
.lane__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lane__last { margin: 2px 0 10px; font-size: 15px; }
.lane__done { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lane__done .icon { color: #2e8b57; }
.lane__note { margin: 4px 0 0; }
.lane__allok { width: 100%; margin-bottom: 4px; }
.lane__reveal { margin: 6px 0 0; padding-left: 0; }
.lane__problem { margin-top: 12px; }
.lane__skip { margin-top: 12px; }
.lane__why { margin: 10px 0 0; }
.round-save { display: grid; gap: 10px; }
.round-save .field__hint { margin: 0; }
.round-discard summary { cursor: pointer; font-weight: 600; }
.round-card { display: grid; gap: 8px; color: inherit; text-decoration: none; margin-bottom: 10px; border-left: 5px solid var(--orange, #e8772e); }
.round-card:hover { border-color: var(--teal); }
.round-card .card__title { display: flex; align-items: center; gap: 8px; color: var(--navy); }
.round-card__top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.round-card .card__title { margin: 0; }

/* Quarterly safety check & toolbox meetings (28 Oct) */
.insp-area .checklist { gap: 0; }
.insp-q { border-bottom: 1px solid var(--line); padding: 2px 0 10px; }
.insp-q:last-child { border-bottom: 0; padding-bottom: 0; }
.insp-q .check-q { border-bottom: 0; padding-bottom: 4px; align-items: start; }
.insp-q.is-no { background: linear-gradient(90deg, var(--red-tint), transparent 70%); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.insp-q__help { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.insp-q__reveal { padding: 0; font-size: 14px; font-weight: 600; }
.insp-q__extra { margin-top: 6px; }
.insp-q__extra .field { margin-bottom: 4px; }
.yn__opt--na input:checked + span { background: #6c6875; border-color: #6c6875; color: #fff; }
@media (max-width: 480px) {
  .insp-q .check-q, .check-q--stack { grid-template-columns: 1fr; gap: 8px; }
  .insp-q .yn, .check-q--stack .yn { display: grid; grid-template-columns: repeat(3, 1fr); }
  .insp-q .yn__opt span, .check-q--stack .yn__opt span { width: 100%; }
  /* Training skills: "Not for them" is longer, so give it a wider button and keep it on one line (6 Nov) */
  .check-q--stack .yn:has(.yn__opt--na) { grid-template-columns: 1fr 1fr 1.7fr; }
  .check-q--stack .yn__opt span { padding: 0 8px; white-space: nowrap; min-width: 0; }
}
.auto-hint { margin: 2px 0 6px; font-size: 14px; padding: 6px 10px; border-radius: 8px; background: #eef7ef; color: #255c35; }
.auto-hint--warn { background: #fdf3d9; color: #6e5000; }
.auto-hint--bad { background: var(--red-tint); color: var(--red); }
.auto-hint__lbl { font-weight: 700; }
.auto-hint a { color: inherit; font-weight: 700; }
.area-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.area-jump .chip { font-size: 14px; padding: 6px 10px; }
.area-jump .chip.is-done { border-color: #2e8b57; color: #1f6a40; }
.area-jump .chip.is-done::before { content: "✓ "; }
.insp-area.is-ready { border-left-color: #2e8b57; }
.kit-contents { margin: 0 0 10px; }
.kit-contents summary { cursor: pointer; font-weight: 600; color: var(--teal-dark); }
.kit-contents__list { columns: 2; column-gap: 20px; margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.insp-pics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.insp-pic { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--bg); color: var(--navy); }
.insp-pic img { width: 100%; height: 100%; object-fit: cover; }
.uploader--sm .uploader__drop { min-height: 48px; padding: 8px; font-size: 15px; }
.consulted { margin-top: 4px; }
.consulted__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.insp-task { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.insp-task:last-child { border-bottom: 0; }
.insp-task__right { display: flex; align-items: center; gap: 8px; }
.due-card { display: grid; gap: 10px; border-left: 5px solid #2e8b57; }
.due-card--never, .due-card--soon { border-left-color: var(--gold); }
.due-card--overdue { border-left-color: var(--red); }
.due-card p { margin: 0; }
.due-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.due-card__top .card__title { margin: 0; }
.problem { padding: 10px 0; border-bottom: 1px solid var(--line); }
.problem:last-child { border-bottom: 0; }
.problem p { margin: 2px 0; }
.problem__area { font: 700 12px/1.2 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.area-answers summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--navy); }
.answer-list { list-style: none; margin: 10px 0 0; padding: 0; }
.answer { display: grid; grid-template-columns: 104px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.answer small { display: block; }
.answer__mark { font-weight: 700; font-size: 14px; }
.answer--yes .answer__mark { color: #1f6a40; }
.answer--no .answer__mark { color: var(--red); }
.answer--na .answer__mark { color: var(--muted); }
.facts--flush { padding: 0; }
.assign-form { margin: 6px 0 4px; padding: 10px 12px; border: 1.5px dashed var(--gold); border-radius: 10px; background: #fffaf0; }
.assign-form .field { margin-bottom: 8px; }
.confirm-banner { display: block; text-decoration: none; color: inherit; }
.sign-on p { margin: 0 0 10px; }
.attendees { list-style: none; margin: 0; padding: 0; }
.attendee { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.attendee:last-child { border-bottom: 0; }
.attendee small { display: block; }
.attendee form { margin: 0; }
.attendee__tick { color: #2e8b57; }
.prompts .mini-h:first-of-type { margin-top: 8px; }
.prompt-list { list-style: none; margin: 0; padding: 0; }
.prompt-list li { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.prompt-list li:last-child { border-bottom: 0; }
.prompt-list .linkbtn { justify-self: start; padding: 0; font-size: 14px; }
.prompt-list .linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.input--num { max-width: 8rem; }
.sign-on { margin-bottom: 16px; }
.confirm-banner + .confirm-banner { margin-top: -8px; }

/* Incident investigation (FOR005), 28 Oct */
.plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.plain-fieldset:disabled textarea, .plain-fieldset:disabled input, .plain-fieldset:disabled select { background: #faf9f7; color: var(--text); opacity: 1; }
.example { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #f1f9fb; }
.example summary { cursor: pointer; font-weight: 700; color: var(--teal-dark); }
.example p, .example ol { margin: 6px 0; font-size: 15px; }
.why .field__label { display: flex; align-items: center; gap: 8px; }
.why__num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 14px/1 var(--head); flex: none; }
.more-whys > summary { padding: 0; margin: 0 0 10px; }
.add-inv-action { margin-top: 12px; padding: 12px; border: 1.5px dashed var(--line); border-radius: 10px; }
.add-inv-action .mini-h { margin-top: 0; }
.control-choices { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .control-choices { grid-template-columns: repeat(3, 1fr); } }
.no-action { margin-top: 10px; }
.no-action > summary { padding: 0; }
.hierarchy { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hierarchy__item { display: grid; gap: 1px; padding: 8px 10px 8px 12px; border-radius: 8px; border-left: 6px solid; background: #faf9f7; font-size: 15px; }
.hierarchy__item--eliminate { border-color: #1f6a40; }
.hierarchy__item--substitute { border-color: #2e8b57; }
.hierarchy__item--isolate { border-color: #5aa469; }
.hierarchy__item--engineering { border-color: #9cbf4f; }
.hierarchy__item--admin { border-color: var(--gold); }
.hierarchy__item--ppe { border-color: var(--red); }
.hierarchy__scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.inv-card--todo { border-left: 5px solid var(--gold); }
.action__form .btn { white-space: nowrap; flex: none; }
.action__form input[type=text] { flex: 1; min-width: 0; }

/* Training register (Staff module), 28 Oct */
.training-list { list-style: none; margin: 0; padding: 0; }
.training-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.training-row:last-child { border-bottom: 0; }
.training-row.is-optional { opacity: .7; }
.training-row__main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 11rem; }
.training-row__main strong { color: var(--navy); }
.training-row__right { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; flex: 0 1 auto; max-width: 100%; margin-left: auto; }
.needs-edit { margin-top: 10px; }
.needs-edit > summary { padding: 0; }
.needs-edit form { margin-top: 6px; }
.table-wrap--scroll { overflow-x: auto; }
.training-matrix th, .training-matrix td { white-space: nowrap; vertical-align: middle; }
.training-matrix th { font-size: 11px; }
.training-matrix a.tag { text-decoration: none; }
.training-card { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.training-card strong { color: var(--navy); }
.training-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.home .confirm-banner, .hello + .confirm-banner { margin-top: 0; }
.upcoming .card__title { display: flex; align-items: center; gap: 8px; }
.upcoming p { margin: 6px 0 0; }
.meeting-notes > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; }
.meeting-notes > summary::-webkit-details-marker { display: none; }
.meeting-notes > summary::before { content: '▸'; color: var(--teal-dark); }
.meeting-notes[open] > summary::before { content: '▾'; }
.meeting-notes[open] > summary { margin-bottom: 8px; }

/* Staff meetings: things to bring up (4 Nov) */
.topic-add { display: flex; gap: 8px; margin: 0 0 10px; }
.topic-add input[type=text] { flex: 1; min-width: 0; }
.topic-add .btn { flex: none; }
.topic-list { list-style: disc; margin: 0; padding-left: 22px; }
.topic { padding: 6px 0; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic { display: list-item; }
.topic__text small { display: block; }
.topic form { display: inline; margin: 0; }
.topic .linkbtn { padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.topic-pick { list-style: none; margin: 0 0 10px; padding: 0; }
.topic-pick__item { padding: 6px 0; border-bottom: 1px solid var(--line); }
.topic-pick__item .checkline { padding: 4px 0; }
.topic-pick__note { margin: 2px 0 0 30px; width: calc(100% - 30px); min-height: 40px; font-size: 15px; }
.topic-done { margin: 0 0 6px; padding-left: 20px; }
.topic-done li { margin: 6px 0; }
.topic-done li span { display: block; color: var(--muted); }
.ohs-part .choices { margin-bottom: 12px; }
.toolbox-card .mini-h:first-of-type { margin-top: 10px; }
.toolbox-card > .btn { margin-top: 8px; }
.topic-quick .topic-add { margin: 0; }
.topic-pick__note { display: block; box-sizing: border-box; max-width: calc(100% - 30px); }

/* Noise checks (v0.11.0) */
.tight-list { margin: 8px 0 0; padding-left: 20px; }
.tight-list li { margin: 6px 0; }
.noise-time { margin: 6px 0 0; }
.noise-time td, .noise-time th { padding: 6px 8px; }
.noise-hint { margin: -6px 0 0; }
.noise-reading { border-left: 4px solid var(--line); }
.noise-reading.is-over { border-left-color: var(--red); }
.noise-reading.is-close { border-left-color: var(--gold); }
.noise-reading.is-ok { border-left-color: var(--green); }
.noise-reading__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.noise-reading__nums .input--num { max-width: none; width: 100%; }
.noise-reading__nums .field__label { white-space: nowrap; }
.noise-reading .field { margin-bottom: 10px; }
.noise-reading__note { margin-bottom: 0 !important; }
.noise-flag { margin: -2px 0 10px; font-weight: 500; font-size: 15px; }
.noise-reading.is-over .noise-flag { color: var(--red); }
.noise-reading.is-close .noise-flag { color: #8a6300; }
.noise-reading.is-ok .noise-flag { color: var(--green); }
.noise-result { display: flex; flex-direction: column; gap: 4px; }
.noise-result--red { border-color: var(--red); background: var(--red-tint); }
.noise-result--gold { border-color: var(--gold); background: #fff7e0; }
.noise-result--green { border-color: var(--green); background: #edf6ef; }
.noise-result--grey { border-color: var(--line); }
.noise-list { list-style: none; margin: 0; padding: 0; }
.noise-row { padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); margin-bottom: 4px; }
.noise-row:last-child { border-bottom: 0; }
.noise-row--over { border-left-color: var(--red); }
.noise-row--close { border-left-color: var(--gold); }
.noise-row--ok { border-left-color: var(--green); }
.noise-row__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.noise-row__nums { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 2px; }
.noise-row__nums b { font-size: 18px; }
.noise-row__safe { margin: 4px 0 0; font-size: 14px; }
.noise-row__note { margin: 4px 0 0; font-size: 14px; }
.danger-text { color: var(--red); }
.dose { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 10px; margin-bottom: 10px; background: #edf6ef; }
.dose--over { background: var(--red-tint); }
.dose--close { background: #fff7e0; }
.dose__pct { font: 800 32px/1 var(--head); color: var(--navy); flex: none; }
.dose--over .dose__pct { color: var(--red); }
.file-list { list-style: none; margin: 0 0 10px; padding: 0; }
.file-list li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.file-list svg { width: 18px; height: 18px; flex: none; }

/* ---------- Logins: "Who are you?", devices, invites (v0.12.0) ---------- */
.auth__h { font: 800 20px/1.2 var(--head); color: var(--navy); margin: 0 0 12px; text-align: center; }
.who-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.who-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; min-height: 104px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy); text-decoration: none; text-align: center;
}
.who-tile:hover, .who-tile:focus-visible { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 6%, #fff); }
.who-tile .person__avatar { width: 44px; height: 44px; font-size: 20px; }
.who-tile__name { font: 700 16px/1.15 var(--head); display: flex; flex-direction: column; gap: 2px; }
.who-tile__name small { font: 500 12px/1 var(--body); color: var(--muted); }
.person__avatar--sm { width: 28px; height: 28px; font-size: 14px; vertical-align: middle; margin-right: 4px; display: inline-grid; }
.auth__forget { text-align: center; margin: 6px 0 0; }
.linkbtn--muted { color: var(--muted); font-weight: 500; font-size: 14px; }
.switch-user { margin: 0 6px 0 auto; }
.switch-user__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.45); background: transparent; color: #fff; font: 600 14px/1 var(--body); cursor: pointer;
}
.switch-user__btn:hover { background: rgba(255,255,255,.12); }
.switch-user + .menu { margin-left: 0; }
@media (max-width: 420px) { .switch-user__btn span { display: none; } .switch-user__btn { padding: 0 10px; } }
.invite-qr { width: 200px; max-width: 70%; margin: 10px auto; background: #fff; padding: 10px; border-radius: 10px; }
.invite-qr svg { display: block; width: 100%; height: auto; }
.invite-link { width: 100%; font: 500 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.device-list { list-style: none; margin: 0 0 4px; padding: 0; }
.device-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.device-list li:first-child { border-top: 0; }
.device-list form { margin: 0; }
.device .card__head { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.device .card__title { margin-right: auto; }
.device__rename { display: flex; gap: 6px; align-items: center; flex: 1 1 260px; }
.device__rename input { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.device .btn-row form { margin: 0; }

/* ---------- Onboarding: "Your details", paperwork, set up the forms (v0.12.0) ---------- */
.chips--pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { position: relative; }
.chip-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-pick span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; color: var(--navy); }
.chip-pick input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-pick input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.card--note { background: #f4f8fb; border-color: #d6e6f0; }
.card--note p { margin: 0; }
.policy { padding: 12px 0; border-top: 1px solid var(--line); }
.policy:first-of-type { border-top: 0; }
.policy__title { margin: 0 0 8px; font: 700 16px/1.25 var(--head); color: var(--navy); }
.policy .checkline { margin-top: 10px; }
.policy--done { display: flex; align-items: center; gap: 6px; color: var(--green); margin: 8px 0 0; padding: 8px 0 0; }
.policy--done strong { color: var(--text); }
.btn-row--stack { display: grid; gap: 10px; }
.paperwork { list-style: none; margin: 0; padding: 0; }
.paperwork__item { padding: 12px 0; border-top: 1px solid var(--line); }
.paperwork__item:first-child { border-top: 0; }
.paperwork__head { display: flex; gap: 10px; align-items: flex-start; }
.paperwork__tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.paperwork__tick .icon { width: 16px; height: 16px; }
.paperwork__item.is-done .paperwork__tick { background: var(--green); border-color: var(--green); color: #fff; }
.paperwork__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.paperwork__title small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.paperwork__undo { margin: 4px 0 0 34px; }
.paperwork__do { margin: 8px 0 0 34px; }
.paperwork__do > summary { list-style: none; display: inline-flex; }
.paperwork__do > summary::-webkit-details-marker { display: none; }
.paperwork__do[open] > summary { margin-bottom: 10px; }
.paperwork__do .stack { gap: 10px; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup-list li:first-child { border-top: 0; }
.setup-list__move { display: flex; gap: 4px; flex: none; }
.setup-list__move form { margin: 0; }
.setup-list__main { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.setup-list__main:hover strong { color: var(--teal-dark); text-decoration: underline; }
.setup-list__main small { color: var(--muted); font-size: 14px; }
.btn--icon { min-width: 40px; padding: 0 8px; }
.btn--icon[disabled] { opacity: .35; cursor: default; }
.text-warn { color: var(--gold-dark); font-weight: 600; }
.onboard-steps { padding: 16px 20px 16px 40px; margin-bottom: 16px; }
details.more { margin-top: 12px; }
details.more > summary { cursor: pointer; color: var(--teal-dark); font-weight: 600; padding: 6px 0; }
details.more[open] > summary { margin-bottom: 8px; }
body.is-bare .shell { background: none; }   /* login pages on desktop: no side menu strip */
.paperwork__title a { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Access: permission groups (v0.12.0) ---------- */
.perm-area { font: 800 12px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 6px; }
.perm-list { list-style: none; margin: 0; padding: 0; }
.perm-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.perm-row:first-child { border-top: 0; }
.perm-row__label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-row__label strong { font-weight: 600; }
.perm-row__label small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.perm-row:not(.is-on) .perm-row__label strong { color: var(--muted); font-weight: 500; }
.perm-row select { width: auto; max-width: 46%; min-height: 40px; font-size: 14px; flex: none; }
@media (max-width: 520px) { .perm-row { flex-direction: column; align-items: stretch; } .perm-row select { max-width: none; width: 100%; } }
.perm-check { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.perm-check:first-of-type { border-top: 0; }
.perm-tile { min-height: 130px; }

/* ---------- Activity log: filters, areas, grouped by day (v0.12.0) ---------- */
.log-filter { display: grid; gap: 12px; align-items: end; margin-bottom: 12px; }
.log-filter .field { margin: 0; }
@media (min-width: 1024px) { .log-filter { grid-template-columns: 170px 200px 1fr auto auto; } }
.log-filter__routine { margin: 0; }
.log-areas { margin-bottom: 8px; }
.log-areas .chip span { font-weight: 500; opacity: .7; margin-left: 2px; }
.log-day { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.log-day small { font: 500 14px/1 var(--body); color: var(--muted); }
.log--grouped li { flex-direction: row; gap: 14px; align-items: flex-start; }
.log--grouped .log__when { flex: none; width: 62px; padding-top: 2px; }
.log--grouped .log__what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.log__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.log__area { margin-left: auto; font-size: 11px; }
@media (max-width: 520px) { .log__area { display: none; } }
.section-h__link { font: 600 14px/1 var(--body); text-transform: none; letter-spacing: 0; margin-left: 8px; color: var(--teal-dark); }

/* ---- Shared checklist engine (v0.14.0): item types, the editor ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cl-q__range { display: block; font-weight: 600; color: var(--teal-dark); font-size: 14px; margin-top: 2px; }
.cl-q__warn { margin: 2px 0 6px; color: var(--red); font-weight: 700; font-size: 15px; }
.cl-num { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-num input[type=text] { width: 7.5em; min-height: 48px; font-size: 18px; font-weight: 700; text-align: right; }
.cl-num input:disabled { background: #f3f1f6; color: var(--muted); }
.cl-num__unit { font-weight: 700; color: var(--muted); }
.cl-q.is-no .cl-num input[type=text] { border-color: var(--red); color: var(--red); }
.cl-na { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; font-weight: 700; cursor: pointer; background: #fff; }
.cl-na input { width: 20px; height: 20px; accent-color: #6c6875; }
.cl-na:has(input:checked) { background: #6c6875; border-color: #6c6875; color: #fff; }
.cl-text { margin: 4px 0 6px; }
.cl-text textarea { min-height: 48px; }
.cl-photo { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 4px 0 6px; }
.cl-photo .uploader { flex: 1 1 220px; }
.yn__opt--done span { gap: 6px; min-width: 110px; }
.cl-list__num { color: var(--muted); font-weight: 600; }
.cl-list__items { counter-reset: none; }
.cl-types { display: grid; gap: 0; }
.cl-range { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px 2px; margin: 0 0 12px; }
.cl-archive { margin-top: 8px; }
.answer__val { font-weight: 600; }
@media (min-width: 640px) { .cl-types { grid-template-columns: 1fr 1fr; column-gap: 8px; } }
@media (max-width: 420px) {
  .insp-q .cl-num { justify-content: flex-start; }
  .insp-q .yn:has(.yn__opt--done) { grid-template-columns: 2fr 1fr; }
}
.record__vals { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; margin: 4px 0; }

/* ---- Forms & checklists: editable choice lists ---- */
.list-edit { list-style: none; margin: 0; padding: 0; }
.list-edit__row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.list-edit__row:first-child { border-top: 0; }
.list-edit__fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.list-edit__sub { display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.list-edit__sub input { font-size: 15px; min-height: 40px; }
.list-edit__ticks { display: flex; flex-wrap: wrap; gap: 0 16px; }
.checkline--sm { padding: 2px 0; font-size: 15px; }
.list-edit__archived { border-top: 1px solid var(--line); padding: 4px 0; }

/* ---------- "How to do this" instructions on forms (v0.15.0) ---------- */
.howto { margin: 0 0 16px; background: #eef8fb; border: 1px solid #cfe9f0; border-radius: var(--radius); }
.howto > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; font-weight: 700; color: var(--teal-dark); }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.howto[open] > summary::after { transform: rotate(-135deg); }
.howto__body { padding: 0 16px 14px; font-size: 16px; }
.howto--preview .howto__body { padding-top: 14px; }
.howto__body > :first-child { margin-top: 0; }
.howto__body > :last-child { margin-bottom: 0; }
.howto__body h3 { font-size: 16px; margin: 14px 0 4px; color: var(--navy); }
.howto__body ol, .howto__body ul { margin: 6px 0; padding-left: 22px; }
.howto__body li { margin: 4px 0; }
.howto__body p { margin: 8px 0; }
.howto__edit { font-size: 14px; border-top: 1px solid #cfe9f0; padding-top: 10px; }
.howto__edit a { display: inline-flex; align-items: center; gap: 4px; }
.howto-edit { font: 15px/1.5 var(--body); width: 100%; }
.howto-help { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.howto-help code { background: var(--bg); padding: 1px 4px; border-radius: 4px; color: var(--text); }

/* ---------- Drag to reorder (v0.15.0) ---------- */
.drag-handle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: var(--tap); margin: -4px 0; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.drag-handle:hover { background: var(--bg); color: var(--navy); }
.drag-handle:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; color: var(--navy); }
.drag-handle .icon { width: 22px; height: 22px; }
.is-sorting, .is-sorting * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
[data-sort-id].is-dragging { background: #eef8fb; border-radius: 10px; box-shadow: 0 6px 18px rgba(12, 59, 94, .18); position: relative; z-index: 2; }
.sort-hint { margin: 0 0 4px; }
.sort-hint .icon { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.sort-status { min-height: 1.3em; margin: 4px 0 0; font-size: 14px; color: var(--green); font-weight: 600; }
.sort-status.is-bad { color: var(--red); }
.list-edit__row .drag-handle { margin-top: 0; }

/* ---------- Actions list (v0.15.0) ---------- */
.stack-sm { display: grid; gap: 10px; }
.text-bad { color: var(--red); }
.actions-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; flex: 1; }
.actions-filter .field { margin: 0; min-width: 160px; }
.actions-filter__q { flex: 1; }
.actions-filter .btn { margin-bottom: 4px; }
.act { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.card__title + .act { border-top: 0; padding-top: 4px; }
.act__what { margin: 0; font-weight: 700; font-size: 17px; }
.act__meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.act__who { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.act__from { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.act__from a { color: var(--teal-dark); }
.act__done { margin: 6px 0 0; font-size: 14px; color: var(--green); display: flex; gap: 4px; align-items: flex-start; }
.act.is-done .act__what { color: var(--muted); }
.act--overdue .act__what { color: var(--red); }
.act__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.act__photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.act__do { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.act__panel { width: auto; }
.act__panel[open] { flex: 1 1 100%; }
.act__panel > summary { list-style: none; display: inline-flex; }
.act__panel > summary::-webkit-details-marker { display: none; }
.act__panel[open] > summary { margin-bottom: 10px; }
.act__panel > form { background: var(--bg); border-radius: 10px; padding: 12px; }
@media (min-width: 900px) {
  .act { grid-template-columns: 1fr minmax(260px, 340px); align-items: start; }
  .act__do { justify-content: flex-end; }
  .act__panel { width: auto; text-align: right; }
  .act__panel[open] { flex: 1 1 100%; order: 2; }
  .act__panel > form { text-align: left; }
}

/* ---------- Shared devices: touch screen / sit down switch (v0.15.0) ---------- */
.layout-switch { display: inline-flex; margin: 0; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.12); }
.layout-switch button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.8); font: 600 14px/1 var(--body); cursor: pointer; }
.layout-switch button.is-on { background: #fff; color: var(--navy); }
.layout-switch + .switch-user { margin-left: 6px; }
@media (max-width: 520px) { .layout-switch button { padding: 0 8px; font-size: 13px; } }
/* Touch screen: everything bigger, for the 24" touch screen at the front counter. */
body.is-touch { zoom: 1.3; --tap: 56px; }
body.is-touch .btn { min-height: 52px; }
body.is-touch .btn--sm { min-height: 46px; }
.device__opts { display: grid; gap: 4px; margin: 4px 0 12px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.device__opts .btn { justify-self: start; margin-top: 4px; }
.add-action-card > summary { list-style: none; display: inline-flex; }
.add-action-card > summary::-webkit-details-marker { display: none; }
.add-action-card[open] > summary { margin-bottom: 12px; }


/* ---------- Safety checks (v0.15.0) ---------- */
.sc { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.card__title + .sc { border-top: 0; padding-top: 2px; }
.sc__main { flex: 1 1 260px; min-width: 0; }
.sc__title { margin: 0; font-weight: 700; font-size: 17px; }
.sc__title a { color: var(--navy); text-decoration: none; }
.sc__title a:hover { text-decoration: underline; }
.sc__sub { margin: 2px 0 0; font-size: 15px; color: var(--text); }
.sc__meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14px; }
.sc__btn { flex: none; min-width: 120px; }
.sc--overdue .sc__title a, .sc--overdue .sc__title { color: var(--red); }


/* Job roles page (v0.15.1) */
.roles { list-style: none; padding: 0; margin: 0 0 16px; }
.card--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Back link at the top of the page on desktop (the header arrow is phone-only) (v0.15.1) */
.page-back { display: none; }
@media (min-width: 1024px) {
  .page-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: -8px 0 16px; padding: 0 14px 0 10px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; font-size: 14px; text-decoration: none; }
  .page-back .icon { width: 16px; height: 16px; color: var(--teal-dark); }
  .page-back:hover { border-color: var(--teal); }
}

/* Person page: More menu (They've left / delete a test login) and the Current / Past staff tabs (v0.15.1) */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(340px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(12, 59, 94, .15); padding: 16px; }
.more-menu__panel hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.more-menu__title { margin: 0; font-weight: 800; color: var(--navy); }
/* The More menu is a small "⋯" button next to Edit (Luke, v0.17.8), with room for more actions later.
   Phones and tablets: Edit fills the row, "⋯" is a square on the right, and the panel opens the full width
   of the row so it never runs off the edge of the screen (v0.17.7) */
.more-menu__btn { min-width: 44px; justify-content: center; }
.more-menu__btn .icon { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .page-head .btn-row:has(> .more-menu) { position: relative; grid-template-columns: 1fr auto; }
  .page-head .btn-row > .more-menu { position: static; }
  .page-head .btn-row > .btn:not(.btn--primary):not(.btn--danger-solid):has(+ .more-menu:last-child) { grid-column: auto; }
  .page-head .btn-row > .more-menu > .more-menu__btn { width: 48px; padding: 0; }
  .page-head .more-menu__panel { left: 0; right: 0; width: auto; max-width: none; }
}
/* Person page on phones and tablets: the two desktop columns become one list with Details near the top
   (Luke: "details sits a bit low"): Login, Details, Training, Paperwork, Access, Devices, Recent activity (v0.17.8) */
@media (max-width: 1023px) {
  .person-split { gap: 12px; }
  .person-split > div { display: contents; }
  .person-split .card + .card { margin-top: 0; }
  .person-split #login { order: 1; }
  .person-split #details { order: 2; }
  .person-split #training { order: 3; }
  .person-split #paperwork { order: 4; }
  .person-split #access { order: 5; }
  .person-split #devices { order: 6; }
  .person-split #activity { order: 7; }
  .person-split > div > * { order: 8; }
}
}
.staff-tabs { max-width: 420px; margin-bottom: 16px; }
/* A button that's working ("Sending the invite…") (v0.17.7) */
.btn.is-busy { opacity: .75; cursor: progress; pointer-events: none; }

/* Paperwork: newer versions (e.g. an updated contract) with the earlier ones listed underneath (v0.15.1) */
.paperwork__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 16px; margin-left: 34px; }
.paperwork__actions .paperwork__do { flex: 1 1 100%; order: 2; }
.paperwork__actions .paperwork__do:not([open]) { flex: 0 0 auto; order: 0; }
.paperwork__earlier { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--line); }
.paperwork__actions > .paperwork__undo, .paperwork__actions > .paperwork__do { margin-left: 0; }

/* Person page: Recent activity folded away by default (Luke, v0.15.1) */
.activity-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.activity-fold > summary::-webkit-details-marker { display: none; }
.activity-fold > summary::before { content: "▸"; color: var(--muted); }
.activity-fold[open] > summary::before { content: "▾"; }
.activity-fold[open] > summary { margin-bottom: 8px; }

/* Forms & checklists: one card per form, with a chip for each thing you can change (v0.15.3) */
.form-card { padding: 14px 16px; }
.form-card__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; color: var(--navy); }
.form-card__title .icon { width: 20px; height: 20px; color: var(--teal-dark); }
.form-card .small-note { margin: 4px 0 10px; }
.form-card__links { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; font-size: 14px; text-decoration: none; }
.chip-link:hover { border-color: var(--teal); }

/* Actions list: an open "Mark done" / "Change" panel takes over the row: its button becomes Cancel, the other button
   hides, and the form sits right under it (Luke: the button stayed and jumped) (v0.15.7) */
.act__panel .when-shut { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.act__panel .when-open { display: none; }
.act__panel[open] .when-shut { display: none; }
.act__panel[open] .when-open { display: inline; }
.act__panel[open] > summary { background: #fff; color: var(--navy); border: 1.5px solid var(--line); box-shadow: none; }
.act__do:has(.act__panel[open]) > .act__panel:not([open]),
.act__do:has(.act__panel[open]) > .inline-form { display: none; }
@media (min-width: 1024px) {
  .act__panel[open] { order: 0; text-align: right; }   /* Cancel stays exactly where Mark done was */
  .act__panel[open] > form { text-align: left; }
}

/* Removed items (src/Bin.php): folded list with Put back */
details.removed { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.removed > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .92rem; }
details.removed > summary::-webkit-details-marker { display: none; }
details.removed > summary .icon { transition: transform .15s; transform: rotate(-90deg); }
details.removed[open] > summary .icon { transform: none; }
.removed__list { list-style: none; margin: 8px 0 0; padding: 0; }
.removed__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.removed__item:first-child { border-top: 0; }
.removed__item > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.removed__item form { flex: none; }
@media (max-width: 560px) { .removed__item { flex-direction: column; align-items: flex-start; } }
.done-fold { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.done-fold > summary { padding: 2px 0; }
.inline-icon { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.inline-icon .icon { flex: none; }
.training-matrix td.levels { white-space: normal; }
.training-matrix td.levels .tag { display: inline-block; margin: 2px 4px 2px 0; }
.training-rest { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }

/* v0.17.6: smaller labels inside a grouped field (home address), and an indented block (contractor details) */
.field__label--sub { font-size: .92em; font-weight: 500; color: var(--muted, #5f6470); }
fieldset.field > .field:last-child, fieldset.field > .field-row:last-child .field { margin-bottom: 0; }
.sub-block { margin: 4px 0 16px; padding: 12px 14px 2px; border-left: 3px solid var(--teal, #1ea1bf); background: #f3f9fb; border-radius: 8px; }
.sub-block > .field__label { margin: 0 0 10px; }

/* Test copy on Luke's PC: impossible to mistake for the real app */
.test-banner { position: relative; z-index: 1000; background: repeating-linear-gradient(45deg, #c4372d, #c4372d 14px, #a82d24 14px, #a82d24 28px); color: #fff; text-align: center; font-size: .9rem; padding: 6px 12px; line-height: 1.3; }
.test-banner strong { letter-spacing: .08em; }

/* "Save the app to your home screen" card on phones (v0.17.7) */
.a2hs { background: #e9f6f9; border: 1px solid #bfe3ec; border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.a2hs__title { margin: 0; font: 800 17px/1.25 var(--head); color: var(--navy); }
.a2hs__note { margin: 4px 0 10px; color: var(--text); }
.a2hs__steps { margin: 0 0 12px; padding-left: 22px; }
.a2hs__steps li { margin: 4px 0; }
.a2hs__glyph { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--teal-dark, #127a92); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a2hs [data-a2hs-install] { margin-bottom: 10px; }
.a2hs__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a2hs__btns .btn { width: 100%; }

/* Competency skills (6 Nov): Yes / Still learning / Not for them */
.yn__opt--learning input:checked + span { background: var(--gold); border-color: var(--gold); color: #3b2a00; }
.check-q__help { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
@media (max-width: 480px) {
  .check-q--stack .yn.yn--skill { grid-template-columns: .7fr 1.2fr 1.2fr; }
  .check-q--stack .yn--skill .yn__opt span { font-size: 15px; }
}
.answer--learning .answer__mark { color: #8a6100; }
.answer__signed { display: block; font-size: 14px; color: var(--muted); }
.skill-signoff { margin-top: 6px; }
.skill-signoff summary { font-weight: 700; color: var(--teal-dark); cursor: pointer; }
.skill-signoff form { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }

/* History of changes on forms (6 Nov) */
.history-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; margin: 0; }
.history-card > summary::-webkit-details-marker { display: none; }
.history-card[open] > summary { margin-bottom: 10px; }
.history-why { font-size: 14px; color: var(--muted); font-style: italic; }
.why-box { margin-top: 4px; }
@media (max-width: 480px) { .answer { grid-template-columns: 84px 1fr; gap: 8px; } .answer__mark { font-size: 13px; } }
