/* Saroki's HQ — brand: red #E31F26 on ink #1B181C. System fonts only (no internet assets). */
:root {
  --red: #E31F26; --red-press: #BC161C; --red-wash: #FDF2F2;
  --ink: #1B181C; --ink2: #3A353C; --muted: #68626B; --faint: #9A939D;
  --line: #E7E4E4; --line2: #D9D5D5; --bg: #F6F5F5; --panel: #FFFFFF; --fill: #F2F0F0; --fill2: #EAE7E7;
  --green: #1C8A50; --green-soft: #E9F4ED; --amber: #B0700F; --amber-soft: #FBF2E2; --blue: #2F6FDE;
  --rail: #1B181C; --rail-text: #CFC9CF; --shadow: 0 1px 2px rgba(27,24,28,.06), 0 4px 14px rgba(27,24,28,.05);
  --radius: 12px; --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-display: "Avenir Next", "Helvetica Neue", -apple-system, "Segoe UI", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --ink: #F3F1F3; --ink2: #D7D2D8; --muted: #A59FA8; --faint: #7D767F; --line: #2D292F; --line2: #3B363D; --bg: #121013;
  --panel: #1B181C; --fill: #242126; --fill2: #2D292F; --red-wash: #2A1517; --green-soft: #13261B; --amber-soft: #2B2112; --rail: #0C0B0D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F3F1F3; --ink2: #D7D2D8; --muted: #A59FA8; --faint: #7D767F; --line: #2D292F; --line2: #3B363D; --bg: #121013;
    --panel: #1B181C; --fill: #242126; --fill2: #2D292F; --red-wash: #2A1517; --green-soft: #13261B; --amber-soft: #2B2112; --rail: #0C0B0D;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--f-ui); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; } .gap4 { gap: 4px; } .gap16 { gap: 16px; }
.right { margin-left: auto; } .center { text-align: center; } .bold { font-weight: 700; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--rail); color: var(--rail-text); display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font: 800 17px/1.1 var(--f-display); letter-spacing: -.02em; }
.brand .logo { height: 34px; width: auto; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--rail-text); font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: var(--red); color: #fff; }
.nav svg { width: 19px; height: 19px; flex: none; }
.rail .spacer { flex: 1; }
.userbtn { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.06); border: 0; color: #fff; cursor: pointer; width: 100%; text-align: left; }
.userbtn:hover { background: rgba(255,255,255,.12); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 64px; }
.topbar h1 { font-size: 22px; font-weight: 800; }
.topbar .sub { color: var(--muted); font-size: 14px; }
#view { padding: 22px 28px 120px; max-width: 1280px; width: 100%; margin: 0 auto; }
.fab { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.fab:hover { background: var(--red-press); } .fab svg { width: 20px; height: 20px; }

/* ---------- primitives */
.card-h > button > .right svg, .card-h > .right svg { width: 18px; height: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .card-h { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; gap: 10px; padding: 14px 16px 10px; }
.card > .card-h h2, .card > .card-h h3 { font-size: 18px; font-weight: 800; }
.card > .card-b { padding: 4px 16px 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--fill); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; } .btn.primary:hover { background: var(--red-press); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.danger { color: var(--red); border-color: var(--red); } .btn.danger:hover { background: var(--red-wash); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--fill); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; } .btn svg { width: 16px; height: 16px; }
.iconbtn { width: 32px; height: 32px; padding: 0; border-radius: 8px; border: 0; background: transparent; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); }
.iconbtn:hover { background: var(--fill); color: var(--ink); } .iconbtn svg { width: 18px; height: 18px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line2); border-radius: 9px; background: var(--panel); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 650; font-size: 13px; color: var(--ink2); }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font-weight: 700; font-size: 12px; border: 0; cursor: default; background: var(--fill); color: var(--ink2); }
.pill.on_track, .pill.green { background: var(--green-soft); color: var(--green); }
.pill.off_track, .pill.red { background: var(--red-wash); color: var(--red); }
.pill.done { background: var(--fill2); color: var(--muted); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.btnlike { cursor: pointer; } .pill.btnlike:hover { filter: brightness(.95); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--ink2); font-size: 12px; font-weight: 650; }
.chip.store { background: var(--amber-soft); color: var(--amber); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; } .avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--ink); } .tabs button.on { color: var(--ink); border-bottom-color: var(--red); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.banner { padding: 12px 14px; border-radius: 10px; background: var(--amber-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); font-size: 14px; }
.banner.red { background: var(--red-wash); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.err { color: var(--red); font-weight: 600; font-size: 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line2); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- add bar */
.addbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--fill); border-radius: 10px; margin: 0 0 8px; }
.addbar input[type=text] { border: 0; background: transparent; box-shadow: none !important; padding: 7px 4px; }
.addbar input[type=date] { width: auto; border: 0; background: var(--panel); padding: 6px 8px; }
.addbar .go { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px; font-weight: 700; }
.ownerpick { position: relative; }
.ownerbtn { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line2); background: var(--panel); border-radius: 99px; padding: 2px 8px 2px 3px; cursor: pointer; min-height: 30px; }
.pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; max-height: 340px; overflow: auto; }
.pop label { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.pop label:hover { background: var(--fill); }
.pop .sep { height: 1px; background: var(--line); margin: 4px 0; }
.pop button.item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.pop button.item:hover { background: var(--fill); } .pop button.item.danger { color: var(--red); }

/* ---------- lists: to-dos / issues / rocks / headlines */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .title { font-weight: 560; overflow-wrap: anywhere; cursor: pointer; } .item .title:hover { text-decoration: underline; text-decoration-color: var(--line2); }
.item.done .title { color: var(--faint); text-decoration: line-through; }
.item .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.due { font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--muted); margin-left: auto; padding-top: 2px; }
.due.late { color: var(--red); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); background: transparent; cursor: pointer; flex: none; margin-top: 1px; display: grid; place-items: center; padding: 0; color: #fff; }
.check:hover { border-color: var(--green); } .check.on { background: var(--green); border-color: var(--green); } .check svg { width: 13px; height: 13px; }
.groupname { display: flex; align-items: center; gap: 9px; padding: 14px 6px 6px; font-weight: 800; border-top: 1px solid var(--line); }
.groupname:first-child { border-top: 0; padding-top: 6px; }
.groupname .count { margin-left: auto; font-weight: 700; color: var(--muted); font-size: 13px; }
.pickno { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line2); background: transparent; font-weight: 800; color: var(--faint); cursor: pointer; flex: none; }
.pickno:hover { border-color: var(--red); color: var(--red); } .pickno.on { background: var(--red); border-color: var(--red); color: #fff; }
.pct { font-weight: 800; font-size: 13px; background: var(--fill); padding: 3px 9px; border-radius: 99px; color: var(--ink2); }
.ms { margin: 4px 0 6px 34px; display: flex; flex-direction: column; gap: 3px; }
.ms .m { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.ms .m .check { width: 17px; height: 17px; }

/* ---------- scorecard */
.gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.grid th, table.grid td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.grid th { background: var(--fill); font-weight: 700; font-size: 12px; color: var(--muted); position: sticky; top: 0; }
table.grid th.cur, table.grid td.cur { background: color-mix(in srgb, var(--amber-soft) 70%, var(--panel)); }
table.grid td.metric { text-align: left; font-weight: 650; position: sticky; left: 0; background: var(--panel); min-width: 190px; max-width: 260px; white-space: normal; z-index: 1; }
table.grid th.metric { left: 0; z-index: 3; text-align: left; }
table.grid td input { width: 92px; text-align: right; border: 1px solid transparent; background: transparent; padding: 5px 6px; border-radius: 6px; }
table.grid td input:hover { border-color: var(--line2); }
table.grid td.green input { background: var(--green-soft); color: var(--green); font-weight: 700; }
table.grid td.red input { background: var(--red-wash); color: var(--red); font-weight: 700; }

/* ---------- meeting page */
.mhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mlayout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.agenda { position: sticky; top: 78px; padding: 12px; }
.agenda .ah { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; } .agenda .ah h3 { font-size: 17px; }
.agenda .page { display: flex; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-weight: 600; gap: 8px; color: var(--ink2); }
.agenda .page:hover { background: var(--fill); } .agenda .page.on { background: var(--ink); color: var(--bg); }
.agenda .page .mins { margin-left: auto; font-size: 12.5px; opacity: .7; font-weight: 700; }
.agenda .page.past { color: var(--faint); } .agenda .page .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.timer { padding: 12px; margin: 10px 0; border-radius: 10px; background: var(--ink); color: var(--bg); text-align: center; }
.timer .t { font: 800 30px/1 var(--f-display); font-variant-numeric: tabular-nums; } .timer.over .t { color: #FF6B70; }
.timer .l { font-size: 12px; opacity: .75; margin-top: 4px; }
.livebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; background: var(--red-wash); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); border-radius: 10px; }
.livedot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.prompt { background: var(--fill); padding: 16px 18px; border-radius: 10px; font: 600 17px/1.4 var(--f-display); text-align: center; margin: 6px 0 14px; }
.attend { display: flex; flex-wrap: wrap; gap: 8px; }
.attend button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-weight: 650; }
.attend button.off { opacity: .45; text-decoration: line-through; }
.newissue { position: fixed; left: 236px; bottom: 0; z-index: 30; width: min(880px, calc(100% - 270px)); margin: 0 0 0 30px; background: var(--fill2); border-radius: 12px 12px 0 0; padding: 8px 12px; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line2); border-bottom: 0; }
.newissue input { border: 0; background: var(--panel); }
.rate { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rate .nums { display: flex; gap: 4px; flex-wrap: wrap; } .rate .nums button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-weight: 700; }
.rate .nums button.on { background: var(--red); color: #fff; border-color: var(--red); }
.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--fill); border-radius: 10px; padding: 14px 8px; text-align: center; }
.stat4 b { display: block; font: 800 26px/1 var(--f-display); } .stat4 span { font-size: 12px; color: var(--muted); }
.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; } .widgets .wide { grid-column: 1 / -1; } .widgets > * { min-width: 0; }
.sumcard { max-width: 720px; margin: 0 auto; padding: 24px 28px; } .sumcard h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin: 20px 0 6px; font-family: var(--f-ui); }
.band { height: 70px; border-radius: 12px 12px 0 0; background: linear-gradient(120deg, var(--red), #FF8A5C); margin: -24px -28px 18px; }

/* ---------- chart */
.chartwrap { overflow: auto; padding: 20px; min-height: 60vh; }
.tree { display: inline-block; min-width: 100%; text-align: center; }
.tree ul.tl { display: inline-flex; justify-content: center; padding: 22px 0 0; margin: 0; list-style: none; position: relative; }
.tree ul.tl.roots { padding-top: 0; gap: 28px; align-items: flex-start; }
.tree li.tn { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 8px 0; vertical-align: top; }
.tree ul.roots > li.tn { padding-top: 0; }
.tree ul.tl:not(.roots) > li.tn::before, .tree ul.tl:not(.roots) > li.tn::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--line2); }
.tree ul.tl:not(.roots) > li.tn::after { right: auto; left: 50%; border-left: 2px solid var(--line2); }
.tree ul.tl:not(.roots) > li.tn:only-child::before, .tree ul.tl:not(.roots) > li.tn:only-child::after { display: none; }
.tree ul.tl:not(.roots) > li.tn:first-child::before, .tree ul.tl:not(.roots) > li.tn:last-child::after { border: 0 none; }
.tree ul.tl:not(.roots) > li.tn:last-child::before { border-right: 2px solid var(--line2); border-radius: 0 6px 0 0; }
.tree ul.tl:not(.roots) > li.tn:first-child::after { border-radius: 6px 0 0 0; }
.tree li.tn > ul.tl::before { content: ""; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--line2); height: 22px; }
.seat { width: 230px; text-align: left; padding: 12px 14px; cursor: pointer; border-top: 4px solid var(--line2); }
.seat.visionary { border-top-color: #7B4FD6; } .seat.integrator { border-top-color: var(--red); } .seat.open { border-top-color: var(--amber); }
.seat h4 { font-size: 14.5px; font-weight: 800; margin-bottom: 6px; }
.seat .roles { padding: 0 0 0 16px; margin: 8px 0 0; list-style: disc; font-size: 12px; color: var(--ink2); }
.seat.match { outline: 3px solid var(--red); }

/* ---------- modal / toast / misc */
.scrim { position: fixed; inset: 0; background: rgba(15,12,16,.55); z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal { background: var(--panel); border-radius: 14px; width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(820px, 100%); }
.modal .mh { display: flex; align-items: center; padding: 16px 20px 6px; } .modal .mh h3 { font-size: 20px; }
.modal .mb { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; } .modal .mf { display: flex; gap: 10px; padding: 12px 20px 18px; justify-content: flex-end; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--panel); z-index: 70; box-shadow: -10px 0 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.toasts { position: fixed; right: 18px; bottom: 76px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); max-width: 360px; }
.toast.error { background: var(--red); color: #fff; } .toast.ok { background: var(--green); color: #fff; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login .box { width: min(400px, 100%); background: var(--panel); border-radius: 16px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
/* The stacked Saroki's logo on the sign-in screens: black text on a light box, white text on a dark one. */
.lockup { align-self: flex-start; }
.lockup img { display: block; width: 168px; height: auto; }
.lockup .on-dark { display: none; }
:root[data-theme="dark"] .lockup .on-light { display: none; }
:root[data-theme="dark"] .lockup .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup .on-light { display: none; }
  :root:not([data-theme="light"]) .lockup .on-dark { display: block; }
}
kbd { font: 12px/1 var(--f-ui); background: var(--fill2); padding: 2px 6px; border-radius: 4px; }
.sketch { width: 100%; }
@media print {
  .rail, .topbar, .newissue, .fab, .btn, .iconbtn, .addbar, .toasts { display: none !important; }
  .shell { display: block; } #view { padding: 0; max-width: none; } body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
}
/* ---------- responsive */
@media (max-width: 980px) { .mlayout { grid-template-columns: minmax(0, 1fr); } .agenda { position: static; } .widgets { grid-template-columns: minmax(0, 1fr); } .newissue { left: 64px; width: calc(100% - 80px); margin: 0 8px; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 62px; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 62px; flex-direction: row; padding: 6px 8px; z-index: 50; align-items: center; }
  .brand, .rail .spacer, .userbtn .nm { display: none; } .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 5px 8px; font-size: 11px; } .userbtn { width: auto; padding: 4px; }
  .topbar { padding: 10px 14px; min-height: 54px; } .topbar h1 { font-size: 18px; } #view { padding: 14px 12px 130px; }
  .newissue { left: 0; width: 100%; margin: 0; bottom: 62px; border-radius: 0; } .stat4 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .toasts { bottom: 130px; right: 10px; left: 10px; } .item { gap: 9px; } .addbar { flex-wrap: wrap; } .addbar input[type=text] { min-width: 60%; }
}

/* Carson's weekly scorecard (PNG from ~/reporting) above the metrics grid */
.wsc { margin: 0 12px 6px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2, var(--fill)); }
.wsc[hidden] { display: none; }
.wsc-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.wsc-h select { width: auto; max-width: 100%; }
.wsc-seg { padding: 0; border: 0; margin: 0; }
.wsc-img { display: block; overflow-x: auto; border-radius: 8px; }
.wsc-img img { display: block; width: 100%; min-width: 820px; height: auto; border-radius: 8px; }

/* Docs rows: the file icon next to each document stays icon-sized */
.list .item > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }

/* a to-do opened from an email link: highlight it for a moment */
.item.flash { animation: flashrow 3.2s ease-out; }
@keyframes flashrow { 0%, 55% { background: #FFF1B8; box-shadow: 0 0 0 6px #FFF1B8; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .item.flash { animation: none; background: #FFF1B8; } }

/* ---- access: what people cannot do is greyed or absent, and a runner-only meeting says who is running it */
.item .title.ro { cursor: default; } .item .title.ro:hover { text-decoration: none; }
.pickno.ro { cursor: default; } .check:disabled { opacity: .45; cursor: not-allowed; }
.agenda .page.ro { cursor: default; } .agenda .page.ro:hover { background: none; } .agenda .page.ro.on:hover { background: var(--ink); }
.attend button:disabled { cursor: default; }
.waiting { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; margin: 0 0 10px; border-radius: 10px; background: var(--fill); font-size: 13px; line-height: 1.4; color: var(--muted); }
.waiting b { color: var(--ink); font-size: 14px; }
/* ---- "View as" preview banner */
.viewas-bar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #1B181C; color: #fff; font-size: 13.5px; }
.viewas-bar > span { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .viewas-bar svg { width: 18px; height: 18px; flex: none; }
.viewas-bar .btn { background: #fff; color: #1B181C; border-color: #fff; }
body.viewas .rail { top: 44px; height: calc(100vh - 44px); } body.viewas .topbar { top: 44px; }
body.viewas .addbar, body.viewas .newissue, body.viewas .fab { opacity: .45; pointer-events: none; }

/* ---- live agenda: time bar, finished pages, counts */
.timer .pbar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); margin: 10px 4px 4px; overflow: hidden; }
.timer .pbar i { display: block; height: 100%; width: 0; background: #7BD99A; border-radius: 3px; transition: width .6s linear; } .timer .pbar.over i { background: #FF6B70; }
.timer .pl { font-size: 11.5px; opacity: .7; }
.agenda .page .tick { width: 14px; height: 14px; flex: none; color: #1C8A50; } .agenda .page .tick svg { width: 14px; height: 14px; }
.agenda .page .cnt { font-size: 11.5px; font-weight: 800; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 9px; background: var(--fill); color: var(--muted); }
.agenda .page .cnt.warn { background: #FDE7E8; color: #B3141B; } .agenda .page.on .cnt { background: rgba(255,255,255,.2); color: inherit; }
.agenda .page .mins.over { color: #E31F26; opacity: 1; }
/* ---- On deck + completion */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile { padding: 12px 14px; border-radius: 12px; background: var(--fill); }
.tile .tl { font-size: 12.5px; color: var(--muted); font-weight: 600; } .tile .tv { font: 800 30px/1.1 var(--f-display); margin-top: 2px; } .tile .ts { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile.good .tv, .big.good { color: #1C8A50; } .tile.bad .tv, .big.bad { color: #D0103A; } .tile.mid .tv, .big.mid { color: #B0700F; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px; background: var(--fill); font-size: 13px; border: 1px solid transparent; }
.pchip.good { border-color: #1C8A50; } .pchip.mid { border-color: #B0700F; } .pchip.bad { border-color: #D0103A; } .pchip .late { font-style: normal; color: #D0103A; font-weight: 700; font-size: 12px; }
.pulse-strip { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--card, #fff); border: 1px solid var(--line); }
.pulse-strip .big { font: 800 26px/1 var(--f-display); }
/* ---- Present (conference-room TV) */
body.present .rail, body.present .newissue, body.present .fab { display: none !important; }
body.present .shell { grid-template-columns: minmax(0, 1fr); }
body.present #view { zoom: 1.22; } body.present .topbar h1 { font-size: 26px; }
body.present .timer .t { font-size: 44px; }
@media (max-width: 980px) { body.present #view { zoom: 1; } }

/* ---- Ctrl+K search */
.sp { width: min(640px, 94vw); background: var(--card, #fff); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.35); overflow: hidden; }
.sp-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); } .sp-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sp-in input { border: 0; outline: 0; background: none; font-size: 18px; width: 100%; padding: 0; box-shadow: none; }
.sp-list { max-height: 52vh; overflow: auto; padding: 6px; } .sp-empty { padding: 22px; text-align: center; color: var(--muted); }
.sp-group { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 800; padding: 10px 12px 4px; }
.sp-item { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; } .sp-item.on { background: var(--fill); }
.sp-t { display: block; font-weight: 650; } .sp-s { display: block; font-size: 12.5px; color: var(--muted); }
.sp-foot { padding: 8px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--fill); }
@media (max-width: 700px) { #search-open kbd { display: none; } }

/* phones: keep the top bar on one line (Search is icon-only, Present is for the big screen) */
@media (max-width: 700px) {
  #search-open { font-size: 0; gap: 0; padding: 9px 10px; } #search-open svg { width: 18px; height: 18px; }
  #present-toggle { display: none; }
}

/* "make an issue" flag on to-do and Rock rows: quiet until you point at the row */
.issuebtn { color: var(--faint); opacity: .55; } .item:hover .issuebtn, .issuebtn:focus-visible { opacity: 1; color: var(--ink); }
@media (hover: none) { .issuebtn { opacity: 1; } }

/* typed rating box next to the 1-10 buttons */
.rate input.typed { width: 92px; flex: none; text-align: center; font-weight: 700; }
.rate { flex-wrap: wrap; }
