/* Slate — production planner. Concept demo by Larpcore Labs. */
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  --font: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r-sm: 10px; --r-md: 14px; --r-lg: 24px; --r-xl: 28px;
  --gap: 16px;
  --pad: 28px;
}
[data-theme='light'] {
  color-scheme: light;
  --bg: #e8e5df;
  --card: #f3f1ec;
  --card-2: #ecE9e3;
  --raised: #fbfaf8;
  --well: #dbd7cf;
  --ink: #0b0b0a;
  --on-ink: #f3f1ec;
  --ink-card: #0b0b0a;
  --ink-card-fg: #f1efea;
  --muted: #5e5a53;
  --faint: #8d887f;
  --line: #0b0b0a14;
  --line-2: #0b0b0a26;
  --data-1: #0b0b0a;
  --data-2: #6a665f;
  --area: #e1ddd5;
  --accent: #ee4b22;
  --good: #2e6b46; --good-bg: #2e6b461a;
  --bad: #a8352b; --bad-bg: #a8352b1a;
  --warn: #8d5c05;
  --shadow: 0 1px 1px #0b0b0a08, 0 16px 32px -22px #0b0b0a4d;
  --shadow-lg: 0 30px 60px -24px #0b0b0a59, 0 2px 6px #0b0b0a0f;
  --scrim: #1a181540;
}
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --card: #161614;
  --card-2: #1c1b19;
  --raised: #262522;
  --well: #2c2b28;
  --ink: #e6e3dc;
  --on-ink: #0d0d0c;
  --ink-card: #050505;
  --ink-card-fg: #e6e3dc;
  --muted: #a29e97;
  --faint: #77736c;
  --line: #ffffff14;
  --line-2: #ffffff26;
  --data-1: #e6e3dc;
  --data-2: #8a8781;
  --area: #222120;
  --accent: #ff6a3d;
  --good: #7fc79b; --good-bg: #7fc79b1f;
  --bad: #f08a80; --bad-bg: #f08a801f;
  --warn: #e0b05c;
  --shadow: 0 1px 1px #00000040, 0 16px 32px -22px #000000b3;
  --shadow-lg: 0 30px 60px -20px #000000c0, 0 0 0 1px #ffffff12;
  --scrim: #00000080;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.45 var(--font); font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; overflow-x: hidden;
}
body.booting #app { visibility: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.num, .kpi-v, .big, .tnum { font-variant-numeric: tabular-nums; }
.show-phone { display: none; }

/* ---------- Lenis (desktop smooth scroll) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 40; height: 80px; padding: 0 var(--pad);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.top::before {
  content: ''; position: absolute; inset: 0 0 -18px; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
  background: linear-gradient(var(--bg) 62%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.top.is-scrolled::before { opacity: 1; }
.top > * { position: relative; }
.brand { display: flex; align-items: center; gap: 11px; justify-self: start; min-width: 0; min-height: 44px; }
.mark { flex: none; display: block; }
.mark-bg { fill: var(--ink); } .mark-fg { fill: var(--on-ink); }
.mark-arm { transform-origin: 8.6px 14.4px; transform: rotate(-13deg); transition: transform .5s var(--ease); }
.brand:hover .mark-arm { transform: rotate(-24deg); }
.brand-tx { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-tx b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.brand-sub { position: relative; height: 14px; overflow: hidden; font-size: 11px; color: var(--muted); }
.brand-sub i { display: block; font-style: normal; white-space: nowrap; transition: transform .45s var(--ease), opacity .3s; }
.brand-sub .bs-b { position: absolute; top: 0; left: 0; transform: translateY(110%); opacity: 0; color: var(--ink); font-weight: 600; }
.top.is-titled .bs-a { transform: translateY(-110%); opacity: 0; }
.top.is-titled .bs-b { transform: none; opacity: 1; }

.nav {
  position: relative; display: flex; gap: 2px; padding: 6px; border-radius: 99px; background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 1px #0b0b0a08, 0 12px 28px -18px #0b0b0a55;
}
.nav-thumb { position: absolute; inset: 0; background: var(--ink); border-radius: 99px; pointer-events: none; z-index: 1; clip-path: inset(50% 50% 50% 50% round 99px); }
.nav-row { position: absolute; inset: 0; display: flex; gap: 2px; padding: 6px; }
.nav-it {
  position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 13px; border-radius: 99px;
  font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: color .2s;
}
.nav > .nav-it:hover { color: var(--ink); }
.nav-row .nav-it, .nav-row .tab-it { color: var(--on-ink); }
.badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  font: 700 10.5px/1 var(--font); font-style: normal; background: var(--well); color: var(--ink);
}
.nav-row .badge { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: var(--on-ink); }

.tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.search {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 7px 0 14px; border-radius: 99px; background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 13.5px; transition: box-shadow .2s;
}
.search span { min-width: 64px; text-align: left; }
.search:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
kbd {
  display: inline-grid; place-items: center; height: 26px; padding: 0 8px; border-radius: 8px; font: 600 11px var(--font);
  background: var(--card-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
}
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--raised); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s; flex: none;
}
.icon-btn:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.bell { position: relative; background: var(--ink); color: var(--on-ink); box-shadow: none; }
.bell .badge-accent { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; font-size: 10px; background: var(--accent); color: #fff; box-shadow: 0 0 0 2.5px var(--bg); }
.me {
  position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--on-ink);
  font: 700 12px var(--font); letter-spacing: .02em; display: grid; place-items: center;
}
.me .av-dot { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 99px;
  font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .2s, box-shadow .2s, color .2s;
}
.btn .ic { width: 16px; height: 16px; }
.btn-ink { background: var(--ink); color: var(--on-ink); box-shadow: 0 10px 22px -14px #0b0b0a99; }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-ghost { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line), 0 1px 1px #0b0b0a08; }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 1px #0b0b0a08; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-danger { color: var(--bad); }
.btn-white { background: var(--ink-card-fg); color: #0b0b0a; height: 38px; padding: 0 18px; }
.btn-dghost { height: 38px; padding: 0 14px; color: var(--ink-card-fg); background: #ffffff10; box-shadow: inset 0 0 0 1px #ffffff26; }
.btn-dghost:hover { background: #ffffff1c; }
.btn-dghost .ic { width: 14px; height: 14px; }
.link-btn { font-size: 12px; font-weight: 600; color: var(--muted); }
.link-btn:hover { color: var(--ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}
.chip-dark { background: #ffffff14; color: var(--ink-card-fg); box-shadow: inset 0 0 0 1px #ffffff1f; }
.chip-delta { background: var(--good-bg); color: #7fc79b; box-shadow: none; }
.chip-delta.down { color: #f08a80; background: #f08a801f; }
.chip-now { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip-now i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.round-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .2s;
}
.round-btn:hover { box-shadow: inset 0 0 0 1px var(--line-2); transform: translateX(2px); }
.round-ink { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.round-ink:hover { transform: rotate(90deg); }

/* avatars */
.av {
  --s: 28px; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%;
  font: 700 calc(var(--s) * .34)/1 var(--font); letter-spacing: .02em;
}
.av-ink { background: var(--ink); color: var(--on-ink); }
.av-grey { background: var(--data-2); color: #fff; }
.av-stone { background: var(--well); color: var(--ink); }
.av-ghost { background: var(--raised); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.av-dot, .av.on::after { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 2px var(--card); }
.av.on::after { content: ''; pointer-events: none; }

/* segmented controls (stretchy thumb) */
.seg {
  position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 16px;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate;
}
.seg .opt {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 12px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .25s;
}
.seg .opt .ic { width: 15px; height: 15px; }
.seg .opt.on, .seg .opt:hover { color: var(--ink); }
.seg-thumb {
  position: absolute; left: 0; top: 0; z-index: 1; border-radius: 12px; background: var(--raised); pointer-events: none;
  box-shadow: 0 1px 2px #0b0b0a14, 0 6px 14px -8px #0b0b0a40, inset 0 0 0 1px var(--line);
}
[data-theme='dark'] .seg-thumb { background: #34332f; }
.seg-sm .opt { height: 30px; padding: 0 12px; }
/* ink variant: clip-path thumb carrying inverted labels */
.seg-ink { background: transparent; box-shadow: none; padding: 0; gap: 6px; }
.seg-ink .opt { height: 34px; padding: 0 14px; border-radius: 99px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); z-index: 0; }
.seg-ink .opt.on { box-shadow: none; }
.seg-ink > .seg-thumb, .seg-days > .seg-thumb { inset: 0; width: auto !important; height: auto !important; transform: none !important; background: var(--ink); box-shadow: none; border-radius: 0; z-index: 2; clip-path: inset(50% round 99px); }
.seg-row { position: absolute; inset: 0; display: flex; align-items: center; }
.seg-ink .seg-row { gap: 6px; }
.seg-ink .seg-row .opt { background: transparent; box-shadow: none; color: var(--on-ink); }

/* ---------- page ---------- */
.page-host.is-parked { content-visibility: hidden; contain-intrinsic-size: none; }
/* a page being pre-rendered or re-styled while it is not on screen: laid out off to the side, out of the flow */
#view { position: relative; }
.page-host.is-warming { content-visibility: visible; position: absolute; top: 0; left: -14000px; width: calc(100% - 2 * var(--pad)); }
#view { max-width: 1480px; margin: 0 auto; padding: 0 var(--pad) 28px; outline: none; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 14px 0 22px; }
.phead-l { min-width: 0; }
.ptitle { display: flex; align-items: flex-end; gap: 6px; font-size: 34px; font-weight: 620; letter-spacing: -.03em; line-height: 1.05; }
.ptitle .w { display: inline-block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; vertical-align: bottom; }
.ptitle .c { display: inline-block; }
.tally { display: block; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); margin-bottom: 8px; }
.psub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.ulink { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .2s; padding: 12px 0; margin: -12px 0; }
.ulink:hover { text-decoration-color: var(--ink); }
.phead-r { display: flex; align-items: center; gap: 10px; flex: none; }
.weather {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 13px; border-radius: 99px; background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--muted);
}
.weather span { display: flex; flex-direction: column; line-height: 1.15; }
.weather b { font-size: 13px; color: var(--ink); }
.weather i { font-style: normal; font-size: 11px; }

.card {
  position: relative; background: var(--card); border-radius: var(--r-lg); padding: 18px 20px 20px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); min-width: 0;
}
.card.ink { background: var(--ink-card); color: var(--ink-card-fg); box-shadow: var(--shadow); }
[data-theme='dark'] .card.ink { box-shadow: inset 0 0 0 1px #ffffff12, var(--shadow); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.card-h p { margin-top: 2px; font-size: 12px; color: var(--muted); }
.card.ink .card-h p { color: #f1efea99; }
.card-tools { display: flex; align-items: center; gap: 8px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { min-height: 124px; padding: 16px 18px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.kpi-l { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi.ink .kpi-l, .kpi.ink .kpi-s { color: #f1efeaa8; }
.kpi-v { font-size: 26px; font-weight: 620; letter-spacing: -.03em; line-height: 1; }
.kpi-v .of { font-size: 15px; font-weight: 500; opacity: .6; letter-spacing: 0; }
.kpi-s { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kpi-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.spark { width: 46%; max-width: 128px; height: 40px; overflow: visible; }
.spark path { fill: none; stroke: var(--ink-card-fg); stroke-width: 1.8; stroke-linecap: round; }
.flash-up { color: var(--good) !important; transition: color 0s; }
.flash-down { color: var(--bad) !important; transition: color 0s; }
.kpi-v b, [data-st], [data-in] { transition: color .6s var(--ease); display: inline-block; }

/* ---------- gantt ---------- */
.gantt { --who: 168px; --rowh: 58px; --barh: 40px; display: grid; grid-template-columns: var(--who) minmax(0, 1fr); position: relative; user-select: none; -webkit-user-select: none; }
.gantt.is-compact { --who: 118px; --rowh: 46px; --barh: 32px; }
.g-who-col { position: relative; z-index: 3; }
.g-who-head, .g-hours { height: 34px; }
.g-who-head { display: flex; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.g-who { height: var(--rowh); display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); min-width: 0; }
.g-who-tx { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.g-who-tx b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-who-tx i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.g-scroll { overflow-x: auto; overflow-y: visible; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.g-plot { position: relative; min-width: 540px; padding-right: 14px; }
.is-full .g-plot { min-width: 720px; }
.g-hours { position: relative; }
.g-hours span { position: absolute; top: 10px; transform: translateX(-50%); font: 500 10.5px var(--mono); color: var(--faint); letter-spacing: -.02em; }
.g-hours span:first-child { transform: none; }
.g-hours span:last-child { transform: translateX(-100%); }
.g-hours span.under-now { visibility: hidden; }
.g-rows { position: relative; }
/* hour and half-hour lines as one background (was 23 elements): each 1/11th tile draws its hour line and a fainter
   half-hour line; the closing 19:00 line is the right border */
.g-grid {
  position: absolute; inset: 0; pointer-events: none; border-right: 1px solid var(--line);
  background-image: linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50%, color-mix(in srgb, var(--ink) 4%, transparent) 50% calc(50% + 1px), transparent calc(50% + 1px));
  background-size: calc(100% / 11) 100%;
}
.g-links { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
.g-links g { opacity: .55; }
.g-links .ln { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.g-links .ar { fill: var(--ink); }
.g-lanes { position: relative; z-index: 2; }
.g-lane { position: relative; height: var(--rowh); border-top: 1px solid var(--line); }
.g-now { position: absolute; top: 6px; bottom: 0; width: 0; z-index: 4; pointer-events: none; }
.g-now::before { content: ''; position: absolute; top: 20px; bottom: 0; left: -1px; width: 2px; background: var(--accent); border-radius: 2px; }
.g-now-pill {
  position: absolute; top: 0; left: 0; transform: translateX(-50%); height: 21px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font: 700 10.5px var(--mono); letter-spacing: -.02em; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}

.bar {
  position: absolute; top: 50%; height: var(--barh); margin-top: calc(var(--barh) / -2); border-radius: 99px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 5px; min-width: 14px;
  background: var(--ink); color: var(--on-ink); cursor: grab; touch-action: pan-x pan-y;
  box-shadow: 0 1px 0 #ffffff12 inset, 0 8px 16px -10px #0b0b0a8c;
  transition: box-shadow .25s var(--ease);
}
.bar:focus-visible { outline-offset: 3px; }
.bar-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.bar-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--on-ink) 16%, transparent); }
.bar.is-pencil .bar-prog { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.bar-ic { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.bar-ic::after { content: ''; width: var(--mi, 15px); height: var(--mi, 15px); background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.is-compact .bar-ic { width: 23px; height: 23px; }
.is-compact .bar-ic { --mi: 13px; }
.bar-tx { position: relative; display: flex; flex-direction: column; min-width: 0; line-height: 1.18; flex: 1; }
.bar-tx b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-compact .bar-tx b { font-size: 12px; }
.bar-tx i { font: 500 10.5px var(--mono); font-style: normal; opacity: .72; white-space: nowrap; letter-spacing: -.02em; }
.is-compact .bar-tx i { display: none; }
.bar-guest { position: relative; flex: none; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: color-mix(in srgb, var(--on-ink) 16%, transparent); }
.bar-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 14px; cursor: ew-resize; border-radius: 0 99px 99px 0; }
.bar-grip::after { content: ''; position: absolute; right: 6px; top: 50%; width: 2px; height: 12px; margin-top: -6px; border-radius: 2px; background: currentColor; opacity: 0; transition: opacity .2s; }
.bar:hover .bar-grip::after, .bar.dragging .bar-grip::after { opacity: .55; }
.bar.is-pencil { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 6px 14px -12px #0b0b0a66; }
.bar.is-pencil::before { content: ''; position: absolute; inset: 3px; border-radius: inherit; border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); pointer-events: none; }
.bar.is-pencil .bar-ic { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.bar.is-pencil .bar-guest { background: var(--card-2); }
.bar.is-done { background: var(--well); color: var(--muted); box-shadow: none; cursor: default; }
.bar.is-done .bar-ic { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.bar.is-done .bar-grip { display: none; }
.bar.short .bar-tx i, .bar.short .bar-guest { display: none; }
.bar.tiny { padding-right: 5px; }
.bar.tiny .bar-tx, .bar.tiny .bar-guest { display: none; }
.bar.dragging { cursor: grabbing; z-index: 20; box-shadow: 0 24px 40px -14px #0b0b0aa6, 0 2px 6px #0b0b0a26; }
.gantt.is-dragging, .gantt.is-dragging * { cursor: grabbing; }
.bar.is-live .bar-ic::before { content: ''; position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--ink); }
.drag-tip {
  position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%); opacity: 0; pointer-events: none;
  height: 24px; padding: 0 9px; border-radius: 7px; display: grid; place-items: center; white-space: nowrap;
  background: #0b0b0a; color: #f3f1ec; font: 600 11px var(--mono); letter-spacing: -.02em; box-shadow: 0 8px 18px -8px #0b0b0a99;
}
[data-theme='dark'] .drag-tip { background: #f3f1ec; color: #0b0b0a; }
[data-theme='dark'] .bar { box-shadow: 0 8px 16px -10px #000; }
[data-theme='dark'] .bar.is-live .bar-ic::before { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Today ---------- */
.grid-today { display: grid; grid-template-columns: minmax(0, 1.86fr) minmax(320px, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.floor { padding-bottom: 12px; }
.next { display: flex; flex-direction: column; }
.live { position: relative; width: 22px; height: 22px; display: grid; place-items: center; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .1; transform: scale(.7); } 50% { opacity: .45; transform: scale(1); } }
.next-panel { background: #ffffff0f; border-radius: 20px; padding: 16px 16px 14px; box-shadow: inset 0 0 0 1px #ffffff0d; }
.next-in { font-size: 12.5px; font-weight: 600; color: #f1efeab3; }
.next-panel h3 { margin-top: 6px; font-size: 22px; font-weight: 620; letter-spacing: -.02em; line-height: 1.15; }
.next-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: #f1efeab3; }
.next-meta [data-when] { font-family: var(--mono); font-size: 11.5px; letter-spacing: -.02em; }
.next-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.stack { display: flex; }
.stack .av { box-shadow: 0 0 0 2.5px #1b1a18; }
.stack .av + .av { margin-left: -8px; }
.stack .av-ink { background: #f1efea; color: #0b0b0a; }
.stack .av.on::after { box-shadow: 0 0 0 2px #1b1a18; }
.next-btns { display: flex; gap: 8px; }
.then-h { margin: 18px 4px 6px; font-size: 12px; color: #f1efea8c; }
.then { display: flex; flex-direction: column; }
.then-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 4px; text-align: left;
  border-top: 1px solid #ffffff12; color: inherit; border-radius: 10px; transition: background .2s;
}
.then-row:hover { background: #ffffff0a; }
.then-row b { font: 600 12.5px var(--mono); letter-spacing: -.02em; }
.then-row span { display: flex; flex-direction: column; min-width: 0; }
.then-row em { font-style: normal; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.then-row i { font-style: normal; font-size: 12px; color: #f1efea8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.then-row .ic { opacity: .5; }
.then-empty { font-size: 12.5px; color: #f1efea8c; padding: 8px 4px; }

.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr) minmax(0, .82fr); gap: var(--gap); margin-bottom: var(--gap); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); gap: var(--gap); }
.big { font-size: 46px; font-weight: 600; letter-spacing: -.04em; line-height: 1; margin: 6px 0 18px; }
.big span { font-size: 20px; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.dbars { display: flex; flex-direction: column; gap: 12px; }
.dbar p { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.dbar p span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dbar p b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ink { background: var(--ink); } .dot-grey { background: var(--data-2); } .dot-ring { box-shadow: inset 0 0 0 1.5px var(--data-2); }
.track { position: relative; display: block; height: 6px; border-radius: 99px; background: var(--well); overflow: hidden; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--ink); }
.dchart { margin-top: 18px; }
.dchart svg { display: block; width: 100%; height: 92px; overflow: visible; }
.dchart path { fill: none; stroke-width: 1.8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.d-logged { stroke: var(--data-2); opacity: .7; }
.d-bill { stroke: var(--ink); }
.legend-s { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.legend-s span { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-ink { background: var(--ink); } .sw-grey { background: var(--data-2); }
.sw-dash { width: 14px; height: 0; border-top: 2px dashed var(--data-2); border-radius: 0; }

.plist { display: flex; flex-direction: column; }
.prow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 44px 70px; align-items: center; gap: 14px; padding: 10px 8px; margin: 0 -8px;
  border-radius: 12px; transition: background .2s;
}
.prow:hover { background: var(--card-2); }
.prow-n { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.prow-n b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-n i { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 5px; }
.pips i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.4px var(--line-2); }
.pips i.done { background: var(--ink); box-shadow: none; }
.pips i.cur { box-shadow: inset 0 0 0 1.6px var(--ink); background: radial-gradient(circle, var(--ink) 1.6px, transparent 2.2px); }
.prow-p { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.prow-d { font-size: 11.5px; color: var(--muted); text-align: right; }

.board { display: flex; flex-direction: column; }
.sb { position: relative; }
.sb-frame { border-radius: 16px; background: #ffffff08; box-shadow: inset 0 0 0 1px #ffffff12; padding: 10px; aspect-ratio: 16 / 10.4; display: grid; place-items: center; }
.sb-frame svg { width: 100%; height: auto; display: block; overflow: visible; }
.sb-frame .st { fill: none; stroke: #f1efea; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sb-frame .st.thin { stroke-width: 1; opacity: .7; }
.sb-frame .st.guide { stroke-width: .8; opacity: .22; stroke-dasharray: 3 4; }
.sb-frame .st.frame { stroke-width: 1.2; opacity: .55; }
.sb-frame .st.crop { stroke-width: 1.2; opacity: .5; }
.sb-frame .st.move { stroke: var(--accent); stroke-width: 1.6; }
.sb-t { font: 500 8.5px var(--mono); fill: #f1efea99; letter-spacing: .04em; }
.sb-nav { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; opacity: 0; transition: opacity .25s; }
.sb:hover .sb-nav, .sb:focus-within .sb-nav { opacity: 1; }
.icon-btn-dark { width: 30px; height: 30px; background: #0b0b0ad9; color: #f1efea; box-shadow: inset 0 0 0 1px #ffffff26; }
.sb-file { margin-top: 14px; font-size: 14px; font-weight: 600; word-break: break-all; }
.sb-meta { margin-top: 2px; font-size: 12px; color: #f1efea8c; }
.sb-by { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid #ffffff12; }
.sb-by p { display: flex; flex-direction: column; line-height: 1.25; }
.sb-by b { font-size: 13px; } .sb-by i { font-style: normal; font-size: 11.5px; color: #f1efea8c; }
.board .av-ink { background: #f1efea; color: #0b0b0a; }
.board .av.on::after { box-shadow: 0 0 0 2px var(--ink-card); }
.board .sb-by { margin-top: 18px; }

.lrows { display: flex; flex-direction: column; gap: 4px; }
.lrow { display: grid; grid-template-columns: 30px 130px minmax(0, 1fr) 112px; align-items: center; gap: 12px; height: 42px; }
.lrow > b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .track { height: 8px; }
.lrow.over .track i { background: #b07a1f; }
[data-theme='dark'] .lrow.over .track i { background: #d39b3b; }
.lv { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv b { color: var(--ink); font-weight: 600; font-size: 13px; }
.lv em { font-style: normal; margin-left: 6px; font-size: 10.5px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .04em; }
.av-dot { pointer-events: none; }

.flist { display: flex; flex-direction: column; gap: 8px; }
.frow {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 16px;
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.ftile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.fn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fn b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn i { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fprog { display: block; width: 64px; height: 5px; border-radius: 99px; background: var(--well); overflow: hidden; }
.fprog i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 26px; padding: 16px 4px 0; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.foot a { display: inline-flex; align-items: center; min-height: 40px; margin: -12px 0; font: 500 11px var(--mono); color: var(--muted); letter-spacing: -.01em; }
.foot a:hover { color: var(--ink); }

/* ---------- Planner ---------- */
.ptools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: var(--gap); flex-wrap: wrap; }
.ptools-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.week {
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 99px; background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 26px -20px #0b0b0a66;
}
.week .icon-btn { width: 36px; height: 36px; background: var(--card-2); }
.seg-days { background: transparent; box-shadow: none; padding: 0; gap: 2px; border-radius: 99px; }
.seg-days .opt { height: 46px; padding: 0 14px; border-radius: 99px; gap: 10px; color: var(--ink); z-index: 0; }
.seg-days .seg-row { gap: 2px; }
.seg-days .seg-row .opt { color: var(--on-ink); }
.day { position: relative; }
.day .dow { display: flex; flex-direction: column; align-items: flex-start; font-size: 12px; font-weight: 600; line-height: 1.1; }
.day .dow i { font-style: normal; font-size: 10px; font-weight: 600; opacity: .6; }
.day b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day .meter { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: color-mix(in srgb, currentColor 16%, transparent); overflow: hidden; }
.day .meter i { position: absolute; left: 0; top: 0; bottom: 0; background: currentColor; opacity: .75; border-radius: 2px; }
.grid-planner { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: var(--gap); align-items: start; }
.tl { padding: 12px 18px 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 2px 0; margin-top: 4px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend-r { margin-left: auto; }
.lg { width: 22px; height: 10px; border-radius: 99px; display: inline-block; }
.lg-booked { background: var(--ink); }
.lg-pencil { background: var(--raised); box-shadow: inset 0 0 0 1.4px var(--line-2); }
.lg-done { background: var(--well); }
.lg-link { height: 0; border-top: 1.4px solid var(--ink); opacity: .6; border-radius: 0; }
.lg-now { width: 3px; height: 14px; background: var(--accent); }
.pside { display: flex; flex-direction: column; gap: var(--gap); }
.kpi-tile { background: var(--raised); border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.kpi-tile p { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi-tile b { display: inline-block; margin-top: 6px; font-size: 22px; font-weight: 620; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.g-big { padding: 14px 16px 16px; margin-bottom: 10px; }
.g-big b { font-size: 40px; letter-spacing: -.04em; margin-top: 10px; }
.g-big i { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.g-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slist { display: flex; flex-direction: column; gap: 4px; }
.srow { display: grid; grid-template-columns: 30px minmax(0, 1fr) 84px; align-items: center; gap: 10px; height: 44px; }
.sn { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sn b { font-size: 13px; font-weight: 600; } .sn i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.agenda { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 4px; }
.ag-group { display: flex; flex-direction: column; gap: 6px; }
.ag-group + .ag-group { margin-top: 10px; }
.ag-group-h { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.ag-group-h b { font-size: 13.5px; font-weight: 620; }
.ag-group-h i { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-row {
  display: grid; grid-template-columns: 54px 10px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; text-align: left;
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s;
}
.ag-row:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.ag-row.is-now { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ag-t { display: flex; flex-direction: column; font: 600 12px var(--mono); letter-spacing: -.02em; line-height: 1.25; }
.ag-t i { font-style: normal; color: var(--muted); font-weight: 500; }
.ag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.ag-row.is-pencil .ag-dot { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.ag-row.is-done .ag-dot { background: var(--well); }
.ag-row.is-done > * { opacity: .7; }
.ag-n { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ag-n b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-n i { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-row > .mi { --mi: 16px; color: var(--faint); }

/* ---------- Reports ---------- */
.grid-reports { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.chart-card .legend-s { margin-top: 2px; }
.swap h2, .swap p { display: block; }
.lc { position: relative; height: 300px; }
.lc svg { display: block; overflow: visible; }
.lc-grid line { stroke: var(--line-2); stroke-dasharray: 3 5; }
.lc-grid line.base { stroke-dasharray: none; stroke: var(--line-2); }
.lc text { font: 500 10.5px var(--mono); fill: var(--faint); letter-spacing: -.02em; }
.lc-area { fill: var(--area); }
[data-theme='dark'] .lc-area { fill: #ffffff0c; }
.lc-line { fill: none; stroke: var(--data-1); stroke-width: 2; stroke-linecap: round; }
.lc-alt { fill: none; stroke: var(--data-2); stroke-width: 1.6; stroke-dasharray: 4 5; stroke-linecap: round; }
.lc-guide { stroke: var(--line-2); opacity: 0; transition: opacity .2s; }
.lc-dot { fill: var(--card); stroke: var(--ink); stroke-width: 2; opacity: 0; transition: opacity .2s; }
.lc.hover .lc-guide, .lc.hover .lc-dot { opacity: 1; }
.lc-tip, .bc-tip {
  position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .2s, transform .25s var(--ease);
  padding: 6px 10px; border-radius: 10px; background: #0b0b0a; color: #f3f1ec; white-space: nowrap; z-index: 5;
  display: flex; flex-direction: column; line-height: 1.25; box-shadow: 0 10px 22px -10px #0b0b0a99;
}
.lc-tip b, .bc-tip b { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.lc-tip i, .bc-tip i { font-style: normal; font-size: 11px; opacity: .7; }
.lc.hover .lc-tip, .bc-tip.on { opacity: 1; }
[data-theme='dark'] .lc-tip, [data-theme='dark'] .bc-tip { background: #f3f1ec; color: #0b0b0a; }

.bc { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 1fr 26px; height: 300px; }
.bc-y { display: flex; flex-direction: column; justify-content: space-between; padding: 0 10px 0 0; font: 500 10.5px var(--mono); color: var(--faint); text-align: right; transform: translateY(-6px); letter-spacing: -.02em; }
.bc-y span { display: block; }
.bc-plot { position: relative; }
.bc-lines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bc-lines i { display: block; height: 0; border-top: 1px dashed var(--line-2); }
.bc-lines i:last-child { border-top-style: solid; }
.bc-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 0; align-items: end; }
.bc-bar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bc-bar i { display: block; width: 58%; max-width: 30px; border-radius: 8px 8px 3px 3px; background: var(--data-2); opacity: .85; transition: background .2s, opacity .2s; }
.bc-bar.now i { background: var(--ink); opacity: 1; }
.bc-bar:hover i, .bc-bar:focus-visible i { background: var(--ink); opacity: 1; }
.bc-bar:focus-visible { outline: none; }
.bc-x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); align-items: end; font: 500 10.5px var(--mono); color: var(--faint); text-align: center; letter-spacing: -.02em; }
.bc-x .now { color: var(--ink); font-weight: 700; }

.burn { padding-bottom: 8px; }
.tbl { display: flex; flex-direction: column; margin: 0 -20px; }
.tr { display: grid; grid-template-columns: minmax(170px, 1.4fr) 100px minmax(140px, 1.2fr) minmax(140px, 1.2fr) 110px 110px; align-items: center; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--line); transition: background .4s; }
.tr.th { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 10px 20px; }
.tr .num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.td-n { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.td-n b { font-size: 13.5px; font-weight: 600; } .td-n i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.td-bar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.td-bar b { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.tr.hot .used .track i { background: var(--bad); }
.tr.hot .used b { color: var(--bad); }
.tr.is-focus { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- pressed + hover states ---------- */
.btn, .icon-btn, .me, .search, .round-btn, .nav-it, .tab-it, .tab-new, .seg .opt, .then-row, .prow, .ag-row, .toast-undo, .nudge, .pal-item, .link-btn, .bc-bar, .sb-nav button {
  transition-property: background, box-shadow, color, scale; transition-duration: .2s; transition-timing-function: var(--ease);
}
.btn:active, .icon-btn:active, .me:active, .search:active, .round-btn:active, .nav-it:active, .tab-it:active, .tab-new:active, .seg .opt:active,
.then-row:active, .prow:active, .ag-row:active, .toast-undo:active, .nudge:active, .pal-item:active, .link-btn:active { scale: .96; transition-duration: .08s; }
.btn-white:hover { background: #fff; }
.me:hover, .bell:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.tab-new:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.bar:not(.is-done):hover { box-shadow: 0 1px 0 #ffffff12 inset, 0 12px 22px -10px #0b0b0aa6; }
.bar.is-pencil:hover { box-shadow: inset 0 0 0 1.5px var(--ink), 0 10px 20px -12px #0b0b0a66; }
.week .icon-btn[aria-disabled='true'] { opacity: .4; cursor: default; }
@media (hover: none) { .sb-nav { opacity: 1; } }

/* ---------- toasts, tooltip ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: 100%; padding: 8px 8px 8px 16px; border-radius: 99px;
  background: #0b0b0a; color: #e6e3dc; font-size: 13.5px; font-weight: 600; box-shadow: 0 18px 40px -16px #0b0b0ab3;
}
.toast-ic { display: grid; place-items: center; opacity: .85; }
.toast-tx { flex: 1; min-width: 0; line-height: 1.3; padding-right: 6px; }
.toast-undo { flex: none; height: 32px; padding: 0 13px; border-radius: 9px; background: #ffffff24; font-size: 12.5px; font-weight: 650; transition: background .2s; }
.toast-undo:hover { background: #ffffff38; }
.toast:not(:has(.toast-undo)) { padding-right: 20px; }
[data-theme='dark'] .toast { background: #ecE9e2; color: #0b0b0a; box-shadow: 0 18px 40px -16px #000; }
[data-theme='dark'] .toast-undo { background: #0b0b0a1c; }
.tip {
  position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; display: none; height: 28px; padding: 0 10px; border-radius: 8px;
  align-items: center; background: #0b0b0a; color: #f3f1ec; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 18px -8px #0b0b0a80;
}
.tip.on { display: flex; }
[data-theme='dark'] .tip { background: #e6e3dc; color: #0b0b0a; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: var(--scrim); }
/* overlays live in one fixed, contained layer: adding a drawer or palette never re-lays-out the page */
.layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; contain: strict; }
.layer > * { pointer-events: auto; }
.layer > .theme-wipe { position: fixed; z-index: 120; border-radius: 50%; pointer-events: none; transform-origin: 50% 50%; }
.gantt:not(.is-ready) .g-lanes, .gantt:not(.is-ready) .g-links, .gantt:not(.is-ready) .g-now { visibility: hidden; }
.scrim-soft { background: color-mix(in srgb, var(--scrim) 60%, transparent); }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); z-index: 80; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); overflow: hidden;
}
.dr-head, .md-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.dr-head h2, .md-head h2 { font-size: 21px; font-weight: 640; letter-spacing: -.02em; line-height: 1.15; }
.dr-head p, .md-head p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.dr-close, .md-close { width: 36px; height: 36px; }
.dr-body { flex: 1; overflow-y: auto; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.dr-time { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 14px; border-radius: 18px; background: var(--ink-card); color: var(--ink-card-fg); }
[data-theme='dark'] .dr-time { box-shadow: inset 0 0 0 1px #ffffff14; }
.dr-time .chip-dark .ic { width: 14px; height: 14px; }
.dr-range { display: flex; align-items: baseline; gap: 10px; }
.dr-range b { display: inline-block; font: 600 22px var(--mono); letter-spacing: -.04em; }
.dr-range i { font-style: normal; font-size: 12px; opacity: .6; }
.dr-sec h3 { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.dr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; font-weight: 600; }
.nudges { display: flex; gap: 6px; }
.nudge { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 99px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); font: 600 12px var(--mono); letter-spacing: -.02em; transition: box-shadow .2s, scale .15s; }
.nudge:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.nudge:active { scale: .96; }
.dr-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.dr-note .ic { margin-top: 2px; }
.dr-people { display: flex; flex-direction: column; gap: 6px; }
.dr-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.dr-person div { display: flex; flex-direction: column; line-height: 1.25; }
.dr-person b { font-size: 13.5px; } .dr-person i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.dr-where { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.dr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.dr-actions .btn { height: 40px; }
.drawer:not(.is-sheet) .sheet-grab { display: none; }
.sheet-grab { display: grid; place-items: center; height: 18px; padding-top: 8px; cursor: grab; touch-action: none; }
.sheet-grab i { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
.drawer.is-sheet, .modal.is-sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 86vh; border-radius: 26px; }
.drawer.is-sheet .dr-head, .modal.is-sheet .md-head { touch-action: none; padding-top: 10px; }

.modal {
  position: fixed; left: 50%; top: 50%; z-index: 80; width: min(520px, calc(100vw - 24px)); translate: -50% -50%; background: var(--card); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); overflow: hidden;
}
.modal.is-sheet { translate: none; }
.md-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.fld input, .fld select {
  height: 44px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 14px; outline: none; width: 100%; appearance: none; -webkit-appearance: none; transition: box-shadow .2s;
}
.fld select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.fld input:focus, .fld select:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld .seg { align-self: flex-start; }
.md-err { min-height: 18px; font-size: 12.5px; color: var(--bad); font-weight: 600; }
.md-actions { display: flex; justify-content: flex-end; gap: 8px; }

.palette {
  position: fixed; left: 50%; top: 14vh; z-index: 85; width: min(600px, calc(100vw - 24px)); margin-left: calc(min(600px, calc(100vw - 24px)) / -2);
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); overflow: hidden;
}
.pal-in { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 15px; color: var(--ink); }
.pal-list { max-height: min(380px, 56vh); overflow-y: auto; padding: 6px 8px 8px; overscroll-behavior: contain; }
.pal-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 10px; border-radius: 12px; text-align: left; font-size: 13.5px; font-weight: 550; }
.pal-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item span i { font-style: normal; color: var(--muted); font-weight: 400; }
.pal-item kbd { height: 22px; font-size: 10.5px; padding: 0 7px; }
.pal-item kbd:empty { display: none; }
.pal-item.on { background: var(--ink); color: var(--on-ink); }
.pal-item.on span i { color: color-mix(in srgb, var(--on-ink) 65%, transparent); }
.pal-item.on kbd { background: color-mix(in srgb, var(--on-ink) 16%, transparent); color: var(--on-ink); box-shadow: none; }
.pal-empty { padding: 22px 12px; font-size: 13px; color: var(--muted); }
.pal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.pal-foot kbd { height: 20px; padding: 0 6px; font-size: 10px; margin-right: 3px; }

.pop {
  position: fixed; z-index: 85; width: 340px; background: var(--card); border-radius: 20px; padding: 8px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
}
.pop header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.pop header b { font-size: 14px; }
.pop-list { display: flex; flex-direction: column; gap: 2px; }
.pop-item { position: relative; display: flex; gap: 10px; padding: 10px; border-radius: 14px; }
.pop-item.unread { background: var(--raised); }
.pop-item.unread::after { content: ''; position: absolute; right: 12px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pop-item p { font-size: 13px; line-height: 1.35; padding-right: 16px; }
.pop-item i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .search span { display: none; }
  .search { padding: 0 6px 0 12px; }
  .nav-it { padding: 0 14px 0 11px; }
}
@media (max-width: 1180px) {
  .top { grid-template-columns: auto 1fr auto; }
  .nav { justify-self: center; }
  .search kbd { display: none; }
  .search { width: 42px; padding: 0; justify-content: center; }
  .grid-today { grid-template-columns: minmax(0, 1fr); }
  .next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .next .card-h { grid-column: 1 / -1; }
  .next .then-h { margin-top: 0; grid-column: 2; grid-row: 2; }
  .next .then { grid-column: 2; grid-row: 2; padding-top: 22px; }
  .next-panel { grid-row: 2; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 20px; }
  .board .card-h { grid-column: 1 / -1; }
  .board .sb { grid-row: 2 / span 4; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-planner { grid-template-columns: minmax(0, 1fr); }
  .pside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-reports { grid-template-columns: minmax(0, 1fr); }
  .tr { grid-template-columns: minmax(150px, 1.4fr) minmax(110px, 1.2fr) minmax(110px, 1.2fr) 96px 96px; gap: 14px; }
  .tr .td-st, .tr.th > span:nth-child(2) { display: none; }
}
@media (max-width: 960px) {
  .tools .me, .theme-btn + .bell { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-new { width: 42px; padding: 0; font-size: 0; gap: 0; }
}
@media (max-width: 760px) {
  :root { --pad: 14px; --gap: 12px; }
  /* phones: crisp 1px shadows instead of large blurs — blurred shadows were the biggest paint cost on a throttled
     phone (every card and bar repainted them on each theme flip and reveal) */
  [data-theme='light'] { --shadow: 0 1px 1px #0b0b0a0d, 0 2px 0 -1px #0b0b0a0a; }
  [data-theme='dark'] { --shadow: 0 1px 1px #00000059; }
  .bar { box-shadow: 0 1px 0 #ffffff12 inset, 0 2px 0 -1px #0b0b0a33; }
  .bar.is-pencil { box-shadow: inset 0 0 0 1.5px var(--line-2); }
  [data-theme='dark'] .bar { box-shadow: 0 2px 0 -1px #000; }
  .btn-ink { box-shadow: none; }
  .week { box-shadow: inset 0 0 0 1px var(--line); }
  .nav { box-shadow: inset 0 0 0 1px var(--line); }
  .g-now-pill { box-shadow: none; }
  .show-phone { display: inline; }
  .hide-phone { display: none; }
  .top { height: 64px; grid-template-columns: 1fr auto; }
  .nav, .search, .btn-new, .tools .bell { display: none; }
  .tools .me { display: grid; width: 40px; height: 40px; font-size: 11px; }
  .tools .icon-btn { width: 40px; height: 40px; }
  .brand-tx b { font-size: 18px; }
  #view { padding-bottom: 110px; }
  .phead { flex-direction: column; align-items: stretch; gap: 14px; padding: 8px 0 18px; }
  .ptitle { font-size: 30px; }
  .phead-r { flex-wrap: wrap; }
  .phead-r .btn { flex: 1; }
  .weather { flex: 1 1 100%; height: 44px; }
  .page-today .phead-r .btn-ink { display: none; }
  .card { padding: 16px 16px 18px; border-radius: 22px; }
  /* off-screen cards skip style, layout and paint until they scroll near (sizes are remembered once seen) */
  .card { content-visibility: auto; contain-intrinsic-size: auto 380px; }
  .kpi { contain-intrinsic-size: auto 112px; }
  .kpis { gap: 10px; }
  .kpi { min-height: 112px; padding: 14px 14px 12px; }
  .kpi-v { font-size: 22px; }
  .kpi-l { font-size: 12px; gap: 6px; }
  .kpi-l .ic { width: 15px; height: 15px; }
  .spark { display: none; }
  .kpi-s .chip:last-child { display: none; }
  .card-h { flex-wrap: wrap; }
  .floor .card-h { flex-direction: column; }
  .gantt { --who: 70px; }
  .gantt.is-compact { --who: 64px; }
  .g-who-tx i { display: none; }
  .g-who-tx b { font-size: 12px; }
  .g-who { gap: 7px; }
  .g-plot, .is-full .g-plot { min-width: 1000px; }
  .gantt.is-compact, .gantt.is-full { --rowh: 54px; --barh: 42px; }
  .is-compact .bar-ic { width: 30px; height: 30px; }
  .seg .opt, .seg-sm .opt { height: 40px; }
  .seg-ink .opt { height: 40px; }
  .seg-days .opt { flex: 1; min-width: 46px; }
  .seg-days > .opt, .seg-days .seg-row > .opt { flex: 1 1 0; }
  .tools .icon-btn, .tools .me { width: 40px; height: 40px; }
  .round-btn { width: 40px; height: 40px; }
  .btn-sm { height: 40px; }
  .nudge { height: 40px; padding: 0 14px; }
  .btn-white, .btn-dghost { height: 40px; }
  .dr-close, .md-close { width: 40px; height: 40px; }
  .toast { padding: 6px 6px 6px 16px; }
  .toast-undo { height: 40px; padding: 0 15px; border-radius: 12px; }
  .icon-btn-dark { width: 40px; height: 40px; }
  .sb-nav { right: 16px; bottom: 16px; }
  .gantt::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--who); width: 14px; z-index: 5; pointer-events: none; background: linear-gradient(90deg, var(--card), color-mix(in srgb, var(--card) 0%, transparent)); }
  .next { display: flex; }
  .next .then { padding-top: 0; }
  .next .then-h { margin-top: 18px; }
  .next-panel h3 { font-size: 20px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .board { display: flex; }
  .prow { grid-template-columns: minmax(0, 1fr) auto 40px; gap: 10px; }
  .prow-d { display: none; }
  .lrow { grid-template-columns: 30px minmax(0, 1fr) 96px; grid-template-rows: auto auto; height: auto; row-gap: 6px; padding: 6px 0; }
  .lrow .track { grid-column: 2 / 4; grid-row: 2; }
  .lrow .lv { grid-row: 1; grid-column: 3; }
  .lrow > .av { grid-row: 1 / span 2; }
  .ptools { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .week { justify-content: space-between; padding: 5px; }
  .week .icon-btn { display: none; }
  .seg-days { flex: 1; justify-content: space-between; }
  .seg-days .opt { padding: 0 8px; gap: 6px; height: 50px; flex-direction: column; justify-content: center; gap: 1px; }
  .seg-days .seg-row { justify-content: space-between; }
  .day .dow { flex-direction: row; gap: 3px; font-size: 11px; }
  .day .dow i { display: none; }
  .day b { font-size: 16px; }
  .day .meter { left: 10px; right: 10px; bottom: 5px; }
  .ptools-r { justify-content: space-between; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; flex-wrap: nowrap; }
  .ptools-r::-webkit-scrollbar { display: none; }
  .seg-ink .opt { padding: 0 12px; }
  .tl { padding: 10px 12px 12px; }
  .legend { gap: 12px; }
  .legend-r { margin-left: 0; }
  .pside { display: flex; }
  .page-reports .ptools { flex-direction: row; flex-wrap: wrap; }
  .page-reports .ptools > .seg:first-child { width: 100%; justify-content: space-between; }
  .page-reports .ptools > .seg:first-child .opt { flex: 1; justify-content: center; padding: 0 6px; }
  .lc, .bc { height: 230px; }
  .chart-card .card-h { flex-direction: column; gap: 8px; }
  .tbl { margin: 0 -16px; }
  .tr { grid-template-columns: minmax(0, 1fr) 92px; grid-template-areas: 'n left' 'p p' 'u u'; gap: 8px 12px; padding: 14px 16px; }
  .tr.th { display: none; }
  .tr .td-n { grid-area: n; }
  .tr .td-st, .tr > .num:nth-child(5) { display: none; }
  .tr > .num:last-child { grid-area: left; }
  .tr > .num:last-child::before { content: 'Left '; color: var(--muted); font-size: 11.5px; }
  .tr .td-bar:not(.used) { grid-area: p; }
  .tr .td-bar.used { grid-area: u; }
  .td-bar { grid-template-columns: 74px minmax(0, 1fr) 40px; }
  .td-bar::before { font-size: 11.5px; color: var(--muted); grid-column: 1; grid-row: 1; }
  .td-bar:not(.used)::before { content: 'Progress'; }
  .td-bar.used::before { content: 'Budget used'; }
  .foot { flex-direction: column; }
  .tabbar {
    display: flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
    padding: 6px; border-radius: 99px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line), 0 20px 40px -18px #0b0b0a80;
  }
  [data-theme='dark'] .tabbar { box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -18px #000; }
  .tabbar-in { position: relative; display: flex; gap: 2px; }
  .tabbar-in .nav-row { padding: 0; }
  .tab-it { position: relative; display: flex; align-items: center; gap: 7px; height: 46px; padding: 0 15px 0 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
  .tab-it .badge { min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .tab-new { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); flex: none; }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { font-size: 12.5px; border-radius: 22px; }
  .pop { left: 12px; right: 12px !important; width: auto; }
  .palette { top: 10vh; }
  .fld-row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .tab-it { padding: 0 12px 0 11px; gap: 6px; }
  .tab-it .badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; opacity: .3; }
  * { scroll-behavior: auto !important; }
}
