/* The Grove — Staff Board
   Layout: navy masthead + section rail (sidebar ≥ 960px, chip strip on phones); one column of working cards.
   Brand: Grove navy + sky, sand as the warm accent, Outfit throughout. */
:root {
  --navy: #003462; --navy-deep: #00172C; --sky: #1F9FE0; --sand: #E7DCC8; --wood: #B59264;
  --bg: #EEF2F6; --surface: #FFFFFF; --raised: #F6F8FB; --well: #E3EAF1;
  --ink: #00172C; --ink2: #3D5368; --ink3: #6A8094; --line: #D3DDE7; --line2: #E4EAF0;
  --accent: #0F7DBE; --accent-ink: #FFFFFF; --accent-soft: #DCF0FC;
  --mast: #003462; --mast-ink: #FFFFFF; --mast-dim: #9AC7E8;
  --red: #C2413A; --red-soft: #FBE7E5; --amber: #A86A12; --amber-soft: #FBF0DC; --green: #2B8556; --green-soft: #E2F3EA;
  --gm: #1F9FE0; --ops: #0B4B82; --pt: #B59264; --gap: #C2413A;
  --shadow: 0 1px 2px rgba(0, 23, 44, .06), 0 4px 14px rgba(0, 23, 44, .06);
  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 12px; --r-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #00121F; --surface: #042440; --raised: #073255; --well: #0A2C4A;
    --ink: #F5F8FB; --ink2: #C3D2E0; --ink3: #8EA7BF; --line: #164A72; --line2: #0F3A5D;
    --accent: #5FBEEF; --accent-ink: #00172C; --accent-soft: #0B3A5E;
    --mast: #00172C; --mast-ink: #FFFFFF; --mast-dim: #7FB4DA;
    --red: #F07A72; --red-soft: #3A1A1F; --amber: #E8B04B; --amber-soft: #352914; --green: #4CC38A; --green-soft: #0F3324;
    --gm: #5FBEEF; --ops: #9AD6F5; --pt: #D9BE93; --gap: #F07A72;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #00121F; --surface: #042440; --raised: #073255; --well: #0A2C4A;
  --ink: #F5F8FB; --ink2: #C3D2E0; --ink3: #8EA7BF; --line: #164A72; --line2: #0F3A5D;
  --accent: #5FBEEF; --accent-ink: #00172C; --accent-soft: #0B3A5E;
  --mast: #00172C; --mast-ink: #FFFFFF; --mast-dim: #7FB4DA;
  --red: #F07A72; --red-soft: #3A1A1F; --amber: #E8B04B; --amber-soft: #352914; --green: #4CC38A; --green-soft: #0F3324;
  --gm: #5FBEEF; --ops: #9AD6F5; --pt: #D9BE93; --gap: #F07A72;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.15; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── masthead ── */
.mast { position: sticky; top: 0; z-index: 20; background: var(--mast); color: var(--mast-ink); padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--mast-ink); text-decoration: none; min-width: 0; }
.brand .bm { width: 15px; height: 25px; flex: none; color: var(--sky); }
.brand .wm { width: 118px; height: 15px; flex: none; }
.brand .tag { font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mast-dim); border-left: 1px solid rgba(255, 255, 255, .2); padding-left: 10px; white-space: nowrap; }
.mast .sp { flex: 1; }
.mast .date { font-size: 14px; color: var(--mast-dim); white-space: nowrap; }
.mast .me { background: rgba(255, 255, 255, .1); border: 0; color: var(--mast-ink); border-radius: 999px; padding: 6px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mast .me:hover { background: rgba(255, 255, 255, .18); }
.demo-bar { background: var(--sand); color: #3a2c12; font-size: 13px; padding: 7px 16px; text-align: center; }

/* ── layout ── */
.frame { display: grid; grid-template-columns: 1fr; max-width: 1280px; margin: 0 auto; }
.rail { position: sticky; top: 52px; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail nav { display: flex; gap: 6px; padding: 10px 16px; width: max-content; }
.rail a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink2); padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap; }
.rail a:hover { background: var(--well); color: var(--ink); }
.rail a.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .rail a.on { background: var(--accent); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rail a.on { background: var(--accent); color: var(--accent-ink); } }
.rail .dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.rail .dot.amber { background: var(--amber); }
.rail .grp { display: none; }
main { padding: 18px 16px 120px; min-width: 0; }
@media (min-width: 960px) {
  .frame { grid-template-columns: 236px minmax(0, 1fr); gap: 8px; }
  .rail { top: 52px; height: calc(100vh - 52px); border: 0; overflow-y: auto; align-self: start; }
  .rail nav { flex-direction: column; width: auto; padding: 18px 12px 40px 16px; gap: 2px; }
  .rail a { border-radius: 8px; justify-content: space-between; }
  .rail .grp { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); padding: 16px 12px 6px; }
  main { padding: 24px 24px 120px 12px; }
}

/* ── page head ── */
.head { display: grid; gap: 6px; margin-bottom: 18px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.head h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -.01em; }
.head p { margin: 0; color: var(--ink2); max-width: 68ch; }
.owner-line { font-size: 13px; color: var(--ink3); }
.owner-line b { color: var(--ink2); font-weight: 600; }

/* ── blocks ── */
.cols { display: grid; gap: 16px; }
@media (min-width: 1100px) { .cols.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.block { display: grid; gap: 10px; min-width: 0; }
.block + .block { margin-top: 22px; }
.bh { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.bh h2 { font-size: 18px; font-weight: 650; }
.bh .meta { font-size: 13px; color: var(--ink3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.pad { padding: 14px 16px; }
.empty { color: var(--ink3); font-size: 14px; padding: 14px 16px; }
.muted { color: var(--ink3); }
.small { font-size: 13px; }

/* ── status ── */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--well); color: var(--ink2); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.pill.sand { background: var(--sand); color: #4a3815; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.who i { width: 8px; height: 8px; border-radius: 50%; background: var(--pt); display: inline-block; }
.who i.gm { background: var(--gm); } .who i.ops { background: var(--ops); } .who i.owner { background: var(--wood); }

/* ── alerts ── */
.alerts { display: grid; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm); background: var(--amber-soft); color: var(--ink); border-left: 4px solid var(--amber); font-size: 14px; }
.alert.red { background: var(--red-soft); border-left-color: var(--red); }
.alert a { margin-left: auto; white-space: nowrap; font-weight: 600; text-decoration: none; }

/* ── today strip ── */
.strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.stat b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink3); }
.stat.red b { color: var(--red); } .stat.green b { color: var(--green); } .stat.amber b { color: var(--amber); }

/* ── on duty ── */
.duty { display: grid; gap: 8px; }
.duty-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.duty-row .t { font-size: 13px; color: var(--ink3); min-width: 112px; }
.duty-row .x { text-decoration: line-through; color: var(--ink3); }

/* ── checklist card ── */
.cl { overflow: hidden; }
.cl > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.ring { width: 38px; height: 38px; flex: none; }
.ring circle { fill: none; stroke-width: 4; }
.ring .bg { stroke: var(--well); } .ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .3s; }
.ring.done .fg { stroke: var(--green); } .ring.overdue .fg { stroke: var(--red); }
.ring text { font: 700 11px var(--font); fill: var(--ink2); text-anchor: middle; dominant-baseline: central; }
.cl h3 { font-size: 16px; font-weight: 600; }
.cl .sub { font-size: 13px; color: var(--ink3); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.cl .chev { color: var(--ink3); transition: transform .2s; }
.cl.open .chev { transform: rotate(180deg); }
.cl .body { border-top: 1px solid var(--line2); padding: 6px 6px 10px; display: none; }
.cl.open .body { display: block; }
.cl .about { font-size: 13px; color: var(--ink2); padding: 6px 10px 4px; }
.cl .g { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); padding: 12px 10px 4px; }
.cl.overdue { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.cl.done { opacity: .82; }

.item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.item:hover { background: var(--raised); }
.item[disabled] { cursor: default; } .item[disabled]:hover { background: none; }
.box { width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 7px; display: grid; place-items: center; background: var(--surface); margin-top: -1px; }
.box svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; }
.item.on .box { background: var(--green); border-color: var(--green); }
.item.on .box svg { opacity: 1; }
.item .tx { font-size: 15px; }
.item.on .tx { color: var(--ink3); }
.item .dt { display: block; font-size: 13px; color: var(--ink3); margin-top: 2px; }
.item .by { display: block; font-size: 12px; color: var(--green); margin-top: 2px; font-weight: 500; }

/* ── timeline steps ── */
.steps { display: grid; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 14px; border-top: 1px solid var(--line2); }
.step:first-child { border-top: 0; }
.step .box { cursor: pointer; }
.step.on .box { background: var(--green); border-color: var(--green); } .step.on .box svg { opacity: 1; }
.step .tx { font-size: 15px; } .step.on .tx { color: var(--ink3); }
.step .ctx { font-size: 13px; color: var(--ink3); display: block; margin-top: 2px; }
.step .ctx a { color: var(--ink2); font-weight: 600; text-decoration: none; }
.step .when { text-align: right; display: grid; gap: 3px; justify-items: end; }

/* ── records ── */
.rec { border-top: 1px solid var(--line2); }
.rec:first-child { border-top: 0; }
.rec > .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.rec .ttl { font-weight: 600; font-size: 15px; }
.rec .sub { font-size: 13px; color: var(--ink3); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.rec .chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rec .detail { display: none; padding: 0 16px 14px; }
.rec.open .detail { display: grid; gap: 12px; }
.rec .detail .steps { border: 1px solid var(--line2); border-radius: var(--r-sm); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--ink3); } .kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log { font-size: 13px; color: var(--ink2); display: grid; gap: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── buttons & forms ── */
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink2); }
.seg button.on { background: var(--navy); color: #fff; }
form.f { display: grid; gap: 12px; }
.f .grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.f label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.f label.wide { grid-column: 1 / -1; }
.f label.chk { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.f input:not([type=checkbox]), .f select, .f textarea, .inp { width: 100%; border: 1px solid var(--line); background: var(--raised); border-radius: var(--r-sm); padding: 9px 11px; font-size: 15px; font-weight: 400; color: var(--ink); }
.f textarea { min-height: 84px; resize: vertical; }
.f textarea.code { min-height: 280px; font-size: 13px; line-height: 1.5; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.f .hint { font-size: 12px; color: var(--ink3); font-weight: 400; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

/* ── sheet ── */
.scrim { position: fixed; inset: 0; background: rgba(0, 12, 24, .5); z-index: 40; display: grid; align-items: end; justify-items: center; }
@media (min-width: 720px) { .scrim { align-items: center; } }
.sheet { background: var(--surface); width: min(640px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
@media (min-width: 720px) { .sheet { border-radius: 16px; } }
.sheet .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h2 { font-size: 20px; }
.choices { display: grid; gap: 8px; }
.choice { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--raised); border-radius: var(--r); padding: 12px 14px; cursor: pointer; }
.choice:hover { border-color: var(--accent); }
.choice .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.choice b { display: block; font-size: 15px; } .choice span { font-size: 13px; color: var(--ink3); }
.choice.red .ic { background: var(--red-soft); color: var(--red); }

.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 23, 44, .35); cursor: pointer; display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .fab { background: var(--accent); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fab { background: var(--accent); color: var(--accent-ink); } }
.fab svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; }

.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--navy-deep); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--red); }

/* ── coverage timeline ── */
.cov { display: grid; gap: 4px; padding: 10px 16px 14px; }
.cov .axis, .cov .day { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; }
.cov .axis .ticks { position: relative; height: 16px; font-size: 11px; color: var(--ink3); }
.cov .axis .ticks span { position: absolute; transform: translateX(-50%); }
.cov .lbl { font-size: 13px; font-weight: 600; } .cov .lbl small { display: block; font-weight: 400; color: var(--ink3); }
.cov .bar { position: relative; height: 30px; background: var(--well); border-radius: 6px; overflow: hidden; }
.cov .seg { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: var(--pt); color: #1d1406; font-size: 11px; font-weight: 600; padding: 0 6px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; border: 0; }
.cov .seg.gm { background: var(--gm); color: #00172C; } .cov .seg.ops { background: var(--ops); color: #fff; }
:root[data-theme="dark"] .cov .seg.ops { color: #00172C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cov .seg.ops { color: #00172C; } }
.cov .seg.gap { background: repeating-linear-gradient(135deg, var(--red-soft) 0 6px, transparent 6px 12px); border: 1.5px solid var(--gap); color: var(--red); top: 1px; bottom: 1px; }
.cov .lane { position: absolute; left: 0; right: 0; }
.cov .day.today .lbl { color: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); padding: 0 16px 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* ── tables ── */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t input.cnt { width: 78px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); text-align: right; }
table.t tr.low td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* accountability grid */
.hist td.c { padding: 4px; text-align: center; }
.hist .sq { width: 22px; height: 22px; border-radius: 5px; display: inline-block; background: var(--well); }
.hist .sq.done { background: var(--green); } .hist .sq.partial { background: var(--amber); } .hist .sq.missed { background: var(--red); }
.hist th.d { font-size: 11px; text-align: center; padding: 6px 2px; }

/* handbook */
.rules { margin: 0; padding: 4px 16px 14px 34px; display: grid; gap: 8px; }
.qa { display: grid; }
.qa div { padding: 11px 16px; border-top: 1px solid var(--line2); display: grid; gap: 2px; }
.qa div:first-child { border-top: 0; }
.qa b { font-size: 14px; } .qa span { font-size: 14px; color: var(--ink2); }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.links a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.links a span { display: block; font-weight: 400; font-size: 12px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipe { counter-reset: p; display: grid; }
.pipe div { padding: 11px 16px 11px 52px; border-top: 1px solid var(--line2); position: relative; font-size: 14px; color: var(--ink2); }
.pipe div:first-child { border-top: 0; }
.pipe div::before { counter-increment: p; content: counter(p); position: absolute; left: 16px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.pipe b { color: var(--ink); display: block; }

/* notes */
.notes { display: grid; }
.note { padding: 10px 16px; border-top: 1px solid var(--line2); font-size: 14px; }
.note:first-child { border-top: 0; }
.note .m { font-size: 12px; color: var(--ink3); margin-bottom: 2px; }
.note p { margin: 0; white-space: pre-wrap; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy-deep); }
.login .panel { width: min(440px, 100%); display: grid; gap: 18px; color: #fff; }
.login .brand { justify-content: center; }
.login .brand .wm { width: 180px; height: 22px; } .login .brand .bm { width: 22px; height: 36px; }
.login h1 { font-size: 22px; text-align: center; font-weight: 600; }
.login .names { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.login .names button { background: rgba(255, 255, 255, .07); color: #fff; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 14px 10px; font-weight: 600; cursor: pointer; display: grid; gap: 2px; }
.login .names button small { font-weight: 400; color: #9AC7E8; font-size: 12px; }
.login .names button:hover { border-color: var(--sky); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { background: rgba(255, 255, 255, .08); border: 0; color: #fff; font-size: 24px; font-weight: 600; border-radius: 12px; padding: 14px 0; cursor: pointer; }
.pinpad button:active { background: rgba(31, 159, 224, .4); }
.dots { display: flex; gap: 12px; justify-content: center; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #9AC7E8; }
.dots i.on { background: #fff; border-color: #fff; }
.login .err { color: #F7A39C; text-align: center; min-height: 20px; font-size: 14px; }
.login .back { background: none; border: 0; color: #9AC7E8; cursor: pointer; justify-self: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* conversation */
.thread { display: grid; gap: 10px; max-height: 70vh; overflow-y: auto; }
.msg { max-width: min(680px, 92%); border-radius: 12px; padding: 10px 14px; font-size: 14px; border: 1px solid var(--line); background: var(--raised); justify-self: start; min-width: 0; overflow-wrap: anywhere; }
.msg.mine { justify-self: end; background: var(--accent-soft); border-color: transparent; }
.msg .mh { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-bottom: 4px; }
.msg .mh b { color: var(--ink2); }
.msg .mb { line-height: 1.5; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: var(--well); padding: 1px 5px; border-radius: 4px; }
details summary { list-style: none; }

/* ───────── audit UX fixes (CR-032) ───────── */
#main { padding-bottom: 104px; }
.navmore { display: none; }
@media (max-width: 959px) {
  .navmore { display: flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
}
@media (max-width: 600px) {
  .mast { gap: 8px; }
  .mast .date { display: none; }
  .mast .brand .wm { width: 104px; }
  .mast .brand .tag { display: none; }
}
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.quick .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
.quick .btn .n { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 6px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.navsheet { display: grid; gap: 14px; }
.navsheet .grp { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); margin-bottom: 4px; }
.navsheet a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--well); margin-bottom: 6px; font-weight: 500; }

/* ───────── run sheet (Today), owner queue, scorecards ───────── */
.run { display: grid; }
.run .tier { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); padding: 12px 16px 4px; border-top: 1px solid var(--line2); }
.run .tier:first-child { border-top: 0; }
.run .tier.t0 { color: var(--red); } .run .tier.t1 { color: var(--amber); }
.rrow { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line2); padding: 10px 16px 10px 12px; cursor: pointer; color: inherit; text-decoration: none; font: inherit; }
.rrow:first-child, .run .tier + .rrow { border-top: 0; }
.rrow:hover { background: var(--raised); }
.rrow .bar { width: 4px; height: 100%; min-height: 34px; border-radius: 2px; background: var(--line); }
.rrow.red .bar { background: var(--red); } .rrow.amber .bar { background: var(--amber); }
.rrow .body { display: grid; gap: 2px; min-width: 0; }
.rrow .ttl { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.rrow .sub { font-size: 13px; color: var(--ink3); overflow-wrap: anywhere; }
.rrow.theirs .ttl { font-weight: 500; }
.rrow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rrow .grp-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
.rrow.red .grp-tag { color: var(--red); }
div.rrow { cursor: default; } div.rrow:hover { background: none; }
@media (max-width: 600px) { .rrow { grid-template-columns: 4px minmax(0, 1fr); } .rrow .pill, .rrow .acts { grid-column: 2; justify-self: start; } }
.leaders { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.leader { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
.leader .lh { display: flex; gap: 12px; align-items: center; }
.leader .ttl { font-weight: 650; font-size: 16px; }
.leader .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.leader .facts { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--ink2); }
.alerts-fold { margin: 6px 0 2px; }
.alerts-fold summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink2); padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.alerts-fold summary::before { content: '▸'; color: var(--ink3); transition: transform .15s; } .alerts-fold[open] summary::before { transform: rotate(90deg); }
.alerts-fold .alerts { margin-top: 6px; }
.sync { display: grid; gap: 12px; }
.sync-sec b { display: block; font-size: 14px; margin-bottom: 4px; }
.sync-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }
.hist .sq.waived { background: var(--well); outline: 1.5px dashed var(--ink3); outline-offset: -1.5px; }
.f table.t input, .f table.t select { width: auto; min-width: 0; padding: 6px 8px; font-size: 14px; }

.actions select.inp { max-width: 100%; }
.f table.t input[type=time] { width: 112px; }
