@font-face { font-family: "Overused Grotesk"; src: url("OverusedGrotesk-VF.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --indigo: #181840; --indigo-2: #20244C; --sky: #88CCF8; --blue: #1F63D6; --blue-ink: #174EA6;
  --ink: #20244C; --slate: #5A5D78; --mute: #A8A8B8; --line: #E1E1EA; --line-2: #C9CCDA; --fill: #F4F5F8; --paper: #FFFFFF;
  --sky-fill: #EAF6FE; --ok: #1F7A3D; --ok-fill: #EFF9F1; --ok-line: #CDE7D4; --bad: #B3261E; --bad-fill: #FDF1F1;
  --warn: #8A4B00; --warn-fill: #FFF4E0; --on-indigo: #C9D2EE;
  --radius: 12px; --shadow: 0 4px 14px rgba(24, 24, 64, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fill); color: var(--ink); }
body { font-family: "Overused Grotesk", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* long words, addresses and ids wrap instead of spilling out of their box */
h1, h2, h3, p, li, dd, label, .chip, .btn { overflow-wrap: anywhere; }
td, th, .card, .small, .tiny { overflow-wrap: break-word; }   /* break a long word only when it cannot fit at all */
h1, h2, h3 { text-wrap: balance; } p, li { text-wrap: pretty; }
a { color: var(--blue); } a:hover { color: var(--indigo); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--indigo); margin: 0; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.top { background: var(--indigo); color: #fff; }
.top-in { max-width: 1360px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.top img { height: 26px; width: auto; display: block; }
.top .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.top .tag { font-size: 12px; letter-spacing: .18em; font-weight: 600; color: var(--sky); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.top nav a { color: var(--on-indigo); text-decoration: none; padding: 10px 14px; border-radius: 8px; }
.top nav a.on { color: #fff; background: var(--indigo-2); font-weight: 600; }
.top nav a:hover { color: #fff; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sky); color: var(--indigo); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.dark { background: var(--indigo); color: var(--sky); }
.avatar.light { background: var(--sky-fill); color: var(--indigo); }

main { max-width: 1360px; margin: 0 auto; padding: 28px 20px 64px; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; font-weight: 600; color: var(--blue); text-transform: uppercase; }
.rule { width: 56px; height: 3px; background: var(--blue); margin: 12px 0 10px; }
.muted { color: var(--slate); }
.small { font-size: 14.5px; line-height: 1.5; }
.tiny { font-size: 13px; line-height: 1.45; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex-grow: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.split > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.tight { padding: 16px; }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.callout { background: var(--indigo); color: #fff; border-radius: var(--radius); padding: 20px 22px; border-left: 4px solid var(--blue); }
.callout .eyebrow { color: var(--sky); }
.callout p { margin-top: 8px; font-size: 16px; line-height: 1.45; }

/* buttons */
.btn { height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--indigo); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1953B8; }
.btn.dark { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn.sky { background: var(--sky); border-color: var(--sky); color: var(--indigo); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--slate); cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--indigo); text-decoration: underline; }
.pill { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line-2); background: var(--paper); }
.pill.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* chips */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--ok-fill); color: var(--ok); }
.chip.info { background: var(--sky-fill); color: var(--blue-ink); }
.chip.bad { background: var(--bad-fill); color: var(--bad); }
.chip.mute { background: var(--fill); color: var(--slate); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.Green { background: var(--ok); } .dot.Amber { background: #C27A00; } .dot.Red { background: var(--bad); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat.dark { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.stat .big { font-size: 30px; font-weight: 700; line-height: 1; color: var(--indigo); }
.stat.dark .big { color: #fff; }
.stat .big span { color: var(--blue); font-size: 17px; }
.stat.dark .big span { color: var(--sky); }
.stat .lbl { font-size: 11px; letter-spacing: .16em; font-weight: 600; color: var(--slate); margin-top: 8px; text-transform: uppercase; }
.stat.dark .lbl { color: var(--on-indigo); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.bar.ok > i { background: var(--ok); }
.stat.dark .bar { background: var(--indigo-2); margin-top: 12px; } .stat.dark .bar > i { background: var(--sky); }

/* stage rail */
.rail-wrap { overflow-x: auto; padding-bottom: 4px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; }
.stage-btn { text-align: left; cursor: pointer; border-radius: 10px; padding: 14px; min-height: 148px; background: var(--fill); border: 2px solid transparent; display: flex; flex-direction: column; }
.stage-btn.active { background: var(--sky-fill); }
.stage-btn.sel { background: var(--paper); border-color: var(--blue); box-shadow: var(--shadow); }
.stage-btn .name { font-size: 15px; font-weight: 700; color: var(--indigo); margin-top: 8px; line-height: 1.25; }
.stage-btn .gate { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 600; }
.stage-btn .bar { margin-top: 10px; height: 4px; }
.sdot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--mute); background: #fff; flex: none; }
.sdot.done { background: var(--ok); border-color: var(--ok); } .sdot.active { background: var(--blue); border-color: var(--blue); }

/* checklist rows */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.check.met { border-color: var(--ok-line); background: var(--ok-fill); }
.check.waived { border-color: #F1D9A8; background: var(--warn-fill); }
.box { flex: none; width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--mute); cursor: pointer; padding: 0; margin-top: 1px; }
.box.on { background: var(--ok); border-color: var(--ok); }
.box.round { border-radius: 50%; }
.box:disabled { cursor: default; }
.check .body { flex-grow: 1; min-width: 0; }
.check .label { font-weight: 600; color: var(--ink); }
.check .tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.file { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--sky-fill); color: var(--blue-ink); padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.file button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .14em; color: var(--slate); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.ref { color: var(--slate); white-space: nowrap; }
.tbl tr:hover td { background: #FAFAFC; }
select.inline { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; padding: 0 8px; font-size: 13px; }

/* project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.grid.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.pcard:hover { border-color: var(--blue); box-shadow: var(--shadow); color: inherit; }
.pcard .code { font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--slate); }
.pcard h3 { font-size: 18px; }

/* risks */
/* RAID log: issues carry their RAG; risks, assumptions and dependencies stay neutral */
.risk { border-radius: 8px; padding: 12px; background: var(--fill); border-left: 4px solid var(--line-2); }
.risk.Red { background: var(--bad-fill); border-left-color: var(--bad); } .risk.Amber { background: var(--warn-fill); border-left-color: #C27A00; }
.risk.Green { background: var(--ok-fill); border-left-color: var(--ok); }
.risk .k { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--slate); text-transform: uppercase; }
.risk.Red .k { color: var(--bad); } .risk.Amber .k { color: var(--warn); } .risk.Green .k { color: var(--ok); }
.risk.Closed { opacity: .65; }

/* handover: three steps, each opening when the one before is done */
.hstep .num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--indigo); color: #fff; font-weight: 700; }
.hstep.done .num { background: var(--ok); }
.hstep.locked { opacity: .55; }
.ready-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: inherit; background: var(--paper); }
.ready-row:hover { border-color: var(--blue); color: inherit; }
.ready-row.done { border-color: var(--ok-line); background: var(--ok-fill); }
.ready-row .box { pointer-events: none; }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--slate); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--indigo); border-bottom-color: var(--blue); }

/* forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
label.f .hint { font-weight: 400; color: var(--slate); }
.input, input[type=text].input, input[type=email].input, input[type=password].input, input[type=date].input, input[type=number].input, select.input, textarea.input {
  height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; padding: 0 12px; font-size: 15px; width: 100%; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .btn:focus-visible, .pill:focus-visible, .box:focus-visible, .stage-btn:focus-visible, a:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.radio.on { border-color: var(--blue); background: var(--sky-fill); }
.radio input { margin-top: 4px; accent-color: var(--blue); }
.tickrow { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tickrow input { width: 18px; height: 18px; accent-color: var(--blue); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(24, 24, 64, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; padding: 24px; box-shadow: 0 20px 60px rgba(24, 24, 64, .3); display: flex; flex-direction: column; gap: 14px; }
.modal .err { color: var(--bad); font-weight: 600; font-size: 14px; }

/* toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--indigo); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 60; max-width: calc(100% - 32px); font-size: 14px; }
.toast.bad { background: var(--bad); }

/* sign-in */
.gate-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(120% 90% at 85% 10%, #2B3A7A 0%, #181840 60%); }
.gate-page .panel { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.gate-page .logo { background: var(--indigo); border-radius: 10px; padding: 14px; display: flex; justify-content: center; }
.gate-page .logo img { height: 28px; }

/* actions */
.action { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; }
.action:hover { border-color: var(--blue); color: inherit; }
.action .k { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--blue-ink); text-transform: uppercase; }
.action.overdue .k, .action.risk .k { color: var(--bad); }
.empty { text-align: center; padding: 28px; color: var(--slate); }

.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.act-list .when { display: block; font-size: 12px; color: var(--slate); }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  main { padding: 20px 16px 48px; }
  .top .tag { display: none; }
  .top-in { gap: 10px; padding: 10px 16px; }
  .top .brand { flex-grow: 1; }
  .top nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; flex-grow: 0; }
  .top nav a { padding: 8px 12px; white-space: nowrap; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs a { white-space: nowrap; }
  .card { padding: 16px; }
}
@media print { .top, .tabs, .btn, .link { display: none !important; } }

/* plan: a Gantt chart of stages, tasks, gates and deliverables */
.gantt-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; }
.gantt { position: relative; }
.grow-row { display: flex; border-bottom: 1px solid var(--line); min-height: 40px; }
.grow-row:last-child { border-bottom: 0; }
.grow-row.stage { background: var(--fill); }
.glabel { flex: none; width: 260px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; left: 0; background: inherit; background-color: var(--paper); border-right: 1px solid var(--line); z-index: 2; }
.grow-row.stage .glabel { background-color: var(--fill); }
.grow-row.task .glabel { padding-left: 26px; }
.gtrack { position: relative; flex: 1; min-height: 40px; }
.ghead .gtrack { height: 46px; }
.gmonths, .gweeks { position: absolute; left: 0; right: 0; height: 22px; }
.gweeks { top: 22px; }
.gm { position: absolute; top: 4px; font-size: 11px; font-weight: 700; color: var(--indigo); padding-left: 4px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.gw { position: absolute; top: 4px; font-size: 10px; color: var(--slate); padding-left: 3px; }
.gtoday { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--blue); opacity: .55; z-index: 1; }
.gband { position: absolute; top: 12px; height: 16px; border-radius: 4px; background: var(--line-2); }
.gband.active { background: var(--indigo); } .gband.done { background: var(--ok); opacity: .7; }
.gbar { position: absolute; top: 11px; height: 18px; border-radius: 9px; border: 0; padding: 0; cursor: pointer; background: var(--line-2); }
.gbar.info { background: var(--blue); } .gbar.ok { background: var(--ok); } .gbar.bad { background: var(--bad); } .gbar.mute { background: #B9BCD0; }
.gbar.late { box-shadow: 0 0 0 2px var(--bad); }
.gdia, .ggate, .gdel { position: absolute; top: 13px; width: 14px; height: 14px; transform: translateX(-7px) rotate(45deg); border: 0; padding: 0; background: var(--blue); }
.gdia.ok { background: var(--ok); } .gdia.bad { background: var(--bad); } .gdia.mute { background: #B9BCD0; }
.gdia { cursor: pointer; }
.ggate { background: #fff; border: 2px solid var(--indigo); } .ggate.on { background: var(--ok); border-color: var(--ok); }
.gdel { width: 10px; height: 10px; top: 15px; transform: translateX(-5px) rotate(45deg); background: var(--sky); border: 1px solid var(--blue); }
.gdel.on { background: var(--ok); border-color: var(--ok); } .gdel.late { background: var(--bad); border-color: var(--bad); }
.gnone { position: absolute; top: 12px; left: 8px; font-size: 12px; color: var(--slate); }
.glegend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.glegend span { display: inline-flex; align-items: center; gap: 6px; }
.glegend i { position: static; display: inline-block; transform: none; }
.glegend .gbar { width: 22px; height: 10px; } .glegend .gdia, .glegend .ggate { width: 10px; height: 10px; transform: rotate(45deg); }
.glegend .gdel { width: 8px; height: 8px; transform: rotate(45deg); }
.gtoday-key { width: 2px; height: 14px; background: var(--blue); }

/* change requests */
.cr .code, .meeting .code { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--slate); }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.cr-grid span.muted, .m-grid .k { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* RACI */
table.raci td { vertical-align: middle; }
.raci-cell { height: 34px; padding: 0 8px; width: 74px; font-weight: 700; }
.raci-cell.vA, .raci-cell.vRA { background: var(--indigo); color: #fff; } .raci-cell.vR { background: var(--sky-fill); color: var(--blue-ink); }
.raci-cell.vC { background: var(--warn-fill); } .raci-cell.vI { background: var(--fill); }
tr.warnrow td { background: #FFFBF2; }

/* meetings */
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.pre { white-space: pre-wrap; }
.transcript { white-space: pre-wrap; max-height: 360px; overflow-y: auto; background: var(--fill); border-radius: 8px; padding: 12px; margin-top: 8px; }
.rec { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--sky-fill); font-size: 14px; }
.rec.on { background: var(--bad-fill); } .rec.bad { background: var(--warn-fill); }
.recdot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s infinite; }
.rec-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--blue); border-top-color: transparent; animation: turn .9s linear infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .recdot, .spin { animation: none; } }
@media (max-width: 640px) { .glabel { width: 170px; } }

/* new project from the bid details */
.bid-up { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border: 2px dashed var(--line-2); background: var(--sky-fill); }
.bid-up label.btn { cursor: pointer; }
#bidstate .spin { display: inline-block; vertical-align: -2px; margin-right: 6px; }
ul.frombid { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.frombid label { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }

/* white label: the one credit line */
footer.powered { text-align: center; font-size: 12px; color: var(--mute); padding: 0 16px 28px; }

/* mail and calendar */
.mailrow { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.mailrow h3 a { color: var(--indigo); text-decoration: none; } .mailrow h3 a:hover { text-decoration: underline; }
ul.callist { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.calrow { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.calrow.match { border-color: var(--blue); background: var(--sky-fill); }

pre.recovery { background: var(--fill); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-size: 15px; line-height: 1.7; margin: 0; }
.tablewrap { overflow-x: auto; }

/* connected systems */
.catset { margin-top: 16px; } .catset .eyebrow { margin-bottom: 8px; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.catbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin-bottom: 6px; text-align: left; height: auto; min-height: 60px; margin: 0; padding: 10px 14px; white-space: normal; line-height: 1.3; justify-content: center; }
.srcmark, .srcmark a { color: var(--blue-ink); font-weight: 600; text-decoration: none; }
.srcmark a:hover { text-decoration: underline; }
.chip.warn { background: var(--warn-fill); color: var(--warn); }

.kpis { display: flex; flex-wrap: wrap; gap: 14px 28px; } .kpis b { display: block; font-size: 24px; color: var(--indigo); }

/* plain tables (Data and access, Security, the source inventory) */
table:not(.tbl):not(.raci) { width: 100%; border-collapse: collapse; }
table:not(.tbl):not(.raci) th { text-align: left; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table:not(.tbl):not(.raci) td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
table:not(.tbl):not(.raci) tr:last-child td { border-bottom: 0; }

/* buttons with long labels wrap rather than run past their edge */
.btn { max-width: 100%; }
.modal .btn, .card .row .btn { white-space: normal; text-align: center; line-height: 1.25; min-height: 44px; height: auto; padding-top: 8px; padding-bottom: 8px; }
.card .row .btn.sm { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .input, select.inline, textarea { font-size: 16px; }      /* no zoom on focus on iPhone */
  /* tables become one block per row on a phone, each value under its column's name */
  table.stacked thead { display: none; }
  table.stacked, table.stacked tbody, table.stacked tr, table.stacked td { display: block; width: 100%; }
  table.stacked { min-width: 0 !important; } table.stacked td.hide-sm { display: none; }
  table.stacked tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stacked tr:last-child { border-bottom: 0; }
  table.stacked td { border: 0 !important; padding: 2px 0 !important; }
  table.stacked td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); font-weight: 600; margin-top: 6px; }
  .kpis { gap: 12px 22px; } .kpis b { font-size: 22px; }
}

.sechead { margin-top: 10px; } .sechead p { margin-top: 6px; max-width: 760px; }
.form-grid label.f .hint { order: 3; }   /* side by side, the boxes line up and a hint sits under its box */
.checkrow { display: flex; gap: 10px; align-items: flex-start; } .checkrow input { margin-top: 4px; flex: none; }
.stagepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; } .stagepick .radio { align-items: flex-start; }
.bbar { position: relative; height: 8px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: visible; }
.bbar i { display: block; height: 100%; border-radius: 4px; background: var(--ok); } .bbar i.ahead { background: #C27A00; } .bbar i.over { background: var(--bad); }
.bbar b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--indigo); }
tr.total td { border-top: 2px solid var(--line-2); }
tr.grp td { background: var(--fill); } tr.sub td:first-child { padding-left: 26px; }

/* the testing programme (delivery/feedback.py): the Feedback page */
.fb-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--fill); margin-bottom: 14px; }
.fb-check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.fb-check input { width: 18px; height: 18px; accent-color: var(--indigo); }
