/* PM Companion. Shell close to Plane (canvas + sidebar, content card, header with breadcrumbs), in CaptainDev's
   colours: the logo's red as the accent, its charcoal for text; blue stays for information only, with its own components for the PM's work: attention lists, health, readiness, inline editing. */
:root {
  --canvas: #f4f5f7; --surface: #ffffff; --surface-2: #f7f8fa; --surface-3: #eef0f3; --hover: #f1f2f5;
  --text: #1a1b1e; --text-2: #3f4248; --muted: #6f737b; --faint: #a1a5ad;
  --border: #e6e8ec; --border-strong: #d3d6dc;
  --accent: #e31e24; --accent-hover: #c8181d; --accent-text: #c4161c; --accent-soft: #fdecec; --accent-line: #f7c5c6;
  --danger: #dc3545; --danger-soft: #fdeced; --warn: #c27c0e; --warn-soft: #fdf4e3; --ok: #1f9d55; --ok-soft: #e7f6ed;
  --info: #3f76ff; --info-soft: #ebf1ff; --neutral-soft: #eef0f3;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05); --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  --radius: 10px; --radius-sm: 6px;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #141518; --surface: #1c1d21; --surface-2: #222328; --surface-3: #2a2b31; --hover: #26272c;
    --text: #ececee; --text-2: #c9cbd0; --muted: #8e9199; --faint: #5f626a;
    --border: #2c2d33; --border-strong: #3a3c43;
    --accent: #e8383d; --accent-hover: #f05257; --accent-text: #ff7d80; --accent-soft: #3a1b1d; --accent-line: #6e2b2e;
    --danger: #f2555a; --danger-soft: #3a1c1f; --warn: #f0b54a; --warn-soft: #382c14; --ok: #3ccf7e; --ok-soft: #15301f;
    --info: #7ea2ff; --info-soft: #1c2645; --neutral-soft: #2a2b31;
    --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #141518; --surface: #1c1d21; --surface-2: #222328; --surface-3: #2a2b31; --hover: #26272c;
  --text: #ececee; --text-2: #c9cbd0; --muted: #8e9199; --faint: #5f626a;
  --border: #2c2d33; --border-strong: #3a3c43;
  --accent: #e8383d; --accent-hover: #f05257; --accent-text: #ff7d80; --accent-soft: #3a1b1d; --accent-line: #6e2b2e;
  --danger: #f2555a; --danger-soft: #3a1c1f; --warn: #f0b54a; --warn-soft: #382c14; --ok: #3ccf7e; --ok-soft: #15301f;
  --info: #7ea2ff; --info-soft: #1c2645; --neutral-soft: #2a2b31;
  --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
code { font: 12.5px/1.4 var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
h1, h2, h3 { letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
h3 { font-size: 13px; margin: 18px 0 8px; font-weight: 600; color: var(--text-2); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell ---------- */
body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; overflow-x: clip; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; min-width: 0; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 10px; color: var(--text); font-weight: 600; font-size: 14.5px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: -2px; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .08); flex: none; overflow: hidden; }
.logo img { width: 26px; height: 26px; display: block; }
.logo.big { width: 48px; height: 48px; border-radius: 12px; }
.logo.big img { width: 42px; height: 42px; }
.wordmark img { display: block; height: 64px; width: auto; }
.wordmark .wm-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark .wm-light { display: none; } :root:not([data-theme="light"]) .wordmark .wm-dark { display: block; } }
:root[data-theme="dark"] .wordmark .wm-light { display: none; }
:root[data-theme="dark"] .wordmark .wm-dark { display: block; }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; box-shadow: var(--shadow-sm); }
.search-btn:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; font: 11px/16px var(--mono); color: var(--muted); background: var(--surface-2); }
.nav { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); font-weight: 500; font-size: 13.5px; min-height: 30px; }
.nav:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.nav.on { background: var(--accent-soft); color: var(--accent-text); }
.nav .icon { color: var(--muted); }
.nav.on .icon { color: var(--accent-text); }
.nav .badge-count { margin-left: auto; }
.side-title { display: flex; align-items: center; justify-content: space-between; margin: 14px 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.proj-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 10px; font-weight: 700; color: #fff; flex: none; }
.side-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 2px; }
.me { display: grid; grid-template-columns: 24px minmax(0, 1fr) 28px 28px; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); }
.me-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }

.main { min-width: 0; margin: 8px 8px 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-height: calc(100vh - 16px); }
.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .sep { color: var(--faint); }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sync form { margin: 0; }
.sync .dot { width: 7px; height: 7px; background: var(--ok); }
.sync.stale .dot { background: var(--warn); }
.sync.loading .dot { background: var(--accent); animation: sync-pulse 1s ease-in-out infinite alternate; }
@keyframes sync-pulse { to { opacity: .3; } }
.sync-reload { padding: 0; border: 0; background: none; font: inherit; color: var(--accent-text); cursor: pointer; }
.sync-reload:hover { text-decoration: underline; }
.subnav { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 10px 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a .icon { width: 15px; height: 15px; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { color: var(--text); border-bottom-color: var(--accent); }
.page { padding: 22px 24px 64px; width: 100%; max-width: 1840px; }
.page.narrow { max-width: 980px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Buttons ---------- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500; line-height: 20px; padding: 5px 12px; border-radius: 6px; border: 1px solid transparent; background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover, button:hover { background: var(--accent-hover); text-decoration: none; }
.btn .icon, button .icon { width: 15px; height: 15px; }
.btn.ghost, button.ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover, button.ghost:hover { background: var(--hover); color: var(--text); }
.btn.subtle, button.subtle { background: transparent; color: var(--text-2); }
.btn.subtle:hover, button.subtle:hover { background: var(--hover); }
.btn.danger, button.danger { background: var(--danger); }
.btn.danger:hover, button.danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.btn.sm, button.sm { padding: 2px 9px; font-size: 12.5px; }
.btn.lg, button.lg { padding: 8px 16px; font-size: 14px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Page heading ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.page-head h1 { font-size: 20px; margin: 0; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 48px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.card-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.card-head .btn-row { flex: none; }
.card-body { padding: 14px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.grid { display: grid; gap: 16px; align-items: start; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.main-side { grid-template-columns: minmax(0, 1fr) 340px; }
.grid.side-main { grid-template-columns: 240px minmax(0, 1fr); }
.grid.wide-narrow { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.stack { display: grid; gap: 16px; align-content: start; }
.mt { margin-top: 16px; }

/* ---------- Badges, pills ---------- */
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.badge-count.danger { background: var(--danger-soft); color: var(--danger); }
.badge-count.warn { background: var(--warn-soft); color: var(--warn); }
.badge-count.info { background: var(--info-soft); color: var(--info); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--surface); white-space: nowrap; line-height: 20px; }
.pill .state { width: 13px; height: 13px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; line-height: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.soft { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; line-height: 21px; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
.soft .icon { width: 13px; height: 13px; }
.soft.danger { background: var(--danger-soft); color: var(--danger); }
.soft.warn { background: var(--warn-soft); color: var(--warn); }
.soft.ok { background: var(--ok-soft); color: var(--ok); }
.soft.info { background: var(--info-soft); color: var(--info); }
.health { display: inline-flex; align-items: center; gap: 6px; padding: 0 9px 0 7px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 22px; white-space: nowrap; }
.health::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health.on-track { background: var(--ok-soft); color: var(--ok); }
.health.at-risk { background: var(--warn-soft); color: var(--warn); }
.health.off-track { background: var(--danger-soft); color: var(--danger); }
.health.none { background: var(--neutral-soft); color: var(--muted); }
.state { width: 14px; height: 14px; flex: none; }
.key { color: var(--muted); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Avatars ---------- */
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c, var(--accent)); color: #fff; font-weight: 600; font-size: 10px; flex: none; border: 2px solid var(--surface); }
.avatar.lg { width: 30px; height: 30px; font-size: 11.5px; }
.people { display: inline-flex; }
.people .avatar + .avatar { margin-left: -7px; }

/* ---------- Progress and health ---------- */
.bar { position: relative; display: flex; height: 8px; border-radius: 99px; overflow: visible; background: var(--surface-3); gap: 2px; }
.bar > span { min-width: 3px; }
.bar > span:first-child { border-radius: 99px 0 0 99px; }
.bar > span:last-of-type { border-radius: 0 99px 99px 0; }
.bar > span:only-of-type { border-radius: 99px; }
.bar .expected { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--text); opacity: .65; min-width: 0; }
.bar.bar-lg { height: 10px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row b { color: var(--text-2); font-weight: 600; }
.legend-row i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.legend-row i.mark { width: 2px; height: 11px; border-radius: 1px; background: var(--text); opacity: .65; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--accent)); }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 12px 16px; border-left: 1px solid var(--border); display: grid; gap: 2px; }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat.danger .stat-value { color: var(--danger); } .stat.warn .stat-value { color: var(--warn); } .stat.ok .stat-value { color: var(--ok); }

/* ---------- Attention list (what needs the PM) ---------- */
.attn { list-style: none; margin: 0; padding: 0; }
.attn li + li { border-top: 1px solid var(--border); }
.attn-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 16px; color: var(--text); }
a.attn-row:hover { background: var(--hover); text-decoration: none; }
.attn-row.on { background: var(--accent-soft); }
.attn-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--neutral-soft); color: var(--muted); }
.attn-icon .icon { width: 17px; height: 17px; }
.attn-row.danger .attn-icon { background: var(--danger-soft); color: var(--danger); }
.attn-row.warn .attn-icon { background: var(--warn-soft); color: var(--warn); }
.attn-row.info .attn-icon { background: var(--info-soft); color: var(--info); }
.attn-text b { display: block; font-weight: 600; font-size: 13.5px; }
.attn-text span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn-count { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.attn-row.danger .attn-count { color: var(--danger); } .attn-row.warn .attn-count { color: var(--warn); } .attn-row.info .attn-count { color: var(--info); }
.attn-projects { display: flex; gap: 4px; }
.attn-go { color: var(--faint); }
.all-clear { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.all-clear .icon { color: var(--ok); }
.all-clear.only { border-top: 0; padding: 22px 16px; }

/* ---------- Ticket rows (Plane-like list) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 16px; min-height: 42px; border-top: 1px solid var(--border); font-size: 13.5px; }
.rows .row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.row-main { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.row-main:hover { text-decoration: none; }
.row-main:hover .row-title { text-decoration: underline; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; align-items: center; gap: 8px; }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; line-height: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due .icon { width: 13px; height: 13px; color: var(--muted); }
.due.late { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.due.late .icon { color: var(--danger); }
.missing { font-size: 11.5px; color: var(--warn); font-weight: 600; }
.row-group { padding: 7px 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.rows .row-group:first-child { border-top: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 14px; white-space: nowrap; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table .num { text-align: right; }
.table a.strong { color: var(--text); font-weight: 600; }

/* ---------- Empty states ---------- */
.empty { display: grid; justify-items: center; gap: 6px; padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .icon { width: 26px; height: 26px; color: var(--faint); stroke-width: 1.5; }
.empty b { color: var(--text-2); font-size: 14px; }
.empty p { margin: 0; max-width: 460px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field > span, .field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field .hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], input[type="file"], select { font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 7px 10px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; min-height: 38px; }
textarea:hover, input:hover, select:hover { border-color: var(--faint); }
textarea:focus, input:focus, select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="number"] { width: 84px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.savebar { position: sticky; bottom: 12px; z-index: 5; display: none; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 13px; }
.savebar span { flex: 1; }
.savebar .ghost { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); box-shadow: none; }
.savebar .ghost:hover { background: color-mix(in srgb, var(--surface) 12%, transparent); }
form.dirty .savebar { display: flex; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-actions .muted { font-size: 12.5px; }
.saved-by { font-size: 12px; color: var(--muted); }
.callout { display: flex; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.callout .icon { margin-top: 2px; color: var(--muted); }
.callout.warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.callout.warn .icon { color: var(--warn); }
.callout.info { background: var(--info-soft); border-color: transparent; color: var(--text); }
.callout.info .icon { color: var(--info); }
.callout.danger { background: var(--danger-soft); border-color: transparent; color: var(--text); }
.callout.danger .icon { color: var(--danger); }
.callout p { margin: 0; }

/* Inline editable text block (click Edit to change) */
.editable { position: relative; padding: 10px 12px; border: 1px dashed transparent; border-radius: 8px; margin: 0 -12px; }
.editable:hover { border-color: var(--border-strong); background: var(--surface-2); }
.editable .edit-btn { position: absolute; top: 6px; right: 6px; opacity: 0; }
.editable:hover .edit-btn, .editable .edit-btn:focus { opacity: 1; }
.editable.empty-text { color: var(--muted); font-style: italic; }
.text-block { white-space: normal; overflow-wrap: anywhere; }
.goal { font-size: 15.5px; font-weight: 500; color: var(--text); line-height: 1.45; }

/* Day-off chips (capacity grid) */
.days { display: flex; flex-wrap: wrap; gap: 3px; }
.day-chip { position: relative; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); font-size: 10.5px; line-height: 1.05; color: var(--text-2); cursor: pointer; text-align: center; background: var(--surface); user-select: none; }
.day-chip span b { display: block; font-size: 12px; font-weight: 600; }
.day-chip span:hover { border-color: var(--faint); }
.day-chip input:checked + span { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); box-shadow: inset 0 -3px 0 var(--warn); }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Capacity and load grid */
.cap { display: grid; grid-template-columns: minmax(150px, 240px) 110px max-content minmax(200px, 1fr); }
.cap > div { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; min-width: 0; }
.cap .cap-h { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--surface-2); border-top: 0; padding-top: 8px; padding-bottom: 8px; }
.cap .who { font-weight: 500; }
.cap .who small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.cap .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hours { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.hours input { width: 58px; padding: 5px 6px; text-align: right; }
.load { flex: 1; display: grid; gap: 4px; min-width: 0; }
.load-bar { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); }
.load-bar .committed { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.load-bar .done { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.load-bar .cap-line { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--text); opacity: .7; }
.load.over .committed { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.load.over .done { background: var(--danger); }
.load.full .committed { background: color-mix(in srgb, var(--warn) 50%, transparent); }
.load-text { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.load-text b { font-weight: 600; }
.load.over .load-text b { color: var(--danger); } .load.full .load-text b { color: var(--warn); } .load.ok .load-text b { color: var(--ok); }

/* ---------- Checklist / readiness / stepper ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.checklist li:first-child { border-top: 0; }
.checklist .tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); color: transparent; margin-top: 1px; }
.checklist .tick .icon { width: 12px; height: 12px; stroke-width: 3; }
.checklist li.ok .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.ok b { color: var(--muted); font-weight: 500; }
.checklist li.bad .tick { border-color: var(--warn); }
.checklist li span.hint { display: block; font-size: 12.5px; color: var(--muted); }
.ready-meter { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.ready-meter .meter { width: 90px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 0 0 26px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--border-strong); font-weight: 650; font-size: 13px; color: var(--text-2); position: relative; z-index: 1; }
.step::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 1.5px; background: var(--border); }
.step:last-child::after { display: none; }
.step.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.step.current::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-body { min-width: 0; padding-top: 4px; }
.step-body > h2 { font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.step-body > p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.effects { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.effects li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.effects .icon { margin-top: 3px; color: var(--accent-text); width: 15px; height: 15px; }

.flow { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.flow li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.flow li + li::before { content: ""; width: 28px; height: 1.5px; background: var(--border-strong); margin: 0 8px; }
.flow .n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: 11px; }
.flow li.done { color: var(--ok); } .flow li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow li.current { color: var(--text); } .flow li.current .n { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Two-pane list (queues) ---------- */
.pane-nav { position: sticky; top: 120px; display: grid; gap: 1px; }
.pane-nav .side-title { margin: 12px 8px 4px; }
.pane-nav .side-title:first-child { margin-top: 0; }
.pane-nav a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 6px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.pane-nav a:hover { background: var(--hover); text-decoration: none; }
.pane-nav a.on { background: var(--accent-soft); color: var(--accent-text); }
.pane-nav a .badge-count { margin-left: auto; }
.pane-nav a.zero { color: var(--muted); font-weight: 400; }
.tone-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.tone-dot.danger { background: var(--danger); } .tone-dot.warn { background: var(--warn); } .tone-dot.info { background: var(--info); } .tone-dot.ok { background: var(--ok); }

/* ---------- Projects list (home) ---------- */
.plist { list-style: none; margin: 0; padding: 0; }
.prow { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(220px, 1.6fr) 110px minmax(150px, 1fr) 24px; gap: 16px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--border); color: var(--text); }
.plist li:first-child .prow { border-top: 0; }
a.prow:hover { background: var(--hover); text-decoration: none; }
.prow-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prow-name b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-name small { display: block; color: var(--muted); font-size: 12px; }
.prow-cycle { display: grid; gap: 6px; min-width: 0; }
.prow-cycle .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.prow-cycle .top b { color: var(--text-2); font-weight: 600; }
.prow-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.goal-line { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Agenda ---------- */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda > li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); }
.agenda > li:first-child { border-top: 0; }
.agenda .when { text-align: center; line-height: 1.15; }
.agenda .when b { display: block; font-size: 17px; font-weight: 650; }
.agenda .when span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.agenda li.today .when b, .agenda li.today .when span { color: var(--accent-text); }
.agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.agenda ul li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agenda ul li > span:last-child, .agenda ul li > a:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda ul a { color: var(--text); }
.ev-ico { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.ev-ico .icon { width: 12px; height: 12px; stroke-width: 2.2; }

/* Routine (today's focus) */
.routine { list-style: none; margin: 0; padding: 0; }
.routine li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.routine li:first-child { border-top: 0; }
.routine .tick { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); color: transparent; }
.routine .tick .icon { width: 11px; height: 11px; stroke-width: 3; }
.routine li.ok .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.routine li.ok .what { color: var(--muted); }
.routine .what small { display: block; color: var(--muted); font-size: 12px; }
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 12px 16px 4px; }
.week span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 5px 0; border-radius: 6px; background: var(--surface-2); }
.week span small { display: block; font-weight: 500; font-size: 10.5px; }
.week span.today { background: var(--accent); color: #fff; }
.week span.today small { color: #fff; opacity: .85; }
.week span.past { opacity: .55; }

/* ---------- Cycle hero ---------- */
.hero-cycle { padding: 18px 20px; display: grid; gap: 14px; }
.hero-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.hero-top h2 { font-size: 17px; }
.hero-top .dates { color: var(--muted); font-size: 13px; }
.hero-top .btn-row { margin-left: auto; }
.hero-nums { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.hero-nums b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Decisions ---------- */
.decision { padding: 14px 16px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.decision:first-child { border-top: 0; }
.decision-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decision-top a { color: var(--text); font-weight: 600; }
.decision textarea { min-height: 60px; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: inherit; }
.chart .scope { fill: none; stroke: var(--faint); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .done { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .done-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.chart .done-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .ideal { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 2 4; opacity: .9; }
.chart .today { stroke: var(--text); stroke-width: 1; opacity: .3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.chart-legend .lg { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart-legend .lg.scope { background: var(--faint); } .chart-legend .lg.done { background: var(--accent); } .chart-legend .lg.ideal { background: var(--ok); }
.scope-cols { display: grid; grid-template-columns: 1fr 1fr; }
.scope-cols > div { padding: 12px 16px; }
.scope-cols > div + div { border-left: 1px solid var(--border); }
.scope-cols h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.keylist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.keylist li { min-width: 0; }
.keylist a { color: var(--text); display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.keylist a .key, .keylist a .state { flex: none; }
.keylist a span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding: 12px 16px 0; }
.vbar { flex: 1; display: grid; justify-items: center; gap: 4px; height: 100%; align-content: end; font-size: 11px; color: var(--muted); min-width: 0; }
.vbar i { display: block; width: 100%; max-width: 42px; border-radius: 4px 4px 0 0; background: var(--accent); min-height: 2px; position: relative; }
.vbar i.ghost { position: absolute; bottom: 0; left: 0; right: 0; background: var(--surface-3); border-radius: 4px 4px 0 0; }
.vbar .stackb { position: relative; width: 100%; max-width: 42px; display: flex; align-items: flex-end; height: 100%; }
.vbar .stackb i:not(.ghost) { z-index: 1; width: 100%; }
.vbar b { color: var(--text-2); font-weight: 600; font-size: 12px; }

/* ---------- Links ---------- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.link-tile { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 500; background: var(--surface); min-width: 0; }
.link-tile:hover { border-color: var(--accent-line); background: var(--accent-soft); text-decoration: none; }
.link-tile .icon { color: var(--muted); }
.link-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-tile small { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 0; }
.kv dt, .kv dd { padding: 10px 16px; border-top: 1px solid var(--border); margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.kv dd { overflow-wrap: anywhere; }
.kv dd.unset { color: var(--faint); font-style: italic; }

/* ---------- Dialogs (side drawer and centered) ---------- */
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--border); padding: 0; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10, 12, 16, .45); backdrop-filter: blur(1px); }
dialog.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; border-width: 0 0 0 1px; display: none; flex-direction: column; }
dialog.drawer[open] { display: flex; }
dialog.drawer.wide { width: min(780px, 100vw); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 15.5px; flex: 1; }
.dlg-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.dlg-body { flex: 1; overflow-y: auto; padding: 18px; }
.dlg-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.dlg-foot .grow { flex: 1; font-size: 12px; color: var(--muted); }
dialog form.form-dlg { display: flex; flex-direction: column; height: 100%; margin: 0; }

/* Command menu */
dialog.cmdk { width: min(620px, calc(100vw - 32px)); margin: 12vh auto auto; border-radius: 12px; overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.cmdk-input input { border: 0; box-shadow: none !important; padding: 15px 0; font-size: 15px; background: transparent; }
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.cmdk-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.cmdk-list li a small { margin-left: auto; color: var(--muted); font-size: 12px; }
.cmdk-list li a .icon { color: var(--muted); }
.cmdk-list li.sel a { background: var(--accent-soft); text-decoration: none; }
.cmdk-list li.none { padding: 14px; color: var(--muted); font-size: 13px; }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); background: var(--surface-2); }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 8px; max-width: min(460px, calc(100vw - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .2s ease-out; }
.toast .icon { margin-top: 2px; color: var(--ok); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.toast.error .icon { color: var(--danger); }
.toast p { margin: 0; flex: 1; }
.toast button { padding: 0; width: 22px; height: 22px; background: transparent; color: var(--muted); }
.toast button:hover { background: var(--hover); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Briefs and spec ---------- */
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.doc-text { font-size: 14px; line-height: 1.6; }
.doc-text p { margin: 4px 0 10px; }
.doc-text ul, .doc-text ol { margin: 4px 0 10px; padding-left: 20px; }
.doc-text li p { margin: 0; }
.doc-text h3 { font-size: 14px; margin: 12px 0 4px; color: var(--text); }
.doc-section { padding: 14px 18px; border-top: 1px solid var(--border); scroll-margin-top: 120px; }
.doc-section:first-child { border-top: 0; }
.doc-section > h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; position: sticky; top: 120px; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text-2); font-size: 13px; }
.toc a:hover { background: var(--hover); text-decoration: none; }
.toc a .muted { font-size: 12px; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; padding: 0 16px 14px 34px; font-size: 13px; }
.history li::before { content: ""; position: absolute; left: 18px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.history li::after { content: ""; position: absolute; left: 21.5px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.history li:last-child::after { display: none; }
.history li:first-child::before { background: var(--accent); }
.history .when { display: block; font-size: 12px; color: var(--muted); }
.paste-box { border: 1px dashed var(--accent-line); background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; }
.paste-box b { font-size: 13px; }
.paste-box p { margin: 0; font-size: 12.5px; color: var(--muted); }
.tpl-link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tpl-link .icon { width: 14px; height: 14px; }
.plane-review { border-color: var(--warn); }
.plane-diff { gap: 16px; } .plane-diff > div { min-width: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.plane-diff > div:last-child { background: var(--warn-soft); }
.plane-review-foot { display: grid; gap: 14px; }
.plane-review-foot .plane-discard { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .plane-diff { grid-template-columns: minmax(0, 1fr); } }
.module-pick { display: grid; gap: 6px; } .module-pick > label { display: grid; gap: 6px; }
.module-new[hidden] { display: none; }
.feedback-items td { vertical-align: middle; } .feedback-items td:last-child { width: 190px; } .feedback-items select { width: 100%; }
.ticket-fields { border-color: var(--accent-line); }
.ticket-fields > .card-head { background: var(--accent-soft); }
.ticket-count { white-space: nowrap; }
.ticket-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.ticket-preview li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.ticket-preview li > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-preview .soft { flex: none; }
.paste-file { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }
.paste-file > span:first-child { font-weight: 600; color: var(--text-2); }
.paste-file input[type=file] { font-size: 12.5px; color: var(--text-2); max-width: 100%; }
.client-copy { font: 12px/1.5 var(--mono); width: 100%; min-height: 220px; background: var(--surface-2); }

/* ---------- Calendar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar .month { font-size: 17px; font-weight: 650; margin: 0 6px; }
.filters { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.filters a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 500; background: var(--surface); }
.filters a.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.filters a:hover { text-decoration: none; border-color: var(--border-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--lc); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.dow { background: var(--surface-2); font-size: 12px; font-weight: 500; color: var(--muted); padding: 7px 10px; }
.day { min-height: 116px; background: var(--surface); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day.other { background: var(--surface-2); }
.day.other .date { opacity: .5; }
.day.weekend { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.day .date { font-size: 12px; font-weight: 600; color: var(--text-2); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.day.today .date { background: var(--accent); color: #fff; }
.stripes { display: flex; gap: 2px; height: 3px; margin: -2px -2px 2px; }
.stripes span { flex: 1; border-radius: 2px; opacity: .85; }
.ev { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11.5px; line-height: 1.35; padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); border-left: 3px solid var(--c); overflow: hidden; word-break: break-word; }
a.ev:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 20%, transparent); }
.ev.cycle { font-weight: 600; }
.ev.module { font-style: italic; }
.ev.late { color: var(--danger); font-weight: 600; background: var(--danger-soft); }
.ev.off { color: var(--muted); background: var(--surface-3); }
.more { font-size: 11px; color: var(--muted); padding-left: 4px; }

/* ---------- Timeline ---------- */
.tl { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.tl-label { padding: 8px 14px 8px 16px; font-size: 13px; display: grid; align-content: center; min-height: 46px; border-top: 1px solid var(--border); }
.tl-label a { color: var(--text); font-weight: 500; }
.tl-label small { color: var(--muted); font-size: 12px; }
.tl-track { position: relative; border-top: 1px solid var(--border); min-height: 46px; margin-right: 16px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 8 - 1px), var(--border) calc(100% / 8 - 1px), var(--border) calc(100% / 8)); }
.tl-weeks { position: relative; height: 30px; margin-right: 16px; }
.tl-weeks span { position: absolute; font-size: 11.5px; color: var(--muted); top: 8px; padding-left: 4px; }
.todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .8; z-index: 1; }
.seg, .mbar { position: absolute; top: 50%; transform: translateY(-50%); height: 24px; border-radius: 6px; }
.seg { background: color-mix(in srgb, var(--c) 85%, transparent); color: #fff; font-size: 11.5px; font-weight: 600; padding: 0 8px; line-height: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.seg:hover { text-decoration: none; background: var(--c); }
.mbar { background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent); overflow: hidden; }
.mbar span { display: block; height: 100%; background: var(--c); opacity: .8; }
.mbar.late { border-color: var(--danger); }
.mslip { position: absolute; top: 50%; transform: translateY(-50%); height: 24px; border-radius: 0 6px 6px 0; border: 1.5px dashed var(--danger); border-left: 0; background: color-mix(in srgb, var(--danger) 10%, transparent); }
.mend { position: absolute; top: 8px; bottom: 8px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--ok); }
ul.plain { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 13px; }
details.more-list { padding: 10px 16px 14px; border-top: 1px solid var(--border); font-size: 13px; }
details.more-list summary { cursor: pointer; color: var(--muted); }

/* ---------- Help ---------- */
.help-hero { position: relative; margin-bottom: 18px; }
.help-hero .lead { max-width: 760px; color: var(--muted); margin: 0 0 14px; }
.help-search { display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--muted); }
.help-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.help-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; min-width: 0; padding: 0; box-shadow: none !important; }
.help-results { list-style: none; margin: 6px 0 0; padding: 6px; max-width: 640px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.help-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.help-results a:hover { background: var(--hover); text-decoration: none; }
.help-results span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.help-results .none { padding: 8px 10px; color: var(--muted); }
.help-start { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--text-2); max-width: 900px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.help-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); transition: transform .12s, border-color .12s; }
.help-card:hover { text-decoration: none; border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.help-thumb { position: relative; display: block; height: 150px; overflow: hidden; background: #141518; border-bottom: 1px solid var(--border); }
.help-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: .92; }
.help-thumb.plain { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); color: var(--accent-text); }
.help-thumb .icon.big { width: 64px; height: 64px; stroke-width: 1.4; opacity: .8; }
.help-icon { position: absolute; left: 14px; bottom: -1px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px 10px 0 0; background: var(--surface); color: var(--accent-text); }
.help-icon .icon { width: 20px; height: 20px; }
.help-card-body { display: grid; gap: 8px; padding: 14px 18px 18px; }
.help-card h2 { font-size: 15.5px; line-height: 1.3; }
.help-card p { margin: 0; font-size: 13.5px; }
.help-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: var(--muted); }
.help-meta .meta { display: inline-flex; align-items: center; gap: 5px; }
.help-meta .icon { width: 14px; height: 14px; }
.guide-head { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; }
.guide-head h1 { font-size: 23px; margin: 0 0 6px; line-height: 1.2; }
.guide-icon { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.guide-icon .icon { width: 26px; height: 26px; }
.copy-link .icon { width: 14px; height: 14px; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start; }
.help-side { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 13px; }
.help-side .side-title { margin: 0 0 8px; }
.help-nav { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 1px; }
.help-nav a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; border-left: 2px solid transparent; color: var(--text-2); }
.help-nav a:hover { background: var(--hover); text-decoration: none; }
.help-nav a.on { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.help-nav.others .icon { width: 15px; height: 15px; }
.doc { padding: 28px 38px; font-size: 15px; line-height: 1.7; max-width: 900px; }
.doc > :first-child { margin-top: 0; }
.doc h2 { position: relative; font-size: 19px; margin: 42px 0 12px; padding-top: 22px; border-top: 1px solid var(--border); scroll-margin-top: 76px; }
.doc h3 { position: relative; font-size: 15.5px; margin: 26px 0 8px; color: var(--text); scroll-margin-top: 76px; }
.doc .anchor { margin-left: 8px; color: var(--muted); opacity: 0; font-weight: 400; }
.doc h2:hover .anchor, .doc h3:hover .anchor { opacity: 1; text-decoration: none; }
.doc p { margin: 10px 0; }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 3px 0; }
.doc li > p { margin: 0; }
.doc > ol { list-style: none; counter-reset: step; padding-left: 0; }
.doc > ol > li { counter-increment: step; position: relative; padding: 4px 0 4px 40px; }
.doc > ol > li::before { content: counter(step); position: absolute; left: 0; top: 4px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; }
.doc ul[data-type="taskList"] { list-style: none; padding-left: 4px; }
.doc li[data-type="taskItem"] p::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; border: 1.5px solid var(--border-strong); border-radius: 4px; vertical-align: -2px; }
.doc table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 13.5px; display: block; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.doc th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.doc th, .doc td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 500; color: var(--text); min-width: 120px; }
.doc code { font: 12.5px/1.4 var(--mono); background: var(--surface-3); border: 0; padding: 1px 5px; border-radius: 4px; }
.doc pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin: 14px 0; padding: 12px 18px; border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 8px 8px 0; }
.doc blockquote.glance { border: 1px solid var(--accent-line); border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 20px; }
.doc .glance-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.doc blockquote.glance ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.doc hr { display: none; }
.shot { margin: 22px 0 26px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.shot a.zoom { display: block; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 12px 16px 14px; font-size: 13.5px; line-height: 1.55; border-top: 1px solid var(--border); }
.shot figcaption > p { margin: 0 0 10px; font-weight: 600; color: var(--text); }
.shot ol, .lightbox ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shot li, .lightbox li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; padding: 0; }
.badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fbbf24; color: #111827; font-weight: 700; font-size: 12px; }
.kit-panel { margin: 18px 0 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.kit-main { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.kit-main .btn:hover { text-decoration: none; }
.kit-panel p { margin: 8px 0 6px; font-size: 13px; }
.doc .kit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; font-size: 13.5px; }
.doc .kit-list li { display: flex; justify-content: space-between; gap: 10px; margin: 0; }
.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(5, 7, 12, .85); overflow-y: auto; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); background: var(--surface); border-radius: 10px; overflow: hidden; cursor: zoom-out; }
.lightbox img { display: block; width: 100%; height: auto; }
.lightbox figcaption { padding: 14px 18px; font-size: 14px; }
.lightbox figcaption > p { margin: 0 0 10px; font-weight: 600; }
.lb-close { position: fixed; top: 14px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 22px; padding: 0; }
.lb-close:hover { background: var(--hover); }
body.public { background: var(--canvas); }
.public-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; padding: 10px 32px; background: color-mix(in srgb, var(--canvas) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.public-bar .brand { padding: 0; }
.public-main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }
.public-title { font-size: 26px; margin: 0 0 8px; }
.public .doc { background: var(--surface); }
.public .help-side { top: 70px; }

/* ---------- Sign-in and messages ---------- */
body.plain { display: block; }
main.narrow { max-width: 460px; margin: 12vh auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-align: center; box-shadow: var(--shadow); }
main.narrow h1 { font-size: 20px; margin: 14px 0 6px; }
body.landing { min-height: 100vh; background: radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--canvas); }
.hero { max-width: 1080px; margin: 0 auto; min-height: 100vh; padding: 48px 24px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-copy h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.025em; margin: 18px 0 12px; }
.hero-lead { font-size: 17px; color: var(--text-2); margin: 0 0 24px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.hero-points li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; color: var(--text-2); }
.hero-points .hp-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); }
.hero-points b { color: var(--text); display: block; }
.signin { padding: 28px; display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.signin h2 { font-size: 19px; }
.signin p { margin: 0; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 500; font-size: 13.5px; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; color: #1f1f1f; font-weight: 600; font-size: 14.5px; }
.google-btn:hover { text-decoration: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .14); }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pw-form { display: grid; gap: 12px; }
.pw-form button[type="submit"] { justify-self: stretch; padding: 10px 18px; }
.account-card { display: grid; gap: 16px; max-width: 520px; margin: 0 auto; padding: 20px; text-align: left; }
.account-card p { margin: 4px 0 0; }
a.me-mail { color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .subnav a .icon { display: none; }
  .subnav a { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 1180px) {
  .grid.main-side, .grid.wide-narrow, .brief-layout { grid-template-columns: 1fr; }
  .brief-side { order: -1; }
  .grid.main-side > .stack[style*="sticky"] { position: static !important; }
  .prow { grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.4fr) 100px 24px; }
  .prow .prow-flags { display: none; }
  .help-layout { grid-template-columns: 1fr; }
  .help-side { display: none; }
}
@media (max-width: 900px) {
  body.app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 12px; gap: 4px; }
  .sidebar .brand { padding: 0 8px 0 0; }
  .brand small, .side-title, .proj-list, .nav.ext, .search-btn kbd, .me-mail { display: none; }
  .search-btn { width: auto; margin: 0; }
  .side-foot { margin: 0 0 0 auto; padding: 0; display: flex; }
  .main { margin: 0; border-radius: 0; border-width: 1px 0 0; min-height: 0; }
  .header { position: static; border-radius: 0; padding: 8px 16px; flex-wrap: wrap; }
  .page { padding: 16px 16px 48px; }
  .grid.two, .grid.side-main, .fields-2, .fields-3, .scope-cols { grid-template-columns: 1fr; }
  .scope-cols > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .pane-nav { position: static; }
  .prow { grid-template-columns: 1fr; gap: 8px; }
  .prow .attn-go { display: none; }
  .attn-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .attn-projects { display: none; }
  .cap { grid-template-columns: 1fr; }
  .cap .cap-h { display: none; }
  .cap > div { border-top: 0; padding-top: 4px; padding-bottom: 4px; }
  .cap > div.who { border-top: 1px solid var(--border); padding-top: 12px; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { border-top: 0; padding-top: 0; }
  .cal { grid-template-columns: 1fr; }
  .dow, .day.other { display: none; }
  .day { min-height: 0; }
  .tl { grid-template-columns: 1fr; }
  .tl-label { border-top: 0; min-height: 0; padding-bottom: 0; }
  .tl-weeks { display: none; }
  .tl-track { margin: 0 16px; }
  .doc { padding: 18px 16px; font-size: 14.5px; }
  .help-cards { grid-template-columns: 1fr; }
  .public-bar, .public-main { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px; min-height: 0; }
  .hero-copy h1 { font-size: 26px; }
  .row { grid-template-columns: minmax(0, 1fr); padding: 8px 16px; gap: 6px; }
  .row-meta { flex-wrap: wrap; }
  .stat { border-left: 0; border-top: 1px solid var(--border); }
  .flow { flex-wrap: wrap; row-gap: 8px; }
}

/* ---------- Operations center ---------- */
.side-title { text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.side-title span { font-weight: 500; color: var(--faint); }
.proj-list { display: grid; gap: 1px; }
.proj-row .proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.hdot.on-track { background: var(--ok); } .hdot.at-risk { background: var(--warn); } .hdot.off-track { background: var(--danger); }
.nav.ext { font-size: 12.5px; color: var(--muted); min-height: 28px; }
.nav.ext span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Signal tiles */
.signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.sig { position: relative; display: grid; gap: 1px; padding: 11px 14px 11px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); overflow: hidden; }
.sig::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border-strong); }
a.sig:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.sig-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sig-label .icon { width: 14px; height: 14px; }
.sig-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sig-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig.danger::before { background: var(--danger); } .sig.danger .sig-value { color: var(--danger); }
.sig.warn::before { background: var(--warn); } .sig.warn .sig-value { color: var(--warn); }
.sig.info::before { background: var(--accent); } .sig.info .sig-value { color: var(--accent-text); }
.sig.ok::before { background: var(--ok); } .sig.ok .sig-value { color: var(--ok); }

/* Status board */
.table.board th, .table.board td { padding: 9px 7px; }
.table.board td:first-child, .table.board th:first-child { padding-left: 16px; }
.board-proj { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 150px; }
.board-proj:hover { text-decoration: none; }
.board-proj:hover b { text-decoration: underline; }
.board-proj b { display: block; font-weight: 600; white-space: nowrap; }
.board-proj small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.board-progress { min-width: 150px; }
.board-progress .health { margin-bottom: 6px; }
.board-progress small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.heat { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 6px; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); background: var(--surface-3); }
a.heat:hover { text-decoration: none; outline: 1px solid var(--border-strong); }
.heat.zero { background: transparent; color: var(--faint); font-weight: 500; }
.heat.danger { background: var(--danger-soft); color: var(--danger); }
.heat.warn { background: var(--warn-soft); color: var(--warn); }
.heat.info { background: var(--info-soft); color: var(--info); }
.heat.ok { background: var(--ok-soft); color: var(--ok); }
.ready { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.ready .meter { width: 36px; min-width: 0; }
.ready .meter span { background: var(--accent); }
.ready.ok { color: var(--ok); }
.ready.ok .meter span { background: var(--ok); }
.ready:hover { text-decoration: none; }
.board-id { display: flex; align-items: center; gap: 4px; }

/* Team table */
.who-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.table.team td, .table.team th { padding: 8px 10px; }
.table.team td:first-child, .table.team th:first-child { padding-left: 16px; }
.load-mini { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.load-mini .meter { width: 60px; min-width: 0; }
.load-mini.ok .meter span { background: var(--ok); }
.load-mini.full .meter span { background: var(--warn); }
.load-mini.over .meter span { background: var(--danger); }
.load-mini.over { color: var(--danger); }
.load-mini.full { color: var(--warn); }
.kv.compact { grid-template-columns: 120px minmax(0, 1fr); }
.kv.compact dt, .kv.compact dd { font-size: 13px; padding: 8px 16px; }

/* Project cockpit (the band under the header) */
.cockpit { padding: 14px 20px 0; border-bottom: 1px solid var(--border); background: linear-gradient(var(--surface-2), var(--surface)); }
.cockpit-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.cockpit-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 320px; }
.cockpit-id > div { min-width: 0; }
.cockpit-id .proj-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
.cockpit-id h1 { margin: 0; font-size: 18px; font-weight: 650; display: flex; align-items: baseline; gap: 8px; }
.cockpit-id p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-id p b { color: var(--text-2); }
.cockpit-id p.cockpit-goal { display: flex; align-items: center; gap: 6px; color: var(--text-2); margin-top: 3px; }
.cockpit-goal .icon { width: 13px; height: 13px; color: var(--muted); flex: none; }
.cockpit-goal span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-progress { display: flex; align-items: center; gap: 10px; }
.cp-bar { width: 170px; }
.cockpit-actions { margin-left: auto; }
.shortcuts { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.shortcuts::-webkit-scrollbar { display: none; }
.shortcuts-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-right: 4px; white-space: nowrap; }
.shortcut { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.shortcut .icon { width: 14px; height: 14px; color: var(--muted); }
.shortcut:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.shortcut b { font-size: 11px; font-weight: 700; min-width: 18px; text-align: center; padding: 0 5px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.shortcut b.zero { background: transparent; color: var(--faint); }
.shortcut b.danger { background: var(--danger-soft); color: var(--danger); }
.shortcut b.warn { background: var(--warn-soft); color: var(--warn); }
.shortcut b.info { background: var(--info-soft); color: var(--info); }

/* Daily run sheet */
.daily-progress { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.daily-progress b { font-size: 18px; }
.step-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.step-top h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 0; }
.step-top .covered { margin-left: auto; font-size: 13px; color: var(--muted); }
.step.done .step-body > .card, .step.done .person-grid { opacity: .55; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.person-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); display: grid; gap: 8px; }
.pb-head { display: flex; align-items: center; gap: 8px; }
.pb-line { display: grid; gap: 3px; }
.pb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pb-label.info { color: var(--accent-text); }
.pb-label.ok { color: var(--ok); }
/* In the daily the title is what gets read: the key shrinks and the title wraps to two lines instead of being cut. */
.person-block .keylist a { gap: 6px; }
.person-block .keylist .key { font-size: 10.5px; }
.person-block .keylist a span:last-child { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }

@media (max-width: 1320px) {
  .sig { padding: 10px 10px 10px 13px; }
  .sig-label .icon { display: none; }
  .sig-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .sig-value { font-size: 21px; }
}
@media (max-width: 1180px) {
  .cp-bar { width: 120px; }
}
@media (max-width: 900px) {
  .cockpit { padding: 12px 16px 0; }
  .cockpit-actions { margin-left: 0; }
  .signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Layout safety: grid and flex children may shrink below their content ---------- */
.grid > *, .stack > *, .brief-layout > *, .scope-cols > *, .person-grid > *, .person-block > *, .pb-line > *, .signals > *,
.cc > *, .cc-main > *, .cc-rail > *, .card-head > div, .attn-text, .prow > *, .step-body, .decision-top, .help-layout > * { min-width: 0; }
.card-head > div { flex: 1; }
.card-head h2, .card-head p { overflow-wrap: anywhere; }
.goal, .text-block { overflow-wrap: anywhere; }
.checklist li > span { min-width: 0; }
.row-meta { min-width: 0; }

/* ---------- Command center ---------- */
.crumb-sub { font-weight: 400; color: var(--muted); margin-left: 10px; font-size: 13px; }
.kstrip { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.kstrip::-webkit-scrollbar { display: none; }
.ks { flex: 1 1 0; min-width: 118px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 10px 14px; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; position: relative; }
.ks:first-child { border-left: 0; }
.ks .ks-ico { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--neutral-soft); color: var(--muted); }
.ks .ks-ico .icon { width: 16px; height: 16px; }
.ks b { font-size: 19px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ks > span:last-child { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.ks:hover, a.ks:hover { background: var(--hover); text-decoration: none; }
.ks::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; transition: background-color .15s; }
.ks.on::after { background: var(--accent); }
.ks.zero b { color: var(--faint); }
.ks.danger b { color: var(--danger); } .ks.danger .ks-ico { background: var(--danger-soft); color: var(--danger); }
.ks.warn b { color: var(--warn); } .ks.warn .ks-ico { background: var(--warn-soft); color: var(--warn); }
.ks.info b { color: var(--accent-text); } .ks.info .ks-ico { background: var(--info-soft); color: var(--info); }
.ks.demo { flex: 1.3 1 0; }

.cc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cc-main { display: grid; gap: 16px; }
.cc-rail { display: grid; gap: 16px; position: sticky; top: 68px; max-height: calc(100vh - 84px); overflow-y: auto; scrollbar-width: thin; border-radius: var(--radius); }
@media (min-width: 1600px) { .cc { grid-template-columns: minmax(0, 1fr) 380px; } }

/* Buttons used as list openers: no button look */
button.attn-row, button.heat, button.ready, button.soft { font: inherit; cursor: pointer; border: 0; }
button.attn-row { width: 100%; text-align: left; background: transparent; color: var(--text); border-radius: 0; padding: 11px 16px; line-height: 1.5; }
button.attn-row:hover, button.attn-row.on { background: var(--hover); }
button.attn-row.on { box-shadow: inset 3px 0 0 var(--accent); }
button.heat { padding: 0 7px; line-height: 1; }
button.heat:hover { outline: 1px solid var(--border-strong); }
button.heat.danger:hover { background: var(--danger-soft); } button.heat.warn:hover { background: var(--warn-soft); } button.heat.info:hover { background: var(--info-soft); }
button.heat.on { outline: 2px solid var(--accent); }
button.ready { background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; }
button.ready:hover, button.ready.on { background: var(--hover); }
button.soft { padding: 0 8px; }
button.soft.danger:hover { background: var(--danger-soft); outline: 1px solid var(--danger); }
.board-progress .soft { margin-bottom: 6px; }

/* Side panel listing a kind of work by project */
.lp-body { padding: 0; }
.lp { border-bottom: 1px solid var(--border); }
.lp-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.lp-head b { font-weight: 600; }
.lp-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lp-text { padding: 14px 18px; display: grid; gap: 10px; justify-items: start; font-size: 13.5px; }
.lp-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lp-todo li { display: flex; gap: 8px; }
.lp-todo .icon { margin-top: 3px; color: var(--warn); }

/* ---------- Motion ---------- */
a, button, .nav, .row, .attn-row, .sig, .ks, .heat, .shortcut, .navgroups a, .subtabs a, .link-tile, .help-card, .pane-nav a, .day-chip span, .table tbody tr td {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, opacity .15s ease; }
dialog.drawer[open] { animation: slide-in .22s cubic-bezier(.2, .8, .2, 1); }
dialog.drawer.closing { animation: slide-out .16s ease-in forwards; }
dialog[open]::backdrop { animation: fade-in .2s ease-out; }
dialog.closing::backdrop { animation: fade-out .16s ease-in forwards; }
dialog.cmdk[open] { animation: pop-in .16s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide-out { to { transform: translateX(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { transform: translateY(-6px) scale(.98); opacity: 0; } }
.bar > span:not(.expected), .meter > span, .load-bar > span { animation: grow .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left center; }
@keyframes grow { from { transform: scaleX(0); } }
.page { animation: page-in .2s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }
.toast { transition: opacity .2s, transform .2s; }
.toast.out { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; } }

@media (max-width: 1180px) {
  .cc { grid-template-columns: 1fr; }
  .cc-rail { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 900px) {
  .crumb-sub { display: none; }
  .kstrip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .ks { border-left: 0; border-top: 1px solid var(--border); min-width: 0; }
  .ks:nth-child(-n+2) { border-top: 0; }
  .ks:nth-child(even) { border-left: 1px solid var(--border); }
  .cc-rail { grid-template-columns: 1fr; }
  .lp-links { margin-left: 0; width: 100%; }
  dialog.drawer, dialog.drawer.wide { width: 100vw; }
}

/* Tone classes on buttons must not pick up the red / accent button look */
button.ks, button.ks.danger, button.ks.warn, button.ks.info { background: transparent; color: var(--text); }
button.ks:hover, button.ks.danger:hover, button.ks.warn:hover, button.ks.info:hover, button.ks.on { background: var(--hover); }
button.attn-row.danger, button.attn-row.warn, button.attn-row.info { background: transparent; color: var(--text); }
button.attn-row.danger:hover, button.attn-row.warn:hover, button.attn-row.info:hover, button.attn-row.on { background: var(--hover); }
/* Status board: fits next to the rail */
.table.board th, .table.board td { padding: 9px 5px; }
.table.board td:first-child, .table.board th:first-child { padding-left: 16px; }
.table.board td:last-child, .table.board th:last-child { padding-right: 16px; }
.board-proj { min-width: 0; }
.board-proj small { white-space: normal; }
.board-progress { min-width: 130px; }

@media (max-width: 1280px) {
  .kstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); overflow: visible; }
  .kstrip .ks, button.ks, button.ks.danger, button.ks.warn, button.ks.info { min-width: 0; border: 0; background: var(--surface); }
  button.ks:hover, button.ks.danger:hover, button.ks.warn:hover, button.ks.info:hover, a.ks:hover { background: var(--hover); }
  .ks:first-child { border-radius: var(--radius) 0 0 0; }
}
@media (max-width: 900px) {
  .kstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks:nth-child(even) { border-left: 0; }
}

.person-block { align-content: start; }
.step-clear { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 500; }
.step-clear .icon { width: 15px; height: 15px; }
.scope-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) {
  .sidebar .side-title, .sidebar .proj-list, .sidebar .nav.ext { display: none; }
  .sidebar .nav span { white-space: nowrap; }
  .scope-cols { grid-template-columns: 1fr; }
}

/* ---------- Hover layer: tooltips and ticket cards ---------- */
.tip { position: fixed; z-index: 80; max-width: 300px; padding: 6px 9px; border-radius: 6px; background: #17181c; color: #f2f3f5; font-size: 12px; line-height: 1.45; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .12s, transform .12s; white-space: pre-line; }
:root[data-theme="dark"] .tip { background: #2e3037; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tip { background: #2e3037; } }
.tip.on { opacity: 1; transform: none; }
.hcard { position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 16px); padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 13px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .14s, transform .14s, visibility 0s linear .14s; }
.hcard.on { opacity: 1; visibility: visible; transform: none; transition: opacity .14s, transform .14s; }
.hc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.hc-state i { width: 9px; height: 9px; border-radius: 50%; }
.hc-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; margin-bottom: 8px; }
.hcard dl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 3px 10px; margin: 0; }
.hcard dt { color: var(--muted); }
.hcard dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.hcard dd .late { color: var(--danger); font-weight: 600; }
.hc-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.hc-labels span { padding: 0 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; line-height: 20px; }
.hc-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ---------- Inner scroll areas: thin scrollbar, visible only while the pointer is over the area ---------- */
.cc-rail, .sidebar, .dlg-body, .cmdk-list, .help-side, .table-wrap { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.cc-rail:hover, .sidebar:hover, .dlg-body:hover, .cmdk-list:hover, .help-side:hover, .table-wrap:hover { scrollbar-color: var(--border-strong) transparent; }

/* ---------- Guides: audiences, diagrams, walkthrough steps, callouts ---------- */
.aud-everyone { --ac: #64748b; } .aud-dev { --ac: #3f76ff; } .aud-qa { --ac: #a855f7; } .aud-pm { --ac: #f59e0b; }
.aud { display: inline-flex; align-items: center; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 21px; color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.aud-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); flex: none; }
.help-start { display: flex; gap: 12px; align-items: flex-start; }
.help-start .icon { margin-top: 3px; color: var(--accent-text); }
.aud-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.aud-filter button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; }
.aud-filter button:hover { background: var(--hover); color: var(--text); }
.aud-filter button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.aud-group { margin: 22px 0 8px; }
.aud-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.aud-head h2 { font-size: 17px; }
.aud-head p { margin: 1px 0 0; color: var(--muted); font-size: 13px; }
.aud-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.aud-ico .icon { width: 19px; height: 19px; }
.start-here { justify-self: start; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 20px; background: var(--accent); color: #fff; }
.guide-icon[class*="aud-"] { color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.help-card:hover .help-icon { color: var(--accent-text); }
.help-nav a.walk .icon { width: 14px; height: 14px; color: var(--muted); }
.help-nav a.walk.on .icon { color: var(--accent-text); }
.help-nav.others a { gap: 9px; }
.guide-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; max-width: 900px; }
.guide-pager a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.guide-pager a:hover { border-color: var(--accent-line); text-decoration: none; }
.guide-pager a small { color: var(--muted); font-size: 12px; }
.guide-pager a.next { text-align: right; grid-column: 2; }

/* Diagram from a ```flow block */
.doc .diagram { margin: 22px 0 28px; padding: 16px 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.doc .diagram figcaption { margin: 0 0 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.doc .flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; }
.doc .flow-steps > li { position: relative; margin: 0; padding: 9px 9px 11px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-top: 3px solid var(--rc); border-radius: 9px; background: var(--surface); font-size: 12px; line-height: 1.35; min-width: 0; }
.doc .flow-steps > li::before { content: none; }
.doc .flow-steps > li + li::after { content: ""; position: absolute; left: -12px; top: 50%; width: 9px; height: 9px; border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: translate(-1px, -50%) rotate(45deg); }
.fs-n { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.fs b { font-size: 13px; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.fs-who { align-self: flex-start; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 18px; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); }
.fs-detail { color: var(--muted); overflow-wrap: anywhere; }
.r-pm { --rc: #f59e0b; } .r-dev { --rc: #3f76ff; } .r-qa { --rc: #a855f7; } .r-client { --rc: #10b981; } .r-auto { --rc: #94a3b8; } .r-all { --rc: #64748b; } .r-none { --rc: var(--border-strong); }
.flow-loops { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; margin-top: 2px; }
.fl { position: relative; height: 24px; margin: 0 calc((100% - (var(--span) - 1) * 14px) / var(--span) / 2); border: 2px dashed var(--accent); border-top: 0; border-radius: 0 0 12px 12px; margin-bottom: 14px; }
.fl::before { content: ""; position: absolute; top: -7px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 8px solid var(--accent); }
.fl.back::before { left: -8px; } .fl.fwd::before { right: -8px; }
.fl span { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); max-width: 92%; padding: 0 8px; background: var(--surface-2); font-size: 12px; line-height: 1.35; color: var(--text-2); text-align: center; }
.doc .flow-plain { display: none; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-2); }

/* Walkthrough steps */
.doc h2.walk-title { display: flex; align-items: center; gap: 10px; }
.doc h2.walk-title::before { content: "Walkthrough"; order: -1; padding: 0 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 20px; }
.wstep { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 6px 0 22px; }
.wstep::before { content: ""; position: absolute; left: 16px; top: 44px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--border); }
.wstep + :not(.wstep) { margin-top: 0; }
.wnum { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 4px var(--surface); }
.wbody { min-width: 0; }
.doc .wbody > h3:first-child { margin: 4px 0 6px; font-size: 16px; }
.doc .wbody .shot { margin: 14px 0 4px; }
.doc .wbody pre { margin: 10px 0; }

/* Callouts */
.doc blockquote.tip, .doc blockquote.rule, .doc blockquote.warn, .doc blockquote.why { padding: 12px 18px; border-radius: 0 10px 10px 0; }
.doc blockquote.tip { border-left: 3px solid var(--ok); background: var(--ok-soft); }
.doc blockquote.rule { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.doc blockquote.warn { border-left: 3px solid var(--warn); background: var(--warn-soft); }
.doc blockquote.why { border-left: 3px solid var(--faint); background: var(--surface-2); }
.doc .callout-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.doc blockquote.tip .callout-title { color: var(--ok); } .doc blockquote.rule .callout-title, .doc blockquote.glance .callout-title { color: var(--accent-text); } .doc blockquote.warn .callout-title { color: var(--warn); }
.doc blockquote.glance ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

@media (max-width: 760px) {
  .doc .flow-steps { grid-template-columns: 1fr; gap: 12px; }
  .doc .flow-steps > li + li::after { left: 50%; top: -11px; transform: translate(-50%, 0) rotate(135deg); }
  .flow-loops { display: none; }
  .doc .flow-plain { display: grid; gap: 4px; }
  .guide-pager { grid-template-columns: 1fr; }
  .guide-pager a.next { grid-column: 1; }
  .wstep { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
  .wnum { width: 28px; height: 28px; font-size: 13px; }
  .wstep::before { left: 13px; top: 36px; }
}

/* ---------- New project (super admins: /setup) ---------- */
.setup-form .card-body { gap: 4px; }
.setup-part { border: 0; margin: 0; padding: 14px 0 16px; display: grid; gap: 12px; border-bottom: 1px solid var(--border); min-width: 0; }
.setup-part:last-child { border-bottom: 0; padding-bottom: 4px; }
.setup-part legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 2px; font-weight: 650; font-size: 14px; color: var(--text); float: left; width: 100%; }
.setup-part legend + * { clear: both; }
.setup-part > p { margin: -4px 0 0; }
.setup-part code { font-size: 12px; }
.setup-plan, .setup-left { margin: 0; padding: 12px 16px 14px 34px; display: grid; gap: 9px; font-size: 13px; }
.setup-plan li b { display: block; font-size: 13px; }
.setup-plan li span { color: var(--muted); font-size: 12.5px; }
.setup-left li { color: var(--text-2); }
.setup-past { list-style: none; margin: 0; padding: 6px; }
.setup-past a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.setup-past a:hover { background: var(--hover); text-decoration: none; }
.setup-past small { display: block; color: var(--muted); font-size: 12px; }
.setup-steps { list-style: none; margin: 0; padding: 8px 16px 12px; }
.setup-step { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.setup-step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 40px; bottom: -6px; width: 1.5px; background: var(--border); }
.setup-dot { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); }
.setup-dot .icon { width: 14px; height: 14px; }
.setup-step.done .setup-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-step.manual .setup-dot { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.setup-step.error .setup-dot { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.setup-step.current .setup-dot { border-color: var(--accent); color: var(--accent-text); }
.setup-step.running .setup-dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.setup-step.running .setup-dot .icon { opacity: 0; }
.setup-step-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setup-step p { margin: 2px 0 0; }
.setup-step.waiting b { color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.grow { flex: 1; min-width: 0; }

/* ---------- Help index: audiences side by side (one column per guide, up to four), drawn card illustrations ---------- */
.aud-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; margin-top: 18px; }
.aud-groups .aud-group { margin: 0; min-width: 0; }
.aud-group.span-1 { grid-column: span 1; --cols: 1; } .aud-group.span-2 { grid-column: span 2; --cols: 2; }
.aud-group.span-3 { grid-column: span 3; --cols: 3; } .aud-group.span-4 { grid-column: span 4; --cols: 4; }
.aud-group .help-cards { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.aud-group .aud-head p { min-height: 3em; }
.help-card.wide { grid-column: 1 / -1; flex-direction: row; }
.help-card.wide .help-thumb { flex: none; width: 38%; max-width: 360px; height: auto; min-height: 150px; border-bottom: 0; border-right: 1px solid var(--border); }
.help-card.wide .help-card-body { align-content: center; }
.aud-groups.filtered .aud-group { grid-column: 1 / -1; }
.aud-groups.filtered .help-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1180px) {
  .aud-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aud-group.span-3, .aud-group.span-4 { grid-column: 1 / -1; --cols: 2; }
}
@media (max-width: 720px) {
  .aud-groups { grid-template-columns: minmax(0, 1fr); }
  .aud-groups .aud-group { grid-column: auto; --cols: 1; }
  .aud-group .aud-head p { min-height: 0; }
  .help-card.wide { flex-direction: column; }
  .help-card.wide .help-thumb { width: auto; max-width: none; min-height: 0; height: 150px; border-right: 0; border-bottom: 1px solid var(--border); }
}
.help-thumb.art { display: block; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--ac) 20%, var(--surface-2)), var(--surface-2) 75%); }
.help-thumb.art svg { display: block; width: 100%; height: 100%; }
.help-card:hover .help-thumb.art svg { transform: scale(1.02); }
.help-thumb.art svg { transition: transform .2s; }
.th-card { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.th-card.hl { fill: color-mix(in srgb, var(--ac) 10%, var(--surface)); stroke: var(--ac); stroke-width: 1.5; }
.th-chip { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.th-chip.ac { fill: color-mix(in srgb, var(--ac) 18%, var(--surface)); stroke: var(--ac); }
.th-chip.ok { fill: color-mix(in srgb, var(--ok) 16%, var(--surface)); stroke: var(--ok); }
.th-chip.ko { fill: color-mix(in srgb, var(--danger) 16%, var(--surface)); stroke: var(--danger); }
.th-tx { fill: var(--text-2); font-size: 10px; font-weight: 600; }
.th-tx.left { text-anchor: start; }
.th-tx.strong { fill: var(--text); font-weight: 700; }
.th-sm { fill: var(--muted); font-size: 9px; font-weight: 500; }
.th-sm.strong { fill: var(--text-2); font-weight: 700; }
.th-big { fill: var(--ac); font-size: 13px; font-weight: 750; }
.th-key { fill: var(--ac); font-size: 11px; font-weight: 700; }
.th-bar { fill: var(--border-strong); }
.th-arrow { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.th-head { fill: var(--faint); }
.th-ok { fill: var(--ok); } .th-ko { fill: var(--danger); }
.th-mark { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.th-todo { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.th-dot { fill: var(--faint); } .th-dot.ac { fill: var(--ac); } .th-dot.ok { fill: var(--ok); } .th-dot.ko { fill: var(--danger); } .th-dot.warn { fill: var(--warn); }
.th-sun { fill: color-mix(in srgb, var(--ac) 16%, transparent); stroke: var(--ac); stroke-width: 1.5; }
.th-ray { stroke: var(--ac); stroke-width: 2; stroke-linecap: round; }
.th-git { fill: none; stroke: var(--faint); stroke-width: 2; }
.th-commit { fill: var(--surface); stroke: var(--text-2); stroke-width: 2; } .th-commit.ac { stroke: var(--ac); }
.th-block { fill: color-mix(in srgb, var(--ac) 45%, var(--surface)); } .th-block.soft { fill: var(--surface-3); }
.th-flag { fill: color-mix(in srgb, var(--ac) 30%, transparent); stroke: var(--ac); stroke-width: 1.8; stroke-linejoin: round; }
.th-side { fill: var(--surface-2); stroke: var(--border-strong); }
.th-sel { fill: color-mix(in srgb, var(--ac) 18%, transparent); }
.th-funnel { fill: color-mix(in srgb, var(--ac) 25%, transparent); stroke: var(--ac); stroke-width: 1.5; stroke-linejoin: round; }
.th-row { fill: var(--surface-3); }
.th-phone { fill: var(--ac); }
.th-pen { fill: color-mix(in srgb, var(--ac) 35%, var(--surface)); stroke: var(--ac); stroke-width: 1.5; stroke-linejoin: round; }
.th-dl { fill: none; stroke: var(--ac); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Help videos (lib/videos.js): a section on the index pages, and the guide's own videos above its text. */
.video-section { margin: 4px 0 26px; }
.video-title { font-size: 18px; margin: 0 0 4px; }
.video-lead { margin: 0 0 14px; max-width: 760px; }
.video-group { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 10px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.video-card { margin: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.video-card video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; background: #0b0c0e; }
.video-card figcaption { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.video-card figcaption b { font-size: 15px; color: var(--text); }
.video-card figcaption .muted { font-size: 13px; line-height: 1.45; }
.video-kind { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.video-section.in-guide { margin: 0 0 18px; }
.video-section.in-guide .side-title { margin: 0 0 8px; }

/* Inbox: the agent's proposals and what each one rests on */
.proposal.closed { opacity: .78; }
.evidence { border-top: 1px dashed var(--border); padding-top: 10px; display: grid; gap: 6px; }
.evidence .side-title { margin: 0; }
.ev-quote { margin: 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--border-strong); color: var(--text-2); font-size: 13px; }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.ev-row .icon { width: 14px; height: 14px; color: var(--muted); }
.doc-section-sm { margin: 8px 0; }
.doc-section-sm .side-title { margin: 0 0 2px; }
.source-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); font-size: 12.5px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.usage-grid div { display: grid; gap: 2px; }
.usage-grid b { font-size: 18px; }
.usage-grid span { font-size: 12.5px; color: var(--muted); }

/* Workflow structure: compact project header, one-menu Plane links, scannable proposals, client input from anywhere */
.capture-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 8px; padding: 7px 10px; font-weight: 600; }
.capture-btn kbd { margin-left: auto; background: transparent; color: inherit; opacity: .75; border-color: currentColor; }
.cockpit { padding: 10px 20px 0; }
.cockpit-top { gap: 8px 18px; }
.cockpit-id { flex: 1 1 260px; }
.cockpit-id .proj-mark { width: 30px; height: 30px; font-size: 12px; }
.cockpit-id h1 { font-size: 16px; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 5px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-sm); display: grid; gap: 1px; }
.menu-list a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.menu-list a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.menu-list .icon { width: 14px; height: 14px; color: var(--muted); }
.menu-list b { margin-left: auto; font-weight: 600; }
.menu-list b.danger { color: var(--danger); } .menu-list b.warn { color: var(--warn); } .menu-list b.info { color: var(--info); }
.step.done { padding-bottom: 12px; }
.step.done .step-body > p, .step.done .step-body > .card, .step.done .person-grid, .step.done .step-more { display: none; }
.step-more { margin-top: 10px; }
.step-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 2px 0 8px; }
.proposal-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.proposal-head::-webkit-details-marker { display: none; }
.proposal-chev { flex: none; width: 14px; height: 14px; color: var(--faint); transition: transform .12s; }
details.proposal[open] .proposal-chev { transform: rotate(90deg); }
.proposal-title { min-width: 0; flex: 1; display: grid; gap: 1px; }
.proposal-title b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proposal-title small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.proposal[open] .proposal-title b, details.proposal[open] .proposal-title small { white-space: normal; }
details.proposal > .card-body { border-top: 1px solid var(--border); }
.proposal-head .btn-row { flex: none; flex-wrap: nowrap; }
form + form > details.proposal, form > details.proposal { margin: 0; }
.stack > form { display: block; }
@media (max-width: 720px) {
  .proposal-head { flex-wrap: wrap; }
  .proposal-title { flex-basis: calc(100% - 70px); }
  .proposal-head .btn-row { margin-left: 24px; }
  .menu-list { right: auto; left: 0; }
}
details.later { border-top: 1px solid var(--border); }
details.later > summary { display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer; list-style: none; font-size: 13px; color: var(--muted); }
details.later > summary::-webkit-details-marker { display: none; }
details.later > summary:hover { color: var(--text-2); }
.later-chev { flex: none; width: 14px; height: 14px; transition: transform .12s; }
details.later[open] .later-chev { transform: rotate(90deg); }
/* Pages appear at once: no fade or growing bars on every navigation. */
.page { animation: none; }
.bar > span:not(.expected), .meter > span, .load-bar > span { animation: none; }

/* Acting on a ticket without leaving the page */
.act-btn { flex: none; padding: 2px 9px; font-size: 12px; font-weight: 500; background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 6px; }
.act-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.keylist li { display: flex; align-items: center; gap: 8px; }
.keylist li > a { min-width: 0; flex: 1; }
li.acted > a, li.acted .row-main { opacity: .45; }
.act-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.act-choice[hidden] { display: none; }
.act-choice input { position: absolute; opacity: 0; pointer-events: none; }
.act-choice span { display: inline-block; padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: 99px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.act-choice input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.act-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.field[hidden], .callout[hidden] { display: none; }

/* Phone: a bottom bar, one-line tabs, full-height forms */
.tabbar { display: none; }
.sheet-action { width: 100%; background: transparent; border: 0; text-align: left; cursor: pointer; }
@media (max-width: 900px) {
  .sidebar { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; }
  .sidebar .nav, .sidebar .capture-btn, .sidebar .side-foot { display: none; }
  .search-btn { margin-left: auto; width: 36px; height: 36px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .desk-only { display: none; }
  .main { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .header { flex-wrap: nowrap; min-height: 42px; padding: 6px 16px; }
  .crumbs a, .crumbs .sep, .crumb-sub { display: none; }
  .sync span:not(.dot) { display: none; }
  .savebar { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; padding: 2px; background: transparent; border: 0; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 500; }
  .tabbar .icon { width: 21px; height: 21px; }
  .tabbar .on { color: var(--accent-text); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .tabbar-add { color: #fff; background: var(--accent); margin: 2px 8px; font-weight: 600; }
  .sheet-body { display: grid; align-content: start; gap: 3px; }
  .sheet-body .nav { padding: 11px 8px; }
  .sheet-body .side-title { display: flex; margin-top: 12px; }
  .cockpit { padding: 10px 16px 0; }
  .cockpit-top { gap: 8px; }
  .cockpit-id { flex-basis: 100%; }
  .cockpit-progress { flex: 1; min-width: 0; }
  .cockpit-actions { margin-left: 0; }
  .row-meta { flex-wrap: wrap; }
  .act-btn { padding: 5px 11px; }
  #capture-dlg .dlg-head p, #capture-dlg .dlg-foot .grow, #capture-dlg .dlg-foot .ghost, #ticket-dlg .dlg-foot .grow { display: none; }
  #capture-dlg .dlg-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
  #capture-dlg .fields-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  #capture-dlg .field:has(textarea) { flex: 1; min-height: 170px; display: flex; flex-direction: column; }
  #capture-dlg textarea { flex: 1; font-size: 16px; }
  #capture-dlg input, #capture-dlg select, #ticket-dlg input, #ticket-dlg select, #ticket-dlg textarea { font-size: 16px; }
  #capture-dlg .hint { display: none; }
  #capture-dlg .dlg-foot button[type=submit] { width: 100%; justify-content: center; }
}
#ticket-dlg .dlg-body { align-content: start; }
.sheet-action { justify-content: flex-start; }
.cockpit-progress .small { white-space: nowrap; }

/* Project navigation: four sections, then the pages of the current one. */
.navgroups { display: flex; gap: 2px; margin-top: 8px; }
.navgroups a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 9px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.navgroups a .icon { width: 15px; height: 15px; }
.navgroups a:hover { color: var(--text); text-decoration: none; }
.navgroups a.on { color: var(--text); border-bottom-color: var(--accent); }
.navgroups a.on .icon { color: var(--accent-text); }
.group-dot { width: 6px; height: 6px; border-radius: 50%; }
.group-dot.danger { background: var(--danger); } .group-dot.warn { background: var(--warn); } .group-dot.info { background: var(--info); }
.subtabs { display: flex; gap: 4px; margin: 0 -20px; padding: 6px 20px; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.subtabs a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.subtabs a.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
@media (max-width: 900px) {
  .navgroups { justify-content: space-between; gap: 0; }
  .navgroups a { flex: 1; justify-content: center; padding: 8px 2px 9px; font-size: 13.5px; gap: 5px; }
  .navgroups a .icon { display: none; }
  .subtabs { margin: 0 -16px; padding: 6px 16px; }
  .subtabs a { padding: 6px 11px; }
}

/* Desktop: the sections as a compact switch, their pages as tabs on the same line. */
@media (min-width: 901px) {
  .cockpit-nav { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
  .navgroups { flex: none; margin: 0; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 8px; }
  .navgroups a { padding: 4px 11px; font-size: 13px; font-weight: 500; border: 0; border-radius: 6px; margin: 0; gap: 6px; }
  .navgroups a .icon { display: none; }
  .navgroups a.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
  .subtabs { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; gap: 2px; }
  .subtabs a { padding: 12px 10px 11px; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .subtabs a:hover { background: transparent; }
  .subtabs a.on { background: transparent; color: var(--text); border-bottom-color: var(--accent); }
}

.bulk-actions { flex-wrap: nowrap; justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 640px) {
  .page-head:has(.bulk-actions) { flex-direction: column; align-items: stretch; }
  .bulk-actions { flex-wrap: wrap; justify-content: flex-start; }
}
.q-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px; align-items: start; }
.q-row:hover { background: none; }
.q-text { display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.q-text a { font-size: 12px; }
.q-row form { margin: 0; }
