/* GENERATED by site/tools/site_numbers.py from assistant-app/burrow/ui/style.css. Do not edit. */
/* =====================================================================================================================
   Burrow design spec
   ---------------------------------------------------------------------------------------------------------------------
   Character   calm, neutral, spacious. Near-white / near-black surfaces; the primary action is ink (black in light, white in
               dark). ONE accent (cobalt, --accent) is used only for focus rings, selected state, unread dots and toggles.
               Pastels appear only as calendar category colors.
   Color       --bg page · --bg-2 side panes · --surface cards/inputs · --fill hover/quiet fills · --fill-2 pressed
               --line hairlines · --line-2 control borders · --ink text · --ink-2 secondary · --muted tertiary
               --primary / --primary-ink black (light) or white (dark) buttons · --accent / --accent-soft cobalt
               --good / --warn / --bad + *-soft for status chips and banners · --cat-0..5 calendar pastels (bg + line)
   Type        Inter (bundled, /static/fonts) → Segoe UI Variable → system-ui. Scale 12 / 13 / 14 / 16 / 20 / 28.
               Body 14/1.5. Headings 600, letter-spacing -0.01em (20) / -0.02em (28). No uppercase section labels.
   Spacing     4 · 8 · 12 · 16 · 20 · 24 · 32 · 48 (--s1 … --s8)
   Radii       8 small controls · 10 inputs/buttons · 14 cards/menus · 18 sheets · 24 composer · 999 pills
   Elevation   only floating things: --shadow-1 (composer, menus), --shadow-2 (modals, palette, toasts)
   Controls    36px minimum hit target. Buttons, inputs and selects are 36px tall. Visually smaller controls (segments 30, .sm
               buttons 30, toolbar icons 32, footer switch 22, chip remove 18) get an invisible 36px ::after hit area
               (the "hit area" block below); switches carry a transparent 6px border so their box is 48x36.
               Every control has :hover, :focus-visible (2px accent ring), :active and :disabled.
               button (secondary, hairline) · .primary (ink fill) · .ghost · .danger · .icon-btn · .tog (pill toggle,
               aria-pressed) · input.sw (switch, role=switch) · input.check (round check) · .seg (segmented, role=radiogroup)
               · .chip · .menu (popover) · select (styled, chevron)
   Motion      120–180 ms ease on hover/focus/menus; disabled under prefers-reduced-motion.
   ===================================================================================================================== */

/* ---------------------------------------------------------------------------------------------------- fonts + tokens */
@font-face { font-family: "Inter"; src: url("fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
  --r-sm: 8px; --r: 10px; --r-card: 14px; --r-sheet: 18px; --r-composer: 24px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1); --t: 150ms;
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f8f8f9; --surface: #ffffff; --fill: #f2f2f4; --fill-2: #e8e8eb;
  --line: #ececef; --line-2: #dedee3; --ink: #18181b; --ink-2: #3f3f46; --muted: #71717a; --faint: #a1a1aa;
  --primary: #18181b; --primary-ink: #ffffff; --primary-hover: #2e2e33;
  --accent: #3358d4; --accent-soft: #e9eefc; --accent-ink: #1f3fa8; --ring: rgba(51, 88, 212, .35);
  --good: #18794e; --good-soft: #e6f4ec; --warn: #a35200; --warn-soft: #fdf1dc; --bad: #c62a2f; --bad-soft: #fdebec;
  --scrim: rgba(24, 24, 27, .32);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .06);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .06), 0 16px 48px rgba(0, 0, 0, .14);
  /* calendar categories: muted pastels (background, line) */
  --cat-0: #e6eefc; --cat-0-l: #6f8fd8;   /* blue   */
  --cat-1: #e3f3ec; --cat-1-l: #5fae8a;   /* green  */
  --cat-2: #fbf0dc; --cat-2-l: #d1a04a;   /* amber  */
  --cat-3: #fbe7e6; --cat-3-l: #d77d78;   /* rose   */
  --cat-4: #efe9fb; --cat-4-l: #9a84d6;   /* violet */
  --cat-5: #e2f2f4; --cat-5-l: #5aa9b4;   /* teal   */
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #111113; --bg-2: #18181b; --surface: #1c1c1f; --fill: #242428; --fill-2: #2e2e33;
  --line: #27272b; --line-2: #36363c; --ink: #ededef; --ink-2: #c8c8cd; --muted: #9b9ba3; --faint: #6b6b73;
  --primary: #f4f4f5; --primary-ink: #18181b; --primary-hover: #ffffff;
  --accent: #7b9bff; --accent-soft: #1f2843; --accent-ink: #b5c7ff; --ring: rgba(123, 155, 255, .45);
  --good: #4cc38a; --good-soft: #15291f; --warn: #f0b456; --warn-soft: #2e2413; --bad: #ff6b6b; --bad-soft: #3a1a1c;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 48px rgba(0, 0, 0, .5);
  --cat-0: #1f2a44; --cat-0-l: #7f9de6; --cat-1: #18302a; --cat-1-l: #64c19a; --cat-2: #33291a; --cat-2-l: #dcae5c;
  --cat-3: #3a2224; --cat-3-l: #e48d88; --cat-4: #2a2440; --cat-4-l: #a993e6; --cat-5: #183034; --cat-5-l: #67b8c3;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark;
  --bg: #111113; --bg-2: #18181b; --surface: #1c1c1f; --fill: #242428; --fill-2: #2e2e33;
  --line: #27272b; --line-2: #36363c; --ink: #ededef; --ink-2: #c8c8cd; --muted: #9b9ba3; --faint: #6b6b73;
  --primary: #f4f4f5; --primary-ink: #18181b; --primary-hover: #ffffff;
  --accent: #7b9bff; --accent-soft: #1f2843; --accent-ink: #b5c7ff; --ring: rgba(123, 155, 255, .45);
  --good: #4cc38a; --good-soft: #15291f; --warn: #f0b456; --warn-soft: #2e2413; --bad: #ff6b6b; --bad-soft: #3a1a1c;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 48px rgba(0, 0, 0, .5);
  --cat-0: #1f2a44; --cat-0-l: #7f9de6; --cat-1: #18302a; --cat-1-l: #64c19a; --cat-2: #33291a; --cat-2-l: #dcae5c;
  --cat-3: #3a2224; --cat-3-l: #e48d88; --cat-4: #2a2440; --cat-4-l: #a993e6; --cat-5: #183034; --cat-5-l: #67b8c3;
} }

/* ---------------------------------------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; overflow: hidden; }
h1 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: -.005em; margin: 0 0 var(--s2); }
h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: var(--s5) 0 var(--s2); }
.display { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 var(--s3); }
a { color: var(--accent-ink); }
code { font: 12.5px var(--mono); background: var(--fill); padding: 1px 5px; border-radius: 5px; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--fill); border: 1px solid var(--line-2);
  font: 500 11px/1 var(--font); color: var(--ink-2); }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--line-2); } ::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }
.col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s2); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .ink2 { color: var(--ink-2); }
.pane { padding: var(--s6) var(--s7); overflow: auto; }
.page { max-width: 760px; }
.empty { margin: auto; text-align: center; color: var(--muted); max-width: 420px; padding: var(--s7); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.empty h2 { color: var(--ink); margin: 0; }
.mole-tile { width: 64px; height: 64px; border-radius: 18px; background: var(--fill); display: grid; place-items: center; }
.mole-tile img { width: 64px; height: 64px; border-radius: 18px; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------------------------------------------- controls */
button, .btn { font: 500 14px/1 var(--font); min-height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t); }
button:hover { background: var(--fill); }
button:active { background: var(--fill-2); }
button:focus-visible, .seg button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; background: var(--surface); }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button.primary:active { opacity: .85; }
button.primary:disabled { background: var(--primary); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--fill); }
button.danger { color: var(--bad); }
button.danger:hover { background: var(--bad-soft); border-color: transparent; }
button.sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
button.block { width: 100%; justify-content: flex-start; }
button svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 30px; min-height: 30px; border-radius: var(--r-sm); } .icon-btn.sm svg { width: 16px; height: 16px; }

/* pill toggle (aria-pressed): ghost when off, accent tint when on */
.tog { min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border-color: transparent; background: transparent; color: var(--ink-2); font-size: 13px; }
.tog:hover { background: var(--fill); }
.tog[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.tog[aria-pressed="true"]:hover { filter: brightness(.98); }
.tog.boxed { border-color: var(--line-2); }

input, textarea, select { font: 14px/1.4 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 12px; min-height: 36px; min-width: 0;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
textarea { padding: 9px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover, select:hover { border-color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
input:disabled, textarea:disabled, select:disabled { opacity: .55; }
input[type="date"], input[type="time"], input[type="number"] { font-variant-numeric: tabular-nums; }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2371717a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 10px; background: var(--surface); min-height: 36px; transition: border-color var(--t), box-shadow var(--t); }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.field input { border: 0; padding: 0; box-shadow: none !important; flex: 1; min-height: 34px; background: transparent; }
.field svg { width: 16px; height: 16px; color: var(--muted); flex: none; }

/* switch: a native checkbox, restyled (keeps .checked/onchange and keyboard behavior) */
input.sw { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 36px; min-height: 36px; padding: 0; margin: 0; border-radius: var(--r-pill); border: 6px solid transparent; background: var(--fill-2); background-clip: padding-box;
  position: relative; cursor: pointer; transition: background var(--t) var(--ease); box-shadow: inset 0 0 0 1px var(--line-2); }
input.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t) var(--ease); }
input.sw:checked { background: var(--accent); box-shadow: none; }
input.sw:checked::after { transform: translateX(12px); }
input.sw:hover { box-shadow: inset 0 0 0 1px var(--faint); } input.sw:checked:hover { box-shadow: none; filter: brightness(1.05); }
input.sw:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; box-shadow: none; }
input.sw:disabled { opacity: .4; cursor: default; }

/* round check (todo rows, schedule rows) */
input.check { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; min-height: 22px; padding: 0; margin: 0; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--surface);
  cursor: pointer; display: grid; place-items: center; transition: background var(--t), border-color var(--t); }
input.check::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--primary-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity var(--t); }
input.check:checked { background: var(--primary); border-color: var(--primary); }
input.check:checked::after { opacity: 1; }
input.check:hover { border-color: var(--ink-2); }
input.check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
input.check:disabled { opacity: .45; cursor: default; }
.check-hit { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; flex: none; }
.check-hit:hover { background: var(--fill); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r); background: var(--fill); flex: none; }
.seg button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; }
.seg button:hover { color: var(--ink); background: transparent; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
:root[data-theme="dark"] .seg button.on { background: var(--fill-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: var(--fill-2); } }

/* chips + status pills */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.good { background: var(--good-soft); color: var(--good); } .chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.label { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
button.chip { min-height: 30px; cursor: pointer; border: 0; padding: 0 12px; font-size: 13px; }
button.chip:hover { background: var(--fill-2); }
button.chip.on, button.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.chip .x { width: 18px; height: 18px; min-height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; margin-right: -4px; }
.chip .x:hover { background: rgba(127, 127, 127, .2); } .chip .x svg { width: 12px; height: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.loaded { background: var(--good); } .dot.loading { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; } .dot.error { background: var(--bad); } .dot.stopped, .dot.not_installed { background: var(--faint); }
@keyframes pulse { 50% { opacity: .35; } }

/* cards, banners, tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4) var(--s5); }
.banner { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; background: var(--warn-soft); color: var(--ink); border-radius: var(--r); padding: 10px 14px; margin: var(--s3) 0; font-size: 13px; }
.banner.bad { background: var(--bad-soft); } .banner.info { background: var(--fill); }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t td, table.t th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
details.more { margin-top: 6px; } details.more summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
details.more summary::-webkit-details-marker { display: none; } details.more summary::after { content: "›"; transition: transform var(--t); } details.more[open] summary::after { transform: rotate(90deg); }
details.more summary:hover { color: var(--ink); } details.more .more-body { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.55; }
.bar { height: 6px; background: var(--fill-2); border-radius: 6px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); }

/* tabs (quiet, underline) */
.tabs { display: flex; gap: var(--s1); }
.tabs button { min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: 13px; }
.tabs button:hover { color: var(--ink); background: var(--fill); }
.tabs button.on { color: var(--ink); background: var(--fill); }
.tabs .n { color: var(--muted); font-weight: 500; margin-left: 2px; font-variant-numeric: tabular-nums; }

/* list rows */
.list-item { padding: 8px 12px; border-radius: var(--r); cursor: pointer; transition: background var(--t) var(--ease); }
.list-item:hover { background: var(--fill); } .list-item.on { background: var(--fill-2); }
.list-item .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* settings-style rows: label + one-line description on the left, control on the right */
.switch { display: flex; justify-content: space-between; align-items: center; gap: var(--s5); padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch > div:first-child { min-width: 0; } .switch b { font-weight: 500; display: block; } .switch .small.muted { margin-top: 2px; }
.switch > :last-child { flex: none; }

/* ---------------------------------------------------------------------------------------------------- shell */
#top { flex: none; height: 56px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4); padding: 0 var(--s4); border-bottom: 1px solid var(--line); background: var(--bg); }
#top { -webkit-app-region: drag; app-region: drag; }              /* empty header space is the drag region (only active in the frameless app window) */
#top .logo, #rail, .top-end, .wc { -webkit-app-region: no-drag; app-region: no-drag; }
.wc { align-self: stretch; display: flex; } .wc[hidden] { display: none; }
.wc button { width: 46px; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.wc button svg { width: 18px; height: 18px; stroke-width: 1.4; }
.wc button:hover { background: var(--fill); color: var(--ink); }
.wc button.wclose:hover { background: #c42b1c; color: #fff; }
.wc button:focus-visible { outline-offset: -3px; }
body.custom-frame #top { grid-template-columns: auto 1fr auto auto; padding-right: 0; gap: var(--s3); }
body.custom-frame .top-end { margin-right: var(--s2); }
#top .logo { width: 30px; height: 30px; border-radius: 9px; display: block; }
#rail { justify-self: center; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--fill); }
#rail button, #top .nav-end { min-height: 34px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); position: relative; gap: 6px; font-size: 13px; }
#rail button:hover { color: var(--ink); background: var(--fill-2); }
#rail button svg { width: 18px; height: 18px; }
#rail button .lbl { display: none; }
#rail button.on { background: var(--primary); color: var(--primary-ink); padding: 0 14px 0 12px; }
#rail button.on .lbl { display: inline; }
.top-end { display: flex; align-items: center; gap: var(--s1); justify-self: end; min-width: 0; }
#top .nav-end { color: var(--ink-2); width: 36px; padding: 0; }
#top .nav-end svg { width: 18px; height: 18px; }
#top .nav-end:hover { background: var(--fill); color: var(--ink); } #top .nav-end.on { background: var(--primary); color: var(--primary-ink); }
/* unread / pending: a quiet dot when the tab is inactive, a small count in the active pill */
.badge { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); font-size: 0; box-shadow: 0 0 0 2px var(--fill); }
#rail button.on .badge { position: static; width: auto; height: auto; background: transparent; box-shadow: none; font-size: 12px; font-weight: 500; opacity: .6; font-variant-numeric: tabular-nums; }

/* model selector */
.model-btn { min-height: 36px; max-width: 340px; padding: 0 10px 0 12px; border-radius: var(--r-pill); border-color: transparent; background: transparent; gap: 8px; font-size: 13px; }
.model-btn:hover { background: var(--fill); }
.model-btn .txt { display: flex; align-items: baseline; gap: 6px; overflow: hidden; white-space: nowrap; min-width: 0; }
.model-btn .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.model-btn .load, .model-btn .sub { flex: none; }
.model-btn .load { color: var(--accent-ink); font-weight: 600; }
.model-btn .sub { color: var(--muted); font-weight: 400; }
.model-btn .chev { width: 14px; height: 14px; color: var(--muted); }

#app { flex: 1; display: flex; min-height: 0; }
#view { flex: 1; min-width: 0; display: flex; min-height: 0; }

/* footer: one slim line, contextual hints left, privacy control right */
#status { flex: none; height: 34px; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3) 0 var(--s4); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg); }
#st-hints { display: flex; align-items: center; gap: var(--s4); white-space: nowrap; overflow: hidden; min-width: 0; }
.hint { display: inline-flex; align-items: center; gap: 6px; } .hint kbd { min-width: 18px; }
#st-help { min-height: 24px; height: 24px; width: 24px; padding: 0; border-radius: 50%; font-size: 12px; color: var(--muted); border-color: var(--line-2); flex: none; }
#st-saved { white-space: nowrap; }
.privacy { display: inline-flex; align-items: center; height: 26px; border-radius: var(--r-pill); background: var(--fill); padding: 0 3px 0 10px; gap: 8px; flex: none; }
.privacy .local { display: inline-flex; align-items: center; gap: 5px; color: var(--good); font-weight: 500; }
.privacy .local svg { width: 12px; height: 12px; }
.privacy .sep { width: 1px; height: 14px; background: var(--line-2); }
#st-offline { min-height: 22px; height: 22px; padding: 0 8px 0 4px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 12px; color: var(--ink-2); gap: 6px; }
#st-offline:hover { background: var(--fill-2); }
#st-offline .trk { width: 24px; height: 14px; border-radius: 8px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); position: relative; transition: background var(--t); }
#st-offline .trk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform var(--t) var(--ease); }
#st-offline[aria-checked="true"] .trk { background: var(--accent); box-shadow: none; }
#st-offline[aria-checked="true"] .trk::after { transform: translateX(10px); }
#st-offline[aria-checked="true"] { color: var(--accent-ink); font-weight: 600; }
#st-offline svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------------------------------------------- floating: menus, modals, palette, toasts */
.menu { position: fixed; z-index: 70; min-width: 220px; max-width: 340px; max-height: 60vh; overflow: auto; padding: 6px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: pop 140ms var(--ease); }
.menu-it { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; white-space: normal; line-height: 1.35; }
.menu-it:hover, .menu-it:focus-visible { background: var(--fill); outline: 0; }
.menu-it .mi-l { font-weight: 500; display: flex; align-items: center; gap: 8px; } .menu-it .mi-d { color: var(--muted); font-size: 12px; font-weight: 400; }
.menu-it.on .mi-l::after { content: "✓"; color: var(--accent); margin-left: auto; }
.menu-it.danger .mi-l { color: var(--bad); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-h { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

#palette, #modal { position: fixed; inset: 0; z-index: 50; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  animation: fade 150ms var(--ease); }
#palette[hidden], #modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-2); width: min(560px, 100%); max-height: 80vh; overflow: auto; animation: pop 160ms var(--ease); }
.sheet .body { padding: var(--s6); }
.sheet .body > h2:first-child { font-size: 20px; letter-spacing: -.01em; margin-bottom: var(--s3); }
.sheet .actions-row { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }
.sheet input.big { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 56px; padding: 0 var(--s5); font-size: 16px; box-shadow: none !important; background: transparent; }
.sheet .items { max-height: 46vh; overflow: auto; padding: 6px; }
.sheet .it { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 38px; padding: 0 12px; border-radius: var(--r-sm); cursor: pointer; }
.sheet .it:hover { background: var(--fill); } .sheet .it.on { background: var(--fill-2); }
/* right-hand slide-in panel (approval flows, event forms) */
#modal.side { justify-content: flex-end; align-items: stretch; padding: 0; }
#modal.side .sheet { width: min(460px, 100%); max-height: none; height: 100%; border-radius: 0; border-width: 0 0 0 1px; animation: slide 200ms var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.sheet .x-close { position: sticky; float: right; top: 12px; margin: 12px 12px 0 0; }

#toasts { position: fixed; bottom: 48px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s4); max-width: min(560px, 90vw); padding: 10px 10px 10px 16px; border-radius: var(--r-card); background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-2); font-size: 13px;
  animation: pop 160ms var(--ease); }
.toast span { padding: 2px 6px 2px 0; }
.toast button { min-height: 28px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: rgba(127, 127, 127, .22); color: inherit; font-size: 13px; font-weight: 600; }
.toast button:hover { background: rgba(127, 127, 127, .35); }

.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s6); }
.shortcuts h3 { grid-column: 1 / -1; margin: var(--s3) 0 0; }
.shortcuts .k { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: 13px; min-height: 28px; border-bottom: 1px solid var(--line); }
.shortcuts .k span:last-child { display: inline-flex; gap: 4px; }

/* ---------------------------------------------------------------------------------------------------- side panes */
.sidebar { width: 260px; flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); border-right: 1px solid var(--line); }
.side-head { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.side-list { flex: 1; overflow: auto; padding: 0 var(--s2) var(--s3); }
.side-group { font-size: 12px; font-weight: 500; color: var(--muted); padding: var(--s4) 12px var(--s1); }
.panel { width: 260px; flex: none; border-left: 1px solid var(--line); background: var(--bg-2); padding: var(--s5); overflow: auto; }

/* ---------------------------------------------------------------------------------------------------- chat */
.chat { flex: 1; display: flex; min-width: 0; min-height: 0; position: relative; }
.chat .sidebar { transition: margin var(--t) var(--ease); }
.chat.side-closed .sidebar { display: none; }
.chat-list .list-item { padding: 7px 12px; } .chat-list .list-item .t { font-weight: 400; color: var(--ink-2); } .chat-list .list-item.on .t { color: var(--ink); font-weight: 500; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.chat-tools { position: absolute; top: 10px; left: 12px; display: flex; gap: 2px; z-index: 5; }
.msgs { flex: 1; overflow: auto; padding: var(--s7) var(--s6) var(--s4); display: flex; flex-direction: column; gap: var(--s6); }
.msgs > * { width: 100%; max-width: 740px; margin-left: auto; margin-right: auto; }
.msg { line-height: 1.6; font-size: 14.5px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .ubody { max-width: 80%; background: var(--fill); padding: 10px 16px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant .body { overflow-wrap: anywhere; }
.msg .body p { margin: 0 0 10px; } .msg .body p:last-child { margin-bottom: 0; }
.msg .body ul { margin: 0 0 10px; padding-left: 22px; } .msg .body li { margin: 3px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .chips:empty { display: none; }
.chips .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.chips .chip.bad::before { background: var(--bad); } .chips .chip.warn::before { background: var(--warn); } .chips .chip.run::before { background: var(--faint); animation: pulse 1.2s infinite; }
.stats { font-size: 12px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.think { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--line-2); padding: 2px 0 2px 12px; margin-bottom: 10px; max-height: 84px; overflow: auto; white-space: pre-wrap; }
.status-line { color: var(--muted); }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.err-text { color: var(--bad); }
.msg .actions { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity var(--t); }
.msg:hover .actions, .msg.latest .actions, .msg .actions:focus-within { opacity: 1; }
.act { display: inline-flex; align-items: center; justify-content: center; width: 30px; min-height: 30px; height: 30px; padding: 0; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--muted); }
.act:hover { background: var(--fill); color: var(--ink); } .act.ok { color: var(--good); } .act:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.editor-inline { width: min(600px, 100%); } .editor-inline textarea { width: 100%; min-height: 80px; border-radius: var(--r-card); }

/* composer */
.composer-wrap { flex: none; padding: 0 var(--s6) var(--s3); }
.composer { max-width: 740px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-composer); box-shadow: var(--shadow-1); padding: 10px 10px 8px 14px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); box-shadow: var(--shadow-1), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.composer.drop { border-style: dashed; border-color: var(--accent); }
.composer textarea { width: 100%; border: 0; padding: 4px 2px; min-height: 28px; max-height: 200px; resize: none; background: transparent; box-shadow: none !important; font-size: 15px; display: block; }
.composer .tools { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.composer .tools .icon-btn { width: 32px; min-height: 32px; height: 32px; border-radius: 50%; }
.composer .chip { min-height: 30px; font-size: 13px; background: var(--accent-soft); color: var(--accent-ink); }
.send { width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-ink); flex: none; }
.send:hover { background: var(--primary-hover); }
.send:disabled { background: var(--fill-2); color: var(--faint); opacity: 1; }
.send svg { width: 18px; height: 18px; }
.send.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer-foot { max-width: 740px; margin: 6px auto 0; display: flex; justify-content: center; gap: var(--s3); font-size: 11.5px; color: var(--faint); min-height: 18px; }
.composer-foot .meter:not(:empty)::before { content: "·"; margin-right: var(--s3); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; } .thumbs .th { position: relative; }
.thumbs img { height: 60px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; min-height: 22px; height: 22px; border-radius: 50%; padding: 0; font-size: 14px; background: var(--primary); color: var(--primary-ink); border: 2px solid var(--surface); }
/* empty state: greeting + composer centered together, suggestions under it */
.chat.is-empty .chat-main { justify-content: center; padding-bottom: 6vh; }
.chat.is-empty .msgs { flex: none; overflow: visible; padding-top: 0; padding-bottom: var(--s6); }
.greet { display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center; }
.greet .display { margin-top: var(--s2); }
.greet p { color: var(--muted); margin: 0; }
.sugg { max-width: 740px; margin: var(--s5) auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); padding: 0 var(--s6); }
.sugg button { min-height: 34px; border-radius: var(--r-pill); font-size: 13px; font-weight: 400; color: var(--ink-2); border-color: var(--line); white-space: normal; text-align: left; line-height: 1.3; padding: 7px 14px; }
.sugg button svg { color: var(--muted); }

/* approval card */
.proposal { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-card); padding: var(--s4) var(--s5); margin: var(--s3) 0 0; max-width: 600px; }
.proposal h4 { margin: 0 0 var(--s3); font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.proposal table { border-collapse: collapse; font-size: 13px; width: 100%; }
.proposal td { padding: 6px 0; vertical-align: top; border-top: 1px solid var(--line); }
.proposal td:first-child { color: var(--muted); white-space: nowrap; padding-right: var(--s4); width: 1%; }
.proposal .note { font-size: 12px; color: var(--muted); margin: var(--s3) 0 0; }
.proposal .btns { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }
.proposal .evidence { background: var(--fill); border-radius: var(--r); padding: 8px 12px; font-size: 12px; margin: var(--s3) 0 0; }
.proposal .evidence.sus { background: var(--bad-soft); }
.p-err { margin-top: var(--s3); padding: 8px 12px; border-radius: var(--r); background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.proposal.done { background: var(--bg-2); }
.proposal .res { margin-top: var(--s3); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.proposal .res.ok { color: var(--good); }

/* ---------------------------------------------------------------------------------------------------- mail */
.mail-list { width: 360px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.mail-head { padding: var(--s3) var(--s3) var(--s2); display: flex; flex-direction: column; gap: var(--s2); }
.acct-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.labels-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 var(--s3) var(--s2); }
.labels-row:empty { display: none; }
.mail-rows { flex: 1; overflow: auto; padding: 0 var(--s2) var(--s3); }
.mail-row { position: relative; padding: 10px 12px 10px 24px; border-radius: var(--r); }
.mail-row + .mail-row { margin-top: 1px; }
.mail-row .meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mail-row .from { font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row .when { font-size: 12px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.mail-row .subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.mail-row .s { margin-top: 1px; }
.mail-row.unread .from, .mail-row.unread .subj { color: var(--ink); font-weight: 600; }
.mail-row.unread::before { content: ""; position: absolute; left: 9px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mail-row .labels { display: flex; gap: 4px; margin-top: 6px; } .mail-row .labels .chip { min-height: 20px; font-size: 11px; padding: 0 8px; }
.reader { flex: 1; overflow: auto; padding: var(--s6) var(--s7); min-width: 0; }
.reader > * { max-width: 780px; }
.reader h1 { font-size: 20px; margin-bottom: var(--s3); }
.reader .from-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.reader .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: var(--s3) 0; }
.reader .mail-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin: var(--s4) 0; }
.reader pre { white-space: pre-wrap; font: inherit; line-height: 1.6; margin: 12px 0; }
.editor { border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--surface); margin-top: var(--s4); box-shadow: var(--shadow-1); overflow: hidden; }
.editor .ed-field { display: flex; align-items: center; gap: var(--s3); border-bottom: 1px solid var(--line); padding: 0 var(--s4); }
.editor .ed-field label { color: var(--muted); font-size: 13px; width: 56px; flex: none; }
.editor .ed-field input { border: 0; padding: 0; flex: 1; box-shadow: none !important; background: transparent; min-height: 40px; }
.editor textarea { width: 100%; min-height: 170px; border: 0; padding: var(--s3) var(--s4); box-shadow: none !important; resize: vertical; background: transparent; }
.editor .ed-bar { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--bg-2); }
.panel h2 { margin-bottom: 2px; }
.panel .col { gap: 6px; } .panel .col button { justify-content: flex-start; }
.mv { max-width: 780px; }
.mv-bar { margin: var(--s2) 0; }
.mv-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; min-height: 120px; display: block; }
.mv-banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; background: var(--fill); border-radius: var(--r); padding: 8px 8px 8px 14px; font-size: 13px; margin: var(--s2) 0; }
.mv-banner.warn { background: var(--warn-soft); } .mv-banner.ok { background: var(--good-soft); }
.mv-banner svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.mv-atts { font-size: 12px; margin: var(--s2) 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------------------------------------------- calendar */
.cal-side { width: 248px; flex: none; border-right: 1px solid var(--line); padding: var(--s4); background: var(--bg-2); overflow: auto; display: flex; flex-direction: column; gap: var(--s2); }
.cal-side .mtitle { font-weight: 600; padding: 0 4px; }
.mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.mini div { height: 28px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--ink-2); }
.mini div:hover { background: var(--fill); }
.mini .h { color: var(--faint); cursor: default; font-size: 11px; } .mini .h:hover { background: transparent; }
.mini .dim { color: var(--faint); } .mini .sel { background: var(--fill-2); color: var(--ink); font-weight: 600; }
.mini .today { background: var(--primary) !important; color: var(--primary-ink) !important; font-weight: 600; }
.cal-tog { justify-content: flex-start; gap: 10px; width: 100%; border: 0; background: transparent; font-weight: 400; padding: 0 8px; color: var(--ink-2); }
.cal-tog:hover { background: var(--fill); }
.cal-tog .sw8 { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 2px solid var(--c); background: var(--c); transition: background var(--t); position: relative; }
.cal-tog[aria-pressed="false"] .sw8 { background: transparent; }
.cal-tog[aria-pressed="false"] .nm { color: var(--muted); }
.cal-tog .nm { overflow: hidden; text-overflow: ellipsis; text-align: left; flex: 1; min-width: 0; }
.cal-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cal-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cal-bar h1 { min-width: 0; white-space: nowrap; margin: 0 var(--s2); }
.cal-grid { flex: 1; display: flex; min-height: 0; min-width: 0; }
.wk { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.wk-head, .wk-allday { display: grid; flex: none; background: var(--bg); border-bottom: 1px solid var(--line); }
.wk-day { text-align: center; padding: 8px 0 6px; cursor: pointer; min-width: 0; border-radius: var(--r); }
.wk-day:hover { background: var(--fill); }
.wk-day .dn { display: block; font-size: 12px; color: var(--muted); }
.wk-day .dd { font-size: 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 50%; font-variant-numeric: tabular-nums; }
.wk-day.today .dn { color: var(--accent-ink); } .wk-day.today .dd { background: var(--primary); color: var(--primary-ink); }
.wk-adcell { border-left: 1px solid var(--line); padding: 2px; min-width: 0; } .wk-allday .wk-corner { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; }
.adev { font-size: 12px; border-radius: 6px; padding: 2px 8px; margin: 2px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; background: var(--cat-bg); box-shadow: inset 3px 0 0 var(--cat-line); color: var(--ink); }
.wk-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; position: relative; }
.wk-body { display: grid; position: relative; }
.wk-gutter { position: sticky; left: 0; background: var(--bg); z-index: 2; }
.wk-hr { font-size: 11px; color: var(--faint); text-align: right; padding-right: 8px; overflow: hidden; transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.wk-col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.wk-col.today { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.wk-slot { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.wk-slot.thin { background: repeating-linear-gradient(45deg, var(--fill), var(--fill) 4px, transparent 4px, transparent 8px); }
.wk-now { position: absolute; height: 2px; background: var(--bad); z-index: 6; pointer-events: none; } .wk-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.ev { position: absolute; border-radius: 8px; padding: 4px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; color: var(--ink); background: var(--cat-bg); box-shadow: inset 3px 0 0 var(--cat-line), 0 0 0 1px var(--bg);
  transition: filter var(--t); }
.ev:hover { filter: brightness(.97) saturate(1.1); }
.ev b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.ev .tm { color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.ev.narrow { padding: 3px 5px; } .ev.narrow b { font-size: 11px; }
.ev.conflict { box-shadow: inset 3px 0 0 var(--bad), 0 0 0 1px var(--bg); }
.ev.local, .adev.local { outline: 1.5px dashed var(--cat-line); outline-offset: -2px; }
.ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.month { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto repeat(6, minmax(90px, 1fr)); overflow: auto; }
.month .mh { padding: 8px; font-size: 12px; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.month .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 12px; overflow: hidden; cursor: pointer; min-width: 0; }
.month .cell:hover { background: var(--bg-2); } .month .cell.out { background: var(--bg-2); color: var(--faint); }
.month .cell .dnum { font-weight: 500; font-variant-numeric: tabular-nums; display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; }
.month .cell.today .dnum { background: var(--primary); color: var(--primary-ink); }
.month .cell .evs { font-size: 11.5px; border-radius: 5px; padding: 1px 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--cat-bg); box-shadow: inset 2px 0 0 var(--cat-line); color: var(--ink); }
.cal-notice { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px var(--s4); background: var(--warn-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.mig { display: flex; flex-direction: column; gap: 0; padding: 10px var(--s4); background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.mig .mig-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.mig .mig-row .grow { color: var(--ink); }
.mig .proposal { margin: var(--s2) 0 0; max-width: 640px; background: var(--surface); }
.mig .p-err { margin-top: 6px; }
.mig details.more { margin-top: 2px; }
.free-slots { display: flex; flex-direction: column; gap: 2px; }

/* ---------------------------------------------------------------------------------------------------- todos, notes, dictation, browser */
.page-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.todo { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 2px; border-radius: var(--r); cursor: pointer; transition: background var(--t); }
.todo:hover { background: var(--fill); } .todo.sel { background: var(--fill-2); }
.todo .c { width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; flex: none; }
.todo .c::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--faint); box-sizing: border-box; transition: all var(--t); }
.todo .c:hover::before { border-color: var(--ink-2); }
.todo.doing .c::before { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.todo.done .c::before { background: var(--primary); border-color: var(--primary); }
.todo.done .c::after { content: ""; position: absolute; width: 9px; height: 5px; border: 2px solid var(--primary-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.todo .c { position: relative; }
.todo .c:hover { background: transparent; }
.todo .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo.done .ttl { text-decoration: line-through; color: var(--muted); }
.todo .due { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; } .todo .due.over { color: var(--bad); }
.sugg-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4) var(--s5); margin-bottom: var(--s5); }
.sugg-card .row { min-height: 44px; border-top: 1px solid var(--line); } .sugg-card h2 + .row { border-top: 0; }
.rec { display: inline-flex; align-items: center; gap: 8px; background: var(--bad-soft); color: var(--bad); border-radius: var(--r-pill); min-height: 32px; padding: 0 14px; font-weight: 600; font-size: 13px; }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; } .bars b { width: 3px; background: var(--bad); border-radius: 2px; }
.steps { list-style: none; padding: 0; margin: var(--s2) 0; } .steps li { padding: 6px 0; display: flex; gap: 10px; border-bottom: 1px solid var(--line); }
.steps li::before { content: "○"; color: var(--faint); } .steps li.done::before { content: "✓"; color: var(--good); }
.status-big { font-size: 12px; font-weight: 600; min-height: 26px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-pill); }
.st-working { background: var(--accent-soft); color: var(--accent-ink); } .st-waiting, .st-stopped { background: var(--warn-soft); color: var(--warn); }
.st-done { background: var(--good-soft); color: var(--good); } .st-error { background: var(--bad-soft); color: var(--bad); } .st-idle { background: var(--fill); color: var(--muted); }
.log { font: 12px/1.6 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; max-height: 180px; overflow: auto; color: var(--ink-2); }

/* ---------------------------------------------------------------------------------------------------- settings */
.settings { flex: 1; display: flex; min-width: 0; min-height: 0; }
.set-nav { width: 220px; flex: none; padding: var(--s5) var(--s3); border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 2px; }
.set-nav h1 { padding: 0 12px var(--s4); }
.set-nav button { justify-content: flex-start; border: 0; background: transparent; color: var(--ink-2); font-weight: 400; gap: 10px; }
.set-nav button:hover { background: var(--fill); }
.set-nav button.on { background: var(--fill-2); color: var(--ink); font-weight: 500; }
.set-nav button svg { width: 17px; height: 17px; color: var(--muted); }
.set-body { flex: 1; overflow: auto; padding: var(--s7) var(--s8); min-width: 0; }
.set-body > * { max-width: 720px; }
.set-sec { margin-bottom: var(--s7); }
.set-sec > h2 { font-size: 16px; margin-bottom: 2px; }
.set-sec > .lead { color: var(--muted); font-size: 13px; margin-bottom: var(--s3); }
.set-card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 var(--s5); background: var(--surface); }
.set-card + .set-card { margin-top: var(--s3); }
.set-card .switch:last-child { border-bottom: 0; }
.set-card .pad { padding: var(--s4) 0; }
.model-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.model-row:last-child { border-bottom: 0; }
.model-row .nm { font-weight: 500; }
.about { display: flex; gap: var(--s4); align-items: center; }
.about img { width: 56px; height: 56px; border-radius: 14px; }

/* schedule-import preview */
.proposal.sched { max-width: 100%; }
.sched .meta { margin-bottom: var(--s2); }
.sched .shifts { margin: var(--s2) 0; }
.sched .sh { display: grid; grid-template-columns: 40px 1fr; gap: 4px 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; }
.sched .sh.dim { opacity: .72; }
.sched .f1, .sched .f2 { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.sched .f1 input[type=date] { width: 150px; } .sched .f1 input[type=time] { width: 118px; } .sched .f2 input { flex: 1 1 150px; min-width: 120px; }
.sched input.unsure { border-color: var(--warn); background: var(--warn-soft); }
.sched-warn { background: var(--warn-soft); color: var(--ink); border-radius: var(--r); padding: 6px 12px; font-size: 12px; margin: 6px 0; }
.sched .chip { margin: 2px 4px 0 0; }

/* ---------------------------------------------------------------------------------------------------- responsive + motion */
@media (max-width: 1100px) { .panel { display: none; } .set-body { padding: var(--s6); } .reader { padding: var(--s5) var(--s6); } }
@media (max-width: 1000px) {
  .cal-root:not(.side-closed) .cal-side { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; box-shadow: var(--shadow-2); } .mail-list { width: 300px; } .set-nav { width: 180px; }
  #rail button.on { padding: 0 12px 0 10px; }
  .chat:not(.side-closed) .sidebar { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; box-shadow: var(--shadow-2); }
  .pane { padding: var(--s5); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } .shimmer { color: var(--muted); background: none; } }
.sugg:empty { display: none; }

/* calendar root: the side pane can be hidden (sidebar button in the bar) */
.cal-root { flex: 1; display: flex; min-width: 0; min-height: 0; position: relative; }
.cal-root.side-closed .cal-side { display: none; }

/* dropdown (menu-backed choice) */
.dd { justify-content: space-between; gap: 10px; max-width: 280px; font-weight: 400; padding: 0 10px 0 12px; }
.dd .dd-t { overflow: hidden; text-overflow: ellipsis; }
.dd svg { width: 14px; height: 14px; color: var(--muted); }

/* hit area: visually small controls still get a 36px target */
.seg button, button.sm, .act, .tog, #st-offline, #st-help, button.chip, .tabs button, .icon-btn.sm, .composer .tools .icon-btn, .send, #rail button, .thumbs button, .toast button { position: relative; }
.seg button::after, button.sm::after, .act::after, .tog::after, #st-offline::after, #st-help::after, button.chip::after, .tabs button::after, .icon-btn.sm::after,
.composer .tools .icon-btn::after, .send::after, #rail button::after, .thumbs button::after, .toast button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 36px; min-width: 36px; transform: translateY(-50%); }
.chip .x { position: relative; } .chip .x::after { content: ""; position: absolute; inset: -9px; }

/* the app's dark theme scoped to one section, so the page can go underground in light mode too */
.ground { color-scheme: dark;
  --bg: #111113; --bg-2: #18181b; --surface: #1c1c1f; --fill: #242428; --fill-2: #2e2e33;
  --line: #27272b; --line-2: #36363c; --ink: #ededef; --ink-2: #c8c8cd; --muted: #9b9ba3; --faint: #6b6b73;
  --primary: #f4f4f5; --primary-ink: #18181b; --primary-hover: #ffffff;
  --accent: #7b9bff; --accent-soft: #1f2843; --accent-ink: #b5c7ff; --ring: rgba(123, 155, 255, .45);
  --good: #4cc38a; --good-soft: #15291f; --warn: #f0b456; --warn-soft: #2e2413; --bad: #ff6b6b; --bad-soft: #3a1a1c;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 48px rgba(0, 0, 0, .5);
  --cat-0: #1f2a44; --cat-0-l: #7f9de6; --cat-1: #18302a; --cat-1-l: #64c19a; --cat-2: #33291a; --cat-2-l: #dcae5c;
  --cat-3: #3a2224; --cat-3-l: #e48d88; --cat-4: #2a2440; --cat-4-l: #a993e6; --cat-5: #183034; --cat-5-l: #67b8c3;
  background: var(--ground-bg); color: var(--ink); }
