/* =====================================================================================================
   NJG Command in Signature Titanium (brand rev 4), the same design as the chat (studio/packages/adk-bridge
   portal.html), so command.njgconsultancy.com reads as one website (Neil, 12 Nov 2026).
   Paper by default, warm black for dark (localStorage njg_theme_v2, shared with the chat). Sora for words,
   Michroma for labels and numbers, corners cut not rounded, hairline edges, copper for the answer. Liquid glass
   only on the layers that float (header, sidebar on a phone, sheets, tips); everything on the page stays flat.
   The tokens and the shell's class names are the chat's, so a change there is easy to carry here.
   ===================================================================================================== */
@font-face { font-family: 'Sora'; src: url('/fonts/Sora-Variable.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Michroma'; src: url('/fonts/Michroma-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root, [data-theme="light"] {
  --ground: #F8F6F2;
  --sidebar: #F3EEE7;
  --panel: #FFFFFF;
  --panel-raised: #FFFFFF;
  --wash: #F3EEE7;
  --hover: rgba(31, 28, 25, 0.045);
  --active: rgba(31, 28, 25, 0.075);
  --rule: #D9D2C8;
  --rule-soft: #E8E2D9;
  --ink: #1F1C19;
  --ink-body: #2B2723;
  --ink-quiet: #6F685F;
  --ink-faint: #9A9289;
  --accent: #9A5C37;
  --accent-soft: rgba(154, 92, 55, 0.10);
  --accent-line: rgba(154, 92, 55, 0.6);
  --on-accent: #F3EEE7;
  --primary: #1F1C19;
  --on-primary: #F3EEE7;
  --series-rest: #B9B1A6;
  --ok: #3F7A55;
  --ok-soft: rgba(63, 122, 85, 0.1);
  --bad: #A8452F;
  --bad-soft: rgba(168, 69, 47, 0.09);
  --warn: #8A6A23;
  --warn-soft: rgba(138, 106, 35, 0.1);
  --glass: rgba(251, 249, 246, 0.72);
  --glass-strong: rgba(251, 249, 246, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 46%);
  --float: 0 24px 48px -24px rgba(31, 28, 25, 0.2);
  --float-lg: 0 40px 80px -32px rgba(31, 28, 25, 0.28);
  --scrim: rgba(31, 28, 25, 0.28);
  --sig-light: inline; --sig-dark: none;
  color-scheme: light;
}
[data-theme="dark"] {
  --ground: #0B0A09;
  --sidebar: #0E0D0C;
  --panel: #161412;
  --panel-raised: #1C1917;
  --wash: #1C1917;
  --hover: rgba(243, 238, 231, 0.05);
  --active: rgba(243, 238, 231, 0.085);
  --rule: #3A352F;
  --rule-soft: #2A2622;
  --ink: #F3EEE7;
  --ink-body: #CFC8BE;
  --ink-quiet: #8A8279;
  --ink-faint: #6B645C;
  --accent: #D38B5D;
  --accent-soft: rgba(211, 139, 93, 0.13);
  --accent-line: rgba(211, 139, 93, 0.6);
  --on-accent: #0B0A09;
  --primary: #F3EEE7;
  --on-primary: #0B0A09;
  --series-rest: #4E4943;
  --ok: #7FB592;
  --ok-soft: rgba(127, 181, 146, 0.12);
  --bad: #E08C74;
  --bad-soft: rgba(224, 140, 116, 0.12);
  --warn: #D9B25F;
  --warn-soft: rgba(217, 178, 95, 0.12);
  --glass: rgba(22, 20, 18, 0.66);
  --glass-strong: rgba(22, 20, 18, 0.84);
  --glass-edge: rgba(243, 238, 231, 0.14);
  --glass-sheen: linear-gradient(180deg, rgba(243, 238, 231, 0.07) 0%, rgba(243, 238, 231, 0) 50%);
  --float: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  --float-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  --scrim: rgba(0, 0, 0, 0.55);
  --sig-light: none; --sig-dark: inline;
  color-scheme: dark;
}
:root {
  --font-sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-label: 'Michroma', 'Sora', Arial, sans-serif;
  --heat: linear-gradient(90deg, #de9668 0%, #e8a070 40%, #c4708c 62%, #8c78f6 82%, #6896f4 100%);
  --cut-xs: 7px; --cut-s: 8px; --cut-m: 10px; --cut-l: 16px; --cut-xl: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --sidebar-w: 280px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--ground); color: var(--ink);
  font: 300 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent-soft); }
.ico { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.label {
  font-family: var(--font-label); font-size: 9px; font-weight: 400; line-height: 1.4;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-quiet);
}
.dia { display: inline-block; flex: none; width: 6px; height: 6px; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.heat { display: block; width: 120px; height: 1px; background: var(--heat); }
.loading { color: var(--ink-quiet); padding: 30vh 24px; text-align: center; font-family: var(--font-label); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- The cut corner, with a true 1px edge on the diagonal too ----------
   ::before is the edge colour in the cut shape; ::after is the face, 1px in, in the same shape. */
.cut, .btn, button.ghost, button.primary, a.button, .freeze-btn, .card, .kpi, .p1-kpi, .p1-tile, .p1-vcard, .vault-card,
.segmented, .nav-item, .notice, .toast, .p1-filter, .field input, .field textarea, .status-kpi {
  --c: var(--cut-l); --edge: var(--rule); --face: var(--panel);
  position: relative; isolation: isolate; border: none; background: transparent;
}
.cut::before, .btn::before, button.ghost::before, button.primary::before, a.button::before, .freeze-btn::before, .card::before, .kpi::before,
.p1-kpi::before, .p1-tile::before, .p1-vcard::before, .vault-card::before, .segmented::before, .nav-item::before, .notice::before,
.toast::before, .p1-filter::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: var(--edge);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background 0.3s var(--ease);
}
.cut::after, .btn::after, button.ghost::after, button.primary::after, a.button::after, .freeze-btn::after, .card::after, .kpi::after,
.p1-kpi::after, .p1-tile::after, .p1-vcard::after, .vault-card::after, .segmented::after, .nav-item::after, .notice::after,
.toast::after, .p1-filter::after {
  content: ''; position: absolute; inset: 1px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--sweep, transparent), var(--sweep, transparent)) no-repeat bottom / 100% var(--sweep-h, 0%), var(--face);
  clip-path: polygon(calc(var(--c) - 0.41px) 0, 100% 0, 100% calc(100% - var(--c) + 0.41px), calc(100% - var(--c) + 0.41px) 100%, 0 100%, 0 calc(var(--c) - 0.41px));
  transition: background-size 0.55s var(--ease-expo), background-color 0.3s var(--ease);
}

/* ---------- Buttons: line by default, the fill sweeps up on hover ---------- */
.btn, button.ghost, button.primary, a.button, .freeze-btn {
  --c: var(--cut-s); --edge: var(--rule); --face: var(--panel); --sweep: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 38px; padding: 0 16px; color: var(--ink); text-decoration: none;
  font-family: var(--font-label); font-size: 9px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap; transition: color 0.45s var(--ease);
}
.btn:hover:not(:disabled), .btn:focus-visible, button.ghost:hover:not(:disabled), button.primary:hover:not(:disabled), a.button:hover, .freeze-btn:hover {
  --sweep-h: 100%; --edge: var(--accent); color: var(--on-accent);
}
.btn:active:not(:disabled), button.ghost:active:not(:disabled), button.primary:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled, button.ghost:disabled, button.primary:disabled { opacity: 0.45; cursor: default; }
.btn.primary, button.primary { --edge: var(--primary); --face: var(--primary); color: var(--on-primary); }
[data-theme="dark"] .btn.primary, [data-theme="dark"] button.primary { --edge: var(--rule); --face: var(--panel-raised); color: var(--ink); }
[data-theme="dark"] .btn.primary:hover:not(:disabled), [data-theme="dark"] button.primary:hover:not(:disabled) { color: var(--on-accent); }
.btn.small, button.small { min-height: 32px; padding: 0 12px; font-size: 8.5px; --c: 7px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover:not(:disabled) { --sweep: var(--bad); --edge: var(--bad); color: #fff; }
.freeze-btn { --edge: var(--bad); color: var(--bad); --sweep: var(--bad); }
.freeze-btn:hover { color: #fff; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0;
  border: none; background: transparent; color: var(--ink-quiet);
  clip-path: polygon(var(--cut-s) 0, 100% 0, 100% calc(100% - var(--cut-s)), calc(100% - var(--cut-s)) 100%, 0 100%, 0 var(--cut-s));
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.icon-btn:hover { background: var(--active); color: var(--ink); }
.icon-btn:focus-visible { outline: none; background: var(--accent-soft); color: var(--ink); }

/* ---------- Shell ---------- */
#app { height: 100dvh; }
.shell { display: flex; height: 100dvh; width: 100%; }
.app { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; background: var(--ground); }

/* ---------- Sidebar (the chat's) ---------- */
.chats-panel {
  width: var(--sidebar-w); flex-shrink: 0; height: 100dvh; position: relative;
  background: var(--sidebar); box-shadow: inset -1px 0 0 var(--rule-soft);
  display: flex; flex-direction: column; overflow-y: auto;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.sb-head { flex-shrink: 0; display: flex; align-items: flex-start; gap: 10px; padding: 20px 16px 14px 18px; }
.brand { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; text-decoration: none; }
.signature { display: block; height: 60px; width: auto; max-width: 210px; }
.signature.on-light { display: var(--sig-light); }
.signature.on-dark { display: var(--sig-dark); }
.brand .label { display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.chats-tools { padding: 6px 16px 14px; }
.chats-tools .btn.primary { width: 100%; min-height: 42px; justify-content: flex-start; padding: 0 14px; --c: var(--cut-m); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 10px; }
.sb-group { font-family: var(--font-label); font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin: 18px 12px 6px; }
.nav-item {
  --c: var(--cut-s); --edge: transparent; --face: transparent;
  display: flex; align-items: center; gap: 12px; width: 100%; text-decoration: none;
  min-height: 38px; padding: 0 12px; color: var(--ink-quiet); font-size: 14.5px; font-weight: 300; text-align: left;
  transition: color 0.25s var(--ease);
}
.nav-item:hover { --face: var(--hover); color: var(--ink); }
.nav-item.active { --face: var(--panel); --edge: var(--rule-soft); color: var(--ink); font-weight: 400; }
.nav-item .ico { color: currentColor; }
.nav-item.active .ico { color: var(--accent); }
.ni-label { flex: 1; }
.ni-count { font: 400 9px/1 var(--font-label); letter-spacing: 0.06em; color: var(--on-accent); background: var(--accent); padding: 4px 7px 3px; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.sb-spacer { flex: 1; }
.sb-foot { flex-shrink: 0; box-shadow: inset 0 1px 0 var(--rule-soft); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.sb-status { display: flex; align-items: center; gap: 10px; padding: 6px 12px 0; text-decoration: none; }
.sb-status:hover .label { color: var(--ink); }
.dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; background: var(--ok); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.dot.off { background: var(--ink-faint); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.mobile-only { display: none !important; }
.backdrop { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.backdrop.open { display: block; animation: njg-fade 0.25s var(--ease); }
@keyframes njg-fade { from { opacity: 0; } }

/* ---------- Header: liquid glass over the page ---------- */
.header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 6px;
  padding: env(safe-area-inset-top) 16px 0 28px;
  background: var(--glass-sheen), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 -1px 0 var(--rule-soft), inset 0 1px 0 var(--glass-edge);
}
.chat-bar-title { min-width: 0; padding: 6px 0; display: flex; flex-direction: column; gap: 3px; }
.cb-eyebrow { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.cb-name { color: var(--ink); font: 300 16px/1.25 var(--font-sans); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ---------- The page ---------- */
.main { flex: 1; min-height: 0; position: relative; }
.scroll { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: calc(var(--header-h) + env(safe-area-inset-top)); scroll-padding-top: calc(var(--header-h) + 12px); }
.column { width: 100%; max-width: 780px; margin: 0 auto; padding: 28px 40px 40px; }
.column.wide { max-width: 1120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 34px; }
.section-title { font: 200 clamp(32px, 4.2vw, 44px)/1.1 var(--font-sans); letter-spacing: -0.015em; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.section-title::after { content: ''; display: block; width: clamp(96px, 11vw, 168px); height: 1px; background: var(--heat); margin-top: 22px; transform-origin: left; animation: njg-draw 1.4s var(--ease) 0.1s both; }
@keyframes njg-draw { from { transform: scaleX(0); } }
.section-sub { color: var(--ink-quiet); font-size: 15px; margin: 16px 0 0; max-width: 38em; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subhead { font-family: var(--font-label); font-size: 9px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-quiet); margin: 40px 0 14px; }
.page-foot { margin: 56px 0 8px; display: flex; justify-content: center; }
.page-foot .label { color: var(--ink-faint); }
.empty { color: var(--ink-quiet); font-size: 14.5px; padding: 8px 0; }
.note { color: var(--ink-quiet); font-size: 13px; margin: 10px 0 0; }
.note.legal { margin-top: 28px; text-align: center; color: var(--ink-faint); }
.err { color: var(--bad); }
.ok, .ok-text { color: var(--ok) !important; }
.bad, .bad-text { color: var(--bad) !important; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 22px; color: var(--ink-quiet); text-decoration: none; font-family: var(--font-label); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; }
.back-link:hover { color: var(--accent); }
.notice { --c: var(--cut-m); --edge: var(--accent-line); --face: var(--accent-soft); display: block; padding: 12px 16px; margin: 0 0 18px; font-size: 14px; color: var(--ink); }
.tag { display: inline-block; margin-left: 10px; padding: 3px 8px 2px; vertical-align: 2px; font: 400 7.5px/1.4 var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-quiet); background: var(--wash); clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }

/* ---------- Cards ---------- */
.card { --c: var(--cut-l); --edge: var(--rule-soft); display: block; padding: 22px 24px; margin-bottom: 14px; text-decoration: none; transition: filter 0.3s var(--ease); }
a.card:hover, .card.decision:hover { --edge: var(--rule); }
a.card:hover h3 { color: var(--accent); }
.card-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.card-row > .meta:last-child { white-space: nowrap; }
.card h3 { margin: 10px 0 0; font: 300 19px/1.3 var(--font-sans); color: var(--ink); transition: color 0.2s; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card-title { margin: 12px 0 0; font: 200 clamp(24px, 3vw, 30px)/1.2 var(--font-sans); letter-spacing: -0.01em; color: var(--ink); }
.card .meta, .meta { font-family: var(--font-label); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-quiet); }
.meta.soon { color: var(--accent); }
.card .next, .next { font-size: 14.5px; color: var(--ink-body); margin: 10px 0 0; line-height: 1.6; }
.widget-title { font-family: var(--font-label); font-size: 8.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-quiet); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.card .btn { margin-top: 14px; }
.list-card { padding: 6px 24px; }
.log-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; box-shadow: inset 0 -1px 0 var(--rule-soft); font-size: 14px; text-decoration: none; }
.log-row:last-child { box-shadow: none; }
a.log-row:hover .lr-title { color: var(--accent); }
.log-main { flex: 1; min-width: 0; }
.lr-title { color: var(--ink); font-weight: 400; transition: color 0.2s; }
.lr-sub { color: var(--ink-quiet); font-size: 13px; margin-top: 2px; }
.log-row .btn { margin-top: 0; }
.all-clear { display: flex; align-items: center; gap: 12px; font-family: var(--font-label); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-quiet); padding: 6px 0 10px; }
ul.clean { margin: 0; padding-left: 18px; color: var(--ink-body); font-size: 14.5px; }
ul.clean li { margin: 6px 0; }
.link-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-height: 52px; }
.link-card + .link-card { margin-top: 12px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--rule-soft); }
.link-card .lc-icon { flex-shrink: 0; width: 40px; height: 40px; background: var(--wash); color: var(--ink); display: grid; place-items: center; font: 400 12px var(--font-label); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.link-card .lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-card .lc-title { color: var(--ink); font-weight: 400; }
.link-card .lc-domain { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-quiet); margin-top: 3px; }
.link-card:hover .lc-title { color: var(--accent); }

/* Decisions */
.card.decision { padding: 24px 26px; }
.card.decision.closed { opacity: 0.8; }
.says { margin: 12px 0 0; color: var(--ink-body); font-size: 15px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 10px 18px; margin: 18px 0 0; padding: 16px 0 0; box-shadow: inset 0 1px 0 var(--rule-soft); }
.facts dt { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-quiet); padding-top: 4px; }
.facts dd { margin: 0; color: var(--ink-body); font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-line; }
.facts dd a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.facts .checked { display: block; margin-top: 3px; font-size: 7.5px; color: var(--ok); }
.choices { display: grid; gap: 10px; margin: 22px 0 0; }
.choice-row { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 16px; align-items: center; }
.btn.choice { min-height: 44px; padding: 0 18px; --c: var(--cut-m); white-space: normal; text-align: center; }
.choice-says { color: var(--ink-quiet); font-size: 13.5px; line-height: 1.5; }
.choice-says .rec { display: block; color: var(--accent); margin-bottom: 2px; }
.decide-note { min-height: 0; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-quiet); }
.decide-note:empty { display: none; }
.decide-note.ok { color: var(--ok); }
.decide-note.err { color: var(--bad); }
.decided { margin: 16px 0 0; color: var(--ink-quiet); font-size: 13.5px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 18px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--rule-soft); font-size: 12.5px; color: var(--ink-quiet); }
.card-foot > span:first-child { flex: 1; min-width: 200px; }
.out-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-label); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.out-link:hover { color: var(--accent); }
.check-code { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.deck-extras { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.deck-extras .note { flex-basis: 100%; margin: 4px 0 0; font-size: 11.5px; color: var(--ink-faint); overflow-wrap: anywhere; }

/* Numbers */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 18px; }
.kpi { --c: var(--cut-m); --edge: var(--rule-soft); --face: var(--panel); padding: 14px 16px; min-width: 0; }
.kpi-label { font-family: var(--font-label); font-size: 7.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-quiet); line-height: 1.5; }
.kpi-value { font: 400 23px/1.2 var(--font-label); color: var(--ink); margin-top: 10px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.kpi-value.small { font: 300 15px/1.3 var(--font-sans); display: flex; align-items: center; gap: 8px; }
.kpi.lead .kpi-value { color: var(--accent); }
.kpi.word .kpi-value { font: 300 21px/1.25 var(--font-sans); letter-spacing: -0.005em; }
.kpi.neg .kpi-value { color: var(--bad); }
.kpi-note { font-size: 12px; color: var(--ink-quiet); margin-top: 6px; }
.status-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 18px; }
.status-kpi.st-ok .dot { background: var(--ok); }
.status-kpi.st-late .dot { background: var(--warn); }
.status-kpi.st-down .dot { background: var(--bad); }
.status-kpi.st-unknown .dot { background: var(--ink-faint); }
.status-kpi.st-down { --edge: var(--bad); }
.progress-row + .progress-row { margin-top: 16px; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink); }
.progress-head span:last-child { font-family: var(--font-label); font-size: 10px; letter-spacing: 0.06em; color: var(--ink-quiet); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-bar { height: 3px; background: var(--rule-soft); overflow: hidden; margin-top: 8px; }
.progress-bar > div { height: 100%; background: var(--ink); }
.progress-bar > div.full, .st-over .progress-bar > div { background: var(--bad); }
.st-warn .progress-bar > div { background: var(--accent); }
.progress-note { font-size: 12.5px; color: var(--ink-quiet); margin-top: 5px; }
.max-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 28px; }
.max-acct .lr-title { margin-bottom: 10px; }
.amt { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Ideas */
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 18px; }
.idea-grid .card { margin: 0; }
.score { font: 400 18px/1 var(--font-label); color: var(--ink); }
.card.idea.lead .score { color: var(--accent); }
.idea-wealth { margin: 10px 0 0; font-size: 13px; color: var(--ink-quiet); }

/* ---------- Segmented control (appearance) ---------- */
.segmented { --c: var(--cut-s); --edge: var(--rule-soft); --face: var(--wash); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 4px; max-width: 420px; }
.segmented button {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; border: none; background: transparent;
  color: var(--ink-quiet); font: 300 13.5px var(--font-sans);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-soft); }
.segmented button[aria-pressed="true"] .ico { color: var(--accent); }

/* ---------- Sign-in: the raised plate, then the signature ---------- */
.auth-gate {
  position: fixed; inset: 0; z-index: 100; display: flex; overflow-y: auto;
  align-items: center; justify-content: center; padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background: var(--ground);
}
.auth-card { --c: var(--cut-xl); --edge: var(--rule-soft); --face: var(--panel); position: relative; isolation: isolate; width: min(420px, 100%); padding: 40px 36px 32px; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.auth-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--edge); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.auth-card::after { content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--face); clip-path: polygon(calc(var(--c) - 0.41px) 0, 100% 0, 100% calc(100% - var(--c) + 0.41px), calc(100% - var(--c) + 0.41px) 100%, 0 100%, 0 calc(var(--c) - 0.41px)); }
.auth-plate { width: 180px; height: 180px; align-self: center; margin: -6px 0 10px; position: relative; filter: drop-shadow(0 22px 34px rgba(31, 28, 25, 0.32)); }
[data-theme="dark"] .auth-plate { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55)); }
.auth-plate-in { position: absolute; inset: 0; overflow: hidden; }
.auth-plate img { width: 100%; height: 100%; display: block; }
.auth-plate-in::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
  transform: translateX(-80%); animation: njg-sheen 2.4s cubic-bezier(.6, 0, .3, 1) 0.5s both;
}
@keyframes njg-sheen { to { transform: translateX(80%); } }
.auth-card .signature { align-self: center; height: 52px; margin: 2px 0 2px; }
.auth-title { font: 200 28px/1.15 var(--font-sans); letter-spacing: -0.01em; color: var(--ink); margin: 6px 0 0; text-align: center; }
.auth-card .heat { align-self: center; margin: 4px 0 2px; }
.auth-sub { font-size: 14px; color: var(--ink-quiet); margin: 0 0 8px; line-height: 1.55; text-align: center; }
.auth-card .btn { min-height: 48px; width: 100%; --c: var(--cut-m); }
.auth-note { font-size: 12.5px; color: var(--ink-quiet); margin: -8px 0 0; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.auth-status { font-size: 13.5px; color: var(--ink-quiet); min-height: 20px; margin: 0; text-align: center; }
.auth-status.err { color: var(--bad); }

/* ---------- The cockpit's parts (cockpit.js): status, FREEZE ALL, the board, refusals, codes, the Vault ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 6px; font-size: 13px; color: var(--ink); background: var(--wash); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.pill .dot { background: var(--ink-faint); }
.pill-ok .dot { background: var(--ok); }
.pill-late .dot { background: var(--warn); }
.pill-down .dot { background: var(--bad); }
.pill-detail { color: var(--ink-quiet); }
.pill-btn { background: none; border: 0; padding: 0; }
.pills .freeze-btn { margin-left: auto; }
.banner { --c: var(--cut-m); position: relative; padding: 14px 18px; margin: 0 0 18px; font-size: 14px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.banner p { margin: 0; }
.banner p + p { margin-top: 6px; }
.banner.freeze-frozen, .banner.freeze-partial { background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }
.banner-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.board-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.board-cards > p { grid-column: 1 / -1; }
.card h1 { margin: 0 0 6px; font: 300 21px/1.3 var(--font-sans); color: var(--ink); }
.card h2.label { margin: 22px 0 10px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows.plain li { display: grid; gap: 3px; padding: 12px 0; box-shadow: inset 0 -1px 0 var(--rule-soft); font-size: 14px; color: var(--ink-body); }
.rows.plain li:last-child { box-shadow: none; }
.row-title { color: var(--ink); font-weight: 400; overflow-wrap: anywhere; }
.row-meta { color: var(--ink-quiet); font-size: 12.5px; overflow-wrap: anywhere; }
.row-meta a { color: var(--ink-body); margin-right: 10px; }
.row-title .tag:first-of-type { margin-left: 10px; }
.board-row .bad { font-size: 12.5px; }
dialog.sheet {
  border: none; padding: 28px 30px; width: min(520px, calc(100vw - 32px)); color: var(--ink);
  background: var(--glass-sheen), var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--rule);
  clip-path: polygon(var(--cut-xl) 0, 100% 0, 100% calc(100% - var(--cut-xl)), calc(100% - var(--cut-xl)) 100%, 0 100%, 0 var(--cut-xl));
}
dialog.sheet::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.sheet h2 { margin: 0 0 12px; font: 200 26px/1.2 var(--font-sans); }
dialog.sheet p { color: var(--ink-body); font-size: 14.5px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.slide-wrap { display: grid; gap: 10px; margin: 18px 0 6px; }
.slide { width: 100%; accent-color: var(--bad); height: 32px; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field input, .field textarea {
  --c: var(--cut-s); width: 100%; min-height: 42px; padding: 10px 12px; font: 300 14.5px/1.5 var(--font-sans); color: var(--ink);
  background: var(--wash); box-shadow: inset 0 0 0 1px var(--rule); outline: none;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.vault-card { --c: var(--cut-l); --edge: var(--rule-soft); display: block; padding: 22px 24px; margin-bottom: 14px; }
.vault-card .vault > .label:first-child { display: block; margin: 0 0 10px; }
.vault-card button.primary { margin-top: 8px; }
.toast {
  --c: var(--cut-m); --edge: var(--rule); --face: var(--glass-strong);
  position: fixed; z-index: 60; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px));
  padding: 16px 18px; -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.toast::after { background: var(--glass-sheen), var(--face); }
.toast p { margin: 0 0 8px; }
.code-body { font: 400 15px/1.4 var(--font-label); letter-spacing: 0.08em; color: var(--ink); }

/* ---------- Project 100 (p100.js) ---------- */
.p1 { display: block; }
.p1-crumbs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.p1-crumbs .back { min-height: 30px; padding: 0 12px; font-size: 8.5px; --c: 7px; }
.back { --c: 7px; --edge: var(--rule); --face: var(--panel); position: relative; isolation: isolate; border: none; background: transparent; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-family: var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; }
.back::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--edge); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.back::after { content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--face); clip-path: polygon(calc(var(--c) - 0.41px) 0, 100% 0, 100% calc(100% - var(--c) + 0.41px), calc(100% - var(--c) + 0.41px) 100%, 0 100%, 0 calc(var(--c) - 0.41px)); }
.back:hover { color: var(--accent); --edge: var(--accent); }
.p1-path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-quiet); }
.p1-crumb, .p1-link { border: none; background: none; padding: 0; color: var(--ink-quiet); font: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.p1-crumb:hover, .p1-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.p1-sep { color: var(--ink-faint); }
.p1-here { color: var(--ink); }
.p1-head { margin: 4px 0 30px; }
.p1-head h1 { font: 200 clamp(32px, 4.2vw, 44px)/1.1 var(--font-sans); letter-spacing: -0.015em; margin: 8px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.p1-heat { width: clamp(96px, 11vw, 168px); height: 1px; background: var(--heat); margin: 22px 0 0; transform-origin: left; animation: njg-draw 1.4s var(--ease) 0.1s both; }
.p1-lede { color: var(--ink-quiet); font-size: 15px; margin: 16px 0 0; max-width: 46em; }
.p1-when { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin: 12px 0 0; }
.p1-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; }
.p1-tags .note { margin: 0; }
.p1-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 18px; }
.p1-kpi { --c: var(--cut-m); --edge: var(--rule-soft); --face: var(--panel); display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 14px 16px; min-width: 0; text-align: left; color: var(--ink); }
.p1-kpi:hover, .p1-kpi:focus-visible { --edge: var(--accent); }
.kpi-k { font-family: var(--font-label); font-size: 7.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-quiet); line-height: 1.5; }
.p1-kv { font: 400 22px/1.2 var(--font-label); color: var(--ink); margin-top: 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.p1-kv.long { font-size: 16px; }
.p1-ks { font-size: 12px; color: var(--ink-quiet); margin-top: 6px; line-height: 1.45; }
.p1-kpi.lead .p1-kv { color: var(--accent); }
.p1-kpi.bad .p1-kv { color: var(--bad); }
.p1-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.p1-tile { --c: var(--cut-l); --edge: var(--rule-soft); --face: var(--panel); padding: 18px 20px 20px; min-width: 0; }
.p1-tile.span { grid-column: 1 / -1; }
.p1-tile > h2.label { margin: 0 0 14px; }
.p1-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.p1-metrics { margin: 0 0 18px; }
.p1-filter { --c: var(--cut-xs); --edge: var(--rule-soft); --face: var(--panel); display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 11px; color: var(--ink-quiet); font: 300 13px var(--font-sans); transition: color 0.2s; }
.p1-filter:hover { color: var(--ink); --edge: var(--rule); }
.p1-filter.on { --edge: var(--primary); --face: var(--primary); color: var(--on-primary); }
.p1-filter .n { font: 400 8.5px/1 var(--font-label); letter-spacing: 0.06em; opacity: 0.75; }
.go { cursor: pointer; }
.empty, .p1 .note { margin: 6px 0; }

.p1-board { list-style: none; margin: 0; padding: 0; }
.p1-brow { display: grid; grid-template-columns: 30px minmax(160px, 2fr) auto auto minmax(110px, 1fr) minmax(120px, 1fr) auto; gap: 14px; align-items: center; padding: 12px 8px; box-shadow: inset 0 -1px 0 var(--rule-soft); transition: background 0.2s; }
.p1-brow:last-child { box-shadow: none; }
.p1-brow:hover, .p1-brow.hot { background: var(--hover); }
.b-slot { font: 400 10px var(--font-label); color: var(--ink-faint); letter-spacing: 0.08em; }
.b-name { display: grid; gap: 2px; min-width: 0; }
.b-name .row-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-gates { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.b-n { font: 400 10px var(--font-label); color: var(--ink-quiet); }
.b-block, .b-when { font-size: 12.5px; color: var(--ink-quiet); }
.p1-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: none; font: 400 7.5px/1 var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-quiet); background: var(--wash); clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.p1-chip.stage-live { background: var(--accent-soft); color: var(--accent); }
.p1-chip.stage-lab { color: var(--ink); }
button.p1-chip:hover { color: var(--accent); }
.p1-health { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-body); white-space: nowrap; }
.sdot { display: inline-block; width: 7px; height: 7px; background: var(--ink-faint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sdot.st-ok { background: var(--ok); }
.sdot.st-warn { background: var(--warn); }
.sdot.st-over { background: var(--bad); }
.p1-pips { display: inline-flex; gap: 3px; align-items: center; }
.pip { display: inline-block; width: 8px; height: 8px; background: var(--rule); clip-path: polygon(2px 0, 100% 0, 100% calc(100% - 2px), calc(100% - 2px) 100%, 0 100%, 0 2px); }
.pip.g-done { background: var(--ink); }
.pip.g-blocked { background: var(--bad); }
.pip.hot { background: var(--accent); }
.p1-list, .p1-ms, .p1-gates, .p1-gaterows { list-style: none; margin: 0; padding: 0; }
.p1-list li { display: grid; gap: 3px; padding: 11px 0 11px 14px; box-shadow: inset 0 -1px 0 var(--rule-soft); }
.p1-list li:last-child { box-shadow: none; }
.p1-blk { position: relative; }
.p1-blk::before { content: ''; position: absolute; left: 0; top: 14px; width: 5px; height: 5px; background: var(--series-rest); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.p1-blk.sev-high::before { background: var(--bad); }
.p1-blk.hot .row-title, .p1-list li:hover .row-title { color: var(--accent); }
.p1-more { margin-top: 14px; border: none; background: none; padding: 0; font: 400 8.5px var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.p1-more::after { content: ' →'; }
.p1-more:hover { color: var(--accent); }
.p1-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.p1-hbars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.hb-name { font-size: 14px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hb-name a { text-decoration: none; }
.hb-name a:hover { color: var(--accent); }
.p1-hbars .p1-track { grid-column: 1 / -1; }
.hb-meta { grid-column: 1 / -1; font-size: 12px; color: var(--ink-quiet); }
.p1-hbars li.go:hover .hb-name, .p1-hbars li.hot .hb-name { color: var(--accent); }
.p1-track { position: relative; display: block; height: 3px; background: var(--rule-soft); overflow: visible; }
.p1-track.big { height: 8px; }
.p1-fill { display: block; height: 100%; background: var(--ink); transition: width 0.6s var(--ease-expo); }
.p1-hbars li.lead .p1-fill, .p1-fill.lead, .p1-hbars li.hot .p1-fill { background: var(--accent); }
.p1-mark { position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--ink); }
.p1-stop .kpi-sub { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 13px; color: var(--ink-quiet); }
.p1-stop strong { color: var(--ink); font-weight: 400; }

.p1-chart { position: relative; padding-top: 18px; }
.axis-top { position: absolute; top: 0; left: 0; font: 400 8px var(--font-label); letter-spacing: 0.08em; color: var(--ink-faint); }
.p1-cols { display: flex; align-items: stretch; gap: 3px; height: 130px; box-shadow: inset 0 1px 0 var(--rule-soft), inset 0 -1px 0 var(--rule); }
.p1-cols .col { flex: 1; min-width: 2px; display: flex; flex-direction: column-reverse; justify-content: flex-start; transition: background 0.2s; }
.p1-cols .col:hover, .p1-cols .col.hot { background: var(--hover); }
.seg { display: block; width: 100%; background: var(--series-rest); }
.seg.s0, .sw.s0 { background: var(--accent); }
.seg.s1, .sw.s1 { background: var(--ink-quiet); }
.seg.s2, .sw.s2 { background: var(--series-rest); }
.seg.s3, .sw.s3 { background: var(--ink-faint); }
.seg.s4, .sw.s4 { background: var(--rule); }
.seg.hot { background: var(--accent) !important; }
.axis-x { display: flex; justify-content: space-between; margin-top: 8px; font: 400 8px var(--font-label); letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.p1-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-quiet); }
.p1-legend li { display: inline-flex; align-items: center; gap: 7px; }
.p1-legend li strong { font: 400 9.5px var(--font-label); color: var(--ink); letter-spacing: 0.04em; }
.p1-legend li.hot { color: var(--ink); }
.sw { display: inline-block; width: 8px; height: 8px; background: var(--series-rest); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.p1-pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pp { display: grid; gap: 4px; padding: 14px; background: var(--wash); clip-path: polygon(var(--cut-m) 0, 100% 0, 100% calc(100% - var(--cut-m)), calc(100% - var(--cut-m)) 100%, 0 100%, 0 var(--cut-m)); transition: background 0.2s; }
.pp:hover, .pp.hot { background: var(--accent-soft); }
.pp-n { font: 400 24px/1.1 var(--font-label); color: var(--ink); }
.pp.stage-live .pp-n { color: var(--accent); }
.pp-t { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-quiet); }
.pp-names { font-size: 12.5px; color: var(--ink-body); line-height: 1.45; }

.p1-lanes { display: grid; gap: 8px; }
.ln-axis { display: flex; justify-content: space-between; margin-left: 150px; font: 400 8px var(--font-label); letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.ln { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.ln-name { border: none; background: none; padding: 0; text-align: left; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-name:hover { color: var(--accent); }
.ln-track { position: relative; height: 20px; }
.ln-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--rule-soft); }
.ln-today { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--accent); }
.ln-dot { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--ink-quiet); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.ln-dot.done { background: var(--ink); box-shadow: none; }
.ln-dot.hot, .ln-dot:hover { background: var(--accent); box-shadow: none; }
.ln-key { display: inline-block; width: 9px; height: 9px; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--ink-quiet); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.ln-key.done { background: var(--ink); box-shadow: none; }
.ln-key.today { width: 1px; height: 12px; background: var(--accent); box-shadow: none; clip-path: none; }

.p1-gates li, .p1-gaterows li, .p1-ms li { display: grid; gap: 12px; align-items: center; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--rule-soft); font-size: 14px; }
.p1-gates li:last-child, .p1-gaterows li:last-child, .p1-ms li:last-child { box-shadow: none; }
.p1-gates li { grid-template-columns: 10px 1fr auto; }
.p1-gates li > span:nth-child(2) { display: grid; gap: 2px; }
.p1-gaterows li { grid-template-columns: minmax(120px, 1fr) auto auto; }
.p1-gaterows li:hover .row-title { color: var(--accent); }
.p1-ms li { grid-template-columns: 10px 70px 1fr; }
.p1-ms li.done { color: var(--ink-quiet); }
.ms-d { font: 400 9px var(--font-label); letter-spacing: 0.08em; color: var(--ink-quiet); text-transform: uppercase; }
.g-state { font-family: var(--font-label); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-quiet); }
.g-done .g-state, .g-state.g-done { color: var(--ink); }
.g-blocked .g-state, .g-state.g-blocked { color: var(--bad); }
.p1-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.p1-vcard { --c: var(--cut-l); --edge: var(--rule-soft); --face: var(--panel); display: grid; gap: 8px; padding: 18px 20px; min-width: 0; transition: filter 0.2s; }
.p1-vcard:hover, .p1-vcard:focus-visible { --edge: var(--accent); }
.p1-vcard h2 { margin: 0; font: 300 19px/1.3 var(--font-sans); color: var(--ink); }
.p1-vcard .label, .p1-vcard p { margin: 0; }
.p1-next { font-size: 13.5px; color: var(--ink-body); }
.p1-pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.p1-table { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule-soft); clip-path: polygon(var(--cut-m) 0, 100% 0, 100% calc(100% - var(--cut-m)), calc(100% - var(--cut-m)) 100%, 0 100%, 0 var(--cut-m)); }
.p1-tile .p1-table { box-shadow: none; clip-path: none; }
.p1-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.p1-table th, .p1-table td { padding: 11px 14px; text-align: left; vertical-align: top; }
.p1-table th { font-family: var(--font-label); font-size: 8px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-quiet); white-space: nowrap; box-shadow: inset 0 -1px 0 var(--rule); }
.p1-table td { color: var(--ink-body); box-shadow: inset 0 -1px 0 var(--rule-soft); }
.p1-table td:first-child { color: var(--ink); font-weight: 400; }
.p1-table tr:last-child td { box-shadow: none; }
.p1-table tbody tr.go:hover td, .p1-table tbody tr.hot td { background: var(--hover); }
.p1-table .num { text-align: right; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p1-sort { border: none; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.p1-sort:hover { color: var(--accent); }
.p1-tip {
  position: fixed; z-index: 70; max-width: 300px; padding: 12px 14px; display: grid; gap: 3px; pointer-events: none;
  font-size: 12.5px; color: var(--ink-body); line-height: 1.5;
  background: var(--glass-sheen), var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--rule), var(--float);
  clip-path: polygon(var(--cut-s) 0, 100% 0, 100% calc(100% - var(--cut-s)), calc(100% - var(--cut-s)) 100%, 0 100%, 0 var(--cut-s));
}
.p1-tip strong { color: var(--ink); font-weight: 400; font-size: 13.5px; }
.p1-tip .act { color: var(--accent); font-family: var(--font-label); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }

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

/* ---------- Narrow screens: the sidebar slides over as glass ---------- */
@media (max-width: 899px) {
  :root { --header-h: 56px; }
  .mobile-only { display: inline-grid !important; }
  .desktop-only { display: none !important; }
  .chats-panel {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 43;
    width: min(330px, 88vw);
    background: var(--glass-sheen), var(--glass-strong);
    -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    box-shadow: inset -1px 0 0 var(--rule), var(--float-lg);
    transform: translateX(-104%); transition: transform 0.5s var(--ease-expo);
  }
  .chats-panel.open { transform: translateX(0); }
  .chats-backdrop { z-index: 42; }
  .header { padding: env(safe-area-inset-top) 8px 0 8px; gap: 4px; }
  .column, .column.wide { padding: 18px 16px 28px; }
  .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 26px; }
  .card, .card.decision { padding: 18px 18px; }
  .list-card { padding: 4px 18px; }
  .choice-row { grid-template-columns: 1fr; gap: 6px; }
  .btn.choice { width: 100%; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .kpi-grid, .p1-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p1-grid, .board-cards { grid-template-columns: minmax(0, 1fr); }
  .p1-brow { grid-template-columns: 24px 1fr auto; gap: 6px 10px; padding: 12px 4px; }
  .p1-brow .b-gates, .p1-brow .b-block, .p1-brow .b-when { grid-column: 2 / -1; }
  .p1-brow .b-health { grid-column: 2 / -1; }
  .p1-pipe { grid-template-columns: repeat(2, 1fr); }
  .ln-axis { margin-left: 100px; }
  .ln { grid-template-columns: 90px 1fr; }
  .p1-table table { min-width: 520px; }
  .idea-grid { grid-template-columns: minmax(0, 1fr); }
  .pills .freeze-btn { margin-left: 0; }
  .toast { right: 16px; left: 16px; width: auto; }
}

/* Talk to Orla: the live line on other pages, the talk button and the transcript. */
.orla-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.orla-bar > span { flex: 1; }
.orla-talk { margin-top: 14px; }
.orla-lines { margin-top: 16px; max-height: 50vh; overflow-y: auto; }
