/* ==========================================================================
   LID-O HQ — core design system
   Dark-first, restrained, precise. Brand red is a signal, not a decoration.
   Sections: fonts · tokens · base · layout shell · page · components · data ·
             motif (O) · charts · feed/team/settings · motion · responsive · print
   Module CSS goes to /assets/css/<module>.css and should only use the tokens below.
   ========================================================================== */

/* ---------- fonts (self-hosted, from the Shopify theme) ---------- */
@font-face { font-family: "Benzin"; src: url("../fonts/benzin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Benzin"; src: url("../fonts/benzin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Benzin"; src: url("../fonts/benzin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Benzin"; src: url("../fonts/benzin-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("../fonts/klavika-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("../fonts/klavika-500.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("../fonts/klavika-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0A0A0B;
  --s1: #111113;
  --s2: #161618;
  --s3: #1C1C1F;
  --s4: #242428;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .11);
  --line-3: rgba(255, 255, 255, .18);
  --hover: rgba(255, 255, 255, .045);
  --press: rgba(255, 255, 255, .08);
  --text: #F5F5F7;
  --text-2: #A1A1A6;
  --text-3: #8A8A8F;   /* ≥ 5.4:1 on --s1 (AA for 11–12px meta) */
  --red: #ED293A;
  --red-hi: #FF3B4C;
  --red-btn: #D61A2C;    /* filled buttons: white text 5.2:1 */
  --red-btn-hi: #E42536;
  --red-soft: rgba(237, 41, 58, .13);
  --red-line: rgba(237, 41, 58, .42);
  --green: #30D158;
  --green-soft: rgba(48, 209, 88, .13);
  --amber: #FFD60A;
  --amber-soft: rgba(255, 214, 10, .12);
  --blue: #64D2FF;
  --blue-soft: rgba(100, 210, 255, .12);
  --violet: #BF5AF2;
  --violet-soft: rgba(191, 90, 242, .14);
  --orange: #FF9F0A;
  /* chart series: neutral first, then calm signals. Red is never a data series (it means target / anomaly / today). */
  --c1: #D6D6DB; --c2: #64D2FF; --c3: #FFB340; --c4: #8A8A8F; --c5: #30D158; --c6: #BF5AF2; --c7: #5E8BFF;
  /* channels — one colour per channel in every module (channel_color() in app/charts.php maps labels to these) */
  --ch-shop: #E5E5EA;      /* lid-o.com / Shopify (our own store) */
  --ch-amazon-us: #FF9F0A; --ch-amazon-eu: #FFD27A;
  --ch-b2b: #64D2FF; --ch-manual: #8A8A8F;
  --ch-instagram: #BF5AF2; --ch-tiktok: #5AE0D8; --ch-facebook: #5E8BFF; --ch-youtube: #C7C7CC;
  --ch-pinterest: #F2A7C3; --ch-linkedin: #3DA5FF; --ch-amazon-store: #FFB340; --ch-other: #6E6E73;

  --font-display: "Benzin", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Klavika", "Geist", -apple-system, BlinkMacSystemFont, "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --r-lg: 14px; --r-md: 10px; --r-sm: 8px; --r-xs: 6px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --ease-panel: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms; --t-med: 240ms; --t-slow: 520ms;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 12px 32px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 32px 80px -20px rgba(0, 0, 0, .85), 0 8px 24px rgba(0, 0, 0, .45);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px rgba(237, 41, 58, .55);

  --sidebar-w: 244px;
  --sidebar-w-c: 64px;
  --topbar-h: 56px;
  --ribbon-h: 0px;
}
.is-demo { --ribbon-h: 30px; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + var(--ribbon-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font-text); letter-spacing: .005em;
  font-feature-settings: "tnum" 1, "lnum" 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; min-height: 100vh; overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.2; letter-spacing: 0; }
p { margin: 0 0 .6em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 500; }
img, svg { display: block; max-width: 100%; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .86em; font-feature-settings: normal; letter-spacing: 0; }
code { background: var(--s3); border: 1px solid var(--line); border-radius: 5px; padding: .08em .38em; color: var(--text); }
hr, .divider { border: 0; height: 1px; background: var(--line); margin: var(--sp-4) 0; }
::selection { background: rgba(237, 41, 58, .35); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--red); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 500; transition: top var(--t-med) var(--ease-panel); }
.skip-link:focus { top: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .16); }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1.3 var(--font-text); text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.display-num { font: 600 30px/1.05 var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; display: block; }
/* Benzin's 0 is a perfect circle — it reads as the brand O. Zero/empty figures use Klavika. */
.display-num.is-zero, .chart-head__value.is-zero { font-family: var(--font-text); font-weight: 600; letter-spacing: -.02em; }
.tone-red { color: var(--red); } .tone-green { color: var(--green); } .tone-amber { color: var(--amber); } .tone-blue { color: var(--blue); } .tone-violet { color: var(--violet); } .tone-gray { color: var(--text-2); }
.stack { display: grid; gap: var(--sp-3); }
.stack-sm { display: grid; gap: var(--sp-2); }
.stack-lg { display: grid; gap: var(--sp-5); align-content: start; }
.chips, .ds-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.link-ext { display: inline-flex; align-items: center; gap: 4px; color: var(--text); border-bottom: 1px solid var(--line-3); }
.link-ext:hover { border-color: var(--red); }
.link-btn { color: var(--text-2); font-size: 12px; font-weight: 500; }
.link-btn:hover { color: var(--text); }
.dot-sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); vertical-align: middle; margin: 0 8px; }

/* ---------- demo ribbon ---------- */
.demo-ribbon {
  position: fixed; inset: 0 0 auto 0; height: var(--ribbon-h); z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: #0A0A0B; font: 700 11px/1 var(--font-text); letter-spacing: .16em; text-transform: uppercase;
  background: repeating-linear-gradient(-45deg, #FFD60A 0 14px, #F5C400 14px 28px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}
.demo-ribbon span { display: inline-flex; align-items: center; gap: 8px; background: #FFD60A; padding: 4px 10px; border-radius: 4px; }
.demo-ribbon button { font: 700 10px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; background: #0A0A0B; color: #FFD60A; padding: 5px 10px; border-radius: 4px; }
.demo-ribbon button:hover { background: #1C1C1F; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; padding-top: var(--ribbon-h); transition: grid-template-columns var(--t-slow) var(--ease-panel); }
.sb-collapsed .app { grid-template-columns: var(--sidebar-w-c) minmax(0, 1fr); }

.sidebar {
  position: sticky; top: var(--ribbon-h); height: calc(100vh - var(--ribbon-h)); z-index: 40;
  display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line);
  overflow: hidden;
}
.sidebar__head { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); padding: 0 12px 0 18px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__logo { height: 19px; width: auto; }
.brand__o { display: none; width: 26px; height: 26px; color: var(--red); }
.brand__hq { font: 700 10px/1 var(--font-display); letter-spacing: .14em; color: var(--text-2); padding: 4px 6px 3px; border: 1px solid var(--line-2); border-radius: 5px; }
.sidebar__collapse { opacity: 0; transition: opacity var(--t-fast); }
.sidebar:hover .sidebar__collapse, .sidebar__collapse:focus-visible { opacity: 1; }

.nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 10px 16px; scrollbar-width: none; }
/* scroll affordance: fade the edge that has more items (classes set by hq.js) */
.nav.can-up { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px); mask-image: linear-gradient(180deg, transparent 0, #000 28px); }
.nav.can-down { -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 36px); mask-image: linear-gradient(0deg, transparent 0, #000 36px); }
.nav.can-up.can-down { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent 100%); }
.nav::-webkit-scrollbar { display: none; }
.nav__group { padding-top: 14px; }
.nav__group:first-child { padding-top: 4px; }
.nav__label { font: 500 10.5px/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 0 10px 8px; white-space: nowrap; }
.nav__item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 400; font-size: 14px; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast);
}
.nav__item:hover { background: var(--hover); color: var(--text); }
.nav__item.is-active { background: rgba(255, 255, 255, .065); color: var(--text); }
.nav__item.is-active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 2px; border-radius: 0 2px 2px 0; background: var(--red); }
.nav__item.is-active .nav__icon { color: var(--red); }
.nav__item.is-stub { color: var(--text-3); }
.nav__item.is-stub:hover { color: var(--text-2); }
.nav__icon { display: grid; place-items: center; width: 20px; flex: none; }
.nav__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav__badge { position: relative; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--s4); color: var(--text); font: 600 11px/18px var(--font-text); text-align: center; font-variant-numeric: tabular-nums; }
.nav__badge--alert { padding-left: 13px; }
.nav__badge--alert::before { content: ""; position: absolute; left: 5px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.nav__soon { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--text-3); flex: none; }
.nav__sub { display: grid; gap: 1px; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1px solid var(--line); animation: fade-down var(--t-med) var(--ease-panel); }
.nav__subitem { display: block; padding: 6px 10px; border-radius: var(--r-xs); color: var(--text-3); font-size: 13.5px; white-space: nowrap; }
.nav__subitem:hover { color: var(--text); background: var(--hover); }
.nav__subitem.is-active { color: var(--text); font-weight: 500; }

.sidebar__foot { padding: 10px; border-top: 1px solid var(--line); flex: none; }
.ws-switch__btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; transition: background var(--t-fast); }
.ws-switch__btn:hover { background: var(--hover); }
.ws-switch__dot { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.ws-switch__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.ws-switch__btn.is-demo .ws-switch__dot::after { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.ws-switch__label { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.ws-switch__hint { display: block; font-size: 11.5px; color: var(--text-3); }
.ws-switch__icon { color: var(--text-3); }

/* collapsed sidebar */
.sb-collapsed .sidebar__head { padding: 0; justify-content: center; }
.sb-collapsed .brand__logo, .sb-collapsed .brand__hq, .sb-collapsed .sidebar__collapse, .sb-collapsed .nav__text, .sb-collapsed .nav__label,
.sb-collapsed .nav__sub, .sb-collapsed .nav__soon, .sb-collapsed .ws-switch__icon { display: none; }
.sb-collapsed .brand__o { display: block; }
.sb-collapsed .nav { padding: 6px 10px; }
.sb-collapsed .nav__group { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.sb-collapsed .nav__group:first-child { border: 0; margin: 0; }
.sb-collapsed .nav__item { justify-content: center; padding: 0; }
.sb-collapsed .nav__badge { position: absolute; top: 4px; right: 6px; min-width: 7px; width: 7px; height: 7px; padding: 0; font-size: 0; background: var(--text-3); }
.sb-collapsed .nav__badge--alert { background: var(--red); }
.sb-collapsed .nav__badge--alert::before { display: none; }
.sb-collapsed .ws-switch__btn { justify-content: center; padding: 8px 0; }
.sidebar-scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: var(--ribbon-h); z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 20px 0 24px;
  background: rgba(10, 10, 11, .78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar__menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 13.5px; color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs > span:last-child { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs__home { color: var(--text-3); display: grid; place-items: center; }
.crumbs__home:hover { color: var(--red); }
.crumbs__o { width: 16px; height: 16px; }
.crumbs__sep { color: var(--text-3); display: grid; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; width: min(340px, 32vw); height: 34px; padding: 0 8px 0 12px;
  background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text-3); font-size: 13.5px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.search-trigger:hover { border-color: var(--line-2); background: var(--s2); color: var(--text-2); }
.search-trigger > span:nth-child(2) { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; }
.search-trigger__kbd { display: flex; gap: 3px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; }
.bell__count { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--font-text); text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pop .5s var(--ease-spring); }
.user-btn { border-radius: 50%; padding: 2px; transition: box-shadow var(--t-fast); }
.user-btn:hover { box-shadow: 0 0 0 2px var(--line-2); }

.content { flex: 1; padding: 32px 40px 80px; min-width: 0; }
.content:focus { box-shadow: none; }

/* ---------- page ---------- */
.page { max-width: 1320px; margin: 0 auto; }
.page--narrow { max-width: 820px; }
.content--wide .page { max-width: none; }
.page--center { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-code { font: 700 12px/1 var(--font-text); letter-spacing: .3em; color: var(--text-3); margin-top: 12px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.page-header__main { min-width: 0; flex: 1 1 380px; }
.page-header__eyebrow { font: 500 11px/1 var(--font-text); text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin-bottom: 10px; }
.page-header__title { font: 700 26px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; color: var(--text); overflow-wrap: anywhere; }
/* the "dosage" rule — the invoice's red hairline, as a measured scoop: 2px red + 24px grey */
.page-header__title::after { content: ""; display: block; width: 34px; height: 2px; margin-top: 14px; border-radius: 1px; background: linear-gradient(90deg, var(--red) 0 10px, transparent 10px 12px, var(--line-3) 12px 100%); }
.page-header__sub { color: var(--text-2); margin-top: 10px; max-width: 64ch; font-size: 15px; }
.page-header__meta { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-header__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.section { margin-top: 40px; }
.section--tight { margin-top: 28px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section__title { font: 600 17px/1.25 var(--font-text); letter-spacing: .005em; margin-bottom: 4px; }
.section__eyebrow { font: 500 11px/1 var(--font-text); text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin-bottom: 12px; }
.section-label { display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--font-text); text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin: 0 0 12px; }
.section-label:not(:first-child) { margin-top: 24px; }

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.grid-12 > * { min-width: 0; }
p code, li code, dd code { overflow-wrap: anywhere; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }

/* ---------- cards ---------- */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-1); min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--tight { padding: 16px; }
.card--plain { background: transparent; border: 0; box-shadow: none; padding: 0; }
.card--plain > .card__head { padding: 0 0 12px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 22px; }
.card__head--pad { padding: 16px 20px 0; margin-bottom: 12px; }
.card__title { font: 500 13.5px/1.3 var(--font-text); color: var(--text); letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.card__title-link { display: inline-flex; align-items: center; gap: 4px; }
.card__title-link .icon { color: var(--text-3); transition: transform var(--t-med) var(--ease-spring), color var(--t-fast); }
.card__title-link:hover .icon { transform: translateX(3px); color: var(--red); }
.card__actions { display: flex; gap: 6px; }
.card__foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.card--widget { height: 100%; display: flex; flex-direction: column; }
.card--widget > .card__body { flex: 1; min-height: 0; }
section.card > h3.card__title { margin-bottom: 14px; }
.form-card { padding: 24px; }
.form-section + .form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-section h3 { font: 500 11px/1 var(--font-text); text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 16px; }

/* ---------- buttons ---------- */
.btn {
  --h: 36px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 500 13.5px/1 var(--font-text); letter-spacing: .01em; white-space: nowrap; user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--red-btn); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 16px -6px rgba(214, 26, 44, .6); }
.btn--primary:hover:not(:disabled) { background: var(--red-btn-hi); }
.btn--danger-fill { background: var(--red-btn); color: #fff; border-color: transparent; }
.btn--danger-fill:hover:not(:disabled) { background: var(--red-btn-hi); }
.btn--secondary { background: var(--s3); border-color: var(--line-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }
.btn--secondary:hover:not(:disabled) { background: var(--s4); border-color: var(--line-3); }
.btn--ghost { color: var(--text-2); }
.btn--ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.btn--subtle { background: var(--hover); color: var(--text); }
.btn--danger { background: rgba(237, 41, 58, .12); color: #FF6B78; border-color: rgba(237, 41, 58, .3); }
.btn--danger:hover:not(:disabled) { background: rgba(237, 41, 58, .2); }
.btn--danger-text { color: #FF6B78 !important; }
.btn--sm { --h: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn--lg { --h: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--h); padding: 0; }
.btn .kbd--btn { margin-left: 2px; margin-right: -4px; }
.btn--primary .kbd--btn { background: rgba(0, 0, 0, .2); border-color: rgba(255, 255, 255, .2); color: #fff; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-spring); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.is-disabled { opacity: .3; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.inline-form { display: inline-flex; }
.create-btn { padding-left: 8px; }
.create-btn.btn--secondary .icon { color: var(--red); }

.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--s3); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--text-2); font: 500 11px/1 var(--font-text); }
.kbd + .kbd { margin-left: 3px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 16px; }
.form-grid > .field:not([class*="span-"]) { grid-column: span 12; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.form-actions > .muted:first-child, .form-actions > span:first-child { margin-right: auto; }
.form-actions--pad { padding: 16px 20px; margin: 0; border-top: 1px solid var(--line); }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field__label { font: 500 12.5px/1.2 var(--font-text); color: var(--text-2); }
.field__label .req { color: var(--red); font-style: normal; }
.field__label .opt { color: var(--text-3); font-style: normal; font-weight: 300; margin-left: 4px; }
.field__help { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.field__error { font-size: 12.5px; color: #FF6B78; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: rgba(237, 41, 58, .6); }
.input, .select, .textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--text); font-size: 14.5px; font-weight: 400; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); font-weight: 300; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(237, 41, 58, .7); box-shadow: 0 0 0 3px rgba(237, 41, 58, .16); background: var(--s1); }
.input--sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.input--bare { border: 0; background: transparent; padding: 0; min-height: 0; box-shadow: none !important; }
.input[type="date"] { color-scheme: dark; }
.input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.7); }
.input[type="number"] { font-variant-numeric: tabular-nums; }
.textarea { resize: vertical; line-height: 1.5; min-height: 64px; }
.textarea--bare { border: 0; background: transparent; padding: 6px 0; min-height: 0; resize: none; box-shadow: none !important; }
.textarea--soft { background: transparent; border-color: var(--line); }
.select-wrap { position: relative; display: block; }
.select-wrap .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.select--sm { min-height: 30px; padding: 4px 30px 4px 10px; font-size: 13px; }
.select option { background: var(--s2); color: var(--text); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); overflow: hidden; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.input-group:focus-within { border-color: rgba(237, 41, 58, .7); box-shadow: 0 0 0 3px rgba(237, 41, 58, .16); }
.input-group .input { border: 0; box-shadow: none; background: transparent; }
.input-group__addon { display: grid; place-items: center; padding: 0 12px; color: var(--text-3); background: var(--s2); font-size: 13px; border-right: 1px solid var(--line); }
.input-group__addon:last-child { border-right: 0; border-left: 1px solid var(--line); }
.input-reveal { position: relative; display: block; }
.input-reveal .input { padding-right: 42px; }
.input-reveal .icon-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 36px; height: 22px; border-radius: 11px; background: var(--s4); border: 1px solid var(--line-2); transition: background var(--t-med) var(--ease-out), border-color var(--t-med); flex: none; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform var(--t-med) var(--ease-spring); }
.switch input:checked + .switch__track { background: var(--red); border-color: var(--red); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(14px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--focus); }
.switch__label { font-size: 14px; font-weight: 400; color: var(--text); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label, .seg__item { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); white-space: nowrap; }
.seg label:hover, .seg__item:hover { color: var(--text); }
.seg input:checked + label, .seg__item.is-active { background: var(--s4); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .06) inset; }
.seg input:focus-visible + label { box-shadow: var(--focus); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px transparent; transition: box-shadow var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.swatch span:hover { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.swatch input:focus-visible + span { box-shadow: var(--focus); }
.strength { display: inline-flex; gap: 4px; width: 120px; }
.strength i { flex: 1; height: 3px; border-radius: 2px; background: var(--s4); transition: background var(--t-med); }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--orange); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--amber); }
.strength[data-level="4"] i { background: var(--green); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px 12px; color: var(--text-2); font-size: 14px; font-weight: 400; white-space: nowrap; transition: color var(--t-fast); }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); font-weight: 500; }
.tab.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--red); view-transition-name: tab-indicator; }
.tab__count { font-size: 11.5px; color: var(--text-3); background: var(--s3); border-radius: 9px; padding: 1px 7px; font-weight: 500; }

.subnav { display: grid; gap: 2px; align-content: start; position: sticky; top: calc(var(--topbar-h) + var(--ribbon-h) + 24px); }
.subnav__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; }
.subnav__item:hover { background: var(--hover); color: var(--text); }
.subnav__item.is-active { background: rgba(255, 255, 255, .065); color: var(--text); font-weight: 500; }
.subnav__item.is-active .icon { color: var(--red); }
.subnav__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-left: auto; box-shadow: 0 0 0 3px var(--amber-soft); }

/* ---------- badges, pills, tags, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 6px; font: 500 11.5px/1 var(--font-text); white-space: nowrap; letter-spacing: .01em; vertical-align: middle; }
.badge--gray { background: rgba(255, 255, 255, .07); color: var(--text-2); }
.badge--red { background: var(--red-soft); color: #FF6B78; }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--violet { background: var(--violet-soft); color: #D58CFF; }
.badge--outline { border: 1px solid var(--line-2); color: var(--text-2); background: transparent; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px 0 8px; border-radius: var(--r-pill); font: 500 12px/1 var(--font-text); white-space: nowrap; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--gray i { background: var(--text-3); } .pill--gray { color: var(--text-2); }
.pill--red i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.pill--green i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pill--amber i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.pill--blue i { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.pill--violet i { background: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
a.pill:hover { border-color: var(--line-3); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px/1 var(--font-text); background: rgba(255, 255, 255, .06); color: var(--text-2); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--text-3); }
.tag--red::before { background: var(--red); } .tag--green::before { background: var(--green); } .tag--amber::before { background: var(--amber); }
.tag--blue::before { background: var(--blue); } .tag--violet::before { background: var(--violet); }
.tag__x { display: grid; place-items: center; width: 14px; height: 14px; margin-right: -3px; border-radius: 3px; color: var(--text-3); }
.tag__x:hover { background: var(--press); color: var(--text); }
.tag-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-editor__input { background: transparent; border: 1px dashed var(--line-2); border-radius: 6px; height: 22px; padding: 0 8px; font-size: 12px; min-width: 70px; color: var(--text); }
.tag-editor__input:focus { border-style: solid; border-color: var(--red-line); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: border-color var(--t-fast), color var(--t-fast); }
a.chip:hover, button.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip--sm { height: 22px; padding: 0 8px; font-size: 12px; }
.chip--add { border-style: dashed; }
.saved-views { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; color: var(--text-3); }

/* ---------- avatars ---------- */
.avatar {
  --s: 32px; --av: #6E6E73;
  display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--av) 60%, #fff 0%) 0%, color-mix(in srgb, var(--av) 70%, #000) 100%);
  color: #fff; font: 600 calc(var(--s) * .38)/1 var(--font-text); letter-spacing: .02em; text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset; user-select: none;
}
.avatar--xs { --s: 20px; font-size: 8.5px; }
.avatar--sm { --s: 26px; }
.avatar--md { --s: 34px; }
.avatar--lg { --s: 44px; }
.avatar--xl { --s: 56px; }
.avatar--xxl { --s: 88px; font-size: 30px; }
.avatar--empty { background: var(--s3); box-shadow: 0 0 0 1px var(--line-2) inset; }
.avatar--more { background: var(--s4); color: var(--text-2); font-size: 10px; }
.avatar--system { background: var(--s3); color: var(--text-2); box-shadow: 0 0 0 1px var(--line-2) inset; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--s1); }
.avatar-stack .avatar + .avatar { margin-left: -7px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; white-space: nowrap; max-width: 100%; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; }
.user-chip:hover span { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }

/* ---------- alerts / banners / callouts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 16px; }
.alert--danger { background: rgba(237, 41, 58, .1); border: 1px solid rgba(237, 41, 58, .3); color: #FF8A94; }
.alert .icon { margin-top: 2px; }
.banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 20px; border: 1px solid; }
.banner--warning { background: linear-gradient(90deg, rgba(255, 214, 10, .09), rgba(255, 214, 10, .03)); border-color: rgba(255, 214, 10, .28); }
.banner--warning .banner__icon { color: var(--amber); background: var(--amber-soft); }
.banner--success { background: linear-gradient(90deg, rgba(48, 209, 88, .08), rgba(48, 209, 88, .02)); border-color: rgba(48, 209, 88, .25); }
.banner--success .banner__icon { color: var(--green); background: var(--green-soft); }
.banner__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.banner__body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.banner__body b { font-weight: 500; }
.banner__body span { color: var(--text-2); font-size: 14px; }
.callout { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; }
.callout .icon { margin-top: 3px; flex: none; }
.reveal { display: flex; gap: 16px; padding: 18px; border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(237, 41, 58, .12), rgba(237, 41, 58, .03)); border: 1px solid var(--red-line); margin-bottom: 20px; animation: rise .6s var(--ease-panel); }
.reveal__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--red-soft); color: var(--red); flex: none; }
.reveal__body { display: grid; gap: 4px; min-width: 0; }
.reveal__body > span { color: var(--text-2); font-size: 14px; }
.reveal__secret { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.reveal__secret code { font-size: 16px; padding: 6px 10px; letter-spacing: .04em; }

/* ---------- KPI ---------- */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.page--dashboard .kpi-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 28px; }
.page--dashboard .kpi-strip > .kpi:nth-child(-n+6) { min-height: 140px; }
.page--dashboard .kpi-strip > .kpi:nth-child(-n+6) { --kpi-fs: 28px; }
.page--dashboard .kpi-strip > .kpi:nth-child(n+7) { min-height: 112px; background: transparent; box-shadow: none; }
.page--dashboard .kpi-strip > .kpi:nth-child(n+7) { --kpi-fs: 21px; }
.kpi {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 128px; padding: 16px 16px 14px; overflow: hidden;
  background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease-spring), background var(--t-med);
}
a.kpi:hover { border-color: var(--line-2); background: var(--s2); transform: translateY(-2px); }
.kpi__label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.kpi__label .icon { color: var(--text-3); }
.kpi__value { font: 600 26px/1 var(--font-text); letter-spacing: -.015em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; position: relative; z-index: 1; }
.kpi__value--empty { color: var(--text-3); }
/* Long figures shrink to fit the card instead of clipping (Benzin ≈ .78em per glyph). */
.kpi { container-type: inline-size; }
.kpi__value[style*="--len"] { font-size: min(var(--kpi-fs, 26px), calc(100cqi / (var(--len) * .62))); }
.kpi__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; position: relative; z-index: 1; }
.kpi__hint { color: var(--text-3); font-size: 12px; line-height: 1.35; }
.kpi__value--empty + .kpi__hint { margin-top: auto; }
.kpi__spark { position: absolute; right: 0; bottom: 0; width: 62%; height: 40px; opacity: .42; pointer-events: none; }
.kpi__spark .spark { width: 100%; height: 100%; }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 5px; font: 600 11.5px/1 var(--font-text); }
.delta--up, .delta--good { color: var(--green); background: var(--green-soft); }
.delta--down, .delta--bad { color: #FF6B78; background: var(--red-soft); }
.delta--flat { color: var(--text-2); background: var(--hover); }
.spark--up, .spark--good { color: var(--green); } .spark--down, .spark--bad, .spark--flat { color: var(--text-3); }
.stat-list { display: grid; gap: 0; margin: 0; }
.stat-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stat-list > div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--text-2); font-size: 13.5px; }
.stat-list dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.props { display: grid; gap: 0; margin: 0; }
.props > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); min-height: 40px; }
.props > div:last-child { border-bottom: 0; }
.props dt { color: var(--text-3); font-size: 13px; }
.props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- data table ---------- */
.table-wrap { position: relative; overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { border-radius: inherit; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  position: sticky; top: 0; z-index: 2; background: var(--s1); text-align: left; white-space: nowrap;
  padding: 10px 14px; font: 500 12px/1.2 var(--font-text); color: var(--text-3); letter-spacing: .02em; border-bottom: 1px solid var(--line);
  user-select: none;
}
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--text); }
.table th .icon { display: inline-block; margin-left: 4px; opacity: 0; transition: opacity var(--t-fast); vertical-align: -1px; }
.table th[data-sort]:hover .icon, .table th[aria-sort] .icon { opacity: 1; }
.table th[aria-sort] { color: var(--text); }
.table th > span { vertical-align: middle; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-selected { background: rgba(237, 41, 58, .06); }
.table--dense td { padding: 8px 14px; font-size: 13.5px; }
.table__check { width: 40px; padding-right: 0 !important; }
.table input[type="checkbox"], .raci-opt input { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; }
.ta-left { text-align: left; } .ta-right { text-align: right !important; } .ta-center { text-align: center !important; }
.cell-title { display: block; font-weight: 500; color: var(--text); }
a.cell-title:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.cell-sub { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.cell-person { display: inline-flex; align-items: center; gap: 10px; }
.cell-person > span { display: grid; }
.cell-person small { color: var(--text-3); font-size: 12px; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card > .toolbar:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.toolbar__search { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; height: 32px; padding: 0 10px; color: var(--text-3); border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); transition: border-color var(--t-fast); }
.toolbar__search:focus-within { border-color: var(--red-line); }
.toolbar__search input { font-size: 13.5px; }
.toolbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.toolbar + .table-wrap .table th { top: 0; }
.selection-bar { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 12px; margin: 12px auto 0; width: max-content; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--s3); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); animation: rise .35s var(--ease-spring); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.pager__btns { display: flex; gap: 6px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters .toolbar__search { flex: 1 1 240px; height: 30px; }
.filters .select-wrap { min-width: 140px; }
.filters__dates { display: inline-flex; align-items: center; gap: 6px; }
.filters__dates .input { width: 140px; }

/* ---------- empty states (the thin O ring) ---------- */
.empty { display: grid; justify-items: center; text-align: center; padding: 48px 24px; gap: 4px; }
.empty__ring { position: relative; width: 120px; height: 120px; margin-bottom: 18px; color: var(--text-3); }
.empty__ring > svg { width: 100%; height: 100%; overflow: visible; }
.empty__ring circle { fill: none; stroke: currentColor; stroke-width: 1; opacity: .5; }
.empty__ring .empty__ring-inner { opacity: .18; stroke-dasharray: 2 5; }
.empty__ring > svg > rect { fill: var(--red); transform-origin: 60px 60px; animation: ring-notch 900ms var(--ease-spring) 300ms 1 both; }
.empty__icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); }
.empty__title { font: 500 16px/1.3 var(--font-text); color: var(--text); }
.empty__text { color: var(--text-2); max-width: 46ch; font-size: 14px; margin-top: 4px; }
.empty__actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.empty--sm { padding: 24px 12px; }
.empty--sm .empty__ring { width: 72px; height: 72px; margin-bottom: 12px; }
.empty--sm .empty__title { font-size: 14.5px; }
.empty--sm .empty__text { font-size: 13px; }
.empty--lg { padding: 72px 24px; }
.empty--lg .empty__ring { width: 160px; height: 160px; }

/* ---------- skeleton ---------- */
.skeleton-group { display: grid; gap: 10px; padding: 4px 0; }
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--s2) 0%, var(--s4) 40%, var(--s2) 80%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }

/* ---------- the O: progress ring ---------- */
.oring { --size: 64px; --ring: var(--red); position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none; }
.oring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.oring__track { fill: none; stroke: rgba(255, 255, 255, .07); }
.oring__arc { fill: none; stroke: var(--ring); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--off); animation: oring-arc 1.3s var(--ease-panel) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.oring.is-zero .oring__arc { opacity: 0; }
.oring__head { transform-box: view-box; transform-origin: 50px 50px; transform: rotate(var(--a)); animation: oring-head 1.3s var(--ease-panel) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.oring__head rect { fill: var(--text); stroke: var(--bg); stroke-width: 2.5; }
.oring--muted { --ring: rgba(255, 255, 255, .3); }
.oring--muted .oring__head rect { fill: var(--text-3); }
.oring--done { --ring: var(--green); }
.oring--done .oring__track { stroke: var(--green); }
.oring--white { --ring: var(--text); }
.oring--green { --ring: var(--green); } .oring--amber { --ring: var(--amber); } .oring--red { --ring: var(--red); }
.oring__label { position: relative; display: grid; justify-items: center; line-height: 1; text-align: center; }
.oring__label b { font: 600 calc(var(--size) * .22)/1 var(--font-text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.oring__label small { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.oring--done .oring__label b { color: var(--green); }

/* O-dial spinner: rotate one notch · click · settle */
.odial { --size: 20px; display: inline-grid; place-items: center; width: var(--size); height: var(--size); color: var(--red); }
.odial svg { width: 100%; height: 100%; animation: odial 3.2s infinite; }

/* ---------- menus, dropdowns ---------- */
.dropdown { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 220px; max-width: min(360px, 92vw); padding: 6px;
  background: rgba(28, 28, 31, .96); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top left; pointer-events: none; visibility: hidden;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-med) var(--ease-spring), visibility 0s linear var(--t-med);
}
.menu--right { left: auto; right: 0; transform-origin: top right; }
.dropdown.is-open > .menu, .dropdown.is-open > [data-dropdown-menu] { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.menu__label { padding: 8px 10px 6px; font: 500 10.5px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.menu__item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--text); font-size: 14px; font-weight: 400; text-align: left; transition: background var(--t-fast); }
.menu__item:hover, .menu__item:focus-visible { background: var(--press); box-shadow: none; }
.menu__item > .icon:first-child { color: var(--text-2); }
.menu__item--danger { color: #FF6B78; }
.menu__text { flex: 1; display: grid; gap: 1px; min-width: 0; }
.menu__text b { font-weight: 500; }
.menu__text small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu__check { color: var(--red); }
.menu__sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin: -6px -6px 6px; }
.menu__user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin: -6px -6px 6px; padding-top: 14px; }
.menu__user span { display: grid; min-width: 0; }
.menu__user small { color: var(--text-3); font-size: 12.5px; }
.menu--user { min-width: 260px; }
.menu--notifs { width: 380px; padding: 6px; }
.menu__scroll { max-height: min(460px, 60vh); overflow-y: auto; margin: 0 -2px; }
.menu--create { width: 600px; max-width: calc(100vw - 24px); padding: 6px; }
.menu--create .menu__scroll { max-height: min(560px, 70vh); }
.menu__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; align-items: start; }
.menu__group { min-width: 0; padding-bottom: 4px; }
.menu__foot { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 8px; position: relative; }
.notif:hover { background: var(--press); }
.notif.is-unread::after { content: ""; position: absolute; right: 10px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.notif__body { display: grid; gap: 2px; min-width: 0; padding-right: 14px; }
.notif__title { font-size: 13.5px; line-height: 1.35; }
.notif.is-unread .notif__title { font-weight: 500; }
.notif__text { font-size: 12.5px; color: var(--text-2); }
.notif__meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); }
.notif-empty { display: grid; justify-items: center; gap: 4px; padding: 28px 16px; text-align: center; }
.notif-empty__o { width: 36px; height: 36px; color: var(--text-3); opacity: .5; margin-bottom: 8px; }
.notif-empty span { color: var(--text-3); font-size: 13px; }

/* ---------- tooltip ---------- */
.tooltip { position: fixed; z-index: 200; max-width: 280px; padding: 6px 9px; border-radius: 7px; background: #F5F5F7; color: #0A0A0B; font: 500 12px/1.35 var(--font-text); pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(2px); transition: opacity 120ms, transform 160ms var(--ease-out); white-space: pre-line; }
.tooltip.is-on { opacity: 1; transform: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 12px 12px 14px; border-radius: 12px; background: rgba(28, 28, 31, .97); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); font-size: 14px; animation: toast-in .5s var(--ease-spring) both; }
.toast.is-out { animation: toast-out .28s var(--ease-out) forwards; }
.toast__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.toast--success .toast__icon { background: var(--green-soft); color: var(--green); }
.toast--error .toast__icon { background: var(--red-soft); color: #FF6B78; }
.toast--info .toast__icon { background: var(--blue-soft); color: var(--blue); }
.toast__msg { flex: 1; min-width: 0; }
.toast .icon-btn { width: 24px; height: 24px; }

/* ---------- drawer & modal ---------- */
.drawer, .modal, .palette { position: fixed; inset: 0; z-index: 120; }
.drawer__scrim, .modal__scrim, .palette__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in var(--t-med) var(--ease-out); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); display: flex; flex-direction: column; background: var(--s1); border-left: 1px solid var(--line-2); box-shadow: var(--shadow-3); animation: drawer-in var(--t-slow) var(--ease-panel); }
.drawer.is-closing .drawer__panel { animation: drawer-out var(--t-med) var(--ease-out) forwards; }
.drawer.is-closing .drawer__scrim, .modal.is-closing .modal__scrim { animation: fade-out var(--t-med) forwards; }
.drawer__form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font: 600 18px/1.25 var(--font-text); margin-top: 6px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer__foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--s1); }
.modal { display: grid; place-items: center; padding: 20px; }
.modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--s1); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-3); animation: modal-in var(--t-slow) var(--ease-spring); }
.modal.is-closing .modal__panel { animation: modal-out var(--t-med) var(--ease-out) forwards; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font: 500 16px/1.3 var(--font-text); }
.modal__body { padding: 20px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.shortcuts h3 { font: 500 11px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.shortcuts dl { margin: 0; display: grid; gap: 2px; }
.shortcuts dl > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.shortcuts dd { margin: 0; white-space: nowrap; }
.modal[data-shortcuts] .modal__panel { width: min(760px, 100%); }

/* ---------- ⌘K palette ---------- */
.palette { display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; z-index: 150; }
.palette__panel { position: relative; width: min(660px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: rgba(22, 22, 24, .97); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-3), 0 0 0 1px rgba(0, 0, 0, .4); overflow: hidden; animation: palette-in .42s var(--ease-spring); }
.palette.is-closing .palette__panel { animation: modal-out var(--t-fast) var(--ease-out) forwards; }
.palette.is-closing .palette__scrim { animation: fade-out var(--t-fast) forwards; }
.palette__search { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); color: var(--text-3); flex: none; }
.palette__search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; font-size: 17px; font-weight: 400; color: var(--text); }
.palette__search input:focus-visible { box-shadow: none; }
.palette__search input::placeholder { color: var(--text-3); font-weight: 300; }
.palette__spin { display: grid; }
.palette__results { overflow-y: auto; padding: 6px; flex: 1; min-height: 0; scroll-padding: 8px; }
.palette__group { padding: 10px 10px 6px; font: 500 10.5px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.palette__item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); cursor: pointer; }
.palette__item.is-active { background: rgba(255, 255, 255, .07); color: var(--text); }
.palette__item.is-active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--red); }
.palette__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--s3); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.palette__item.is-active .palette__icon { color: var(--red); border-color: var(--red-line); }
.palette__text { flex: 1; min-width: 0; display: grid; }
.palette__title { color: var(--text); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__title mark { background: none; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.palette__sub { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.palette__type { font-size: 11px; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.palette__empty { padding: 36px 16px; text-align: center; color: var(--text-3); font-size: 14px; }
.palette__foot { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; flex: none; }
.palette__foot > span { display: inline-flex; align-items: center; gap: 6px; }
.palette__brand { margin-left: auto; font: 700 11px/1 var(--font-text); letter-spacing: .14em; }
.palette__brand svg { width: 14px; height: 14px; color: var(--red); }

/* ---------- charts ---------- */
.chart { margin: 0; --h: 220px; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font-size: 12.5px; color: var(--text-2); }
.chart__legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart__legend i { width: 8px; height: 8px; border-radius: 2px; }
.chart__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: var(--h); }
.chart__y { position: relative; width: 44px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart__y span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.chart__plot { position: relative; min-width: 0; }
.chart__grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.chart__grid:first-child { background: var(--line-2); }
.chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart__area { animation: fade-in 1s var(--ease-out) .3s both; }
.chart__bars { position: absolute; inset: 0; display: flex; gap: 0; }
.chart__col { position: relative; flex: 1; margin: 0 clamp(2px, 1.2%, 8px); transform-origin: bottom; animation: grow-y .9s var(--ease-panel) both; animation-delay: calc(var(--i) * 35ms + 100ms); }
.chart__col i { position: absolute; left: 0; right: 0; border-radius: 3px; box-shadow: 0 -1px 0 var(--s1); }
.chart__col i:first-child { border-radius: 0 0 3px 3px; }
.chart__col i:last-child { border-radius: 4px 4px 0 0; }
.chart__col i:only-child { border-radius: 4px 4px 0 0; }
.chart__bars--grouped .chart__col i, .chart__bars--grouped .chart__col i:first-child { border-radius: 3px 3px 0 0; box-shadow: none; }
.chart__hover { position: absolute; inset: 0; }
.chart__hover span { position: absolute; top: 0; bottom: 0; }
.chart__hover span:hover { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .04)); }
.chart__x { position: relative; height: 18px; margin: 8px 0 0 54px; font-size: 11px; color: var(--text-3); }
.chart__x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart__x span.is-first { transform: none; }
.chart__x span.is-last { transform: translateX(-100%); }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.chart-head > div { display: grid; gap: 4px; }
.chart-head__value { font: 600 24px/1 var(--font-display); }
.donut { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut__ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.donut__ring svg { width: 100%; height: 100%; }
.donut__track { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 11; }
.donut__seg { fill: none; stroke-width: 11; stroke-linecap: butt; animation: donut-in 1.1s var(--ease-panel) both; animation-delay: calc(var(--i) * 120ms + 100ms); }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__center b { font: 600 21px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.donut__center small { color: var(--text-3); font-size: 11px; margin-top: 4px; }
.donut__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 210px; font-size: 13.5px; }
.donut__legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 38px; gap: 8px; align-items: center; }
.donut__legend i { width: 8px; height: 8px; border-radius: 2px; }
.donut__legend span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut__legend b { font-weight: 500; font-variant-numeric: tabular-nums; }
.donut__legend em { font-style: normal; color: var(--text-3); text-align: right; font-size: 12px; }
.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.barlist__row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 30px; padding: 0 10px; border-radius: 6px; font-size: 13.5px; overflow: hidden; }
.barlist__fill { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, .06); border-radius: 6px; transform-origin: left; animation: grow-x .9s var(--ease-panel) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
.barlist li:first-child .barlist__fill { background: rgba(255, 255, 255, .1); }
.barlist__label, .barlist__row b { position: relative; }
.barlist__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.barlist__row b { font-weight: 500; font-variant-numeric: tabular-nums; }
a.barlist__row:hover .barlist__fill { background: rgba(255, 255, 255, .1); }

/* ---------- activity feed ---------- */
.activity { list-style: none; margin: 0; padding: 0; position: relative; }
.activity__day { font: 500 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 14px 0 8px; }
.activity__day:first-child { padding-top: 0; }
.activity__item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.activity__item + .activity__item::before { content: ""; position: absolute; left: 13px; top: -6px; height: 12px; width: 1px; background: var(--line-2); }
.activity__who { position: relative; width: 26px; height: 26px; }
.activity__verb { position: absolute; right: -5px; bottom: -4px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--s3); box-shadow: 0 0 0 2px var(--s1); }
.activity__body { min-width: 0; padding-top: 2px; }
.activity__body p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.activity__body p b { color: var(--text); font-weight: 500; }
.activity__body p a { color: var(--text); }
.activity__body p a:hover { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.activity__meta { display: flex; gap: 10px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.activity__meta span { display: inline-flex; align-items: center; gap: 4px; }
.activity__changes { list-style: none; margin: 8px 0 0; padding: 8px 10px; display: grid; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.activity__changes li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-3); }
.activity__changes li > span { color: var(--text-2); min-width: 70px; }
.activity__changes s { color: var(--text-3); }
.activity__changes b { color: var(--text); font-weight: 500; }
.activity--compact .activity__item { padding: 6px 0; }
.activity--compact .activity__body p { font-size: 13.5px; }
.activity__more { text-align: center; margin-top: 8px; }
.scroll-fade { overflow-y: auto; mask-image: linear-gradient(180deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent); padding-bottom: 20px; scrollbar-width: thin; }

/* ---------- comments, reactions, files ---------- */
.comments { display: grid; gap: 14px; }
.comments__title { font: 500 13.5px/1 var(--font-text); display: flex; gap: 6px; align-items: center; }
.comments__list { display: grid; gap: 16px; }
.comment { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; animation: rise .4s var(--ease-panel); }
.comment__head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.comment__head b { color: var(--text); font-size: 13.5px; }
.comment__del { margin-left: auto; opacity: 0; transition: opacity var(--t-fast); }
.comment:hover .comment__del, .comment__del:focus-within { opacity: 1; }
.comment__del .icon-btn { width: 26px; height: 26px; }
.comment__body { margin-top: 3px; font-size: 14.5px; }
.composer { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.composer__box { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); padding: 6px 12px 8px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.composer__box:focus-within { border-color: var(--red-line); box-shadow: 0 0 0 3px rgba(237, 41, 58, .12); }
.composer__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.composer__hint { color: var(--text-3); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.mention { color: var(--blue); font-weight: 500; }
.mention-menu { position: fixed; z-index: 220; min-width: 220px; padding: 4px; background: rgba(28, 28, 31, .98); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-3); }
.mention-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; text-align: left; }
.mention-menu button.is-active, .mention-menu button:hover { background: var(--press); }
.mention-menu small { color: var(--text-3); margin-left: auto; font-size: 12px; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reaction { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line); font-size: 13px; transition: transform var(--t-fast) var(--ease-spring), border-color var(--t-fast), background var(--t-fast); }
.reaction b { font-weight: 500; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.reaction:hover:not(:disabled) { border-color: var(--line-3); }
.reaction:active:not(:disabled) { transform: scale(.9); }
.reaction.is-mine { background: rgba(255, 255, 255, .09); border-color: var(--line-3); }
.reaction.is-mine b { color: var(--text); }
.reaction.is-pop { animation: pop .45s var(--ease-spring); }
.reaction--add { color: var(--text-3); padding: 0 7px; }
.reaction--add .plus { font-size: 12px; margin-left: -2px; }
.reactions--compact .reaction { height: 22px; font-size: 12px; padding: 0 6px; }
.reactions--compact { margin-top: 6px; }
.reaction-picker { position: relative; display: inline-flex; }
.reaction-picker__menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 50; display: flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--s3); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translateY(4px) scale(.9); transform-origin: bottom left; transition: opacity var(--t-fast), transform var(--t-med) var(--ease-spring), visibility 0s linear var(--t-med); }
.reaction-picker.is-open .reaction-picker__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.reaction-picker__menu button { width: 32px; height: 32px; border-radius: 50%; font-size: 17px; transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast); }
.reaction-picker__menu button:hover { transform: scale(1.25); background: var(--press); }
.files { display: grid; gap: 12px; }
.files__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.file { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 6px 4px 6px 6px; border-radius: 8px; animation: rise .4s var(--ease-panel); }
.file:hover { background: var(--hover); }
.file__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--s3); color: var(--text-2); grid-row: span 2; }
.file__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { grid-column: 2; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .icon-btn { grid-row: 1 / span 2; width: 28px; height: 28px; }
.file form { grid-row: 1 / span 2; }
.dropzone label { display: grid; justify-items: center; gap: 4px; padding: 18px; border: 1px dashed var(--line-3); border-radius: 12px; color: var(--text-2); text-align: center; cursor: pointer; font-size: 13.5px; transition: border-color var(--t-fast), background var(--t-fast); }
.dropzone label b { color: var(--text); font-weight: 500; }
.dropzone label small { color: var(--text-3); font-size: 12px; }
.dropzone label:hover, .dropzone.is-over label { border-color: var(--red); background: var(--red-soft); }
.files__link summary { cursor: pointer; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.files__link summary::-webkit-details-marker { display: none; }
.files__link summary:hover { color: var(--text); }
.files__link-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }

.rich { overflow-wrap: anywhere; }
.rich p { margin: 0 0 .5em; }
.rich ul { margin: .2em 0 .6em; padding-left: 1.2em; }
.rich li { margin: .15em 0; }
.rich li::marker { color: var(--text-3); }
.rich a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.rich--lg { font-size: 17px; line-height: 1.55; }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- command center ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 4px 0 28px; flex-wrap: wrap; }
.hero__date { font: 500 12px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.hero__title { font: 700 clamp(26px, 3.2vw, 38px)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: -.005em; background: linear-gradient(180deg, #fff 30%, #B9B9BF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__clocks { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.clock { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s1); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.clock b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.announce { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line-2); transition: border-color var(--t-med), transform var(--t-med) var(--ease-spring); }
.announce:hover { border-color: var(--line-3); transform: translateY(-1px); }
.announce__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--s3); border: 1px solid var(--line-2); color: var(--text); flex: none; }
.announce__body { flex: 1; display: grid; min-width: 0; }
.announce__body span { color: var(--text-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce__meta { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.dash-grid { align-items: stretch; }
.dash-grid + .dash-grid { margin-top: var(--grid-gap, 16px); }
.dash-section { margin-top: 32px; }
.dash-section:first-of-type, .kpi-strip + .dash-section { margin-top: 0; }
.dash-section__label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 11.5px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.dash-section__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dash-section__label .icon { color: var(--text-3); }
.widget { min-width: 0; }
.widget .card--widget { min-height: 100%; }
.widget .card__body { min-width: 0; }
.milestones { display: grid; gap: 22px; }
.milestones__summary { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.milestones__ttm { display: grid; gap: 8px; }
.milestones__ttm .display-num { font-size: 36px; }
.milestones__facts { display: flex; gap: 28px; }
.milestones__facts > div { display: grid; gap: 6px; align-content: start; }
.milestones__facts b { font: 600 19px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.milestones__rings { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); position: relative; }
.milestone { display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; }
.milestone .oring { --i: inherit; margin-bottom: 4px; }
.milestone b { font: 600 14px/1 var(--font-text); }
.milestone small { color: var(--text-3); font-size: 11.5px; }
.milestone--current b { color: var(--text); }
.milestone--current small { color: var(--red); }
.milestone--future b { color: var(--text-2); }
.milestone--done small { color: var(--text-2); }
.milestones__note { display: flex; gap: 8px; align-items: flex-start; color: var(--text-3); font-size: 12.5px; margin: 0; }
.milestones__note .icon { margin-top: 2px; flex: none; }
.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attention__item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); transition: border-color var(--t-fast), background var(--t-fast); }
a.attention__item:hover { border-color: var(--line-3); background: var(--s3); }
.attention__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none; }
.attention__item--danger .attention__icon { background: var(--red-soft); color: #FF6B78; }
.attention__item--warning .attention__icon { background: var(--amber-soft); color: var(--amber); }
.attention__item--info .attention__icon { background: var(--blue-soft); color: var(--blue); }
.attention__body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.attention__body b { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.attention__body small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention__go { color: var(--text-3); transition: transform var(--t-med) var(--ease-spring); }
a.attention__item:hover .attention__go { transform: translateX(3px); color: var(--text); }
.pulse-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pulse-head > div { display: grid; gap: 2px; }
.pulse-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pulse-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.pulse-list__name { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-cta { margin-top: 14px; }
.widget-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upcoming__item { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 10px; }
a.upcoming__item:hover { background: var(--hover); }
.upcoming__date { display: grid; justify-items: center; width: 40px; padding: 5px 0; border-radius: 9px; background: var(--s2); border: 1px solid var(--line); flex: none; }
.upcoming__date small { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.upcoming__date b { font: 600 16px/1.1 var(--font-text); font-variant-numeric: tabular-nums; }
.upcoming__body { display: grid; min-width: 0; }
.upcoming__body b { font-size: 13.5px; font-weight: 500; }
.upcoming__body small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- feed ---------- */
.feed-layout, .updates-layout, .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.feed-side, .updates-side, .detail-side { display: grid; gap: 16px; position: sticky; top: calc(var(--topbar-h) + var(--ribbon-h) + 24px); }
.timeline { display: grid; gap: 12px; }
.feed-main > .post { margin-bottom: 16px; }
.timeline__day { font: 500 11px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 14px 0 2px; position: sticky; top: calc(var(--topbar-h) + var(--ribbon-h)); z-index: 3; background: linear-gradient(var(--bg) 70%, transparent); padding-bottom: 8px; }
.timeline > .activity { padding: 4px 16px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.load-more { display: flex; justify-content: center; margin-top: 16px; }
.post { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); animation: rise .5s var(--ease-panel) both; }
.post + .post { margin-top: 0; }
.update-list > .post + .post, .card > .post + .post, .stack > .post { margin-top: 12px; }
.card > .post { background: var(--s2); }
.post__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post__who { flex: 1; display: grid; gap: 3px; min-width: 0; }
.post__who b { font-weight: 500; }
.post__who .muted { font-size: 12.5px; }
.post__title { font-size: 16px; font-weight: 500; color: var(--text); line-height: 1.3; }
a.post__title:hover { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.post__meta { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
.post__glyph { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--s3); border: 1px solid var(--line); flex: none; }
.post__body { color: var(--text); }
.post__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.post__comments { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.post__comments:hover { color: var(--text); }
.post__owner { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.post--announcement.is-pinned { border-color: var(--line-3); }
.post--compact { padding: 16px; }
.update-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.update-section { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.update-section h4 { display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.update-section .rich { font-size: 14px; }
.update-section--blockers { border-color: rgba(255, 214, 10, .22); }
.week-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.week-nav__label { display: grid; padding: 0 6px; }
.week-nav__label b { font: 600 16px/1.2 var(--font-text); }
.week-nav__label span { font-size: 12.5px; color: var(--text-3); }
.week-nav__progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.week-nav__progress b { color: var(--text); }
.composer-card { padding: 20px; margin-bottom: 16px; border-color: var(--line-2); }
.composer-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.composer-card__head > div { min-width: 180px; }
.composer-card__head > div { flex: 1; display: grid; gap: 2px; }
.composer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.composer-field { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); transition: border-color var(--t-fast); }
.composer-field:focus-within { border-color: var(--red-line); }
.composer-field__label { display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; }
.composer-field .textarea { border: 0; padding: 0; background: transparent; min-height: 72px; box-shadow: none; resize: none; }
.people-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.people-mini li > a, .people-mini li > span { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.people-mini li > a:hover, .people-mini a.is-active { background: var(--hover); }
.people-mini span span, .people-mini a > span { display: grid; min-width: 0; }
.people-mini b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-mini small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-links { display: grid; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.side-links a .icon:last-child { margin-left: auto; color: var(--text-3); }
.side-links a:hover { background: var(--hover); color: var(--text); }
.all-in { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 13.5px; margin: 0; }
.blockers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.blockers a { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 6px; border-radius: 8px; }
.blockers a:hover { background: var(--hover); color: var(--text); }
.digest-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.digest-stat { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.digest-stat > span:last-child { color: var(--text-2); font-size: 13.5px; }
.digest-stat .display-num { font-size: 28px; }
.digest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.digest-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.digest-list--tight { gap: 10px; }
.digest-decisions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.digest-decisions a { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.digest-decisions a b:hover { text-decoration: underline; }
.digest-decisions p { margin: 4px 0 0 58px; color: var(--text-2); font-size: 13.5px; }
.digest-decisions__date { width: 48px; color: var(--text-3); font-size: 12.5px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-list a { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; font-size: 13.5px; }
.mini-list a:hover { background: var(--hover); }
.mini-list a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { color: var(--text-3); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.check-list li { display: flex; align-items: center; gap: 8px; }
.check-list .icon { color: var(--green); }

/* ---------- team ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.person-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); overflow: hidden; transition: transform var(--t-med) var(--ease-spring), border-color var(--t-med); }
.person-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 90px; background: radial-gradient(120% 100% at 20% 0%, color-mix(in srgb, var(--av) 22%, transparent), transparent 70%); pointer-events: none; }
.person-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.person-card__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.person-card__time { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; }
.person-card__time b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.person-card__name { font-size: 17px; font-weight: 500; }
.person-card__title { color: var(--text-2); font-size: 13.5px; margin: 0 0 8px; }
.person-card__meta { display: flex; align-items: center; gap: 8px; }
.person-card__owns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.person-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; color: var(--text-3); font-size: 12px; }
.person-card__foot .icon { transition: transform var(--t-med) var(--ease-spring); }
.person-card:hover .person-card__foot .icon { transform: translateX(3px); color: var(--red); }
.raci-wrap { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.raci th, .raci td { white-space: nowrap; }
.raci td:first-child { white-space: normal; min-width: 220px; }
.raci__person { vertical-align: bottom; }
.raci__person .avatar { margin: 0 auto 4px; }
.raci__person span { display: block; font-size: 11.5px; }
.raci-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 700 12px/1 var(--font-text); margin: 0 1px; }
.raci-badge--red { background: var(--text); color: var(--bg); }
.raci-badge--blue { background: var(--blue-soft); color: var(--blue); }
.raci-badge--amber { background: var(--amber-soft); color: var(--amber); }
.raci-badge--gray { background: rgba(255, 255, 255, .07); color: var(--text-2); }
.raci-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; color: var(--text-3); font-size: 12.5px; }
.raci-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.raci-edit { display: grid; gap: 6px; }
.raci-edit__row { display: flex; align-items: center; gap: 10px; }
.raci-edit__name { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raci-edit__opts { display: flex; gap: 4px; }
.raci-opt input { position: absolute; opacity: 0; }
.raci-opt span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line-2); font: 700 12px/1 var(--font-text); color: var(--text-3); cursor: pointer; transition: all var(--t-fast); }
.raci-opt input:checked + span { color: #fff; border-color: transparent; }
.raci-opt--red input:checked + span { background: var(--text); color: var(--bg); }
.raci-opt--blue input:checked + span { background: #2C8CB3; }
.raci-opt--amber input:checked + span { background: #B39400; }
.raci-opt--gray input:checked + span { background: var(--s4); border-color: var(--line-3); }
.raci-opt input:focus-visible + span { box-shadow: var(--focus); }
.profile-hero { position: relative; display: flex; align-items: center; gap: 24px; padding: 28px; margin-bottom: 24px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); overflow: hidden; flex-wrap: wrap; }
.profile-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--av) 22%, transparent), transparent 70%); pointer-events: none; }
.profile-hero > * { position: relative; }
.profile-hero__text { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.profile-hero__name { font: 700 28px/1.05 var(--font-display); text-transform: uppercase; }
.profile-hero__title { color: var(--text-2); margin: 0; }
.profile-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.profile-hero__meta > * { display: inline-flex; align-items: center; gap: 6px; }
.profile-hero__meta b { color: var(--text); font-weight: 500; }
.profile-hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.owns-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.owns-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.owns-list li:last-child { border-bottom: 0; }
.owns-list li > div { display: grid; }
.profile-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-preview > div { display: grid; }

/* ---------- settings ---------- */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-main { min-width: 0; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bank-card { display: grid; gap: 6px; text-align: left; padding: 20px; border-radius: 16px; background: linear-gradient(140deg, var(--s3), var(--s1)); border: 1px solid var(--line-2); min-height: 170px; transition: transform var(--t-med) var(--ease-spring), border-color var(--t-med); }
.bank-card:hover { transform: translateY(-2px); border-color: var(--line-3); }
.bank-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bank-card__cur { font: 700 12px/1 var(--font-text); letter-spacing: .12em; color: var(--text-2); }
.bank-card__label { font-size: 16px; font-weight: 500; }
.bank-card__bank { color: var(--text-2); font-size: 13.5px; }
.bank-card__no { color: var(--text); font-size: 14px; letter-spacing: .06em; }
.bank-card__foot { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; margin-top: auto; }
.num-preview { font-size: 13px; }
.fx-current { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
.fx-pill { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.fx-pill b { color: var(--text); font-weight: 500; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.role-legend > div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); }
.ws-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.ws-card { display: grid; gap: 12px; align-content: start; }
.ws-card.is-current { border-color: rgba(48, 209, 88, .35); }
.ws-card--demo.is-current { border-color: rgba(255, 214, 10, .4); }
.ws-card__head { display: flex; align-items: center; gap: 12px; }
.ws-card__head > div { flex: 1; display: grid; gap: 2px; }
.ws-card__head h3 { font-size: 16px; font-weight: 500; }
.ws-card__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--s3); color: var(--text-2); }
.ws-card--demo .ws-card__icon { color: var(--amber); background: var(--amber-soft); }
.ws-card__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; }
.ws-card__stats > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ws-card__stats dt { color: var(--text-2); }
.ws-card__stats dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.ws-card__foot { display: flex; gap: 8px; flex-wrap: wrap; }
.int-summary { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; color: var(--text-2); font-size: 13px; }
.int-summary > span { display: inline-flex; align-items: center; gap: 8px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.int-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); transition: border-color var(--t-med), transform var(--t-med) var(--ease-spring), background var(--t-med); }
.int-card:hover { border-color: var(--line-2); transform: translateY(-2px); background: var(--s2); }
.int-card--connected { border-color: rgba(48, 209, 88, .28); }
.int-card--error { border-color: rgba(237, 41, 58, .35); }
.int-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.int-card__head { display: flex; justify-content: space-between; align-items: center; }
.int-card__logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--s3); border: 1px solid var(--line-2); color: var(--text); }
.int-card--connected .int-card__logo { color: var(--green); }
.int-card__name { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-card__desc { color: var(--text-2); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.int-card__caps { display: flex; gap: 6px; flex-wrap: wrap; }
.int-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.int-card__action { position: relative; z-index: 2; }
.int-card__go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.int-card:hover .int-card__go { color: var(--text); }
.int-dev { margin-top: 28px; display: flex; gap: 6px; align-items: center; }
.int-hero { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.int-hero__logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line-2); flex: none; }
.int-hero__text { flex: 1; display: grid; gap: 8px; min-width: 260px; }
.setup-guide { color: var(--text-2); font-size: 14px; }

/* ---------- auth ---------- */
body.bare { min-height: 100vh; }
.auth { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px 72px; overflow: hidden; }
.auth__bg { position: absolute; inset: 0; pointer-events: none; }
.auth__dial { position: absolute; width: min(1100px, 150vw); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgba(255, 255, 255, .025); animation: slow-spin 120s linear infinite; }
.auth__dial svg { width: 100%; height: 100%; }
.auth__glow { position: absolute; inset: auto 0 -40% 0; height: 80%; background: radial-gradient(50% 50% at 50% 50%, rgba(237, 41, 58, .18), transparent 70%); }
.auth__card { position: relative; width: min(400px, 100%); padding: 36px 32px 28px; background: rgba(17, 17, 19, .82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-3); animation: rise .8s var(--ease-panel); }
.auth__logo { height: 26px; width: auto; margin-bottom: 28px; }
.auth__title { font: 700 22px/1.1 var(--font-display); text-transform: uppercase; }
.auth__sub { color: var(--text-2); margin: 10px 0 24px; font-size: 14.5px; }
.auth .stack { gap: 16px; }
.auth .btn--block { margin-top: 6px; }
.auth__foot { margin-top: 20px; color: var(--text-3); font-size: 12.5px; text-align: center; }
.auth__legal { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: var(--text-3); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- being built ---------- */
.being-built { display: grid; justify-items: center; text-align: center; padding: 48px 16px 24px; max-width: 640px; margin: 0 auto; }
.being-built__dial { position: relative; width: 200px; height: 200px; margin-bottom: 28px; }
.being-built__ticks { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 90s linear infinite; }
.being-built__ticks line { stroke: var(--line-3); stroke-width: 1.2; stroke-linecap: round; }
.being-built__o { position: absolute; inset: 34px; color: var(--s3); }
.being-built__o svg { width: 100%; height: 100%; animation: odial 4.8s infinite; }
.being-built__icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); }
.being-built__eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.8s ease-in-out infinite; }
.being-built__title { font: 700 32px/1.05 var(--font-display); text-transform: uppercase; margin-bottom: 14px; }
.being-built__text { color: var(--text-2); font-size: 16px; max-width: 52ch; }
.being-built__list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.being-built__list li { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-pill); background: var(--s1); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.being-built__list .icon { color: var(--text-3); }
.being-built__actions { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.being-built__note { margin-top: 28px; color: var(--text-3); font-size: 12.5px; max-width: 46ch; }

/* ---------- kanban (core styles; drag via hq.js) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kanban__col { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); min-height: 200px; max-height: calc(100vh - 220px); }
@media (max-width: 860px) { .kanban__col { min-height: auto; max-height: none; } }
.kanban__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kanban__count { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.kanban__list { flex: 1; display: grid; gap: 8px; align-content: start; padding: 10px; overflow-y: auto; transition: background var(--t-fast); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.kanban__list.is-over { background: rgba(237, 41, 58, .05); box-shadow: inset 0 0 0 1px var(--red-line); }
.kanban__card { padding: 12px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); box-shadow: var(--shadow-1); cursor: grab; transition: transform var(--t-med) var(--ease-spring), box-shadow var(--t-med), border-color var(--t-fast), opacity var(--t-fast); }
.kanban__card:hover { border-color: var(--line-3); }
.kanban__card.is-dragging { opacity: .35; }
.kanban__card.is-ghost { transform: rotate(2.5deg) scale(1.03); box-shadow: var(--shadow-3); }
.kanban__card.is-dropped { animation: drop-click .45s var(--ease-spring); }
.kanban__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--text-2); font-size: 12.5px; }
.kanban__empty { padding: 20px; text-align: center; color: var(--text-3); font-size: 12.5px; border: 1px dashed var(--line-2); border-radius: 10px; }
.drop-placeholder { height: 46px; border-radius: 10px; border: 1px dashed var(--red-line); background: var(--red-soft); }

/* ---------- design system page ---------- */
.ds-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.ds-toc a { padding: 5px 10px; border-radius: 7px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.ds-toc a:hover { color: var(--text); border-color: var(--line-3); }
.ds-section { margin-bottom: 44px; }
.ds-section__title { font: 500 11px/1 var(--font-text); text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ds-section > .ds-row + .ds-row { margin-top: 12px; }
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ds-swatch { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; }
.ds-swatch span { height: 48px; border-radius: 8px; border: 1px solid var(--line-2); margin-bottom: 6px; }
.ds-swatch code { font-size: 11px; background: none; border: 0; padding: 0; color: var(--text-3); }
.ds-type { display: grid; gap: 12px; }
.ds-body { max-width: 70ch; }
.ds-row--center { align-items: center; gap: 24px; }
.ds-spin { display: inline-flex; gap: 16px; align-items: center; }
.ds-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ds-icon { display: grid; justify-items: center; gap: 8px; padding: 14px 6px 10px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); color: var(--text-2); transition: color var(--t-fast), border-color var(--t-fast); }
.ds-icon:hover { color: var(--text); border-color: var(--line-3); }
.ds-icon span { font-size: 11px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slow-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes oring-arc { from { stroke-dashoffset: 100; } }
@keyframes oring-head { from { transform: rotate(0deg); } }
@keyframes donut-in { from { stroke-dasharray: 0 100; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes drop-click { 0% { transform: scale(1.04); } 50% { transform: scale(.98); } 100% { transform: scale(1); } }
/* one notch: rotate 45° → click (overshoot) → settle. Runs once; never loops back. */
@keyframes ring-notch { 0% { transform: rotate(-45deg); } 55% { transform: rotate(4deg); } 75% { transform: rotate(-1.5deg); } 100% { transform: rotate(0deg); } }
/* rotate one notch (45°) → click (overshoot) → settle → pause; ×8 */
@keyframes odial {
  0% { transform: rotate(0deg); animation-timing-function: var(--ease-spring); }
  7% { transform: rotate(45deg); } 12.5% { transform: rotate(45deg); animation-timing-function: var(--ease-spring); }
  19.5% { transform: rotate(90deg); } 25% { transform: rotate(90deg); animation-timing-function: var(--ease-spring); }
  32% { transform: rotate(135deg); } 37.5% { transform: rotate(135deg); animation-timing-function: var(--ease-spring); }
  44.5% { transform: rotate(180deg); } 50% { transform: rotate(180deg); animation-timing-function: var(--ease-spring); }
  57% { transform: rotate(225deg); } 62.5% { transform: rotate(225deg); animation-timing-function: var(--ease-spring); }
  69.5% { transform: rotate(270deg); } 75% { transform: rotate(270deg); animation-timing-function: var(--ease-spring); }
  82% { transform: rotate(315deg); } 87.5% { transform: rotate(315deg); animation-timing-function: var(--ease-spring); }
  94.5% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }
}
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease-panel) forwards; animation-delay: var(--d, 0ms); }
.js [data-stagger] > * { animation: rise .6s var(--ease-panel) both; animation-delay: calc(var(--i, 0) * 40ms); }
.js [data-stagger-item] { animation: rise .6s var(--ease-panel) both; }

/* View Transitions (cross-document, same origin) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease-panel) both vt-in; }
.sidebar { view-transition-name: sidebar; }
.topbar { view-transition-name: topbar; }
.demo-ribbon { view-transition-name: ribbon; }
::view-transition-group(sidebar), ::view-transition-group(topbar), ::view-transition-group(ribbon) { animation: none; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .odial svg, .being-built__o svg { animation: none !important; }
  @view-transition { navigation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .dash-grid > .span-3 { grid-column: span 6; }
  .page--dashboard .kpi-strip > .kpi:nth-child(-n+6) { --kpi-fs: 24px; }
}
@media (max-width: 1100px) {
  .page--dashboard .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid > .span-3, .dash-grid > .span-4, .dash-grid > .span-5 { grid-column: span 6; }
  .dash-grid > .span-8, .dash-grid > .widget:last-child:nth-child(odd) { grid-column: span 12; }
  .dash-grid > .span-8 + .span-4:last-child { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .feed-layout, .updates-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .feed-side, .updates-side, .detail-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .subnav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav__item { white-space: nowrap; flex: none; }
  .grid-12 > .span-7, .grid-12 > .span-5 { grid-column: span 12; }
  .digest-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --topbar-h: 54px; }
  .app, .sb-collapsed .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: var(--ribbon-h); bottom: 0; height: auto; width: min(290px, 86vw); transform: translateX(-102%); transition: transform var(--t-slow) var(--ease-panel); box-shadow: var(--shadow-3); z-index: 80; }
  .sb-open .sidebar { transform: none; }
  .sb-collapsed .sidebar .brand__logo, .sb-collapsed .sidebar .brand__hq, .sb-collapsed .sidebar .nav__text, .sb-collapsed .sidebar .nav__label { display: revert; }
  .sb-collapsed .sidebar .brand__o { display: none; }
  .sb-collapsed .sidebar .nav__item { justify-content: flex-start; padding: 0 10px; }
  .sb-collapsed .sidebar .sidebar__head { padding: 0 12px 0 18px; justify-content: space-between; }
  .sidebar__collapse { display: none; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
  .sb-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar__menu { display: inline-grid; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; }
  .search-trigger > span { display: none; }
  .crumbs > a:not(.crumbs__home):not(:last-child), .crumbs > span:not(:last-child):not(.crumbs__sep) { display: none; }
  .crumbs > .crumbs__sep { display: none; }
  .crumbs > :last-child { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
  .create-btn span { display: none; }
  .create-btn { width: 30px; padding: 0; }
  .content { padding: 20px 16px 72px; }
  .grid-12 { gap: 12px; }
  .grid-12 > [class*="span-"], .dash-grid > [class*="span-"], .dash-grid > .widget[data-widget] { grid-column: span 12; }
  .form-grid > [class*="span-"] { grid-column: span 12; }
  .page-header { margin-bottom: 20px; align-items: flex-start; }
  .page-header__title { font-size: 21px; }
  .page-header__actions { width: 100%; }
  .hero__actions .btn--ghost { display: none; }
  .kpi-strip, .page--dashboard .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .page--dashboard .kpi-strip > .kpi:nth-child(n) { min-height: 112px; }
  .page--dashboard .kpi-strip > .kpi:nth-child(n), .kpi { --kpi-fs: 20px; }
  .dash-section { margin-top: 24px; }
  .kpi { min-height: 112px; padding: 14px; }
  .kpi__value { font-size: 20px; }
  .milestones__rings .oring { --size: 52px !important; }
  .milestones__rings { gap: 2px; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .milestone b { font-size: 10.5px; }
  .milestone small { font-size: 10.5px; }
  .milestones__facts { gap: 20px; }
  .update-sections, .composer-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-cards { grid-template-columns: minmax(0, 1fr); }
  .digest-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .digest-stat { padding: 14px; gap: 10px; }
  .filters { gap: 6px; }
  .filters .select-wrap { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .filters__dates { flex: 1 1 100%; }
  .filters__dates .input { flex: 1; width: auto; }
  .menu--notifs { width: min(380px, calc(100vw - 24px)); }
  .menu--create { position: fixed; top: calc(var(--ribbon-h, 0px) + var(--topbar-h) + 6px); left: 12px; right: 12px; width: auto; max-width: none; }
  .menu__cols { grid-template-columns: minmax(0, 1fr); }
  .dropdown[data-notifications] .menu { position: fixed; top: calc(var(--topbar-h) + var(--ribbon-h) + 6px); left: 12px; right: 12px; width: auto; max-width: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
  .toast { max-width: none; }
  .palette { padding-top: 8px; }
  .palette__panel { max-height: 86vh; }
  .palette__foot > span:not(.palette__brand) { display: none; }
  .profile-hero { padding: 20px; gap: 16px; }
  .profile-hero .avatar--xxl { --s: 64px; font-size: 22px; }
  .drawer__panel { width: 100vw; }
  .people-grid { grid-template-columns: minmax(0, 1fr); }
  .files__link-form { grid-template-columns: minmax(0, 1fr); }
  .demo-ribbon { justify-content: space-between; padding: 0 8px; letter-spacing: .1em; }
  .props > div { grid-template-columns: 96px minmax(0, 1fr); }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
  .chart__y { width: 36px; }
  .chart__x { margin-left: 46px; }
  .chart__x .is-sub { display: none; }
  .week-nav__progress { margin-left: 0; width: 100%; }
  .auth__card { padding: 28px 22px 22px; }
}
@media (max-width: 420px) {
  .kpi-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .milestones__ttm .display-num { font-size: 28px; }
  .hero__clocks .clock:nth-child(n+3) { display: none; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --s1: #fff; --s2: #f6f6f7; --s3: #eee; --text: #0A0A0B; --text-2: #444; --text-3: #777; --line: #ddd; --line-2: #ccc; }
  body { background: #fff; color: #0A0A0B; font-size: 11pt; }
  .sidebar, .topbar, .demo-ribbon, .toasts, .page-header__actions, .btn, .composer, .reactions, .filters, .hero__actions, .load-more, .skip-link { display: none !important; }
  .app { display: block; padding: 0; }
  .content { padding: 0; }
  .card, .post, .kpi { box-shadow: none; break-inside: avoid; border-color: #ddd; background: #fff; }
  .page-header__title, .hero__title { color: #0A0A0B; -webkit-text-fill-color: #0A0A0B; background: none; }
  a { color: inherit; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- record panels (CRM 360° tabs) ---------- */
.rec-panel__summary { display: flex; flex-wrap: wrap; gap: 24px; padding: 4px 0 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.rec-panel__summary > div { display: grid; gap: 4px; }
.rec-panel__summary b { font: 600 19px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rec-list__row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; min-width: 0; }
a.rec-list__row:hover { background: var(--hover); }
.rec-list__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--s2); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.rec-list__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rec-list__main b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-list__main small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-list__side { display: flex; align-items: center; gap: 10px; flex: none; font-variant-numeric: tabular-nums; font-size: 13.5px; }
@media (max-width: 560px) { .rec-list__side .pill { display: none; } }
.stack-gap { height: 16px; }

/* ==========================================================================
   v2 finish-gate pass (2026-10): one-red rule, quiet empty states, milestone dial,
   setup card, team time strip, card tables, header overflow menu, date picker, O click
   ========================================================================== */

/* link-style button (in-card empty states, quiet actions) */
.btn--link { --h: auto; height: auto; padding: 0; background: none; border: 0; box-shadow: none; color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.btn--link:hover:not(:disabled) { text-decoration-color: var(--text); background: none; }
.btn--link .icon { display: none; }
.btn--link .kbd { display: none; }

/* in-card empty state: one quiet line + link (the big O is reserved for one page-level empty state) */
.empty-inline { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.empty-inline__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--s2); border: 1px solid var(--line); color: var(--text-3); flex: none; }
.empty-inline__body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.empty-inline__body b { color: var(--text); font-weight: 500; }
.empty-inline__body span { color: var(--text-3); }
.empty-inline__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; align-self: center; flex: none; }
.card__body > .empty-inline:only-child, .card > .empty-inline { padding: 4px 0; }
.table-wrap + .empty-inline, .card--flush > .empty-inline { padding: 16px; }
@media (max-width: 640px) { .empty-inline { flex-wrap: wrap; } .empty-inline__actions { width: 100%; padding-left: 36px; } }

/* hero */
.page--dashboard .hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 24px; margin: 0 0 20px; }
.page--dashboard .hero__title { font-size: clamp(24px, 2.6vw, 32px); }
.page--dashboard .hero__date { margin-bottom: 10px; }
.page--dashboard .hero__time { grid-column: 1 / -1; }

/* team time strip — 24 h band, one O per timezone */
.tstrip { position: relative; padding: 4px 0 30px; }
.tstrip__band { position: relative; height: 26px; border-radius: 13px; background: var(--s1); border: 1px solid var(--line); }
.tstrip__work { position: absolute; top: 3px; bottom: 3px; left: 37.5%; width: 37.5%; border-radius: 10px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line); }
.tstrip__tick { position: absolute; top: 100%; width: 1px; height: 5px; background: var(--line-3); }
.tstrip__tick small { position: absolute; top: 6px; left: 0; transform: translateX(-50%); font-size: 10.5px; font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tstrip__tick:first-of-type small { transform: none; } .tstrip__tick:last-of-type small { transform: translateX(-100%); }
.tstrip__dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 1; }
.tstrip__o { display: block; width: 18px; height: 18px; color: var(--text-3); transition: color var(--t-med); }
.tstrip__o svg { width: 100%; height: 100%; }
.tstrip__dot.is-work .tstrip__o { color: var(--text); }
.tstrip__label { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: var(--text-2); }
.tstrip__label b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tstrip__who { display: inline-flex; }
.tstrip { padding-top: 28px; }
.tstrip__dot.is-edge-r .tstrip__label { left: auto; right: -4px; transform: none; }
.tstrip__dot.is-edge-l .tstrip__label { left: -4px; transform: none; }
.tstrip--compact { padding: 26px 0 0; max-width: 560px; }
.tstrip--compact .tstrip__band { height: 20px; }
.tstrip--compact .tstrip__tick { display: none; }
.tstrip-card { margin-bottom: 20px; }

/* dashboard hero: dial + setup */
.dash-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dash-hero--live { grid-template-columns: minmax(0, 1fr); }
.dial-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px 28px; }
.dial { position: relative; width: 300px; aspect-ratio: 1; flex: none; }
.dial__svg { width: 100%; height: 100%; overflow: visible; }
.dial__track { fill: none; stroke: var(--s3); stroke-width: 16; }
.dial__arc { fill: none; stroke: var(--text); stroke-width: 16; stroke-linecap: round; stroke-dasharray: 100; animation: oring-arc 1.2s var(--ease-panel) .25s both; }
.dial__inner { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 1.5 5; }
.dial__tick { stroke-width: 2.5; stroke-linecap: round; }
.dial__tick--done { stroke: var(--green); } .dial__tick--next { stroke: var(--text); } .dial__tick--ahead { stroke: var(--line-3); }
.dial__lbl { font: 600 13px var(--font-text); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.dial__lbl--next { fill: var(--text); } .dial__lbl--done { fill: var(--green); }
.dial__head { transform-box: view-box; transform-origin: 120px 120px; transform: rotate(var(--a)); animation: dial-click 1s var(--ease-spring) .35s both; }
.dial__head rect { fill: var(--red); stroke: var(--bg); stroke-width: 3; }
@keyframes dial-click { 0% { transform: rotate(calc(var(--a) - 45deg)); } 70% { transform: rotate(calc(var(--a) + 3deg)); } 85% { transform: rotate(calc(var(--a) - 1deg)); } 100% { transform: rotate(var(--a)); } }
.dial__center { position: absolute; inset: 22%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; }
.dial__eyebrow { font: 500 10.5px/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.dial { container-type: inline-size; }
.dial__value { font-size: var(--fs, 34px); font-size: calc(var(--k, 11.333) * 1cqi); }
.dial__sub { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dial-card__side { display: grid; gap: 14px; min-width: 0; }
.dial-card__title { font: 600 18px/1.2 var(--font-text); }
.dial-card__lead { color: var(--text-3); font-size: 13px; margin: -8px 0 0; }
.dial-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dial-steps__row { display: grid; grid-template-columns: 12px 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: 13.5px; }
.dial-steps__row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dial-steps__row small { text-align: right; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.dial-steps__mark { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-3); }
.dial-steps__row--done .dial-steps__mark { background: var(--green); border-color: var(--green); }
.dial-steps__row--next .dial-steps__mark { border-color: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.dial-steps__row--ahead b { color: var(--text-2); }
.dial-steps__bar { height: 4px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.dial-steps__bar i { display: block; height: 100%; border-radius: inherit; background: var(--text); transform-origin: left; animation: grow-x .9s var(--ease-panel) .3s both; }
.dial-steps__row--done .dial-steps__bar i { background: var(--green); }
.dial-card__facts { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dial-card__facts > span { display: grid; gap: 2px; }
.dial-card__facts small { color: var(--text-3); font-size: 11.5px; }
.dial-card__facts b { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.dial-card__facts .link-btn { display: inline-flex; align-items: center; gap: 2px; }
.dial-card__note { display: flex; gap: 8px; color: var(--text-3); font-size: 12.5px; margin: 0; max-width: 46ch; }
.dial-card__note .icon { margin-top: 2px; }

.setup-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.setup-card__head { display: flex; align-items: center; gap: 14px; }
.setup-card__title { font: 600 18px/1.2 var(--font-text); }
.setup-card__lead { color: var(--text-2); font-size: 13px; margin: 4px 0 0; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setup-steps__row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; transition: background var(--t-fast); }
.setup-steps__row:hover { background: var(--hover); }
.setup-steps__o { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-3); flex: none; color: var(--bg); }
.setup-steps__row.is-done .setup-steps__o { background: var(--green); border-color: var(--green); }
.setup-steps__row.is-next .setup-steps__o { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.setup-steps__icon { color: var(--text-3); display: grid; }
.setup-steps__text { flex: 1; min-width: 0; display: grid; }
.setup-steps__text b { font-size: 13.5px; font-weight: 500; }
.setup-steps__text small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-steps__row.is-done .setup-steps__text b { color: var(--text-2); }
.setup-steps__go { color: var(--text-3); }

.kpi-strip--n1, .kpi-strip--n2, .kpi-strip--n3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }
.kpi-strip--n4, .kpi-strip--n5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }
.page--dashboard .kpi-strip { margin-bottom: 8px; }
.page--dashboard .kpi-strip > .kpi:nth-child(n+7) { background: var(--s1); }
.span-12 .attention, .span-8 .attention { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.dash-section--focus { margin-top: 24px; }
.dash-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.dash-waiting__label { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font: 500 11.5px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

@media (max-width: 1280px) {
  .dial { width: 260px; }
  .dial-card { gap: 20px; padding: 20px; }
}
@media (max-width: 1100px) {
  .dash-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page--dashboard .hero { grid-template-columns: minmax(0, 1fr); margin-bottom: 14px; }
  .page--dashboard .hero__actions { display: none; }
  .dial-card { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 16px; gap: 12px; }
  .dial { width: min(250px, 72vw); }
  .dial-card__side { width: 100%; }
  .dial-steps { display: none; }
  .dial-card__lead { margin: -8px 0 0; }
  .dial-card__title { font-size: 16px; }
  .tstrip--compact { display: none; }
  .setup-card { padding: 16px; }
}

/* page header: dosage rule ok; overflow "…" for secondary actions on phones (built by hq.js) */
.page-header__more { display: none; }
@media (max-width: 640px) {
  .page-header__actions { width: 100%; flex-wrap: nowrap; }
  .page-header__actions.has-more > :not(.page-header__keep):not(.page-header__more):not(.seg) { display: none; }
  .page-header__actions.has-more { flex-wrap: wrap; }
  .page-header__actions.has-more > .page-header__keep { flex: 1; }
  .page-header__actions.has-more > .page-header__keep .btn, .page-header__actions.has-more > .btn.page-header__keep { width: 100%; }
  .page-header__more { display: block; }
}
.page-header__more .menu { min-width: 220px; }
.page-header__more .menu .btn, .page-header__more .menu form { width: 100%; display: flex; }
.page-header__more .menu .btn { justify-content: flex-start; height: 36px; padding: 0 10px; background: none; border: 0; box-shadow: none; color: var(--text); font-weight: 400; border-radius: 7px; }
.page-header__more .menu .btn:hover { background: var(--press); }
.page-header__more .menu .btn .kbd { display: none; }

/* data_table → card rows on phones */
@media (max-width: 640px) {
  .table-wrap--cards { overflow: visible; }
  .table-wrap--cards .table, .table--cards { display: block; }
  .table-wrap--cards thead, .table--cards thead { display: none; }
  .table-wrap--cards tbody, .table--cards tbody { display: grid; }
  .table-wrap--cards tr, .table--cards tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap--cards tr:last-child, .table--cards tbody tr:last-child { border-bottom: 0; }
  .table-wrap--cards td, .table--cards td { display: block; padding: 0 !important; border: 0 !important; grid-column: 1; text-align: left !important; font-size: 13px; min-width: 0; }
  .table-wrap--cards td:first-child, .table-wrap--cards td.table__check + td, .table--cards td:first-child { grid-column: 1 / -1; font-size: 14px; }
  .table-wrap--cards td.table__check { display: none; }
  .table-wrap--cards td.ta-right, .table--cards td.ta-right { grid-column: 2; grid-row: 2; text-align: right !important; align-self: start; font-weight: 500; }
  .table-wrap--cards td.ta-right ~ td.ta-right, .table--cards td.ta-right ~ td.ta-right { grid-row: auto; }
  .table-wrap--cards td:not(:first-child):not(.ta-right)[data-label]::before, .table--cards td:not(:first-child):not(.ta-right)[data-label]::before { content: attr(data-label) " · "; color: var(--text-3); font-size: 12px; }
  .table-wrap--cards td:empty, .table--cards td:empty { display: none; }
  .table-wrap--cards tfoot, .table--cards tfoot { display: block; }
}

/* confirm dialog */
.confirm__title { font: 600 16px/1.35 var(--font-text); margin: 0 0 6px; }
.confirm__body { color: var(--text-2); font-size: 14px; margin: 0; }

/* the O "click" — deal won, invoice paid, stock received (120 ms, once) */
.oclick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; color: var(--red); pointer-events: none; z-index: 5; animation: oclick-out 1.6s var(--ease-out) forwards; }
.oclick svg { width: 100%; height: 100%; animation: oclick 120ms var(--ease-spring) both; }
@keyframes oclick { from { transform: rotate(-45deg); } to { transform: rotate(0); } }
@keyframes oclick-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.toast__icon--o { background: transparent !important; color: var(--red) !important; }
.toast__icon--o svg { width: 20px; height: 20px; animation: oclick 120ms var(--ease-spring) 80ms both; }

/* ⌘K O spinner: notch steps while searching, clicks to rest when results land */
.palette__spin.is-done .odial svg { animation: oclick 120ms var(--ease-spring) both; }
.palette__spin.is-done { opacity: 0; transition: opacity .4s .3s; }
.palette__more { display: block; width: 100%; text-align: left; padding: 6px 10px 8px 52px; font-size: 12.5px; color: var(--text-3); }
.palette__more:hover, .palette__more.is-active { color: var(--text); }

/* custom date field (English, matches the UI) */
.datef { position: relative; display: block; }
.datef__input { padding-right: 36px; }
.datef__btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; }
.datef__pop { position: absolute; z-index: 130; top: calc(100% + 6px); left: 0; width: 272px; padding: 10px; background: var(--s3); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-3); animation: fade-down var(--t-med) var(--ease-panel); }
.datef__pop.is-up { top: auto; bottom: calc(100% + 6px); }
.datef__pop.is-right { left: auto; right: 0; }
.datef__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.datef__head b { font-size: 13.5px; font-weight: 600; }
.datef__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datef__grid span { text-align: center; font-size: 11px; color: var(--text-3); padding: 4px 0; }
.datef__grid button { height: 32px; border-radius: 7px; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.datef__grid button:hover { background: var(--press); }
.datef__grid button.is-out { color: var(--text-3); }
.datef__grid button.is-today { box-shadow: inset 0 0 0 1px var(--line-3); }
.datef__grid button.is-sel { background: var(--text); color: var(--bg); font-weight: 600; }
.datef__grid button:disabled { opacity: .3; cursor: not-allowed; }
.datef__foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.filters__dates .datef { width: 150px; }
@media (max-width: 860px) { .filters__dates .datef { flex: 1; width: auto; } }

/* sidebar: footer never clips the last nav item */
.sidebar__foot { background: var(--bg); position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .dial__head, .dial__arc, .oclick svg, .toast__icon--o svg, .empty__ring rect { animation: none !important; }
}
@media (max-width: 640px) { .dial-card__lead, .dial-card__note { display: none; } .dial-card__facts { border-top: 0; padding-top: 0; } }

.tooltip__kbd { background: rgba(0, 0, 0, .08); border-color: rgba(0, 0, 0, .18); color: #0A0A0B; margin-left: 4px; height: 18px; min-width: 18px; }
.datef > input[type="date"] { left: 0; top: 0; }
.filters__dates .datef { min-width: 0; }
@media (max-width: 860px) { .filters__dates .datef { flex: 1 1 0; } }
.datef > input.sr-only { width: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; }
/* where the ring is too small for a ≥24px Benzin figure, the hero number switches to Klavika (Benzin stays ≥24px only) */
@media (max-width: 1280px) { .dial__value:not(.is-zero) { font-family: var(--font-text); font-weight: 600; font-size: 28px; letter-spacing: -.02em; } }

/* ───────────── PWA: install modal + Account → Notifications (core, app/push.php) */
.install { display: grid; gap: 18px; }
.install__app { display: flex; gap: 14px; align-items: center; }
.install__app img { border-radius: 13px; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.install__app span { display: grid; gap: 2px; min-width: 0; }
.install__app small { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.install__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.install__steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.install__steps b { color: var(--text); font-weight: 500; }
.install__n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 12px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 1px; }
.install__ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-xs); background: var(--s3, var(--s2)); color: var(--text); vertical-align: -5px; }
.push-device { display: grid; gap: 16px; }
.push-device__head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.push-device__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.push-device__text { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.push-device__text p { margin: 0; }
.push-device__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.push-device .section-label { margin: 4px 0 0; }
.push-devices { list-style: none; margin: 0; padding: 0; display: grid; }
.push-devices li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.push-devices__name { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; }
.push-devices__this { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.push-devices__meta { grid-column: 1; }
.push-devices li > form, .push-devices li > .btn { grid-column: 2; grid-row: 1 / span 2; }
.push-lead { margin: 4px 0 16px; }
.push-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.push-channel { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.push-channel span { display: grid; gap: 2px; min-width: 0; }
.push-channel b { font-weight: 500; font-size: 14px; }
.push-channel small, .push-matrix__label small { font-size: 12.5px; line-height: 1.4; }
.push-channel.is-disabled { opacity: .55; }
.switch.is-disabled { cursor: not-allowed; }
.push-matrix { display: grid; }
.push-matrix__row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 72px; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.push-matrix__row > span:not(:first-child) { display: flex; justify-content: center; }
.push-matrix__row--head { border-top: 0; font: 500 11px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding-top: 16px; padding-bottom: 12px; }
.push-matrix__group { padding: 18px 20px 6px; border-top: 1px solid var(--line); font: 500 11px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.push-matrix__group + .push-matrix__row { border-top: 0; }
.push-matrix__label { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.push-matrix__label > .icon { color: var(--text-3); margin-top: 3px; flex: none; }
.push-matrix__label > span { display: grid; gap: 2px; min-width: 0; }
.push-matrix__label b { font-weight: 500; font-size: 14px; }
@media (max-width: 640px) {
  .push-channels { grid-template-columns: 1fr; }
  .push-matrix__row { grid-template-columns: minmax(0, 1fr) 52px 52px; gap: 8px; padding: 12px 16px; }
  .push-matrix__group { padding: 16px 16px 6px; }
  .push-matrix__label > .icon { display: none; }
}
