/* Zetmos Command. The Zetmos brand: blue-black ink, emerald green, the Z-arrow
   mark, Outfit throughout (GM choice 2026-11-19). Layout: a light menu
   on the left; the home page is a timeline of the day with a right-hand rail. */
:root {
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #F1F4F9;
  --text: #0B0F17;
  --muted: #59647A;
  --line: #E7EBF2;
  --line-strong: #D7DEE9;
  --accent: #0EA96A;
  --accent-strong: #0A7C4E;
  --accent-soft: #E6F6EF;
  --accent-ink: #FFFFFF;
  --mark: #34C88A;
  --ink: #0B0F17;
  --ink-2: #151B27;
  --ink-line: #22304A;
  --ink-text: #FFFFFF;
  --ink-muted: #8B94AC;
  --warn: #B45309;
  --warn-soft: #FFF4E5;
  --danger: #C2412D;
  --danger-soft: #FDECEA;
  --info: #2E5BD8;
  --info-soft: #EAF0FE;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 15, 23, .04);
  --shadow-lift: 0 10px 30px rgba(11, 15, 23, .08);
  --display: Outfit, "Segoe UI", system-ui, sans-serif;
  --body: Outfit, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --side-w: 232px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F17;
    --surface: #121826;
    --surface-2: #182030;
    --text: #E8ECF4;
    --muted: #8B94AC;
    --line: #20293A;
    --line-strong: #2B374B;
    --accent-strong: #34C88A;
    --accent-soft: #0F2A1F;
    --ink: #151B27;
    --ink-2: #1C2434;
    --warn: #F0B45A;
    --warn-soft: #2C2213;
    --danger: #F08A7A;
    --danger-soft: #311915;
    --info: #8DB0FF;
    --info-soft: #18233D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 30px; line-height: 1.15; margin: 0; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 600; }
h3 { font-weight: 600; }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── The Zetmos mark ────────────────────────────────────────────────────── */
.zmark { width: 34px; height: 34px; border-radius: 9px; background: #0B0F17; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px #22304A; }
.zmark svg { width: 19px; height: 19px; stroke: #34C88A; stroke-width: 6.5; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.brand-text small { font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ── Shell: menu on the left ────────────────────────────────────────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 14px 14px;
}
.side .brand { padding: 0 8px 18px; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
#nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 500; transition: background .12s, color .12s;
}
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.side-clock { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.side-clock button { width: 100%; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 4px 0; border-top: 1px solid var(--line); }
.who-text { display: grid; min-width: 0; line-height: 1.25; flex: 1; }
.who-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--ink); color: var(--mark); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }

.shell { min-height: 100vh; }
body.in .shell { margin-left: var(--side-w); }
.bar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(11, 15, 23, .45); z-index: 25; }
main { max-width: 1240px; margin: 0 auto; padding: 34px 36px 72px; }

/* ── Work clock (menu and phone bar) ────────────────────────────────────── */
.clock-off { color: var(--muted); }
.clock-on { font-weight: 600; color: var(--accent-strong); display: inline-flex; align-items: center; }
.clock-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(14, 169, 106, .5); } 70% { box-shadow: 0 0 0 7px rgba(14, 169, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(14, 169, 106, 0); } }
@media (prefers-reduced-motion: reduce) { .clock-on::before { animation: none; } }

/* ── Building blocks ────────────────────────────────────────────────────── */
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn); font-weight: 600; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.card .page-head { margin-bottom: 14px; }
.card .page-head h2 { margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; margin-bottom: 20px; }
.product { color: var(--text); text-decoration: none; margin: 0; transition: box-shadow .15s, border-color .15s; }
.product:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.product-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.product-head h2 { margin: 0; font-size: 18px; }
dl { margin: 0; display: grid; gap: 8px; }
dl div { display: flex; justify-content: space-between; gap: 10px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
.updated { color: var(--muted); font-size: 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }

.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 0; }
.stage-live, .test-passed, .test-qa-signed-off, .proj-approved, .proj-done, .task-done { background: var(--accent-soft); color: var(--accent-strong); }
.stage-testing, .stage-pilot, .test-running, .proj-proposed, .proj-in-review, .task-in-review { background: var(--warn-soft); color: var(--warn); }
.stage-building, .stage-idea, .proj-in-progress, .task-doing { background: var(--info-soft); color: var(--info); }
.test-failed { background: var(--danger-soft); color: var(--danger); }
.role { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }

a.button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
a.button:hover { border-color: var(--text); }
.facts div { justify-content: flex-start; }
.facts dt { min-width: 130px; }
.facts dd { text-align: left; }
.decision { align-items: flex-end; }
.decision label { min-width: 200px; }
p.wrap { white-space: pre-wrap; }

/* ── Messages ───────────────────────────────────────────────────────────── */
.messages { max-height: 480px; overflow-y: auto; display: grid; gap: 10px; padding: 4px 2px 14px; }
.msg { background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 9px 13px; max-width: 78%; }
.msg.mine { justify-self: end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.msg-head time { color: var(--muted); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.composer { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.composer .row { align-items: center; }
.inbox { list-style: none; margin: 0 -8px; padding: 0; }
.inbox li { border-bottom: 1px solid var(--line); }
.inbox li:last-child { border-bottom: 0; }
.inbox a { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 14px; align-items: center; padding: 11px 8px; border-radius: 10px; color: var(--text); text-decoration: none; }
.inbox a:hover { background: var(--surface-2); }
.inbox-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.inbox time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.inbox li.unread .inbox-who { font-weight: 700; }
.inbox li.unread .inbox-last { color: var(--text); }
.inbox li.unread .inbox-who::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 14px; font-size: 13.5px; font-weight: 500; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
a.tab { color: var(--muted); text-decoration: none; }
a.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab.later { color: var(--muted); opacity: .55; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 169, 106, .16); }
input:disabled, select:disabled, textarea:disabled { opacity: .65; background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span2 { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 7px; color: var(--text); font-weight: 400; font-size: 14px; }
.check input { width: auto; accent-color: var(--accent); }
.inline-form { margin-bottom: 20px; }

button { font: inherit; font-weight: 500; cursor: pointer; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); transition: border-color .15s, background .15s; }
button:hover { border-color: var(--text); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); font-weight: 600; }
@media (prefers-color-scheme: dark) { button.primary { background: var(--accent); border-color: var(--accent); color: #04140D; } }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--surface-2); }
button.wide { width: 100%; padding: 11px 14px; }
button.small { padding: 4px 11px; font-size: 12.5px; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.wrap { white-space: pre-wrap; }
.table td a { font-weight: 600; text-decoration: none; }
.table .num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
section.card { overflow-x: auto; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.two > .card { margin-bottom: 20px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list li a { font-weight: 600; text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); text-decoration: none; }
.tile .l { font-size: 12.5px; color: var(--muted); }
.tile .v { font-family: var(--display); font-size: 26px; font-weight: 600; }
.nowrap { white-space: nowrap; }
.section-title { margin: 28px 0 14px; }
.filters { align-items: flex-end; margin-bottom: 16px; }
.filters label { min-width: 200px; }

/* ── Today (home) ───────────────────────────────────────────────────────── */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "head rail" "feed rail"; column-gap: 36px; align-items: start; }
.today-head { grid-area: head; }
.today-feed { grid-area: feed; min-width: 0; }
.today .rail { grid-area: rail; }
.today-head h1 { font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.today-hi { margin: 6px 0 26px; font-size: 16.5px; max-width: 60ch; }
.today-hi b { font-weight: 600; }
.tl { position: relative; display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.tl::before { content: ""; position: absolute; left: 75px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 62px 28px minmax(0, 1fr); align-items: start; }
.tl-item time { font-size: 12.5px; color: var(--muted); padding-top: 13px; font-variant-numeric: tabular-nums; }
.tl-item time.now { color: var(--accent-strong); font-weight: 700; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); margin: 16px 0 0 8px; box-shadow: 0 0 0 4px var(--bg); position: relative; }
.tl-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 16px; min-width: 0; }
.tl-box b { font-weight: 600; overflow-wrap: anywhere; }
.tl-box b a { color: var(--text); text-decoration: none; }
.tl-box b a:hover { text-decoration: underline; }
.tl-box small { display: block; color: var(--muted); font-size: 12.5px; }
.tl-acts { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.tl-acts a { font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text); }
.tl-acts a.go { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .tl-acts a.go { background: var(--accent); border-color: var(--accent); color: #04140D; } }
.tl-item.k-start .tl-dot { background: var(--accent); }
.tl-item.k-ask .tl-dot { background: var(--accent-strong); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent-soft); }
.tl-item.k-ask .tl-box { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 6px 20px rgba(14, 169, 106, .08); }
.tl-item.k-late .tl-dot { background: var(--warn); }
.tl-item.k-late .tl-box { background: var(--warn-soft); border-color: transparent; }
.tl-item.k-late .tl-box small { color: var(--warn); font-weight: 500; }
.tl-item.k-next .tl-box { background: transparent; border-style: dashed; }
.tl-empty { color: var(--muted); }
.tl-more { margin: 14px 0 0 90px; font-size: 13px; }

.rail { display: grid; gap: 18px; position: sticky; top: 24px; }
.ring-card { background: var(--ink); color: var(--ink-text); border-radius: 18px; padding: 18px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; box-shadow: inset 0 0 0 1px var(--ink-line); }
.ring-card svg { width: 88px; height: 88px; }
.ring-card small { color: var(--ink-muted); font-size: 12.5px; display: block; }
.ring-card strong { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.15; }
.ring-card button { margin-top: 10px; background: #fff; color: #0B0F17; border: 0; border-radius: 8px; padding: 6px 14px; font-weight: 600; font-size: 13px; }
.ring-card button.primary { background: var(--mark); color: #04140D; }
.ring-card button:hover { filter: brightness(.95); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.stat:hover { border-color: var(--line-strong); }
.stat strong { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.stat em { font-style: normal; font-size: 12px; color: var(--warn); font-weight: 600; }
.rail h2 { font-family: var(--body); font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 6px; letter-spacing: 0; }
.mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.mini:first-of-type { border-top: 0; }
.mini a { font-weight: 600; color: var(--text); text-decoration: none; }
.mini a:hover { text-decoration: underline; }

/* ── Task board ─────────────────────────────────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--surface-2); border-radius: var(--radius); padding: 12px; display: grid; gap: 9px; min-width: 0; }
.board-col h3 { font-family: var(--body); font-size: 12.5px; margin: 0 0 2px; color: var(--muted); display: flex; justify-content: space-between; letter-spacing: 0; }
.board-col .count { font-weight: 600; }
.task-card { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); text-decoration: none; transition: box-shadow .15s; }
.task-card:hover { box-shadow: var(--shadow-lift); }
.task-product { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { font-size: 12px; color: var(--muted); }

/* ── Picking people, @mentions ──────────────────────────────────────────── */
.picker { position: relative; display: grid; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 11px; border-radius: 99px; background: var(--accent-soft); font-size: 13px; font-weight: 500; color: var(--text); }
.person-chip button { border: 0; padding: 0 6px; background: transparent; }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; list-style: none; margin: 6px 0 0; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); max-height: 260px; overflow-y: auto; }
.suggest li { padding: 0; }
.suggest li.muted { padding: 6px 8px; }
.suggest button { width: 100%; text-align: left; border: 0; border-radius: 8px; background: transparent; padding: 7px 9px; }
.suggest button:hover, .suggest button.first { background: var(--surface-2); }
.composer-box { position: relative; }
.composer-box .suggest { top: auto; bottom: 100%; margin: 0 0 6px; }
.mention { color: var(--accent-strong); font-weight: 600; }
.msg.to-me { box-shadow: inset 3px 0 0 var(--accent); }
.list li.unread a { font-weight: 700; }
.grow { flex: 1 1 260px; }

/* ── Time ───────────────────────────────────────────────────────────────── */
.week-nav { align-items: center; }
.time-grid td, .time-grid th { white-space: nowrap; }
.time-grid tr.picked td { background: var(--accent-soft); }
.day-block { border-top: 1px solid var(--line); padding: 12px 0; }
.day-block h3 { font-size: 14px; margin: 0 0 6px; }

/* ── Checklists ─────────────────────────────────────────────────────────── */
.checklist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
details.card summary { cursor: pointer; font-weight: 600; }

/* ── Sign-in: the "Split" door ──────────────────────────────────────────── */
body:not(.in) main { max-width: none; padding: 0; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 4px minmax(0, 1fr); }
.auth-brand {
  position: relative; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 48px max(32px, 5vw);
  background-color: #0B0F17;
  background-image:
    radial-gradient(820px 760px at calc(100% + 40px) -60px, rgba(14, 169, 106, .62), rgba(14, 169, 106, .18) 42%, transparent 72%),
    radial-gradient(560px 560px at -120px calc(100% + 140px), rgba(52, 200, 138, .2), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}
.auth-brand .brand { color: #fff; }
.auth-brand .brand-text small { color: #8B94AC; }
.auth-hero h1 { color: #fff; font-size: clamp(34px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -.02em; margin: 32px 0 0; }
.auth-hero .grad { background: linear-gradient(90deg, #6FE0AE, #2CC489 55%, #0EA96A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { color: #9AA3B8; font-size: 17px; margin: 12px 0 0; }
.auth-foot { color: #6F7A92; font-size: 12.5px; margin: 0; }
.auth-edge { background: linear-gradient(180deg, #34C88A, #0EA96A 50%, #0A7C4E); }
.auth-form { background: var(--surface); display: grid; place-items: center; padding: 48px 32px; }
.auth-inner { width: 100%; max-width: 400px; }
.auth-inner h2 { font-size: 32px; margin: 0; }
.auth-inner > .muted { margin: 6px 0 26px; font-size: 16px; }
.auth-inner form { display: grid; gap: 14px; }
.auth-inner label { font-size: 14px; }
.auth-inner input { height: 50px; font-size: 15.5px; }
.auth-inner button.primary { height: 52px; font-size: 16px; background: linear-gradient(135deg, #0A7C4E, #0B9460); border: 0; color: #fff; box-shadow: 0 8px 22px rgba(14, 169, 106, .32), inset 0 1px 0 rgba(255, 255, 255, .18); }
.auth-inner .notice { margin: 0 0 18px; }
.zmark-xl { width: 120px; height: 120px; border-radius: 30px; }
.zmark-xl svg { width: 66px; height: 66px; stroke-width: 6.5; }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 4px 1fr; }
  .auth-brand { padding: 36px 24px 30px; gap: 26px; }
  .auth-hero .zmark-xl { display: none; }
  .auth-hero h1 { font-size: 30px; margin-top: 0; }
  .auth-hero p, .auth-foot { display: none; }
  .auth-edge { background: linear-gradient(90deg, #34C88A, #0EA96A 50%, #0A7C4E); }
  .auth-form { place-items: start center; padding: 30px 24px 40px; }
  .auth-inner h2 { font-size: 26px; }
}
.or { text-align: center; color: var(--muted); margin: 14px 0; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 50; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100% - 32px); box-shadow: var(--shadow-lift); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: var(--danger); color: #fff; }

/* ── Smaller screens ────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .today { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "rail" "feed"; }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 26px; }
}
@media (max-width: 960px) {
  body.in .shell { margin-left: 0; }
  .side { transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.in .bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; height: 58px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .brand-sm b { font-family: var(--display); font-size: 17px; font-weight: 600; }
  .brand-sm .zmark { width: 30px; height: 30px; border-radius: 8px; }
  .brand-sm .zmark svg { width: 17px; height: 17px; }
  .bar-clock { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
  .bar-clock .clock-off { display: none; }
  .side-clock { display: none; }
  main { padding: 24px 20px 56px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 48px; }
  .today-head h1 { font-size: 32px; }
  .tl::before { left: 59px; }
  .tl-item { grid-template-columns: 46px 28px minmax(0, 1fr); }
  .tl-more { margin-left: 74px; }
  .card { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .inbox a { grid-template-columns: 1fr auto; }
  .inbox-last { grid-column: 1 / -1; grid-row: 2; }
  .msg { max-width: 92%; }
}
@media (max-width: 520px) {
  .board { grid-template-columns: minmax(0, 1fr); }
}
.notice-error { background: var(--danger-soft); color: var(--danger); }

/* ── Assistant page ─────────────────────────────────────────────────────── */
.asst { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.asst-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: calc(100vh - 190px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.asst-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.asst-meter { font-size: 12.5px; color: var(--muted); }
.asst-bar button { white-space: nowrap; }
.asst-log { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.asst-msg { max-width: 86%; border-radius: 14px; padding: 10px 14px; overflow-wrap: anywhere; }
.asst-msg p { margin: 0 0 8px; } .asst-msg p:last-child { margin-bottom: 0; }
.asst-msg ul { margin: 0 0 8px; padding-left: 20px; }
.asst-bot { align-self: flex-start; background: var(--surface-2); border-radius: 14px 14px 14px 4px; }
.asst-me { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.asst-tool { align-self: flex-start; padding: 2px 4px; font-size: 12.5px; color: var(--muted); }
.asst-tool::before { content: "✓ "; color: var(--accent); }
.asst-note { align-self: center; font-size: 13px; color: var(--warn); background: var(--warn-soft); }
.asst-propose { align-self: flex-start; width: min(100%, 460px); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-lift); }
.asst-propose-title { font-weight: 600; }
.asst-propose dl { margin: 0 0 10px; gap: 4px; }
.asst-propose dd { text-align: left; }
.asst-propose dl div { justify-content: flex-start; } .asst-propose dt { min-width: 110px; }
.asst-propose blockquote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; white-space: normal; }
.asst-yes { color: var(--accent-strong); font-weight: 600; margin: 8px 0 0; }
.asst-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.asst-suggest button { border-radius: 99px; }
.asst-compose { display: flex; gap: 10px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.asst-compose textarea { resize: none; min-height: 46px; max-height: 180px; }
.asst-compose button { height: 46px; }
.dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .6; } }
.asst-side .card { margin-bottom: 16px; }
/* Files only (no AI yet): the two cards side by side, one column on a phone. */
.asst.asst-files { display: block; }
.asst-files .asst-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.asst-files .asst-side .card { margin-bottom: 0; }
.asst-side .card-head .button.small, .file-acts .button.small { padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.files { list-style: none; margin: 8px 0 0; padding: 0; }
.files li { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.file-name { display: grid; min-width: 0; }
.file-name b { font-weight: 600; overflow-wrap: anywhere; }
.file-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -8px; }
@media (max-width: 1100px) {
  .asst { grid-template-columns: minmax(0, 1fr); }
  .asst-chat { height: 70vh; }
}

/* ── Product control room ───────────────────────────────────────────────── */
.notice-warn { background: var(--warn-soft); color: var(--text); }
.code-line { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.sub-head { font-size: 14px; margin: 20px 0 8px; }
.change { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.change-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.change p { margin: 4px 0 6px; }
.change-detail { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; }
details.history { margin-top: 16px; }
details.history summary { cursor: pointer; color: var(--muted); font-weight: 500; }

/* Notifications and secret values */
.notices li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.notices li.unread { font-weight: 600; }
.notices li.unread .muted { font-weight: 400; }
.vault-people { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.vault-people legend { font-size: 13px; padding: 0 4px; }
.vault-reveal { display: grid; gap: 8px; padding: 6px 0; }
.vault-reveal code { user-select: all; }

/* Health & incidents */
.health-up { background: var(--accent-soft); color: var(--accent-strong); }
.health-slow, .inc-investigating, .sev-s2 { background: var(--warn-soft); color: var(--warn); }
.health-down, .inc-open, .sev-s1 { background: var(--danger-soft); color: var(--danger); }
.inc-fixed { background: var(--info-soft); color: var(--info); }
.inc-closed { background: var(--accent-soft); color: var(--accent-strong); }
.text-danger { color: var(--danger); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.timeline li { border-left: 2px solid var(--line-strong); padding-left: 12px; }

/* Product link + Client voice */
.stats-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
@media (max-width: 640px) { .stats-3 { grid-template-columns: 1fr; } }
.link-box { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 10px; }
.link-box .key-code { display: block; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); margin: 6px 0; font-size: 13px; }
.voice-row { cursor: pointer; }
.voice-row:hover td { background: var(--surface-2); }
.voice-open { background: var(--warn-soft); color: var(--warn); }
.voice-answered { background: var(--info-soft); color: var(--info); }
.voice-resolved { background: var(--accent-soft); color: var(--accent-strong); }
a.button.small { padding: 5px 10px; font-size: 13px; }

/* A product's own control room, shown inside Command */
.own-room .card-head .row { gap: 8px; align-items: center; flex-wrap: nowrap; }
.own-room .card-head .row .button { white-space: nowrap; }
.room-frame { display: block; width: 100%; height: calc(100vh - 260px); min-height: 560px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.room-frame[hidden] { display: none; }
/* Client voice: screenshots a product sent with a ticket */
.shot-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.shot { display: flex; flex-direction: column; gap: 4px; max-width: 220px; text-decoration: none; color: inherit; }
.shot img { max-width: 220px; max-height: 160px; object-fit: contain; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg, #fff); }
.shot span { overflow-wrap: anywhere; }
/* Code books: rendered Markdown, search and "what does this affect?" */
.md { line-height: 1.55; overflow-wrap: anywhere; }
.md h2, .md h3, .md h4, .md h5 { margin: 18px 0 6px; }
.md pre { background: var(--bg-soft, #f4f6fa); border: 1px solid var(--line, #e3e8ef); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.md code { font-family: Consolas, 'Courier New', monospace; font-size: 0.92em; }
.md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--line-strong, #c9d2df); color: var(--muted, #59647a); }
.md-table td, .md-table th { vertical-align: top; }
/* Words in a table stay whole: on a phone the table scrolls sideways in its .table-wrap instead of breaking "SendGrid" into "SendG rid". Long code names may still break. */
.md-table td, .md-table th { overflow-wrap: normal; word-break: normal; min-width: 7.5em; }
.md-table td code { overflow-wrap: anywhere; }
.cb-tools { gap: 12px; margin-top: 8px; }
.cb-note { border-top: 1px solid var(--line, #e3e8ef); padding: 8px 0; }
.cb-note > summary { cursor: pointer; }
.cb-hit { margin-top: 10px; }
.cb-hit th { width: 220px; text-align: left; white-space: nowrap; }

/* Products page for all staff: a card's summary, and a product you cannot open yet. */
.product-summary { margin: -4px 0 12px; font-size: 14px; line-height: 1.5; }
.product.locked { background: var(--bg-soft, #f7f8fb); }
.product.locked .ask-form { margin-top: 10px; display: grid; gap: 8px; }
.product.locked .ask-form input { width: 100%; }
