/* MTA Safety: MTA brand (primary blues + black; Mulish). Mobile first, 44px touch targets, works at 360px. */
:root {
  --dark: #052d4a; --mid: #0077c0; --bright: #00aeef; --ink: #000; --bg: #f0f4fa; --card: #fff;
  --line: #d5dfeb; --muted: #4a5a6a; --ok: #005336; --ok-bg: #e3f4e8; --warn: #8a5a00; --warn-bg: #fff4d6;
  --bad: #a1001e; --bad-bg: #fde8ec; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Mulish, Arial, system-ui, sans-serif; font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--mid); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--bright); outline-offset: 2px; }
h1, h2, h3 { color: var(--dark); line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 1.6rem; font-weight: 900; } h2 { font-size: 1.25rem; font-weight: 800; color: var(--mid); } h3 { font-size: 1.05rem; color: var(--ink); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem; z-index: 10; }
header.top { background: var(--dark); color: #fff; }
header.top .bar { display: flex; align-items: center; gap: 1rem; max-width: 1100px; margin: 0 auto; padding: .6rem 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.15rem; }
.badge-mark { background: var(--bright); color: #fff; border-radius: 6px; padding: .1rem .45rem; font-weight: 900; letter-spacing: .02em; }
nav.main { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
nav.main a { color: #fff; text-decoration: none; padding: .55rem .7rem; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
nav.main a[aria-current="page"], nav.main a:hover { background: rgba(255,255,255,.14); }
.who { font-size: .9rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.who a, .who button { color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--mid); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
label { display: block; font-weight: 700; margin-bottom: .25rem; }
.field { margin-bottom: .9rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input, select, textarea { width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #9fb0c2; border-radius: 8px; background: #fff; min-height: 44px; color: var(--ink); }
textarea { min-height: 96px; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; vertical-align: middle; margin: 0 .4rem 0 0; accent-color: var(--mid); }
.choice { display: flex; align-items: center; font-weight: 400; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; margin: 0; cursor: pointer; background: #fff; }
.choices { display: flex; gap: .5rem; flex-wrap: wrap; }
.choices .choice { flex: 1 1 120px; }
.choice:has(input:checked) { border-color: var(--mid); background: #e6f2fa; }
.btn, button { font: inherit; font-weight: 800; border: 0; border-radius: 8px; padding: .65rem 1.1rem; min-height: 44px; background: var(--mid); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn:hover, button:hover { background: var(--dark); }
.btn.secondary, button.secondary { background: #fff; color: var(--mid); border: 2px solid var(--mid); }
.btn.danger, button.danger { background: var(--bad); }
.btn.big, button.big { width: 100%; font-size: 1.1rem; padding: .9rem; }
button.link { background: none; color: inherit; padding: 0; min-height: 0; text-decoration: underline; font-weight: 400; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--dark); color: #fff; font-weight: 700; font-size: .9rem; }
tbody tr:nth-child(even) { background: #f7f9fc; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 800; background: #e6eef6; color: var(--dark); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.notice { border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.notice.ok { background: var(--ok-bg); border-color: #9bd3ae; } .notice.warn { background: var(--warn-bg); border-color: #f1d27a; } .notice.bad { background: var(--bad-bg); border-color: #f2a3b2; }
.notice.info { background: #e6f2fa; border-color: #9cc9e8; }
.dnu { background: var(--bad); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); font-weight: 900; }
.dnu-huge { background: var(--bad); color: #fff; text-align: center; font-size: clamp(2.2rem, 12vw, 5rem); font-weight: 900; padding: 1.5rem .5rem; border-radius: var(--radius); line-height: 1; margin-bottom: 1rem; }
.stat { font-size: 1.8rem; font-weight: 900; color: var(--dark); }
.stat.bad { color: var(--bad); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a.item { display: flex; justify-content: space-between; gap: .5rem; text-decoration: none; color: inherit; min-height: 44px; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
.timeline li { padding: .2rem 0 .8rem .9rem; position: relative; }
.timeline li::before { content: ""; width: 11px; height: 11px; background: var(--mid); border-radius: 50%; position: absolute; left: -7px; top: .45rem; }
.timeline li.recommendation::before { background: var(--bright); } .timeline li.signoff::before { background: var(--ok); }
.worksafe { position: fixed; inset: 0; background: var(--dark); color: #fff; z-index: 50; overflow: auto; padding: 1.5rem 1rem; }
.worksafe .inner { max-width: 640px; margin: 0 auto; }
.worksafe h1, .worksafe h2 { color: #fff; }
.worksafe .phone { display: block; background: var(--bright); color: var(--dark); font-size: 1.8rem; font-weight: 900; text-align: center; padding: 1rem; border-radius: var(--radius); text-decoration: none; margin: 1rem 0; }
.worksafe a { color: #fff; }
.hidden { display: none !important; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.matrix td, .matrix th { text-align: center; white-space: nowrap; font-size: .88rem; }
.matrix td:first-child, .matrix th:first-child { text-align: left; position: sticky; left: 0; background: inherit; }
.labels { display: grid; gap: 6mm; }
.labels.per-6 { grid-template-columns: repeat(2, 1fr); } .labels.per-12 { grid-template-columns: repeat(3, 1fr); }
.label { border: 1px dashed #999; padding: 4mm; text-align: center; page-break-inside: avoid; background: #fff; }
.label svg { width: 100%; max-width: 45mm; height: auto; }
.label .name { font-weight: 900; } .label .tag { font-size: .85rem; }
.kiosk-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.kiosk-names .choice { justify-content: center; font-size: 1.1rem; min-height: 64px; }
.player-wrap { position: relative; padding-top: 56.25%; background: #000; border-radius: var(--radius); overflow: hidden; }
.player-wrap iframe, .player-wrap .sim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sim { color: #fff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; }
progress { width: 100%; height: 14px; accent-color: var(--mid); }
footer.foot { max-width: 1100px; margin: 0 auto; padding: 1rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 640px) {
  th, td { padding: .5rem .4rem; } h1 { font-size: 1.35rem; }
  header.top .bar { gap: .25rem .75rem; padding: .5rem 1rem 0; justify-content: space-between; }
  nav.main { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem; padding: 0 .5rem .25rem; scrollbar-width: none; }
  nav.main a { white-space: nowrap; padding: .5rem .65rem; }
}
@media print {
  header.top, footer.foot, .no-print { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; }
  @page { size: A4; margin: 10mm; }
}
/* Incident workflow */
.steps { display: flex; list-style: none; padding: 0; margin: 0; gap: .25rem; overflow-x: auto; counter-reset: step; }
.steps li { flex: 1 1 0; min-width: 84px; text-align: center; font-size: .82rem; font-weight: 700; color: var(--muted); padding: .45rem .25rem; border-bottom: 4px solid var(--line); white-space: nowrap; }
.steps li.done { color: var(--ok); border-color: var(--ok); }
.steps li.current { color: var(--dark); border-color: var(--bright); }
.next-step h2 { color: var(--dark); margin: .1rem 0 .3rem; }
.next-step p { margin: 0 0 .6rem; }
.card.attention { border: 2px solid var(--bad); }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { margin: 0; }
details.card > summary::after { content: "Show"; margin-left: auto; font-size: .85rem; color: var(--mid); }
details.card[open] > summary::after { content: "Hide"; }
details.card[open] > summary { margin-bottom: .75rem; }
:target { scroll-margin-top: 1rem; }
details:not(.card) > summary { color: var(--mid); }
details:not(.card) > summary::before { content: "▸"; margin-right: .4rem; transition: transform .15s; }
details:not(.card)[open] > summary::before { transform: rotate(90deg); }
.card.attention-ok { border: 2px solid var(--ok); }
pre { white-space: pre-wrap; word-break: break-word; }
