:root {
  /* ink: the night-shift sidebar; paper: the sage page; care green: the one accent */
  --ink: #16263a; --ink-2: #213650; --ink-text: #d7e1ea; --ink-muted: #8ea3b8;
  --bg: #eef2ee; --panel: #ffffff; --panel-2: #f6f8f5; --line: #d9e0d9; --line-strong: #c4cec4;
  --text: #182a26; --muted: #5a6b66;
  --accent: #2c6e5c; --accent-2: #235a4b; --accent-soft: #e2efe9;
  --danger: #b23a3a; --danger-soft: #f9e6e4; --warn: #9a6514; --warn-soft: #fbf0db;
  --ok: #2f7a43; --ok-soft: #e3f2e6; --info: #2f5d9b; --info-soft: #e6eef9; --pin: #b7791f;
  --radius: 14px; --radius-sm: 9px; --shadow: none; --lift: 0 12px 32px rgba(22,38,58,.16);
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --nav-w: 248px;
  /* product preview: its own cobalt identity, so it never reads as our internal workspace */
  --pv: #2d5fa8; --pv-ink: #1b3a6b; --pv-soft: #e5edf9; --pv-bg: #edf1f8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0c1724; --ink-2: #1a2b3e; --ink-text: #cfdae5; --ink-muted: #7f93a8;
    --bg: #121b19; --panel: #18231f; --panel-2: #1d2925; --line: #2a3833; --line-strong: #364740;
    --text: #e3ebe7; --muted: #95a8a1;
    --accent: #5fb89d; --accent-2: #7cc8b0; --accent-soft: #1d3a31;
    --danger: #f08a80; --danger-soft: #3b2220; --warn: #e8b35a; --warn-soft: #382c17;
    --ok: #82c995; --ok-soft: #1c3424; --info: #8fb4ea; --info-soft: #1c2a40; --pin: #e8b04b;
    --lift: 0 12px 32px rgba(0,0,0,.45);
    --pv: #7fa6e6; --pv-ink: #142a4d; --pv-soft: #1b2a44; --pv-bg: #131a26;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 10px; padding: 7px 14px; font-weight: 700; font-size: 14.5px; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
button.danger { color: var(--danger); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 10px; padding: 9px 12px; width: 100%; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 34px; font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.brand { font-family: var(--display); font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; font-size: 18px; }
.brand svg { width: 28px; height: 28px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Sign-in ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(280px, 42%) 1fr; }
.auth.hidden { display: none; }
/* Sign-in and welcome: a system map on the left (auth-art.js), a card on the right. */
.auth-side { position: relative; overflow: hidden; background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; justify-content: flex-end; padding: 48px;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px), radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%);
  background-size: 22px 22px, 100% 100%; border-right: 1px solid var(--line); }
.auth-art { position: absolute; left: 50%; top: 40%; width: min(92%, 640px); transform: translate(-50%, -50%); overflow: visible; }
.auth-copy { position: relative; }
.auth-mark { display: flex; align-items: center; gap: 10px; font: 600 15px var(--font-mono); letter-spacing: .02em; color: #fff; }
.auth-side .auth-logo { width: 34px; height: 34px; }
.auth-side p { font-family: var(--display); font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; margin: 16px 0 0; max-width: 12ch; color: #fff; }
.auth-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.auth-tags span { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 3px 8px; }
.aa-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 6; }
.aa-ring.spin { transform-origin: 300px 300px; animation: aa-spin 60s linear infinite; }
.aa-link { stroke: color-mix(in srgb, var(--accent) 30%, transparent); stroke-width: 1.2; }
.aa-pulse { stroke: var(--accent-2); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 14 400; stroke-dashoffset: 0; opacity: 0; animation: aa-pulse 3.6s ease-in infinite; }
.aa-node { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.aa-label { font: 500 13px var(--font-mono); fill: var(--ink-text); letter-spacing: .02em; }
.aa-person { fill: var(--panel); stroke: var(--line-strong); stroke-width: 1.5; }
.aa-icon, .aa-head { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.aa-icon { stroke: var(--accent-2); }
.aa-head { stroke: var(--ink-text); }
.aa-role { font: 600 11px var(--font-mono); fill: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }
.aa-core rect { fill: var(--accent); filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 55%, transparent)); }
.aa-core path { stroke: #0b0f14; stroke-width: 9; stroke-linecap: round; }
.aa-beat { fill: none; stroke: var(--accent); stroke-width: 2; transform-origin: 300px 300px; animation: aa-beat 2.8s ease-out infinite; }
@keyframes aa-spin { to { transform: rotate(360deg); } }
@keyframes aa-pulse { 0% { stroke-dashoffset: 0; opacity: 0; } 10% { opacity: 1; } 70% { opacity: 1; } 100% { stroke-dashoffset: -250; opacity: 0; } }
@keyframes aa-beat { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .aa-ring.spin, .aa-pulse, .aa-beat { animation: none; } .aa-pulse { opacity: 0; } }
.auth form { align-self: center; justify-self: center; width: calc(100% - 32px); max-width: 420px; display: grid; gap: 16px; padding: 36px 32px 28px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.7); }
.auth form .brand { display: none; }
.auth-head h1 { font-size: 28px; }
.auth-head p { margin: 6px 0 0; }
.auth label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 700; }
.auth input { padding: 12px 14px; font-size: 16px; }
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 70px; }
.pw-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 10px; font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; background: transparent; border: 0; color: var(--muted); }
.pw-show:hover { color: var(--text); background: var(--panel-2); }
.caps { margin: -8px 0 0; font-size: 13px; color: var(--warn); }
.auth .err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 0; }
.auth button.primary { padding: 13px; font-size: 16px; display: flex; justify-content: center; gap: 8px; }
.auth-foot { margin: 4px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Shell ---------- */
#app { height: 100%; display: grid; grid-template-columns: var(--nav-w) 1fr; }
nav#nav { background: var(--ink); color: var(--ink-text); overflow: auto; padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; font-family: var(--display); font-weight: 750; font-size: 19px; color: #fff; letter-spacing: -.02em; }
.nav-brand svg { width: 30px; height: 30px; }
.nav-sec { font-size: 13px; color: var(--ink-muted); font-weight: 700; padding: 16px 12px 6px; }
.nav-sec span { font-weight: 400; }
nav#nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--ink-text); text-decoration: none; font-size: 15px; }
nav#nav a:hover { background: var(--ink-2); color: #fff; }
nav#nav a[aria-current="page"] { background: var(--ink-2); color: #fff; font-weight: 700; }
nav#nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: #7cc8b0; }
nav#nav a svg.i { opacity: .85; }
.nav-foot { margin-top: auto; padding: 18px 12px 4px; border-top: 1px solid var(--ink-2); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; }
.nav-foot .who { color: #fff; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-foot button { color: var(--ink-text); font-size: 13.5px; padding: 4px 8px; }
.nav-foot button:hover { background: var(--ink-2); color: #fff; }
.nav-foot p { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--ink-muted); }
.main-col { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }
header.top { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
header.top .spacer { flex: 1; }
header.top .top-brand, #navToggle { display: none; }
button.ask { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 99px; padding: 7px 16px 7px 12px; }
button.ask:hover { background: var(--ink-2); border-color: var(--ink-2); }
main#view { overflow: auto; min-width: 0; }
.page { padding: 28px 32px 120px; max-width: 1240px; } /* the bottom clears the Note button */
.page.wide { max-width: 1440px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 66ch; font-size: 16.5px; }
.fict, .phi-safe, .local { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 99px; white-space: nowrap; }
.fict { color: var(--warn); background: var(--warn-soft); }
.phi-safe { color: var(--info); background: var(--info-soft); }
.local { color: var(--ok); background: var(--ok-soft); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .search { width: 220px; }
.toggle { display: inline-flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ptabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 4px 0 22px; }
.ptabs a { padding: 8px 0 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 16px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ptabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.ptabs a:hover { color: var(--text); }

/* ---------- Building blocks ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 20px; }
.card h3 + * { margin-top: 10px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 16px 18px; }
.stat .n { font-family: var(--display); font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.stat .l { font-size: 14px; color: var(--muted); margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6; }
.chip.red { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chip.amber { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.green { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.blue { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip.teal { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
button.chip { cursor: pointer; padding: 4px 12px; }
button.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { display: inline-flex; background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 5px 14px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 13.5px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--panel-2); }
.scroll-x { overflow-x: auto; }
.list { display: grid; gap: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; }
.empty { padding: 32px 16px; color: var(--muted); text-align: center; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 15px; font-weight: 700; z-index: 60; box-shadow: var(--lift); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check .box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; margin-top: 2px; }
.check .box.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.label { font-size: 13.5px; font-weight: 700; color: var(--muted); }

/* ---------- Workspace ---------- */
.ws { display: grid; grid-template-columns: 340px 1fr; height: 100%; min-height: 0; }
.ws aside { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.ws .tools { padding: 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.ws .drop { border: 2px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.ws .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
#list { overflow: auto; flex: 1; }
.irow { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 14px; background: transparent; }
.irow:hover { background: var(--bg); }
.irow[aria-current="true"] { background: var(--accent-soft); }
.irow .t { font-weight: 600; display: flex; gap: 6px; align-items: baseline; }
.irow .t .pin { color: var(--pin); }
.irow .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 13px; font-weight: 700; color: var(--accent); }
.ws footer.note { font-size: 12px; color: var(--muted); padding: 8px 14px; border-top: 1px solid var(--line); border-left: 0; }
.ws section.editor { overflow: auto; padding: 20px 24px 40px; }
.ed { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.ed input.title { font-size: 22px; font-weight: 700; border-color: transparent; background: transparent; padding-left: 0; }
.ed input.title:focus { border-color: var(--line); padding-left: 10px; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.fields label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pinlabel { display: flex !important; align-items: center; gap: 6px; padding-bottom: 8px; white-space: nowrap; }
.pinlabel input { width: auto; }
.ed textarea { min-height: 50vh; resize: vertical; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; line-height: 1.55; }
.preview { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 18px; min-height: 50vh; overflow-wrap: anywhere; }
.preview code { background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.preview pre { background: var(--bg); padding: 10px; border-radius: 6px; overflow: auto; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions .status { font-size: 13px; color: var(--muted); flex: 1; }
.actions select { width: auto; flex: 1; min-width: 150px; }
.placeholder { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; }
.back { display: none; }
.filecard { display: flex; gap: 10px; align-items: center; }
.filecard .ext { flex: none; width: 34px; height: 40px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.filecard .ext.link { background: var(--info-soft); color: var(--info); }

/* ---------- Product map ---------- */
.map-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); overflow: hidden; height: calc(100vh - 220px); min-height: 420px; touch-action: none; cursor: grab; }
.map-wrap.dragging { cursor: grabbing; }
.map-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.map-grid { display: grid; position: relative; }
.map-head { position: sticky; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.map-head .ph { color: var(--accent); font-size: 13px; font-family: var(--display); font-weight: 750; }
.map-lane { font-size: 12px; font-weight: 700; padding: 12px; border-right: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.map-cell { border-right: 1px dashed var(--line); border-bottom: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mcard { position: relative; z-index: 1; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: var(--shadow); width: 100%; }
.mcard:hover { border-color: var(--accent); }
.mcard[aria-pressed="true"] { outline: 2px solid var(--accent); }
.mcard .k { font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.mcard.s-idea { border-left-color: #9aa7ad; }
.mcard.s-specced { border-left-color: var(--info); }
.mcard.s-building { border-left-color: var(--warn); }
.mcard.s-done { border-left-color: var(--ok); }
.mcard.s-blocked { border-left-color: var(--danger); }
.mcard.dim { opacity: .3; }
svg.links { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
svg.links path { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .55; }
svg.links path.blocks { stroke: var(--danger); stroke-dasharray: 5 4; opacity: .8; }
svg.links path.hot { stroke: var(--accent); opacity: 1; stroke-width: 2.5; }
.map-ctrl { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; z-index: 3; }
.map-ctrl button { width: 36px; height: 36px; padding: 0; font-weight: 700; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.side { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.12); z-index: 30; overflow: auto; padding: 20px; display: grid; gap: 14px; align-content: start; }
.side .x { position: absolute; top: 12px; right: 12px; }

/* ---------- Product preview: the Agency Hub app ---------- */
/* The Hub's own palette. Inner components read the shared tokens, so overriding them here
   restyles every preview screen at once. */
.hx {
  --h-brand: #2d5fa8; --h-brand-soft: #e6eefa; --h-bg: #f4f6fa; --h-rail: #eef2f8;
  --panel: #ffffff; --panel-2: #f8f9fc; --line: #dde3ee; --line-strong: #c9d2e1; --text: #14213a; --muted: #5b6880;
  --accent: var(--h-brand); --accent-2: #234c88; --accent-soft: var(--h-brand-soft); --bg: var(--h-bg);
  --ok: #1f7a4c; --ok-soft: #e2f3ea; --warn: #a35f0f; --warn-soft: #fbefdc; --danger: #b8322f; --danger-soft: #fbe5e3;
  --info: var(--h-brand); --info-soft: var(--h-brand-soft); --display: var(--font);
  color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--lift);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hx {
    --h-brand: #7fa6e6; --h-brand-soft: #1d2b44; --h-bg: #111824; --h-rail: #0e1520;
    --panel: #172131; --panel-2: #1b2638; --line: #263347; --line-strong: #33425a; --text: #e3e9f3; --muted: #93a2b8;
    --accent-2: #a3c0ee; --ok: #7fcf9f; --ok-soft: #173326; --warn: #e9b463; --warn-soft: #362a15; --danger: #f08f86; --danger-soft: #3a2020;
  }
}
.hx h1, .hx h2, .hx h3 { font-family: var(--font); letter-spacing: -.01em; }
.hx-top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.hx-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; }
.hx-logo svg { width: 30px; height: 30px; }
.hx-agency { color: var(--muted); font-size: 14.5px; padding-left: 14px; border-left: 1px solid var(--line); }
.hx-agency i { font-style: normal; opacity: .7; }
.hx-sp { flex: 1; }
.hx-house { font-size: 14px; padding: 6px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; color: var(--text); }
.hx-me { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.hx-me b { display: block; font-size: 14.5px; }
.hx-me small { color: var(--muted); font-size: 12.5px; }
.hx-av { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.hx-body { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 640px; }
.hx.kiosk .hx-body { grid-template-columns: minmax(0, 1fr); }
.hx-rail { background: var(--h-rail); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.hx-rail a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.hx-rail a:hover { background: var(--panel); color: var(--text); }
.hx-rail a[aria-current="page"] { background: var(--panel); color: var(--h-brand); box-shadow: 0 1px 2px rgba(20,33,58,.08); }
.hx-main { background: var(--h-bg); padding: 26px 28px 32px; min-width: 0; }
.hx-foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 9px; border-top: 1px solid var(--line); background: var(--panel); }
.hx .card { border-radius: 14px; }
.hx-title { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.hx-title h2 { font-size: 26px; }
.hx-title p { margin: 4px 0 0; color: var(--muted); }
.hx-title .grow { flex: 1; min-width: 200px; }
/* house iPad */
.ipad { width: min(900px, 100%); margin: 0 auto; border: 14px solid #1b2026; border-radius: 36px; background: #1b2026; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.ipad .hx { border: 0; border-radius: 22px; box-shadow: none; }
.hx.on-ipad .hx-body { grid-template-columns: 76px minmax(0, 1fr); }
.hx.on-ipad.kiosk .hx-body { grid-template-columns: minmax(0, 1fr); }
.hx.on-ipad .hx-rail a { flex-direction: column; gap: 4px; font-size: 11.5px; padding: 10px 4px; text-align: center; }
.hx.on-ipad .hx-agency, .hx.on-ipad .hx-me span:last-child { display: none; }
.hx.on-ipad .hx-main { padding: 22px; font-size: 17px; }
/* page above the app */
.pv-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.pv-head > div:first-child { flex: 1; min-width: 260px; }
.pv-head p { margin: 8px 0 0; color: var(--muted); max-width: 70ch; }
.pv-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 1000px) {
  .hx-body { grid-template-columns: 70px minmax(0, 1fr); }
  .hx-rail a { flex-direction: column; gap: 4px; font-size: 11.5px; padding: 10px 4px; text-align: center; }
  .hx-agency { display: none; }
}
@media (max-width: 640px) {
  .hx-body, .hx.on-ipad .hx-body { grid-template-columns: minmax(0, 1fr); }
  .hx-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; }
  .hx-rail a { flex: 1; min-width: 64px; }
  .hx-me span:last-child { display: none; }
  .hx-main { padding: 18px 14px; }
  .ipad { border-width: 8px; border-radius: 22px; }
}


.lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lane { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; align-content: start; }
.lane h3 { display: flex; align-items: center; gap: 8px; }
.xcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.xcard.urgent { border-left: 4px solid var(--danger); }
.xcard.routine { border-left: 4px solid var(--warn); }
.xcard.done { opacity: .55; }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.clock.late { color: var(--danger); }
.teams { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.teams .th { padding: 8px 12px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.teams .tb { padding: 10px 12px; display: grid; gap: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.strip { display: flex; gap: 8px; flex-wrap: wrap; }
.strip .src { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ok); }
.dot.bad { background: var(--danger); }
.dot.warn { background: var(--warn); }
.cell-ok { color: var(--ok); }
.cell-bad { color: var(--danger); font-weight: 600; }
.cell-warn { color: var(--warn); font-weight: 600; }

/* DSP kiosk flow */
.steps { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.steps span { font-size: 11px; padding: 3px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.steps span.on { background: var(--accent); color: #fff; }
.steps span.done { background: var(--accent-soft); color: var(--accent); }
.kiosk { display: grid; gap: 14px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.person { padding: 14px; border-radius: 12px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; }
.pinpad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; }
.pinpad button { height: 56px; font-size: 20px; border-radius: 12px; }
.pindots { display: flex; gap: 12px; justify-content: center; margin: 6px 0 10px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.pindots i.f { background: var(--accent); border-color: var(--accent); }
.bigbtn { font-size: 17px; padding: 14px 18px; border-radius: 12px; }
.rec { width: 96px; height: 96px; border-radius: 50%; background: var(--danger); color: #fff; border: 0; font-size: 15px; font-weight: 700; justify-self: center; }
.rec.on { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179,38,30,.5); } 50% { box-shadow: 0 0 0 16px rgba(179,38,30,0); } }
.wave { display: flex; gap: 3px; align-items: center; justify-content: center; height: 40px; }
.wave i { width: 4px; border-radius: 2px; background: var(--accent); animation: wv 1s infinite ease-in-out; }
@keyframes wv { 0%, 100% { height: 6px; } 50% { height: 34px; } }
.flag { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.flag.red { border-color: var(--danger); background: var(--danger-soft); }
.goals { display: grid; gap: 6px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rec.on, .wave i, .spinner { animation: none; } }

/* Rate shield grid */
.shield td.c { text-align: center; }
.shield .day { font-size: 12px; color: var(--muted); }

/* System flow diagram (one SVG, themed from these vars) */
.fx-stories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-story { border-radius: 99px; padding: 8px 16px; font-weight: 600; }
.fx-story[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.fx-story.accent[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0b0f14; }
.fx-story.info[aria-pressed="true"] { background: var(--info); border-color: var(--info); color: #0b0f14; }
.fx-story.warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #0b0f14; }
.fx-fig { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.fx-scroll { overflow-x: auto; }
.fx-caption { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 15px; min-height: 50px; background: var(--panel-2); }
svg.fy { display: block; width: 100%; min-width: 820px; height: auto; font-family: inherit; }
.fy-col { font-size: 16px; font-weight: 700; font-family: var(--display); fill: var(--muted); }
.fy-card { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.fy-emoji { font-size: 22px; }
.fy-emoji.xl { font-size: 38px; }
.fy-name { font-size: 15px; font-weight: 700; fill: var(--text); }
.fy-name.lg { font-size: 17px; }
.fy-sub { font-size: 12.5px; fill: var(--muted); }
.fy-sub.lg { font-size: 14px; font-weight: 600; fill: var(--accent); }
.fy-app { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; }
.fy-appname { font-size: 30px; font-weight: 800; fill: var(--accent); letter-spacing: -.01em; }
.fy-tilebg { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.fy-avatar { fill: var(--panel); stroke: var(--info); stroke-width: 3; }
.fy-person { cursor: pointer; outline: none; }
.fy-person:hover .fy-avatar, .fy-person:focus-visible .fy-avatar { stroke: var(--accent); stroke-width: 4; }
.fy-tile { cursor: pointer; }
.fy-link { fill: none; stroke: var(--muted); stroke-width: 2.5; opacity: .35; }
.fy-link.out { stroke: var(--accent); opacity: .5; }
.fy-head { fill: var(--accent); }
svg.fy .fy-item, svg.fy .fy-link { transition: opacity .25s; }
svg.fy.focus .fy-item:not(.on), svg.fy.focus .fy-link:not(.on) { opacity: .12; }
svg.fy.focus .fy-link.on { opacity: 1; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 10 8; animation: fxflow 1s linear infinite; }
svg.fy.focus .fy-tile.on .fy-tilebg, svg.fy.focus .fy-sys.on .fy-card { stroke: var(--accent); stroke-width: 3; }
svg.fy.focus .fy-person.on .fy-avatar { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 4; }
@keyframes fxflow { to { stroke-dashoffset: -18; } }
@media (prefers-reduced-motion: reduce) { svg.fy.focus .fy-link.on { animation: none; } }
.fy-pcard { text-align: left; display: grid; gap: 4px; align-content: start; cursor: pointer; }
.fy-pcard[aria-pressed="true"] { border-color: var(--accent); outline: 2px solid var(--accent); }
.fy-pcard ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }

/* ---------- Team chat ---------- */
main#view.full { overflow: hidden; }
.nbadge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.chat { display: grid; grid-template-columns: 250px 1fr; height: 100%; min-height: 0; }
.chat-rail { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px; font-size: 13.5px; color: var(--muted); }
.rail-head button { padding: 0 8px; font-size: 16px; }
.rail-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.rail-item:hover { background: var(--bg); }
.rail-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail-item.bold { font-weight: 700; }
.rail-item .hash { color: var(--muted); width: 14px; text-align: center; }
.ubadge { margin-left: auto; background: var(--muted); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; }
.ubadge.men { background: var(--danger); }
.rail-foot { margin-top: auto; padding: 14px 8px 6px; display: grid; gap: 6px; }
.av { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.chat-main { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; min-width: 0; background: var(--panel); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-head .back { display: none; }
.chat-msgs { overflow-y: auto; padding: 10px 0 16px; }
.day { text-align: center; margin: 14px 0 6px; position: relative; }
.day::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; border-top: 1px solid var(--line); }
.day span { position: relative; background: var(--panel); padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.msg-row { position: relative; display: flex; gap: 10px; padding: 6px 16px 4px; }
.msg-row.grouped { padding-top: 1px; }
.msg-row.grouped .av { visibility: hidden; height: 0; }
.msg-row:hover { background: var(--panel-2); }
.msg-row.bot { background: color-mix(in srgb, #5b4bd6 6%, transparent); }
.mcol { min-width: 0; flex: 1; }
.mhead { display: flex; gap: 6px; align-items: baseline; }
.mbody { overflow-wrap: anywhere; line-height: 1.45; }
.mbody code { background: var(--bg); padding: 1px 4px; border-radius: 4px; font-size: 13px; }
.mention { background: var(--info-soft); color: var(--info); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.me { background: var(--warn-soft); color: var(--warn); }
.quote { display: block; border: 0; border-left: 3px solid var(--line); border-radius: 0; background: transparent; padding: 0 0 0 8px; margin: 2px 0 4px; font-size: 13px; color: var(--muted); text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.shot img { max-width: min(360px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.filechip, .pchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; text-decoration: none; color: var(--text); background: var(--panel); }
.pchip img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.react { padding: 1px 8px; border-radius: 99px; font-size: 13px; }
.react.mine { background: var(--accent-soft); border-color: var(--accent); }
.mtools { position: absolute; right: 14px; top: -14px; display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 2px; }
.mtools button { border: 0; background: transparent; padding: 3px 6px; font-size: 14px; }
.mtools button:hover { background: var(--bg); }
.msg-row:hover .mtools, .msg-row:focus-within .mtools { display: flex; }
.edit-box { width: 100%; }
.chat-compose { position: relative; border-top: 1px solid var(--line); padding: 10px 16px 8px; display: grid; gap: 6px; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { resize: none; max-height: 180px; line-height: 1.4; }
.attach { cursor: pointer; font-size: 20px; padding: 6px 4px; }
.replybar { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 4px 6px 4px 10px; display: flex; gap: 6px; align-items: center; }
.replybar button { margin-left: auto; }
.pend { display: flex; gap: 6px; flex-wrap: wrap; }
.pend:empty, #replyBar:empty { display: none; }
.hint { font-size: 11.5px; }
.mention-pop { position: absolute; bottom: 100%; left: 50px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; min-width: 240px; z-index: 5; }
.mention-pop button { display: flex; gap: 8px; align-items: center; border: 0; background: transparent; text-align: left; padding: 6px 8px; }
.mention-pop button[aria-selected="true"] { background: var(--accent-soft); }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; }
  .chat.open-ch .chat-rail { display: none; }
  .chat:not(.open-ch) .chat-main { display: none; }
  .chat-head .back { display: inline-block; }
  .hint { display: none; }
  .mtools { display: flex; position: static; box-shadow: none; border: 0; margin-left: auto; align-self: flex-start; }
  .msg-row:not(:hover):not(:focus-within) .mtools { display: none; }
}

/* ---------- Chat drawer ---------- */
#drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.14); z-index: 40; display: grid; grid-template-rows: auto auto 1fr auto; }
#drawer .dh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
#drawer .dh .sp { flex: 1; }
#drawer .dsub { padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
#drawer .msgs { overflow: auto; padding: 14px; display: grid; gap: 12px; align-content: start; }
.msg { max-width: 92%; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.msg.me { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--bg); border-bottom-left-radius: 4px; }
.msg .src { margin-top: 6px; font-size: 12px; color: var(--muted); }
.msg ul { margin: 6px 0; padding-left: 18px; }
.proposal { border: 1px solid var(--accent); border-radius: 10px; padding: 10px; background: var(--panel); margin-top: 8px; display: grid; gap: 8px; }
#drawer .suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 8px; }
#drawer .suggest button { font-size: 12px; padding: 4px 10px; border-radius: 99px; }
#drawer form { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }

/* ---------- Boards ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bcard { padding: 14px; display: grid; gap: 8px; align-content: start; }
.bcard ul { margin: 0; padding-left: 18px; font-size: 14px; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1px) {
  .dcgrid { grid-template-columns: 1fr !important; }
}
@media (max-width: 1000px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  #navToggle { display: inline-flex; padding: 6px; }
  header.top .top-brand { display: flex; font-size: 16px; }
  header.top .top-brand svg { width: 24px; height: 24px; }
  header.top { padding: 8px 12px; }
  nav#nav { position: fixed; top: 0; left: 0; bottom: 0; width: 272px; z-index: 45; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--lift); }
  nav#nav.open { transform: none; }
  .lanes, .cols-2 { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 48px; }
  h1 { font-size: 28px; }
  button.ask { padding: 6px 12px 6px 10px; }
}
@media (max-width: 760px) {
  .ws { grid-template-columns: 1fr; }
  .ws.editing aside { display: none; }
  .ws:not(.editing) section.editor { display: none; }
  .back { display: inline-block; }
  .fields { grid-template-columns: 1fr 1fr; }
  .ws section.editor { padding: 14px 16px 32px; }
  .cols-4, .cols-3 { grid-template-columns: 1fr 1fr; }
  .ipad { border-width: 8px; border-radius: 22px; }
  .pinpad { grid-template-columns: repeat(3, 64px); }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* phones: the map as a short banner above the card, without the words */
  .auth-side { height: 220px; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-art { top: 50%; width: 330px; }
  .aa-label, .aa-role { display: none; }
  .auth-copy { display: none; }
  .auth form { position: relative; z-index: 1; margin: -36px auto 24px; align-self: start; }
  .auth form .brand { display: flex; }
  .toolbar .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { nav#nav { transition: none; } }

/* ---------- Home ---------- */
.home-head { margin-bottom: 26px; }
.home-head h1 { font-size: 44px; letter-spacing: -.035em; }
.home-head p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.needs { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.needs h2 { color: #fff; }
.needs-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.needs-list a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 12px; color: inherit; text-decoration: none; }
.needs-list a:hover { background: var(--ink-2); }
.needs-list b { display: block; color: #fff; font-size: 16px; }
.needs-list .muted { color: var(--ink-muted); font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.needs-n { font-family: var(--display); font-size: 30px; font-weight: 750; text-align: center; color: var(--ink-muted); line-height: 1; }
.needs-n.hot { color: #7cc8b0; }
.needs-n.warn { color: #f0b860; }
.team-pulse { margin-bottom: 16px; }
.pulse-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.pulse-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ink-2); }
.pulse-list li:first-child { border-top: 0; }
.pulse-list .ow { width: 28px; height: 28px; font-size: 12px; }
.pulse-who b { display: block; color: #fff; }
.pulse-who > span { display: block; }
.pulse-list .warn { color: #f0b860; }
.pulse-tasks { text-align: right; }
@media (max-width: 560px) { .pulse-list li { grid-template-columns: 28px minmax(0, 1fr); } .pulse-tasks { grid-column: 2; text-align: left; } }
.plain-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list a { font-weight: 700; text-decoration: none; color: var(--text); }
.plain-list a:hover { color: var(--accent); }
.phases-card { margin-bottom: 16px; }
.phase-track { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.phase-track li { display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 3px solid var(--line-strong); position: relative; }
.phase-track li.blocked { border-top-color: var(--danger); }
.ph-num { font-family: var(--display); font-size: 26px; font-weight: 750; color: var(--accent); line-height: 1; }
.phase-track li.blocked .ph-num { color: var(--danger); }
.phase-track b { font-size: 15px; line-height: 1.25; }
.ph-bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; }
.ph-bar i { display: block; height: 100%; background: var(--ok); }
a.tile-link { text-decoration: none; color: inherit; display: grid; gap: 6px; }
a.tile-link:hover { border-color: var(--accent); }
a.tile-link h3 { color: var(--accent); }
a.tile-link p { margin: 0; }
@media (max-width: 1000px) { .phase-track { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; } }
@media (max-width: 760px) { .home-grid { grid-template-columns: minmax(0, 1fr); } .phase-track { grid-template-columns: 1fr 1fr; } .home-head h1 { font-size: 34px; } }

/* ---------- Workspace vs product preview ---------- */
.nav-preview { margin-top: 18px; padding: 8px; border-radius: 14px; background: color-mix(in srgb, #7fa6e6 12%, transparent); border: 1px dashed color-mix(in srgb, #7fa6e6 50%, transparent); display: grid; gap: 2px; }
.nav-preview-head { display: flex; gap: 10px; align-items: flex-start; padding: 6px 6px 10px; color: #a9c3ee; font-size: 12.5px; line-height: 1.35; }
.nav-preview-head b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 2px; }
.nav-preview-head svg.i { margin-top: 2px; color: #a9c3ee; }
nav#nav .nav-preview a:hover, nav#nav .nav-preview a[aria-current="page"] { background: color-mix(in srgb, #7fa6e6 22%, transparent); }
nav#nav .nav-preview a[aria-current="page"]::before { left: -8px; background: #a9c3ee; }
.preview-band { display: none; align-items: center; gap: 10px; padding: 9px 20px; background: #2d5fa8; color: #fff; font-size: 14.5px; }
.preview-band a { margin-left: auto; color: #fff; font-weight: 700; white-space: nowrap; }
.preview-band svg.i { flex: none; }
body.previewing .preview-band { display: flex; }
body.previewing main#view, body.previewing header.top { background: var(--pv-bg); }
body.previewing .hub-top { background: var(--pv-ink); }
body.previewing .fict { color: var(--pv); background: var(--pv-soft); }
body.previewing h1 { color: var(--pv-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.previewing h1 { color: var(--text); } }
@media (max-width: 760px) { .preview-band { flex-wrap: wrap; padding: 8px 14px; font-size: 14px; } .preview-band a { margin-left: 30px; } }
a.preview-link { border-color: color-mix(in srgb, var(--pv) 40%, var(--line)); background: color-mix(in srgb, var(--pv-soft) 55%, var(--panel)); } a.preview-link h3 { color: var(--pv); } a.preview-link .fict { justify-self: start; color: var(--pv); background: var(--pv-soft); }
.chip.pv { background: var(--pv-soft); color: var(--pv); border-color: transparent; }
.ask-short { display: none; }
@media (max-width: 760px) {
  .band-long, .ask-label { display: none; }
  .ask-short { display: inline; }
  .preview-band { flex-wrap: nowrap; }
  .preview-band a { margin-left: auto; }
}

/* ---------- Preview: Today (DC dashboard) ---------- */
.triage { padding: 16px 18px; margin-bottom: 18px; }
.tri-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 3px; background: var(--panel-2); }
.tri-bar i { display: block; min-width: 0; }
.tri-bar .u { background: var(--danger); } .tri-bar .r { background: var(--warn); } .tri-bar .d { background: var(--ok); }
.tri-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.tri-stats b { display: block; font-size: 30px; line-height: 1; font-weight: 700; }
.tri-stats b.u { color: var(--danger); } .tri-stats b.r { color: var(--warn); } .tri-stats b.d { color: var(--ok); }
.tri-stats span { color: var(--muted); font-size: 14px; }
.dc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.dc-lane h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 18px; }
.dc-lane h3 .muted { font-weight: 400; font-size: 14.5px; }
.flag-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; position: relative; }
.flag-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--warn); }
.flag-card.urgent::before { background: var(--danger); }
.flag-card.done { opacity: .62; }
.flag-card.done::before { background: var(--ok); }
.flag-card header { display: flex; align-items: flex-start; gap: 10px; }
.flag-card h4 { margin: 0; font-size: 16.5px; flex: 1; line-height: 1.3; }
.flag-card .house { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 7px; background: var(--h-brand-soft); color: var(--h-brand); }
.flag-card p { margin: 0; font-size: 14.5px; color: var(--text); }
.clockline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.clockbar { flex: 1; height: 6px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.clockbar i { display: block; height: 100%; background: var(--ok); }
.clockline.close .clockbar i { background: var(--warn); } .clockline.close { color: var(--warn); }
.clockline.late .clockbar i { background: var(--danger); } .clockline.late { color: var(--danger); }
.flag-card footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag-card footer .sp { flex: 1; }
.flag-card footer select { width: auto; padding: 6px 10px; font-size: 14px; font-weight: 700; }
.owner { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.owner.none { color: var(--danger); }
.hx-av.sm { width: 24px; height: 24px; font-size: 10.5px; }
.decided { font-weight: 700; color: var(--ok); font-size: 14.5px; }
.flag-card .src { font-size: 12.5px; color: var(--muted); }
.teams-msg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tm-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #464eb8; color: #fff; font-weight: 700; font-size: 14px; }
.tm-head .chip { font-size: 12px; }
.tm-post { display: flex; gap: 10px; padding: 14px; font-size: 14.5px; }
.tm-av { width: 32px; height: 32px; border-radius: 8px; background: var(--h-brand); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.tm-body p { margin: 6px 0; } .tm-body ul { margin: 6px 0; padding-left: 18px; }
/* Preview screens respond to the app window, not the browser window. */
.hx-main { container-type: inline-size; }
@container (max-width: 1080px) { .dc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dc-side { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; } .dc-side .note { margin-top: 0 !important; } }
@container (max-width: 640px) { .dc-grid, .dc-side { grid-template-columns: minmax(0, 1fr); } .tri-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Preview: Shifts (reconciliation) ---------- */
.sources { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.src-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.src-pill small { font-weight: 400; color: var(--muted); }
.src-pill.bad { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.src-pill.bad small { color: var(--danger); }
.guard { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
.lights-legend { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 6px 0 12px; }
.lights-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lights-legend .toggle { margin-left: auto; color: var(--text); }
.lt { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; flex: none; color: #fff; }
.lights-legend .lt { width: 20px; height: 20px; font-size: 11px; }
.lt.ok { background: var(--ok); } .lt.warn { background: var(--warn); } .lt.bad { background: var(--danger); }
.shift-list { display: grid; gap: 8px; }
.shift { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2.4fr) minmax(170px, 1.3fr); gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.shift.issue { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.shift .who b { display: block; }
.lts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; }
.lt-cell { display: flex; gap: 9px; align-items: center; min-width: 0; font-size: 14px; }
.lt-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-cell small { display: block; color: var(--muted); font-size: 12px; }
.verdict { display: grid; gap: 4px; justify-items: start; }
.chip .cnt, button.chip .cnt { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
@container (max-width: 760px) {
  .shift { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lights-legend .toggle { margin-left: 0; }
}
@container (max-width: 460px) { .lts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Preview: Billing (Rate Shield) ---------- */
.rs-legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.rs-legend .sp { flex: 1; }
.rs-legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw.ok { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.sw.hold { background: var(--danger); } .sw.dec { background: var(--h-brand); }
.rs-cal { padding: 10px 14px 14px; overflow-x: auto; }
.rs-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(5, minmax(92px, 1fr)); gap: 8px; align-items: stretch; margin-top: 8px; min-width: 640px; }
.rs-headrow { margin-top: 0; }
.rs-day { text-align: center; font-size: 13.5px; } .rs-day b { display: block; } .rs-day span { color: var(--muted); font-size: 12.5px; }
.rs-name { display: flex; align-items: center; font-weight: 700; font-size: 14.5px; }
.rs-cell { border-radius: 11px; padding: 8px; display: grid; gap: 4px; justify-items: center; text-align: center; border: 1px solid transparent; font: inherit; }
.rs-cell.ok { background: var(--ok-soft); color: var(--ok); }
.rs-cell.hold { background: var(--danger); color: #fff; cursor: pointer; }
.rs-cell.dec { background: var(--h-brand); color: #fff; cursor: pointer; }
.rs-cell.sel { outline: 3px solid color-mix(in srgb, var(--text) 35%, transparent); outline-offset: 2px; }
.rs-state { font-weight: 700; font-size: 14px; }
.rs-marks { display: flex; gap: 3px; font-size: 13px; }
.rs-marks span.miss { opacity: 1; filter: none; text-decoration: line-through; }
.rs-cell.ok .rs-marks span { opacity: .55; }
.rs-detail { margin-top: 14px; padding: 18px; display: grid; gap: 12px; }
.rs-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rs-why li.miss { color: var(--danger); }

/* ---------- Preview: house iPad kiosk (DSP notes) ---------- */
.hx .steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 auto 22px; max-width: 760px; }
.hx .steps span { background: none; padding: 8px 0 0; border-top: 5px solid var(--line); border-radius: 0; font-size: 12px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx .steps span.done { border-top-color: color-mix(in srgb, var(--h-brand) 55%, transparent); color: var(--muted); background: none; }
.hx .steps span.on { border-top-color: var(--h-brand); color: var(--text); font-weight: 700; background: none; }
.hx .kiosk { max-width: 760px; margin: 0 auto; gap: 18px; font-size: 17px; }
.hx .kiosk h2 { font-size: 26px; }
.hx .people { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.hx .person { padding: 24px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); gap: 8px; font-size: 17px; }
.hx .person:hover { border-color: var(--h-brand); box-shadow: 0 0 0 3px var(--h-brand-soft); }
.hx .person .avatar { width: 68px; height: 68px; font-size: 22px; }
.hx .pinpad { grid-template-columns: repeat(3, 88px); gap: 12px; }
.hx .pinpad button { height: 68px; font-size: 26px; border-radius: 16px; background: var(--panel); }
.hx .pindots i { width: 18px; height: 18px; }
.hx .pindots i.f { background: var(--h-brand); border-color: var(--h-brand); }
.hx .rec { width: 128px; height: 128px; font-size: 17px; box-shadow: 0 8px 24px color-mix(in srgb, var(--danger) 35%, transparent); }
.hx .bigbtn { font-size: 18px; padding: 14px 22px; border-radius: 14px; }
.hx .flag { border-radius: 14px; padding: 14px 16px; }
.hx .kiosk textarea { font-size: 17px; line-height: 1.55; border-radius: 14px; padding: 14px; }
@container (max-width: 560px) { .hx .steps span { font-size: 0; } .hx .pinpad { grid-template-columns: repeat(3, 72px); } }

/* ---------- Sticky notes ---------- */
main#view { position: relative; }
.sticky-layer { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; z-index: 20; }
.sticky-layer > * { pointer-events: auto; }
.sticky-pin { position: absolute; width: 38px; height: 38px; padding: 0; border-radius: 10px 10px 10px 3px; background: #ffd95a; border: 1px solid #e3b92c; color: #4a3a00; font-weight: 700; font-size: 13px; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(80,60,0,.28); transform: translate(-50%, -100%) rotate(-3deg); transition: transform .12s; }
.sticky-pin:hover, .sticky-pin.active { transform: translate(-50%, -100%) rotate(0) scale(1.08); border-color: #b88a00; }
.sticky-pin small { position: absolute; right: -7px; bottom: -7px; background: #4a3a00; color: #ffd95a; border-radius: 99px; font-size: 10.5px; padding: 0 5px; line-height: 1.6; }
.sticky-pin.unread::after { content: ""; position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); border: 2px solid var(--panel); }
.sticky-pin.resolved { background: #e7e3d2; border-color: #c9c3a8; color: #6f6a55; opacity: .85; }
.sticky-pin.draft { pointer-events: none; }
.sticky-pin.flash { animation: stickyflash 1s ease 2; }
@keyframes stickyflash { 50% { box-shadow: 0 0 0 10px rgba(255,217,90,.55); } }
.sticky-pop { position: absolute; width: 320px; max-width: calc(100vw - 32px); background: #fff8d6; color: #2c2510; border: 1px solid #e8cf6a; border-radius: 14px; box-shadow: 0 16px 40px rgba(60,45,0,.28); padding: 14px; display: grid; gap: 10px; transform: translateY(-50%); font-size: 15px; }
.sticky-pop header { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.sticky-pop header b { display: block; }
.sticky-pop .sp { flex: 1; }
.sticky-pop .muted { color: #7a6c3c; }
.sticky-av { width: 30px; height: 30px; border-radius: 50%; background: #4a3a00; color: #ffd95a; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.sticky-text { overflow-wrap: anywhere; font-size: 16px; min-width: 0; flex: 1; }
/* Markdown in a sticky (md() output): plain text reads as before, one paragraph per line */
.md p { margin: 0 0 .3em; }
.md > :last-child { margin-bottom: 0; }
.md ul, .md ol { margin: .2em 0 .45em; padding-left: 1.3em; }
.md li { margin: .1em 0; }
.md h2, .md h3, .md h4, .md h5 { font-family: var(--display); font-size: 1.08em; line-height: 1.25; margin: .45em 0 .2em; }
.md > h2:first-child, .md > h3:first-child { margin-top: 0; }
.md code { background: rgba(74,58,0,.1); padding: 0 4px; border-radius: 4px; font-size: .92em; }
.md pre { background: rgba(74,58,0,.08); padding: 8px; border-radius: 6px; overflow: auto; }
.sticky-body { display: flex; gap: 6px; align-items: flex-start; }
.sticky-pop .edit-text { flex: none; padding: 2px 8px; font-size: 13px; color: #6b5a20; }
.edit-box { display: grid; gap: 6px; }
.md-editor { display: grid; gap: 4px; }
.md-bar { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.md-bar .sp { flex: 1; }
.sticky-pop .md-tool { min-width: 30px; padding: 2px 7px; font-size: 13.5px; line-height: 1.5; border-radius: 7px; }
.sticky-pop .md-tool:disabled { opacity: .4; cursor: default; }
.sticky-pop .md-mode button { padding: 2px 10px; font-size: 13px; }
.md-editor textarea { min-height: 84px; }
.md-preview { background: #fffdf0; border: 1px dashed #e3cd78; border-radius: 10px; padding: 8px 12px; min-height: 84px; font-size: 15.5px; overflow-wrap: anywhere; }
/* attachments */
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.att-list li { position: relative; }
.att-img a { display: block; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(122,96,0,.3); background: #fffdf0; }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; background: #fffdf0; border: 1px solid #e3cd78; border-radius: 9px; padding: 3px 6px 3px 9px; font-size: 13.5px; }
.att-file a { color: #4a3a00; text-decoration: none; display: inline-flex; gap: 4px; align-items: baseline; min-width: 0; }
.att-file a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.att-file small { color: #7a6c3c; }
.att-file.pending img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
.att-file .spinner { width: 14px; height: 14px; border-width: 2px; }
.sticky-pop .att-rm { padding: 0 6px; line-height: 1.5; font-size: 12px; border-radius: 99px; }
.att-img .att-rm { position: absolute; top: -6px; right: -6px; background: #4a3a00; color: #ffd95a; border-color: #4a3a00; }
.sticky-pop .att-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 13.5px; }
.att-btn svg.i { width: 16px; height: 16px; }
.sticky-pop.drop-over { outline: 3px dashed #b88a00; outline-offset: -6px; }
.sticky-pop .actions { flex-wrap: wrap; row-gap: 6px; }
.sticky-resolved { font-weight: 700; color: #2f7a43; font-size: 14px; }
.sticky-replies { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed #e0c55f; display: grid; gap: 8px; max-height: 220px; overflow: auto; font-size: 14.5px; }
.sticky-replies div { white-space: pre-wrap; overflow-wrap: anywhere; }
.sticky-replies .reply-del { float: right; padding: 0 6px; opacity: .5; }
.sticky-replies li:hover .reply-del, .sticky-replies .reply-del:focus-visible { opacity: 1; }
.sticky-reply { display: flex; gap: 6px; align-items: flex-end; }
.sticky-pop textarea { background: #fffdf0; border-color: #e3cd78; color: #2c2510; resize: vertical; min-height: 40px; }
.sticky-pop textarea:focus { border-color: #b88a00; box-shadow: 0 0 0 3px rgba(184,138,0,.2); }
.sticky-pop button { background: #fffdf0; border-color: #e3cd78; color: #2c2510; }
.sticky-pop button.primary { background: #4a3a00; border-color: #4a3a00; color: #ffd95a; }
.sticky-pop button.ghost { background: transparent; border-color: transparent; }
.sticky-pop button.danger { color: #b23a3a; }
.sticky-pop a { color: #6b5200; }
.sticky-pop .actions { display: flex; gap: 6px; align-items: center; }
.sticky-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fab-main { display: inline-flex; align-items: center; gap: 8px; background: #ffd95a; border: 1px solid #e3b92c; color: #4a3a00; border-radius: 99px; padding: 10px 18px 10px 14px; font-size: 15px; box-shadow: 0 8px 22px rgba(80,60,0,.3); }
.fab-main:hover { background: #ffcf33; border-color: #b88a00; }
.fab-toggle { font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; display: inline-flex; gap: 5px; align-items: center; color: var(--muted); box-shadow: var(--lift); }
body.placing-note main#view, body.placing-note main#view * { cursor: crosshair !important; }
body.placing-note .fab-main { background: #4a3a00; color: #ffd95a; }
body.placing-note main#view { outline: 3px dashed #e3b92c; outline-offset: -3px; }
/* dashboard */
.sticky-list { display: grid; gap: 12px; }
.sticky-card { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid #ffd95a; border-radius: 14px; padding: 16px 18px; }
.sticky-card.unread { border-left-color: #f0b400; box-shadow: 0 0 0 1px #f0b400 inset; }
.sticky-card.resolved { border-left-color: var(--line-strong); opacity: .75; }
.sc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sticky-card p { margin: 6px 0 8px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sticky-card .sc-text { margin: 6px 0 8px; font-size: 16px; overflow-wrap: anywhere; }
.sticky-card .md code, .sticky-card .md pre { background: var(--panel-2); }
.sc-last { font-size: 14.5px; padding: 8px 10px; background: var(--panel-2); border-radius: 9px; overflow-wrap: anywhere; }
.sc-side { display: grid; align-content: start; gap: 2px; justify-items: start; }
.sc-go { margin-top: 10px; font-weight: 700; text-decoration: none; padding: 7px 14px; border-radius: 10px; background: var(--accent); color: #fff; }
.sc-go:hover { background: var(--accent-2); }
@media (max-width: 760px) {
  .sticky-card { grid-template-columns: minmax(0, 1fr); }
  .sticky-fab { right: 14px; bottom: 14px; }
  .sticky-pop { transform: none; }
}
#app.hidden ~ .sticky-fab { display: none; }

/* ---------- tasks: a sticky with owners, a due date, a checklist ---------- */
/* Task pins are square with a checkbox; red when overdue. */
.sticky-pin.task { border-radius: 8px; background: #fff3b8; border-color: #c9a227; color: #4a3a00; transform: translate(-50%, -100%); }
.sticky-pin.task:hover, .sticky-pin.task.active { transform: translate(-50%, -100%) scale(1.08); }
.sticky-pin .pin-box { width: 22px; height: 22px; fill: #fffdf0; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sticky-pin .pin-box path { fill: none; stroke-width: 2.4; }
.sticky-pin.task.overdue { background: #c53b3b; border-color: #9c2626; color: #fff; box-shadow: 0 4px 12px rgba(120,20,20,.35); }
.sticky-pin.task.overdue .pin-box { fill: #c53b3b; }
.sticky-pin.task.overdue small { background: #fff; color: #9c2626; }
.sticky-pin.task.done { background: #e7e3d2; border-color: #c9c3a8; color: #2f7a43; opacity: .85; }
.sticky-pop.is-task { width: 350px; }
.sticky-pop .seg { background: rgba(74,58,0,.1); }
.sticky-pop .seg button { background: transparent; border: 0; color: #6b5a20; }
.sticky-pop .seg button[aria-pressed="true"] { background: #fffdf0; color: #2c2510; box-shadow: 0 1px 2px rgba(60,45,0,.15); }
.kind-seg { justify-self: start; }
.sticky-pop input:not([type=checkbox]) { background: #fffdf0; border-color: #e3cd78; color: #2c2510; color-scheme: light; padding: 6px 10px; }
.sticky-pop input:focus { border-color: #b88a00; box-shadow: 0 0 0 3px rgba(184,138,0,.2); }
.sticky-pop input[type=checkbox] { accent-color: #4a3a00; width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.task-fields { display: grid; gap: 8px; }
.tf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tf-col { display: grid; gap: 4px; }
.tf-l { font-size: 13.5px; font-weight: 700; color: #7a6c3c; min-width: 52px; }
.tf-row input[type=date] { width: auto; }
.owner-togs { display: flex; gap: 6px; flex-wrap: wrap; }
.sticky-pop .owner-tog { border-radius: 99px; padding: 4px 12px; font-size: 13.5px; }
.sticky-pop .owner-tog[aria-pressed="true"] { background: #4a3a00; border-color: #4a3a00; color: #ffd95a; }
.sticky-pop .owner-tog[aria-pressed="true"]::before { content: "✓ "; }
.due-tag { font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.due-tag.soon { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.due-tag.overdue { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.sticky-pop .due-tag.soon { background: #fbe7b0; color: #7a4f00; }
.sticky-pop .due-tag.overdue { background: #c53b3b; color: #fff; }
.checklist { border-top: 1px dashed #e0c55f; padding-top: 8px; display: grid; gap: 6px; }
.cl-head { display: flex; gap: 8px; align-items: baseline; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: flex-start; gap: 6px; }
.checklist li label { display: flex; gap: 8px; align-items: flex-start; flex: 1; cursor: pointer; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; padding: 3px 0; }
.checklist li.done label span { text-decoration: line-through; color: #7a6c3c; }
.checklist li .small { padding-top: 4px; }
.checklist li button { padding: 2px 6px; opacity: .55; }
.checklist li button:hover, .checklist li button:focus-visible { opacity: 1; }
.cl-add { display: flex; gap: 6px; }
.sticky-veil { position: fixed; inset: 0; z-index: 55; background: rgba(10, 20, 30, .45); display: grid; place-items: center; padding: 16px; }
.sticky-pop.in-dialog { position: static; transform: none; width: min(460px, 100%); max-width: 100%; max-height: 88vh; overflow: auto; }
.sticky-pop.in-dialog .sticky-replies { max-height: none; }
.toast a { color: #ffd95a; }

/* Tasks & notes page */
.add-task { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; font-size: 15.5px; }
.add-task span { font-size: 20px; line-height: 1; }
.new-task .nt-text { font-size: 17px; min-height: 84px; }
.new-task .checklist li { align-items: center; }
.new-task .cl-dot { color: #7a6c3c; }
.new-task .cl-t { flex: 1; font-size: 14.5px; overflow-wrap: anywhere; }
.tasks-page .toolbar { flex-wrap: wrap; row-gap: 8px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bcol { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; min-height: 160px; transition: border-color .12s, background .12s; }
.bcol.over { border-color: var(--accent); background: var(--accent-soft); }
.bcol h2 { font-size: 16px; margin: 0; display: flex; gap: 8px; align-items: baseline; }
.owners { display: inline-flex; gap: 3px; }
.ow { width: 24px; height: 24px; border-radius: 50%; background: #4a3a00; color: #ffd95a; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.bcards { list-style: none; margin: 0; padding: 6px 2px 2px; display: grid; gap: 18px; }
.bempty { color: var(--muted); font-size: 14px; padding: 10px 4px; }
/* Board cards are sticky notes: a square of yellow paper, handwritten, a slight tilt, a red tack at the
   top and a lifted bottom-right corner. The whole note opens the task. Same paper in dark mode, like the pins. */
.tcard {
  --muted: #7a6c3c; --line: rgba(122,96,0,.22); --text: #2c2510; --paper: #ffe66e; --paper-top: #fff3a6;
  position: relative; min-height: 170px; background: linear-gradient(175deg, var(--paper-top) 0%, var(--paper) 60%, color-mix(in srgb, var(--paper) 88%, #b08a00) 100%); color: #2c2510;
  border: 0; border-radius: 2px; padding: 24px 16px 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(80,60,0,.18), 0 10px 16px -8px rgba(0,0,0,.55); transform: rotate(-1.4deg); transition: transform .14s, box-shadow .14s;
}
.bcards > .tcard:nth-child(even) { transform: rotate(1.2deg); --paper: #ffd96b; --paper-top: #ffeda0; }
.bcards > .tcard:nth-child(3n) { transform: rotate(-.5deg); --paper: #fff07a; --paper-top: #fff8b8; }
.bcards > .tcard:hover, .bcards > .tcard:focus-within { transform: rotate(0) translateY(-3px) scale(1.01); box-shadow: 0 1px 1px rgba(80,60,0,.18), 0 18px 26px -10px rgba(0,0,0,.6); }
/* the tack: a round head with a highlight, and its shadow on the paper */
.tcard::before { content: ""; position: absolute; top: -7px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #ff8a80 0 18%, #e53935 40%, #9e1c1c 100%); box-shadow: 1px 3px 3px rgba(60,20,0,.4); }
/* the lifted corner: a fold of paper, darker underneath */
.tcard::after { content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 0 0 2px 0;
  background: linear-gradient(315deg, var(--panel-2) 0 50%, color-mix(in srgb, var(--paper) 70%, #8a6a00) 50% 100%); box-shadow: -2px -2px 3px rgba(80,60,0,.18); }
.tcard.dragging { opacity: .5; }
.tcard.unread { box-shadow: 0 0 0 2px #e0a800, 0 10px 16px -8px rgba(0,0,0,.55); }
.tcard.due-overdue { --paper: #ffbfa8; --paper-top: #ffdccf; --muted: #8a3b2a; --line: rgba(150,40,20,.2); }
.tcard.done { --paper: #e8e1b8; --paper-top: #f5f0d4; }
.tcard.done::before { background: radial-gradient(circle at 35% 30%, #b9e3c4 0 18%, #3f9a5a 40%, #1f5e33 100%); }
.tcard.done .tc-text { text-decoration: line-through; color: var(--muted); }
.tc-main { all: unset; cursor: pointer; display: block; border-radius: 4px; }
.tc-main:focus-visible { outline: 3px solid rgba(74,58,0,.55); outline-offset: 2px; }
.tc-text { font: 700 21px/1.2 "Kalam", "Segoe Print", "Comic Sans MS", cursive; overflow-wrap: anywhere; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: auto; }
.tcard .small, .tcard .chip { font-family: var(--font); }
.tcard .ow { background: #2c2510; color: #ffe66e; border-radius: 50%; font-family: var(--font); }
.tcard .due-tag { background: rgba(255,255,255,.55); border-color: transparent; color: #5c4d1a; }
.tcard .due-tag.soon { background: #4a3a00; color: #ffd95a; }
.tcard .due-tag.overdue { background: #c53b3b; color: #fff; }
/* chips on paper look like ink stamps, not app badges */
.tcard .chip { background: transparent; border: 1.5px solid currentColor; border-radius: 3px; padding: 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; transform: rotate(-2deg); }
.tcard .chip.red, .tcard .chip.amber { background: transparent; border-color: currentColor; }
.tcard .chip.red { color: #c0392b; }
.tcard .chip.amber { color: #b4410f; }
.tcard a { color: #6b5200; font-weight: 700; }
.tc-foot { display: flex; align-items: center; gap: 10px; min-height: 26px; padding-right: 18px; }
.tc-where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tc-move { margin-left: auto; display: inline-flex; gap: 2px; flex: none; opacity: 0; transition: opacity .12s; }
.tcard:hover .tc-move, .tcard:focus-within .tc-move { opacity: 1; }
@media (hover: none) { .tc-move { opacity: 1; } }
.tc-move button { padding: 2px 9px; color: #2c2510; }
.tc-move button:hover { background: rgba(255,255,255,.5); border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .tcard, .bcards > .tcard:nth-child(n) { transition: none; } }
@media (max-width: 900px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .bcol { min-height: 0; }
}
@media (max-width: 480px) {
  .sticky-pop.is-task { width: calc(100vw - 32px); }
}

/* ---------- Hub Copilot: the on-box agent, inside the app window ---------- */
/* Floats over the screen on narrow windows; docks as a third column when the Hub is wide. */
.hx { container: hub / inline-size; overflow: clip; } /* clip, not hidden: lets the panel stick while the page scrolls */
.hx-body { position: relative; }
.hx-cp-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 6px 14px 6px 11px; font-size: 14px; background: var(--h-brand-soft); color: var(--h-brand); border: 1px solid color-mix(in srgb, var(--h-brand) 35%, transparent); }
.hx-cp-btn svg.i { width: 17px; height: 17px; }
.hx-cp-btn:hover { border-color: var(--h-brand); }
.hx-cp-btn[aria-expanded="true"] { background: var(--h-brand); border-color: var(--h-brand); color: var(--h-on-brand, #fff); }
.hx-cp { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: 5; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(20,33,58,.16); }
.hx.cp-open .hx-cp { display: block; }
.hx-cp-in { position: sticky; top: 0; height: min(100%, calc(100dvh - 190px)); /* clears the sticky-note button */ display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; }
@container hub (min-width: 1080px) {
  .hx.cp-open .hx-body { grid-template-columns: 196px minmax(0, 1fr) 360px; }
  .hx.cp-open.kiosk .hx-body { grid-template-columns: minmax(0, 1fr) 360px; }
  .hx-cp { position: static; width: auto; box-shadow: none; }
}
.hx-cp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.hx-cp-head b { display: block; font-size: 16px; line-height: 1.2; }
.hx-cp-head small { display: block; font-size: 12px; color: var(--muted); }
.hx-cp-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2d5fa8, #5b4bd6); flex: none; }
.hx-cp-mark svg.i { width: 18px; height: 18px; }
.hx-cp-badge { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.hx-cp-badge .local { white-space: normal; font-size: 12.5px; }
.hx-cp .msgs { overflow: auto; padding: 14px; display: grid; gap: 12px; align-content: start; background: var(--h-bg); }
.hx-cp .msg { max-width: 96%; font-size: 14.5px; }
.hx-cp .msg.bot { background: var(--panel); border: 1px solid var(--line); }
.hx-cp .msg p { margin: 0 0 6px; }
.hx-cp .suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 2px; border-top: 1px solid var(--line); max-height: 118px; overflow: auto; }
.hx-cp .suggest button, .cp-ask { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: var(--h-brand-soft); border-color: transparent; color: var(--h-brand); text-align: left; }
.hx-cp .suggest button:hover, .cp-ask:hover { border-color: var(--h-brand); }
.cp-ask { display: inline-flex; align-items: center; gap: 5px; }
.cp-ask svg.i { width: 15px; height: 15px; }
.hx-cp form { display: flex; gap: 8px; padding: 8px 14px; }
.hx-cp-foot { padding: 0 14px 12px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.proposal-k { font-size: 12px; font-weight: 700; color: var(--accent); }
.cp-draft { margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--h-brand); background: var(--panel-2); border-radius: 6px; font-size: 13.5px; white-space: pre-line; }
.cp-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--h-brand); background: var(--h-brand-soft); padding: 3px 10px; border-radius: 99px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hx { --h-on-brand: #0e1520; }
  :root:not([data-theme="light"]) .hx-cp .msg.me, :root:not([data-theme="light"]) .hx-cp button.primary { color: #0e1520; }
}
/* phones: a full-screen sheet over everything, like a native assistant */
@media (max-width: 640px) {
  .hx-cp { position: fixed; inset: 0; width: 100%; z-index: 45; border: 0; }
  .hx-cp-in { position: static; height: 100%; }
}
@media (max-width: 480px) {
  .hx-top { gap: 10px; padding: 10px 12px; }
  .hx-house { display: none; }
  .hx-cp-btn { padding: 6px 12px 6px 10px; }
}

/* ---------- Activity (screens/activity.js): the audit log as a feed ---------- */
.act-filter { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.act-filter select { width: auto; min-width: 160px; }
.act-day { margin-bottom: 20px; }
.act-day h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: 0; }
.act-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.act-refused .act-dot { background: var(--warn-soft); color: var(--warn); }
.act-failed .act-dot { background: var(--danger-soft); color: var(--danger); }
.act-what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.act-when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.act-go { flex: none; font-weight: 700; color: var(--accent); }
.act-more { text-align: center; }
/* ---------- Tasks & notes: search, This week view, @mentions ---------- */
.tasks-page .toolbar .task-search { width: 220px; flex: 0 1 220px; max-width: 100%; }
.board-none { grid-column: 1 / -1; text-align: center; }
.week { display: grid; gap: 18px; }
.wk-group h2 { font-size: 14px; margin: 0 0 6px; }
.wk-group.overdue h2 { color: #b42318; }
.tasks-page .wk-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tasks-page .wk-group li::marker { content: ""; }
.tasks-page .wk-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff8c9; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.wk-row.unread { outline: 2px solid #f0b429; }
.wk-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.wk-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-reply { position: relative; }
.sticky-reply textarea { flex: 1; }
.mention { background: #dbeafe; color: #1e40af; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention-pop { position: absolute; left: 0; bottom: 100%; z-index: 5; list-style: none; margin: 0 0 4px; padding: 4px; min-width: 180px; background: #fff; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.mention-pop li { padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.mention-pop li[aria-selected="true"] { background: #dbeafe; }
.mention-pop.hidden { display: none; }
/* ---------- Idea dump pins and tasks, chat search ---------- */
.pinned-strip { display: grid; gap: 12px; margin-bottom: 18px; padding: 12px; border-radius: 20px; background: color-mix(in srgb, var(--pin) 8%, var(--panel-2)); }
.pinned-strip[hidden] { display: none; }
.pinned-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--pin); margin: 0; }
.pinned-h svg { width: 16px; height: 16px; fill: currentColor; }
.idea-task { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--muted); }
.idea-task svg { width: 16px; height: 16px; flex: none; }
.dump-card.flash { animation: ideaflash 1s ease 2; }
@keyframes ideaflash { 50% { box-shadow: 0 0 0 8px rgba(255,217,90,.55); } }
.chat-search { position: relative; display: flex; align-items: center; gap: 10px; }
.chat-search input[type=search] { width: 200px; }
.cs-scope { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cs-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(420px, 90vw); max-height: 60vh; overflow: auto; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.cs-hit { display: grid; gap: 2px; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; font: inherit; color: inherit; cursor: pointer; }
.cs-hit:hover, .cs-hit:focus-visible { background: var(--panel-2); }
.cs-snip mark { background: rgba(255,217,90,.7); color: inherit; border-radius: 3px; padding: 0 1px; }
.cs-empty { padding: 12px; }
.msg-row.flash { animation: msgflash 1s ease 2; }
@keyframes msgflash { 50% { background: rgba(255,217,90,.45); } }
@media (max-width: 760px) { .chat-search input[type=search] { width: 120px; } .cs-scope { display: none; } }
/* ---------- Live planning: answered questions, proposed decisions, roadmap pass tests (decisions.js, map.js) ---------- */
.plan-h { font-size: 15px; margin: 20px 0 10px; }
.plan-propose { margin-bottom: 4px; }
.plan-propose summary { cursor: pointer; }
.plan-q textarea, .plan-propose textarea { width: 100%; resize: vertical; }
.plan-q .row-actions, .plan-dec .row-actions, .plan-propose .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-q .row-actions .spacer { flex: 1; }
.plan-q.answered { border-left: 3px solid var(--ok); }
.plan-answer { padding: 8px 10px; border-radius: 6px; background: var(--ok-soft); }
.plan-dec.proposed { border-left: 3px solid var(--warn); }
.plan-dec.confirmed { border-left: 3px solid var(--accent); }
.plan-dec .pre, .plan-q .pre { white-space: pre-line; }
.plan-dec .chips, .plan-q .chips { flex-wrap: wrap; }
.pass-check .pass-toggle { margin-top: 8px; }
.pass-toggle { display: grid; gap: 2px; }
.pass-toggle .toggle { font-weight: 700; }
/* ==========================================================================
   Global search (Ctrl/Cmd+K), keyboard shortcuts sheet, phone tab bar
   (web/search.js, web/shortcuts.js, app.js). Appended block; rules above untouched.
   ========================================================================== */
kbd { font: 700 11.5px/1 var(--font); background: var(--panel-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--muted); white-space: nowrap; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 8px 6px 12px; min-width: 200px; font-weight: 400; }
.search-btn:hover { color: var(--text); border-color: var(--accent); }
.search-btn .search-label { flex: 1; text-align: left; }
.nav-foot .kbd-help { grid-column: 1 / -1; justify-self: start; font-weight: 400; padding: 2px 8px; }
.nav-foot .kbd-help kbd { background: var(--ink-2); border-color: var(--ink-muted); color: var(--ink-text); margin-left: 4px; }
@media (pointer: coarse) { .nav-foot .kbd-help, .search-btn kbd, .gs-foot { display: none; } .search-btn { min-width: 0; } }

.gs-veil, .ks-veil { position: fixed; inset: 0; z-index: 70; background: rgba(10, 20, 30, .45); display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.gs { width: min(640px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); overflow: hidden; }
.gs-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.gs-bar input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 18px; padding: 4px 0; min-width: 0; }
.gs-bar input::-webkit-search-cancel-button { display: none; }
.gs-list { overflow: auto; padding: 6px; flex: 1; overscroll-behavior: contain; }
.gs-group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.gs-item[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.gs-item.done .gs-text b { text-decoration: line-through; color: var(--muted); }
.gs-text { display: grid; min-width: 0; flex: 1; }
.gs-text b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-text small { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-text mark { background: color-mix(in srgb, var(--pin) 30%, transparent); color: inherit; border-radius: 3px; }
.gs-kind { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); }
.gs-page { background: var(--ink-muted); } .gs-task { background: #e3b92c; } .gs-note { background: #ffd95a; }
.gs-idea { background: var(--accent); } .gs-chat { background: var(--info); } .gs-decision { background: var(--ok); }
.gs-question { background: var(--warn); } .gs-feature { background: var(--pv); }
.gs-hint, .gs-empty { margin: 8px 10px; }
.gs-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--panel-2); }
.gs-foot kbd { margin-right: 3px; }
.gs-status { margin-left: auto; }

.ks { width: min(460px, 100%); max-height: 80vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--lift); padding: 16px 20px; outline: 0; }
.ks header { display: flex; align-items: center; justify-content: space-between; }
.ks h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.ks table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ks td, .ks th { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.ks th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 14px; }
.ks td:first-child { width: 110px; }

#tabbar { display: none; }
@media (max-width: 700px) {
  :root { --tabbar-h: 58px; }
  .search-btn { min-width: 0; padding: 6px; border: 0; background: transparent; }
  .search-btn .search-label, .search-btn kbd { display: none; }
  .search-btn .i { width: 22px; height: 22px; }
  header.top { padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  #tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(22,38,58,.06); }
  #tabbar a, #tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 0; background: transparent; padding: 0; color: var(--muted); text-decoration: none; font: 700 11.5px/1.2 var(--font); -webkit-tap-highlight-color: transparent; }
  #tabbar .i { width: 24px; height: 24px; }
  #tabbar a[aria-current="page"] { color: var(--accent); }
  #tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tbadge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--danger); color: #fff; font-size: 10.5px; line-height: 1; border-radius: 99px; padding: 3px 5px; min-width: 16px; text-align: center; }
  .main-col { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .sticky-fab { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); }
  .toast { bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom)); }
  body:has(main#view.full) .sticky-fab { bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom)); } /* clear chat's composer */
  .side { z-index: 36; }
  #app.hidden #tabbar { display: none; }
  .gs-veil, .ks-veil { padding: max(10px, env(safe-area-inset-top)) 10px 10px; }
  .gs { max-height: calc(100dvh - 20px - env(safe-area-inset-top)); }
}

/* ---------- Command center look ----------
   Always dark, the console way: graphite chrome, hairline cards, calm neutral ink, mono uppercase
   section heads. Calm is the breathing green dot; trouble is --danger and nothing else. Colour is
   for state, not decoration. Task cards stay yellow sticky notes on top of it. */
:root:not([data-cc-off]) {
  color-scheme: dark;
  --ink: #07090d; --ink-2: #131922; --ink-text: #c3ccd8; --ink-muted: #6f7b8c;
  --bg: #0b0f14; --panel: #141a22; --panel-2: #10151c; --line: #222b37; --line-strong: #2f3a48;
  --text: #e6eaf0; --text-sec: #a2adbd; --muted: #6f7b8c;
  --accent: #6cbfa4; --accent-2: #8fd3bc; --accent-soft: #15302a;
  --danger: #d9765c; --danger-soft: #33201b; --warn: #ea8a3c; --warn-soft: #34230f;
  --ok: #79ad69; --ok-soft: #1a2a17; --info: #82b6dc; --info-soft: #182833; --pin: #e0b45c;
  --cc-ok: #79ad69; --cc-fine: #7d8899; --cc-fine-soft: #3a4452; --cc-grid: #1c232d;
  --radius: 8px; --radius-sm: 6px; --lift: 0 12px 32px rgba(0,0,0,.5);
  --font: "IBM Plex Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: var(--font);
  --pv: #82b6dc; --pv-ink: #142a4d; --pv-soft: #182833; --pv-bg: #0d131b;
}
body { font-size: 15px; }
h1, h2, h3 { font-family: var(--font); letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font: 700 12px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .075em; color: var(--text-sec); }
h3 { font-size: 15px; font-weight: 600; }
.home-head h1, .dump-head h1 { font-size: 30px; letter-spacing: -.02em; }

/* buttons: flat, hairline */
button { border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; background: var(--panel-2); border-color: var(--line-strong); padding: 6px 12px; }
button.primary { color: #0b0f14; font-weight: 600; }
input, select, textarea { border-radius: var(--radius-sm); background: var(--panel-2); border-color: var(--line-strong); }

/* chrome: graphite rail and bar */
nav#nav { border-right: 1px solid #1b222c; }
.nav-brand { font-family: var(--font); font-weight: 600; }
.nav-sec { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.nav-sec span { display: block; margin-top: 2px; opacity: .7; }
nav#nav a { border-radius: var(--radius-sm); font-size: 14.5px; }
nav#nav a[aria-current="page"]::before { background: var(--accent); }
header.top { background: var(--ink); border-bottom-color: #1b222c; }

/* surfaces */
.card { border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(255,255,255,.02); }
.stat .n { font: 600 28px/1.1 var(--font-mono); letter-spacing: -.02em; }
.stat .l { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.chip { border-radius: 4px; font: 500 12px/1.6 var(--font-mono); background: transparent; border-color: var(--line-strong); color: var(--text-sec); }
.chip.red { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-soft); }
.chip.amber { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.chip.green { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: transparent; }
.chip.blue, .chip.teal { color: var(--text-sec); background: transparent; }
table.t th { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom-color: var(--line); }
table.t td { border-color: var(--cc-grid); }

/* tabs: an accent underline, not pills */
.tabs, .seg { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 2px; }
.tabs button, .seg button { border-radius: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--text-sec); font-weight: 500; }
.tabs button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: transparent; box-shadow: none; color: var(--text); border-bottom-color: var(--accent); }
.ptabs a { font-weight: 500; font-size: 15px; border-bottom-width: 2px; }
.sticky-pop .seg { border-bottom-color: rgba(122,96,0,.22); }

/* the verdict: calm, or what needs you */
.cc-verdict { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; margin-bottom: 16px; box-shadow: inset 4px 0 0 var(--cc-ok); }
.cc-verdict.is-trouble { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.cc-orb { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--cc-ok) 16%, transparent); }
.cc-orb i { width: 12px; height: 12px; border-radius: 50%; background: var(--cc-ok); animation: cc-breathe 3.2s ease-in-out infinite; }
.cc-verdict.is-trouble .cc-orb { background: var(--danger-soft); }
.cc-verdict.is-trouble .cc-orb i { background: var(--danger); animation: none; }
@keyframes cc-breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cc-ok) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .cc-orb i { animation: none; } }
.cc-big { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.cc-verdict.is-trouble .cc-big { color: var(--danger); }
.cc-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-sec); margin-top: 3px; }
.cc-facts b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.cc-facts b.bad { color: var(--danger); }
.cc-stamp { font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }

/* Needs you, as recap rows */
.needs { background: var(--panel); border-color: var(--line); color: var(--text); }
.needs h2 { color: var(--text-sec); }
.needs-list { gap: 0; margin-top: 8px; }
.needs-list li + li a { border-top: 1px solid var(--cc-grid); }
.needs-list a { grid-template-columns: 44px minmax(0, 1fr); border-radius: 0; padding: 11px 10px; }
.needs-list a:hover { background: var(--panel-2); }
.needs-list b { color: var(--text); font-weight: 500; font-size: 14.5px; }
.needs-list .muted { color: var(--muted); font-size: 13px; }
.needs-n { font: 600 22px/1 var(--font-mono); color: var(--muted); }
.needs-n.hot { color: var(--text); }
.needs-n.warn { color: var(--danger); }
.needs-list a:has(.needs-n.warn) { box-shadow: inset 3px 0 0 var(--danger); }

/* tiles and small charts */
.cc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cc-tile { padding: 12px 16px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.cc-kv { display: flex; gap: 18px; flex-wrap: wrap; }
.cc-kv > div { display: flex; flex-direction: column; }
.cc-n { font: 600 20px/1.15 var(--font-mono); letter-spacing: -.02em; }
.cc-n.bad { color: var(--danger); }
.cc-l { font: 500 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.cc-foot { font-size: 12px; color: var(--muted); }
.cc-foot b { color: var(--text-sec); font-weight: 500; }
.cc-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.cc-grid { stroke: var(--cc-grid); }
.cc-tick { font: 9.5px var(--font-mono); fill: var(--muted); }
.cc-bar { fill: var(--cc-fine); }
.cc-bar.is-today { fill: var(--accent); }
.cc-seg-bar { display: flex; gap: 2px; height: 9px; }
.cc-seg-bar span { border-radius: 2px; min-width: 2px; }
.cc-seg-a { background: var(--text-sec); }
.cc-seg-b { background: var(--cc-fine-soft); }
.cc-seg-bad { background: var(--danger); }
.cc-seg-lbl { display: flex; flex-wrap: wrap; gap: 0 10px; font: 10.5px var(--font-mono); color: var(--muted); }
.cc-seg-lbl i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 4px; }

/* the plan, phase by phase: segment bars */
.phase-track li { border-top: 0; padding-top: 0; }
.ph-num { font: 600 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.ph-num::before { content: "Phase "; }
.phase-track li.blocked .ph-num { color: var(--danger); }
.phase-track b { font-weight: 500; font-size: 14px; }
.ph-bar { height: 9px; border-radius: 2px; background: var(--cc-fine-soft); }
.ph-bar i { background: var(--text-sec); border-radius: 2px; }
.phase-track li.blocked .ph-bar { box-shadow: inset 0 0 0 1px var(--danger); }

.tile-link:hover { border-color: var(--line-strong); background: var(--panel-2); }
.fict { font-family: var(--font-mono); }
@media (max-width: 900px) { .cc-tiles { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .cc-verdict { grid-template-columns: auto minmax(0, 1fr); } .cc-stamp { grid-column: 1 / -1; } }

/* the product preview stays its own cobalt app, but in its dark dress whatever the device says */
:root:not([data-cc-off]) .hx {
  --h-brand: #7fa6e6; --h-brand-soft: #1d2b44; --h-bg: #111824; --h-rail: #0e1520; --h-on-brand: #0e1520;
  --panel: #172131; --panel-2: #1b2638; --line: #263347; --line-strong: #33425a; --text: #e3e9f3; --muted: #93a2b8;
  --accent-2: #a3c0ee; --ok: #7fcf9f; --ok-soft: #173326; --warn: #e9b463; --warn-soft: #362a15; --danger: #f08f86; --danger-soft: #3a2020;
}
:root:not([data-cc-off]) .hx-cp .msg.me, :root:not([data-cc-off]) .hx-cp button.primary { color: #0e1520; }
:root:not([data-cc-off]) body.previewing h1 { color: var(--text); }
.hx h2 { font: 600 17px/1.2 var(--font); text-transform: none; letter-spacing: -.01em; color: var(--text); }
/* ink on the light accents, dark like the console's own badges */
.check .box.done, .steps span.on, .msg.me, .sc-go { color: #0b0f14; }
.nbadge, .chip .cnt, button.chip .cnt, .rec, .rs-cell.hold { color: #1a0c08; }
button.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.toast { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); font-weight: 500; }

/* ---------- motion (motion.js) ----------
   One set of speeds and one easing for the whole portal. Constant motion only where it means
   something (someone online, something blocked, a live heartbeat). Reduced motion: all of it stops. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); --t-fast: .14s; --t: .24s; --t-slow: .6s; }

/* the workspace sits on the same dotted grid and glow as the sign-in page */
main#view { background-color: var(--bg); background-image: radial-gradient(ellipse 70% 320px at 30% -40px, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%), radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px);
  background-size: 100% 100%, 22px 22px; background-attachment: local; }

/* page blocks arrive one after another */
.arrive { animation: rise var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* the menu highlight slides from page to page */
nav#nav { position: relative; }
.nav-mark { position: absolute; left: 12px; right: 12px; top: 0; border-radius: var(--radius-sm); background: var(--ink-2); transition: transform .32s var(--ease-out), height .32s var(--ease-out); pointer-events: none; }
.nav-mark::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
nav#nav a { z-index: 1; transition: color var(--t-fast); }
nav#nav a[aria-current="page"] { background: transparent; }
nav#nav a[aria-current="page"]::before { display: none; }
nav#nav a:hover .i { transform: translateX(2px); }
nav#nav a .i { transition: transform var(--t-fast) var(--ease-out); }

/* page icon beside the title */
.ph-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 12px; vertical-align: -6px; border-radius: 11px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--panel)), var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.ph-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* loading placeholder */
.skel { display: grid; gap: 16px; }
.sk { border-radius: var(--radius); background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.sk-h { height: 38px; width: 280px; } .sk-p { height: 18px; width: 460px; max-width: 80%; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .sk-card { height: 130px; } .sk-wide { height: 220px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* charts draw in */
.cc-bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .7s var(--ease-out) both; animation-delay: calc(var(--b, 0) * 25ms + .15s); }
.cc-seg-bar span, .ph-bar i, .bar i { transform-origin: left; animation: grow-x .9s var(--ease-out) both .2s; }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }

/* cards and buttons answer the pointer */
.tile-link, .card.tile-link, .bcard { transition: transform var(--t) var(--ease-out), border-color var(--t), background var(--t), box-shadow var(--t); }
.tile-link:hover, .bcard:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.8); }
button.primary { transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast); }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.primary:active:not(:disabled) { transform: scale(.97); }
.toast { animation: toast-in .32s var(--ease-spring) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Home: team presence. Initials in a ring (solid = share done, faint = opened); a dot that pulses
   while someone is here now, amber when they've been away a while. */
.pulse-list li { grid-template-columns: 40px minmax(0, 1fr) auto; }
@media (max-width: 560px) { .pulse-list li { grid-template-columns: 40px minmax(0, 1fr); } }
.pa { position: relative; width: 40px; height: 40px; display: grid; place-items: center; }
.pa svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pa circle { fill: none; stroke-width: 3; stroke-linecap: round; }
.pa-track { stroke: var(--line); }
.pa-open { stroke: color-mix(in srgb, var(--accent) 35%, transparent); animation: ring-in 1.1s var(--ease-out) both .3s; }
.pa-done { stroke: var(--accent); animation: ring-in 1.1s var(--ease-out) both .45s; }
@keyframes ring-in { from { stroke-dasharray: 0 107; } }
.pulse-list .pa .ow { width: 28px; height: 28px; font-size: 11.5px; background: var(--panel-2); color: var(--text); }
.pa-dot { position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 2px solid var(--panel); }
.pa.live .pa-dot { background: var(--ok, #7fcf9f); box-shadow: 0 0 0 0 color-mix(in srgb, #7fcf9f 60%, transparent); animation: live 2s ease-out infinite; }
.pa.stale .pa-dot { background: var(--warn); }
@keyframes live { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-word { color: #7fcf9f; font-weight: 600; }

/* Home: a slow light sweeps across the status band while something is blocked */
.cc-verdict.is-trouble { position: relative; overflow: hidden; }
.cc-verdict.is-trouble::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--danger) 16%, transparent) 50%, transparent 70%); animation: sweep 5.5s ease-in-out infinite 1s; }
@keyframes sweep { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }

/* Home: the phase being worked on glows, its bar carries moving stripes */
.phase-track li.current .ph-num { color: var(--accent-2); }
.phase-track li.current .ph-bar { position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.phase-track li.current .ph-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 40%, transparent) 0 6px, transparent 6px 12px) 0 0 / 34px 100%; animation: stripes 1.2s linear infinite; }
@keyframes stripes { to { background-position: 34px 0; } }

/* Tasks: lift while dragging, press-and-stick on landing, the tack wobbles on hover, Done gets a stamp */
.tcard.dragging { opacity: .35; transform: rotate(3deg) scale(.95); }
.tcard.landed { animation: stick .55s var(--ease-spring); }
@keyframes stick { 0% { transform: scale(1.06) rotate(-3deg); box-shadow: 0 24px 30px -12px rgba(0,0,0,.6); } 55% { transform: scale(.97) rotate(.6deg); } 100% { transform: rotate(-1.4deg); } }
.bcards > .tcard:hover::before { animation: wobble .5s var(--ease-out); }
@keyframes wobble { 30% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } 85% { transform: rotate(-4deg); } }
.done-stamp { position: absolute; right: 30px; bottom: 30px; z-index: 2; padding: 2px 10px; border: 2.5px solid #2f7d4b; border-radius: 4px; color: #2f7d4b;
  font: 800 15px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-12deg); opacity: .8; pointer-events: none; mix-blend-mode: multiply; }
.tcard.landed .done-stamp { animation: thump .45s var(--ease-spring) .15s both; }
@keyframes thump { from { opacity: 0; transform: rotate(-12deg) scale(2.4); } 70% { opacity: .9; } to { opacity: .8; transform: rotate(-12deg) scale(1); } }
.bcol.over { animation: col-glow 1s ease-in-out infinite alternate; }
@keyframes col-glow { to { box-shadow: inset 0 0 0 2px var(--accent), 0 0 24px -6px color-mix(in srgb, var(--accent) 60%, transparent); } }

/* Chat: new messages slide in, reactions pop, a channel fades in, an empty channel gets a drawing */
.msg-row.fresh { animation: msg-in .38s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.react { transition: transform var(--t-fast) var(--ease-out); }
.react:hover { transform: translateY(-1px) scale(1.06); }
.react.pop { animation: pop .42s var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.chat-msgs.ch-in { animation: fade .3s var(--ease-out); }
.chat-empty { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; text-align: center; }
.chat-empty svg { width: 132px; margin-bottom: 8px; overflow: visible; }
.chat-empty b { color: var(--text); font-size: 16px; }
.ce-a, .ce-b { fill: var(--panel); stroke-width: 2; stroke-linejoin: round; }
.ce-a { stroke: var(--line-strong); animation: bob 4s ease-in-out infinite; }
.ce-b { stroke: var(--accent); fill: var(--accent-soft); animation: bob 4s ease-in-out infinite -2s; }
.ce-dot { fill: var(--accent-2); animation: typing 1.4s ease-in-out infinite; }
.ce-dot:nth-of-type(2) { animation-delay: .2s; } .ce-dot:nth-of-type(3) { animation-delay: .4s; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Idea dump: a saved idea drops in like paper landing; the drop veil breathes while a file hovers */
.dump-card.landed { animation: paper-land .6s var(--ease-spring) both; }
@keyframes paper-land { 0% { opacity: 0; transform: translateY(-26px) rotate(-1.5deg) scale(1.02); } 60% { opacity: 1; transform: translateY(3px) rotate(.4deg); } 100% { transform: none; } }
.drop-veil.on { animation: fade .2s ease-out; }
.drop-veil.on div { animation: veil-breathe 1.6s ease-in-out infinite; }
@keyframes veil-breathe { 50% { transform: scale(1.03); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent); } }
.round.mic.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--danger); animation: ripple 1.4s ease-out infinite; }
.round.mic { position: relative; }
@keyframes ripple { from { transform: scale(.8); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* Activity: a timeline. A line down the left, an icon per kind of change, day headings that stay put */
.act-day { position: relative; }
.act-day h2 { position: sticky; top: 0; z-index: 2; padding: 8px 0; margin: 0; background: linear-gradient(var(--bg) 70%, transparent); }
.act-list { position: relative; background: transparent; border: 0; box-shadow: none; padding-left: 4px; }
.act-list::before { content: ""; position: absolute; left: 33px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--line-strong), var(--line) 80%, transparent); }
.act-row { position: relative; border-top: 0; padding: 8px 16px; border-radius: var(--radius-sm); transition: background var(--t-fast); }
.act-row:hover { background: var(--panel); }
.act-dot { position: relative; z-index: 1; width: 30px; height: 30px; background: var(--panel); border: 1.5px solid var(--line-strong); color: var(--text-sec); }
.act-dot .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.act-dot.k-task { color: #ffd95a; border-color: color-mix(in srgb, #ffd95a 45%, var(--line)); }
.act-dot.k-chat { color: #8fb8f0; border-color: color-mix(in srgb, #8fb8f0 45%, var(--line)); }
.act-dot.k-idea { color: #f0c46a; border-color: color-mix(in srgb, #f0c46a 45%, var(--line)); }
.act-dot.k-decision { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.act-dot.k-signin, .act-dot.k-out { color: var(--muted); }
.act-refused .act-dot, .act-dot.k-guard { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.act-failed .act-dot { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.act-row { animation: rise .45s var(--ease-out) both; animation-delay: calc(min(var(--n, 0), 12) * 30ms); }

/* Decisions: locked ones carry a seal; open questions a slow amber marker; a confirmation's tick draws in */
.dec-locked { position: relative; }
.dec-seal { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 4px;
  color: var(--accent-2); font: 600 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; transform: rotate(3deg); }
.dec-seal .ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dec-locked > b { padding-right: 90px; }
.q-mark { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: var(--warn); vertical-align: 1px; animation: q-breathe 2.4s ease-in-out infinite; }
@keyframes q-breathe { 50% { opacity: .35; box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 18%, transparent); } }
.chip.conf .tick { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; animation: draw 0.6s var(--ease-out) both .3s; }
@keyframes draw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }

/* Agencies: the on-site box and its heartbeat; the onboarding list ticks in */
.box-art { margin: 0; display: grid; gap: 4px; }
.box-art svg { width: 100%; max-width: 420px; height: auto; overflow: visible; }
.box-art figcaption { font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.ba-box { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 2; }
.ba-slot { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.ba-led { fill: var(--muted); }
.box-art.alive .ba-led { fill: #7fcf9f; animation: q-breathe 2s ease-in-out infinite; }
.ba-flat { stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 6; fill: none; }
.ba-wait { fill: var(--warn); animation: wait-scan 4s ease-in-out infinite; }
@keyframes wait-scan { 0% { transform: translateX(0); opacity: .2; } 50% { opacity: 1; } 100% { transform: translateX(226px); opacity: .2; } }
.ba-ecg { fill: none; stroke: #7fcf9f; stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 260; animation: ecg 2.4s linear infinite; }
@keyframes ecg { from { stroke-dashoffset: 260; } to { stroke-dashoffset: -260; } }
.onb .check { animation: rise .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + .2s); }
.onb .box.done { animation: pop .4s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 60ms + .35s); }

/* Boards: persona cards wear their role icon and lift on hover */
.persona { gap: 8px; }
.persona-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); transition: transform var(--t) var(--ease-spring); }
.persona-ic .ic { width: 20px; height: 20px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.persona:hover .persona-ic { transform: rotate(-6deg) scale(1.08); }
.persona-name { font-size: 16px; }
.board .bcard { animation: rise .5s var(--ease-out) both; }
.board .bcard:nth-child(2) { animation-delay: .05s; } .board .bcard:nth-child(3) { animation-delay: .1s; } .board .bcard:nth-child(4) { animation-delay: .15s; }
.board .bcard:nth-child(5) { animation-delay: .2s; } .board .bcard:nth-child(n+6) { animation-delay: .25s; }

/* Product plan: roadmap cards arrive phase by phase; filtering fades rather than snaps */
.mcard { animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--p, 0) * 70ms); transition: opacity var(--t) var(--ease-out), transform var(--t) var(--ease-out), box-shadow var(--t); }
.mcard.dim { transform: scale(.97); }
.mcard:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(0,0,0,.8); }
svg.fy .fy-item, svg.fy .fy-link { transition: opacity var(--t) var(--ease-out); }

/* Product preview, DSP iPad flow: each step slides in from the side it came from */
.kiosk.step-fwd { animation: step-fwd .38s var(--ease-out); }
.kiosk.step-back { animation: step-back .38s var(--ease-out); }
@keyframes step-fwd { from { opacity: 0; transform: translateX(24px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-24px); } }

/* ---------- Catch-up card on Home: what the others changed since you last looked ---------- */
.catchup { border-left: 3px solid var(--accent); animation: msg-in var(--t-slow, .4s) var(--ease-out, ease-out) both; }
.catchup h2 { display: flex; align-items: center; gap: 8px; }
.catchup .act-list::before { left: 29px; }
.catchup .act-row { padding: 6px 12px; }
.catchup.leaving { transition: opacity .25s, transform .25s; opacity: 0; transform: translateY(-6px) scale(.99); }
.catchup-done { margin: 0; padding: 2px 4px; color: var(--ok); }
.ag-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }

/* ---------- Nudge button and dialog ---------- */
.pulse-list li { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.nudge-btn { white-space: nowrap; }
.nudge-pop textarea { width: 100%; font: inherit; line-height: 1.45; resize: vertical; }
@media (max-width: 560px) { .pulse-list li { grid-template-columns: 28px minmax(0, 1fr); } .nudge-btn { grid-column: 2; justify-self: start; } }

/* ---------- Sync agenda ---------- */
.agenda .ag-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: -4px 0 16px; }
.ag-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width var(--t, .3s) var(--ease-out, ease-out); }
.ag-sec { margin-bottom: 14px; }
.ag-sec h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.ag-decide { border-left: 3px solid var(--info); }
.ag-unstick { border-left: 3px solid var(--warn); }
.ag-answer { border-left: 3px solid var(--accent); }
.ag-blocked { border-left: 3px solid var(--danger); }
.ag-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ag-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.ag-item:first-child { border-top: 0; }
.ag-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ag-text a { color: var(--text); font-weight: 600; text-decoration: none; }
.ag-text a:hover { text-decoration: underline; }
.ag-item.ticked .ag-text { opacity: .55; }
.ag-item.ticked .ag-text a { text-decoration: line-through; }
.ag-tick { position: relative; width: 22px; height: 22px; margin-top: 1px; cursor: pointer; }
.ag-tick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ag-tick svg { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--panel); fill: none; stroke: transparent; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: background var(--t-fast, .15s), border-color var(--t-fast, .15s); }
.ag-tick input:checked + svg { background: var(--accent); border-color: var(--accent); stroke: #fff; }
.ag-tick input:checked + svg path { stroke-dasharray: 20; animation: tick-draw .3s ease-out both; }
.ag-tick input:focus-visible + svg { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes tick-draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
.ag-none { margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) { .catchup, .ag-tick input:checked + svg path { animation: none; } }

/* ---------- Seen receipts in direct messages ---------- */
.seen-line { display: flex; justify-content: flex-end; align-items: center; gap: 5px; padding: 0 16px 6px; font-size: 12px; color: var(--muted); animation: msg-in .3s var(--ease-out, ease-out) both; }
.seen-line.is-seen { color: var(--accent); }
.seen-line svg { width: 16px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .seen-line { animation: none; } }

/* ---------- Ideas on the sync agenda, and meeting notes ---------- */
.ag-discuss { border-left: 3px solid var(--pin); }
.dump-card .ag-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.idea-agenda { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--accent); }
.idea-agenda svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ag-notes textarea { width: 100%; margin: 10px 0; font: inherit; line-height: 1.45; resize: vertical; box-sizing: border-box; }
.ag-notes .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-notes .sp { flex: 1; }

/* Platform plan overview (screens/platform.js): a building read top to bottom */
.pp { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.pp .tone-accent { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.pp .tone-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.pp-lede { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 8px; max-width: 22ch; }
.pp-sub { margin: 0 0 26px; max-width: 62ch; }
.pp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.pp-stack { display: flex; flex-direction: column; }

.pp-roof-shape { height: 26px; margin: 0 8%; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--line-strong) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1px), var(--line-strong) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.pp-roof-body { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.pp-roof-body .i { width: 20px; height: 20px; color: var(--accent); }
.pp-roof-body b { font-size: 16px; }
.pp-roof-body span { margin-left: auto; color: var(--text-sec, var(--muted)); font-size: 13.5px; }

.pp-units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; }
.pp-unit { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 16px 14px; min-height: 172px; margin-bottom: 30px; border: 1px solid var(--line-strong); border-top: 4px solid var(--tone); border-radius: var(--radius); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: border-color var(--t-fast, .14s), transform var(--t-fast, .14s); }
.pp-unit:hover { transform: translateY(-2px); border-color: var(--tone); }
.pp-unit[aria-pressed="true"] { background: var(--tone-soft); border-color: var(--tone); box-shadow: 0 0 0 1px var(--tone); }
.pp-unit:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.pp-unit.empty { border-style: dashed; border-top: 1px dashed var(--line-strong); background: transparent; cursor: default; color: var(--muted); }
.pp-unit.empty:hover { transform: none; border-color: var(--line-strong); }
.pp-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--tone); color: var(--bg); font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.pp-unit.empty .pp-mark { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.pp-mark.big { width: 44px; height: 44px; font-size: 22px; border-radius: 11px; margin: 0; }
.pp-unit-name { font-size: 17px; font-weight: 600; }
.pp-unit-kind { font-size: 13px; color: var(--text-sec, var(--muted)); }
.pp-unit-kind em { font-style: normal; margin-left: 6px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 11.5px; }
.pp-plugs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 10px; }
.pp-plugs span { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-sec, var(--muted)); }
.pp-pipe { position: absolute; left: 50%; bottom: -31px; width: 2px; height: 30px; background: repeating-linear-gradient(to bottom, var(--tone) 0 4px, transparent 4px 8px); }
.pp-unit.empty .pp-pipe { background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 8px); }
.pp-pipe::after { content: ""; position: absolute; left: -3px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.pp-unit.empty .pp-pipe::after { background: var(--line-strong); }

.pp-found { padding: 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.pp-found-title { font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.pp-found-title span { font-weight: 400; color: var(--text-sec, var(--muted)); margin-left: 6px; font-size: 13.5px; }
.pp-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pp-mod { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); outline: none; }
.pp-mod:hover, .pp-mod:focus-visible { border-color: var(--accent); }
.pp-mod b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pp-mod b .i { width: 15px; height: 15px; color: var(--accent); }
.pp-mod > div > span { font-size: 12px; color: var(--text-sec, var(--muted)); }
.pp-ring { width: 42px; height: 42px; flex: none; }
.pp-ring circle { fill: none; stroke-width: 4; }
.pp-ring-bg { stroke: var(--line-strong); }
.pp-ring-fg { stroke: var(--accent); stroke-linecap: round; }
.pp-ring text { fill: var(--text); font: 600 10px var(--font-mono, monospace); text-anchor: middle; dominant-baseline: middle; }
.pp-mod-tip { position: absolute; z-index: 5; left: 0; bottom: calc(100% + 8px); width: 260px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--lift); display: none; flex-direction: column; gap: 3px; font-size: 13px; }
.pp-mod:hover .pp-mod-tip, .pp-mod:focus-visible .pp-mod-tip { display: flex; }
.pp-mod-tip b { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pp-mod-tip span::before { content: "○ "; color: var(--muted); }
.pp-mod-tip span.have::before { content: "✓ "; color: var(--accent); }

.pp-side { position: sticky; top: 76px; }
.pp-detail { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-strong); border-top: 4px solid var(--tone); }
.pp-detail-head { display: flex; align-items: center; gap: 12px; }
.pp-detail-head h3 { margin: 0; font-size: 19px; }
.pp-detail-head .muted { font-size: 13px; }
.pp-detail p { margin: 14px 0 4px; font-size: 14.5px; line-height: 1.55; }
.pp-detail h4 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chips span { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--tone-soft); color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.pp-chips.soft span { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.pp-progress { margin-top: 18px; font-size: 13px; color: var(--text-sec, var(--muted)); }
.pp-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.pp-bar i { display: block; height: 100%; min-width: 2px; background: var(--tone); }
.pp-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; }

.pp-h { margin: 40px 0 16px; font-size: 18px; }
.pp-join { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }
.pp-join::before { content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px; background: var(--line-strong); }
.pp-join li { position: relative; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pp-join b { font-size: 15.5px; margin-top: 8px; }
.pp-step { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.pp-step .i { width: 20px; height: 20px; color: var(--accent); }
.pp-step i { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--bg); font: 700 11px/20px var(--font); font-style: normal; text-align: center; }
.pp-flow-host:not(:empty) { margin-top: 8px; }

@media (max-width: 1100px) { .pp-layout { grid-template-columns: 1fr; } .pp-side { position: static; } }
@media (max-width: 700px) {
  .pp-lede { font-size: 24px; }
  .pp-units { grid-template-columns: 1fr; }
  .pp-unit { min-height: 0; }
  .pp-mods { grid-template-columns: 1fr; }
  .pp-join { grid-template-columns: 1fr; }
  .pp-join::before { display: none; }
  .pp-roof-body span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pp-unit { transition: none; } .pp-unit:hover { transform: none; } }

/* Cleanup (Nov 2026): plain headings, no floating Note button, the simple Home */
h2 { font: 600 17px/1.3 var(--font); text-transform: none; letter-spacing: -.005em; color: var(--text); }
.sticky-fab { display: none; }

.home-simple { max-width: 860px; }
.home-simple .home-head { margin-bottom: 22px; }
.home-simple .home-head p { color: var(--text-sec, var(--muted)); margin: 6px 0 0; }
.nd { padding: 8px 0 4px; margin-bottom: 18px; }
.nd-h { margin: 0; }
.nd > .nd-h { padding: 12px 20px 6px; }
.nd-list { list-style: none; margin: 0; padding: 0; }
.nd-list > li { border-top: 1px solid var(--line); }
.nd-list > li:first-child { border-top: 0; }
.nd-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: var(--text); text-decoration: none; }
a.nd-row:hover { background: var(--panel-2); }
a.nd-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nd-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); }
.nd-ico .i { width: 18px; height: 18px; color: var(--accent); }
.nd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nd-text b { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-text > span { font-size: 13.5px; color: var(--text-sec, var(--muted)); }
.nd-go { font-size: 13.5px; color: var(--accent); white-space: nowrap; }
.nd-more { display: block; padding: 12px 20px 12px 70px; font-size: 14px; }
.nd-empty { display: flex; align-items: center; gap: 10px; margin: 0; padding: 18px 20px 20px; font-size: 15.5px; }
.nd-empty .i { width: 20px; height: 20px; color: var(--accent); }
.home-simple .team-pulse { margin-bottom: 18px; }
.home-plan { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.home-plan:hover { border-color: var(--accent); }
.home-plan > .i { width: 22px; height: 22px; color: var(--accent); flex: none; }
.home-plan > span { display: flex; flex-direction: column; gap: 2px; }
.home-plan .muted { font-size: 13.5px; }

.pp-more { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
@media (max-width: 700px) { .nd-text b { white-space: normal; } .nd-row { padding: 12px 14px; gap: 12px; } .nd-more { padding-left: 62px; } }
