/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dusk (deal 1/3, seed personal-life-admin-app-0451·def48dc5·2026-11-16·r0) · redesign: full
 * nav: a sidebar of ruled links with a dot on the current page, a top bar with a menu under 62rem · signature: the todo board, soft panels of ruled rows · states: loading, empty, full · dusk: no hour (app screens)/periwinkle-apricot/glass
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · finish-review: subagent · 8 findings · 8 resolved · gap: none · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S3 R4 V4 · weakest: S, a slate tool could be any tool; the two signals now carry the app's own meaning (periwinkle is done, apricot is due or owed) on every screen */
/* Hallmark · dropped totalIncome-mobile, totalExpense-mobile, leftover-mobile, yearIncome-mobile, yearExpense-mobile, yearLeftover-mobile · one responsive totals panel replaces the duplicate phone-only tables on the finance screen */
/* Hallmark · dropped /checklists · the home tile pointed at a route that does not exist, it now opens /checklist like the sidebar does */
/* Hallmark · answered F7 · pills on chips, meters and the skip link are the Dusk control shape; a deadline chip and a progress meter are states, not boxes */
/* Hallmark · answered F4 · the two counter buttons share one quiet recipe; the plus only tints its glyph */
:root {
  color-scheme: dark;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 20px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 72px; --space-4xl: 120px;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem; --text-3xl: 2.074rem; --text-4xl: 2.488rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --container: 1280px; --gutter: var(--space-xl); --side: 13.5rem; --shell-h: 52px; --ctl-h: 34px; --ctl-h-sm: 32px; --hit: 44px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600; --z-fullscreen: 9999;
  --color-paper: oklch(17.5% 0.014 268); --color-paper-2: oklch(21% 0.016 268); --color-paper-3: oklch(25% 0.017 268); --color-sunk: oklch(14.5% 0.014 268);
  --color-ink: oklch(96% 0.006 75); --color-ink-2: oklch(85% 0.010 262); --color-muted: oklch(72% 0.016 262);
  --color-rule: oklch(30% 0.016 266); --color-edge: oklch(56% 0.02 266);
  --color-split: oklch(100% 0 0 / 0.07); --color-lift: oklch(100% 0 0 / 0.05); --color-lift-2: oklch(100% 0 0 / 0.1); --color-lit: oklch(100% 0 0 / 0.35);
  --color-accent: oklch(77% 0.10 274); --color-accent-hi: oklch(84% 0.085 274); --color-accent-ink: oklch(19% 0.035 274); --color-accent-dim: oklch(30% 0.05 274); --color-focus: oklch(80% 0.10 274);
  --color-accent-2: oklch(83% 0.095 62); --color-accent-2-ink: oklch(22% 0.04 62); --color-accent-2-dim: oklch(30% 0.04 62);
  --color-error: oklch(76% 0.13 27); --color-error-dim: oklch(27% 0.05 27); --color-success: oklch(80% 0.07 160);
  --color-scrim: oklch(9% 0.02 268);
  --note-ink: oklch(27% 0.012 268); --note-muted: oklch(42% 0.012 268); --note-line: oklch(27% 0.012 268 / 0.14); --note-rule: oklch(48% 0.012 268); --note-ring: oklch(100% 0 0 / 0.5); --note-lift: oklch(100% 0 0 / 0.5);
  --glass-hi: inset 0 1px 0 oklch(100% 0 0 / 0.09), inset 0 0 0 1px oklch(100% 0 0 / 0.05);
  --shadow-pop: 0 32px 64px -24px oklch(8% 0.02 268 / 0.7);
  --shadow-note: 0 6px 16px -6px oklch(8% 0.02 268 / 0.6);
  --font-display: "Wix Madefor Display", ui-sans-serif, system-ui, sans-serif; --font-body: "Wix Madefor Text", ui-sans-serif, system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-card: 14px; --radius-inner: 8px; --radius-pill: 999px; --radius-note: 6px; --rule-hair: 1px;
  --tracking-display: -0.022em; --display-weight: 500;
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2314162b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 8.4 6.9 11l5-5.6'/%3E%3C/svg%3E");
  --i-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%2314162b'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23aab0c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  --i-grip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='%23aab0c4'%3E%3Ccircle cx='4' cy='4' r='1.1'/%3E%3Ccircle cx='8' cy='4' r='1.1'/%3E%3Ccircle cx='4' cy='8' r='1.1'/%3E%3Ccircle cx='8' cy='8' r='1.1'/%3E%3Ccircle cx='4' cy='12' r='1.1'/%3E%3Ccircle cx='8' cy='12' r='1.1'/%3E%3C/svg%3E");
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d5d8e2' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m4 4 8 8M12 4l-8 8'/%3E%3C/svg%3E");
}

/* Bootstrap, re-pointed at the tokens */
html[data-bs-theme="dark"] {
  --bs-body-bg: var(--color-paper); --bs-body-color: var(--color-ink); --bs-emphasis-color: var(--color-ink);
  --bs-secondary-color: var(--color-muted); --bs-tertiary-color: var(--color-muted); --bs-secondary-bg: var(--color-paper-3); --bs-tertiary-bg: var(--color-paper-2);
  --bs-border-color: var(--color-rule); --bs-border-color-translucent: var(--color-split); --bs-heading-color: var(--color-ink);
  --bs-link-color: var(--color-ink); --bs-link-hover-color: var(--color-accent-hi); --bs-code-color: var(--color-ink-2);
  --bs-body-font-family: var(--font-body); --bs-body-font-size: var(--text-md); --bs-body-line-height: 1.5;
  --bs-border-radius: var(--radius-inner); --bs-border-radius-sm: var(--radius-inner); --bs-border-radius-lg: var(--radius-card);
  --bs-form-invalid-color: var(--color-error); --bs-form-invalid-border-color: var(--color-error);
  --bs-focus-ring-color: transparent;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); font-synthesis: none; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-ink); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { font-size: var(--text-xl); } h2 { font-size: var(--text-lg); } h3 { font-size: var(--text-md); } h4 { font-size: var(--text-md); } h5, h6 { font-size: var(--text-md); letter-spacing: 0; }
p { margin: 0 0 var(--space-sm); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
small, .small { font-size: var(--text-xs); }
hr { margin: var(--space-lg) 0; border: 0; border-top: 1px solid var(--color-split); opacity: 1; }
button, input, select, textarea { font: inherit; }
svg { display: block; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); }
.skip:focus-visible { top: var(--space-md); }

/* shell */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.shell { position: sticky; top: 0; z-index: var(--z-sticky-nav); display: flex; flex-flow: column nowrap; align-items: stretch; justify-content: flex-start; gap: var(--space-lg); align-self: start; height: 100dvh; padding: var(--space-lg) var(--space-md) var(--space-md) var(--space-lg); border-right: 1px solid var(--color-rule); background: var(--color-paper); }
.brand { display: inline-flex; align-items: baseline; align-self: flex-start; margin: 0; padding: 0; font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); line-height: 1.2; color: var(--color-muted); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--color-ink-2); }
.brand b { margin-right: var(--space-2xs); font-weight: 600; color: var(--color-ink); }
.brand-sub { margin-left: var(--space-xs); font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; letter-spacing: var(--tracking-display); color: var(--color-accent-hi); }
.shell-toggle { display: none; align-items: center; justify-content: center; width: var(--hit); height: var(--hit); margin-left: auto; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink-2); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.shell-toggle:hover { background: var(--color-lift); }
.shell-toggle:active { background: var(--color-lift-2); }
.shell-menu { display: flex !important; flex: 1; flex-direction: column; gap: var(--space-lg); min-height: 0; }
.nav-list { margin: 0; padding: 0; list-style: none; }
.nav-list .nav-item { margin: 0; }
.nav-list .nav-link { position: relative; display: flex; align-items: center; min-height: var(--space-xl); padding: 0 0 0 var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); text-decoration: none; transition: color var(--dur-micro) var(--ease-out); }
.nav-list .nav-item:last-child .nav-link { border-bottom: 1px solid var(--color-rule); }
.nav-list .nav-link:hover { color: var(--color-ink); }
.nav-list .nav-link[aria-current="page"] { color: var(--color-ink); }
.nav-list .nav-link[aria-current="page"]::before { content: ""; position: absolute; left: var(--space-2xs); top: 50%; width: var(--space-xs); height: var(--space-xs); border-radius: 50%; background: var(--color-accent); transform: translateY(-50%); }
.shell-menu > .btn { margin-top: auto; }
.main { min-width: 0; padding-block: var(--space-lg) var(--space-3xl); }
.main .container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.content { margin: 0; padding: 0; border: 0; }
.content > .d-flex:first-child, .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-lg); min-height: var(--ctl-h); margin-bottom: var(--space-md) !important; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.panel { border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--glass-hi); }

/* buttons */
.btn { --bs-btn-padding-x: var(--space-md); --bs-btn-padding-y: 0; --bs-btn-font-size: var(--text-sm); --bs-btn-font-weight: 500; --bs-btn-line-height: 1; --bs-btn-border-radius: var(--radius-pill); --bs-btn-border-width: 1px; --bs-btn-focus-box-shadow: none; --bs-btn-disabled-opacity: 0.55;
  --bs-btn-color: var(--color-ink); --bs-btn-bg: var(--color-lift); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--color-ink); --bs-btn-hover-bg: var(--color-lift-2); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--color-ink); --bs-btn-active-bg: var(--color-lift-2); --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--color-ink); --bs-btn-disabled-bg: var(--color-lift); --bs-btn-disabled-border-color: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--ctl-h); white-space: nowrap; text-decoration: none; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; box-shadow: none; }
.btn:disabled, .btn.disabled, .btn[aria-disabled="true"] { pointer-events: auto; cursor: not-allowed; transform: none; }
.btn-sm { --bs-btn-padding-x: var(--space-sm); --bs-btn-border-radius: var(--radius-pill); min-height: var(--ctl-h-sm); }
.btn-warning, .btn-primary { --bs-btn-color: var(--color-accent-ink); --bs-btn-bg: var(--color-accent); --bs-btn-border-color: var(--color-accent);
  --bs-btn-hover-color: var(--color-accent-ink); --bs-btn-hover-bg: var(--color-accent-hi); --bs-btn-hover-border-color: var(--color-accent-hi);
  --bs-btn-active-color: var(--color-accent-ink); --bs-btn-active-bg: var(--color-accent-hi); --bs-btn-active-border-color: var(--color-accent-hi);
  --bs-btn-disabled-color: var(--color-accent-ink); --bs-btn-disabled-bg: var(--color-accent); --bs-btn-disabled-border-color: var(--color-accent);
  box-shadow: inset 0 1px 0 var(--color-lit); }
.btn-danger, .btn-outline-danger { --bs-btn-color: var(--color-error); --bs-btn-hover-color: var(--color-error); --bs-btn-hover-bg: var(--color-error-dim); --bs-btn-active-color: var(--color-error); --bs-btn-active-bg: var(--color-error-dim); --bs-btn-disabled-color: var(--color-error); }
.btn-link { --bs-btn-bg: transparent; --bs-btn-disabled-bg: transparent; --bs-btn-color: var(--color-ink-2); text-decoration: none; }
.btn-close { --bs-btn-close-bg: var(--i-close); --bs-btn-close-opacity: 0.8; --bs-btn-close-hover-opacity: 1; --bs-btn-close-focus-shadow: none; --bs-btn-close-white-filter: none; width: var(--space-md); height: var(--space-md); padding: var(--space-xs); border-radius: var(--radius-pill); box-sizing: content-box; filter: none; transition: opacity var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.btn-close:hover { background-color: var(--color-lift); }
.btn-close:active { background-color: var(--color-lift-2); }
.icon-btn { display: inline-grid; place-items: center; flex-shrink: 0; width: var(--ctl-h-sm); height: var(--ctl-h-sm); min-height: 0; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font-size: var(--text-md); line-height: 1; cursor: pointer; text-decoration: none; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.icon-btn:hover { color: var(--color-ink); background: var(--color-lift); }
.icon-btn:active { background: var(--color-lift-2); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; background: transparent; }

/* fields */
.form-label, .form-check-label { margin-bottom: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.form-check-label { margin-bottom: 0; font-weight: 400; }
.form-text, .invalid-feedback { margin-top: var(--space-2xs); font-size: var(--text-xs); }
.form-text { color: var(--color-muted); }
.form-control, .form-select { min-height: var(--ctl-h); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-edge); border-radius: var(--radius-inner); background-color: var(--color-sunk); color: var(--color-ink); font-size: var(--text-sm); line-height: 1.4; box-shadow: none; transition: background-color var(--dur-micro) var(--ease-out); }
.form-control::placeholder { color: var(--color-muted); opacity: 1; }
.form-control:focus, .form-select:focus { border-color: var(--color-edge); background-color: var(--color-sunk); color: var(--color-ink); box-shadow: none; outline: 2px solid var(--color-focus); outline-offset: -1px; }
.form-control:disabled, .form-select:disabled { opacity: 0.55; cursor: not-allowed; background-color: var(--color-sunk); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--color-error); background-image: none; padding-right: var(--space-sm); }
.form-control.is-invalid:focus { border-color: var(--color-error); box-shadow: none; }
.form-control-sm { min-height: var(--ctl-h-sm); padding-block: var(--space-2xs); border-radius: var(--radius-inner); font-size: var(--text-sm); }
.form-select { padding-right: var(--space-xl); background-image: var(--i-chev); background-repeat: no-repeat; background-position: right var(--space-sm) center; background-size: var(--space-sm) var(--space-sm); cursor: pointer; }
.form-select option { background: var(--color-paper-2); color: var(--color-ink); }
textarea.form-control { min-height: calc(var(--ctl-h) * 2); }
input[type="date"].form-control { color-scheme: dark; }
.form-check-input, input[type="checkbox"]:not(.form-check-input) { appearance: none; flex-shrink: 0; width: var(--space-md); height: var(--space-md); margin-top: var(--space-3xs); border: 1px solid var(--color-edge); border-radius: var(--radius-pill); background-color: var(--color-sunk); background-repeat: no-repeat; background-position: center; background-size: contain; vertical-align: top; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.form-check-input[type="checkbox"], .form-check-input[type="radio"] { border-radius: var(--radius-pill); }
.form-check-input:focus { border-color: var(--color-edge); box-shadow: none; }
.form-check-input:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.form-check-input:checked, input[type="checkbox"]:not(.form-check-input):checked { border-color: var(--color-accent); background-color: var(--color-accent); background-image: var(--i-tick); }
.form-check-input:checked[type="checkbox"] { --bs-form-check-bg-image: var(--i-tick); }
.form-check-input:checked[type="radio"] { --bs-form-check-bg-image: var(--i-dot); background-image: var(--i-dot); }
.form-check-input:disabled, input[type="checkbox"]:disabled { opacity: 0.55; cursor: not-allowed; }
.form-check { display: flex; align-items: flex-start; gap: var(--space-xs); min-height: 0; margin-bottom: 0; padding-left: 0; }
.form-check .form-check-input { float: none; margin-left: 0; }

/* dialogs */
.modal { --bs-modal-bg: var(--color-paper-2); --bs-modal-color: var(--color-ink); --bs-modal-border-width: 0; --bs-modal-border-radius: var(--radius-card); --bs-modal-inner-border-radius: var(--radius-card); --bs-modal-padding: var(--space-lg); --bs-modal-header-padding: var(--space-md) var(--space-lg); --bs-modal-header-border-color: var(--color-split); --bs-modal-footer-border-color: var(--color-split); --bs-modal-footer-gap: var(--space-xs); --bs-modal-box-shadow: none; }
.modal-content, .modal-content.bg-dark { background-color: var(--color-paper-2) !important; color: var(--color-ink) !important; box-shadow: var(--glass-hi), var(--shadow-pop); }
.modal-header.border-secondary, .modal-footer.border-secondary { border-color: var(--color-split) !important; }
.modal-footer { padding: var(--space-sm) var(--space-lg); }
.modal-footer > * { margin: 0; }
.modal-title { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.3; }
.modal-body { font-size: var(--text-sm); }
.modal-body .mb-3 { margin-bottom: var(--space-md) !important; }
.modal-backdrop { --bs-backdrop-bg: var(--color-scrim); --bs-backdrop-opacity: 0.72; }
.section-title { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--color-muted); }

/* tables */
.table { --bs-table-color: var(--color-ink); --bs-table-bg: transparent; --bs-table-border-color: var(--color-split); --bs-table-striped-bg: transparent; --bs-table-striped-color: var(--color-ink); --bs-table-hover-bg: var(--color-lift); --bs-table-hover-color: var(--color-ink); margin: 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.table > :not(caption) > * > * { padding: var(--space-xs) var(--space-lg); border-bottom-width: 0; border-top: 1px solid var(--color-split); box-shadow: none; }
.table > thead > tr > th { border-top: 0; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); white-space: nowrap; }

/* small parts */
.text-muted, .text-secondary, .text-body-secondary { color: var(--color-muted) !important; }
.text-warning, .text-info { color: var(--color-accent-2) !important; }
.text-danger { color: var(--color-error) !important; }
.text-success { color: var(--color-accent-hi) !important; }
.bg-secondary { background-color: var(--color-paper-2) !important; }
.badge { --bs-badge-padding-x: var(--space-xs); --bs-badge-padding-y: var(--space-2xs); --bs-badge-font-size: var(--text-xs); --bs-badge-font-weight: 500; --bs-badge-border-radius: var(--radius-pill); }
.badge.bg-success { background-color: var(--color-accent-dim) !important; color: var(--color-accent-hi); }
.badge.bg-danger { background-color: var(--color-error-dim) !important; color: var(--color-error); }
.alert { --bs-alert-padding-x: var(--space-md); --bs-alert-padding-y: var(--space-sm); --bs-alert-margin-bottom: var(--space-md); --bs-alert-border-radius: var(--radius-inner); --bs-alert-border-color: transparent; --bs-alert-bg: var(--color-paper-3); --bs-alert-color: var(--color-ink); font-size: var(--text-sm); }
.alert-danger { --bs-alert-bg: var(--color-error-dim); --bs-alert-color: var(--color-error); }
.alert-success { --bs-alert-bg: var(--color-accent-dim); --bs-alert-color: var(--color-accent-hi); }
.alert-warning, .alert-info { --bs-alert-bg: var(--color-accent-2-dim); --bs-alert-color: var(--color-accent-2); }
.spinner-border { --bs-spinner-width: var(--space-lg); --bs-spinner-height: var(--space-lg); --bs-spinner-border-width: 2px; color: var(--color-accent) !important; }
.progress { --bs-progress-height: var(--space-2xs); --bs-progress-bg: var(--color-sunk); --bs-progress-border-radius: var(--radius-pill); --bs-progress-bar-bg: var(--color-accent); --bs-progress-bar-color: var(--color-accent-ink); overflow: hidden; }
.progress-bar { border-radius: var(--radius-pill); background-color: var(--color-accent); background-image: none; transition: none; animation: none; }
.card { --bs-card-bg: var(--color-paper-2); --bs-card-color: var(--color-ink); --bs-card-border-width: 0; --bs-card-border-radius: var(--radius-card); --bs-card-inner-border-radius: var(--radius-card); --bs-card-spacer-x: var(--space-lg); --bs-card-spacer-y: var(--space-lg); --bs-card-cap-padding-x: var(--space-lg); --bs-card-cap-padding-y: var(--space-md); --bs-card-cap-bg: transparent; --bs-card-border-color: var(--color-split); box-shadow: var(--glass-hi); }
.card-header { border-bottom: 0; padding-bottom: 0; }
.card-header h2, .card-header .card-title, .card-title { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); }
.state, #loadingState, #emptyState, .bucketlist-empty-state, .empty-category { padding: var(--space-2xl) var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); font-style: normal; text-align: center; }
#loadingState p, #emptyState p { margin: var(--space-xs) 0 0; }
#emptyState h2, .state h2 { font-size: var(--text-lg); color: var(--color-ink); }

/* home */
.home { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: start; }
.home-index { overflow: hidden; }
.home-row { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); align-items: baseline; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); color: inherit; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.home-row + .home-row { box-shadow: inset 0 1px 0 var(--color-split); }
.home-row:hover { background-color: var(--color-lift); }
.home-row:active { background-color: var(--color-lift-2); }
.home-row:focus-visible { outline-offset: -2px; }
.home-name { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); }
.home-desc { font-size: var(--text-sm); color: var(--color-muted); }
.home-about { padding: var(--space-lg); }
.home-about h2 { margin-bottom: var(--space-xs); font-size: var(--text-md); }
.home-about ul { margin: 0; padding: 0; list-style: none; }
.home-about li { max-width: 46ch; padding-block: var(--space-sm); font-size: var(--text-sm); line-height: 1.55; color: var(--color-ink-2); }
.home-about li + li { border-top: 1px solid var(--color-split); }
.home-about li:last-child { padding-bottom: 0; }

/* shell and home, narrow */
@media (max-width: 62rem) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .shell { flex-flow: row wrap; align-items: center; gap: 0; height: auto; min-height: var(--shell-h); padding: 0 var(--gutter); border-right: 0; border-bottom: 1px solid var(--color-rule); }
  .brand { align-self: center; }
  .shell-toggle { display: inline-flex; margin-right: calc(var(--space-sm) * -1); }
  .shell-menu { flex: 1 0 100%; gap: var(--space-md); padding-bottom: var(--space-lg); }
  .shell-menu.collapse:not(.show) { display: none !important; }
  .shell-menu > .btn { align-self: flex-start; margin-top: 0; }
  .nav-list .nav-link { min-height: var(--hit); font-size: var(--text-md); }
  .home { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .form-control, .form-select { font-size: var(--text-md); }
}
@media (max-width: 40rem) {
  body { --gutter: var(--space-md); }
  .main { padding-block: var(--space-lg) var(--space-2xl); }
  h1 { font-size: var(--text-lg); }
  .home-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); padding-inline: var(--space-md); }
}

/* shared: due chips, meters, crumbs */
.due { display: inline-flex; align-items: center; flex-shrink: 0; min-height: calc(var(--space-md) + var(--space-2xs)); padding: 0 var(--space-xs); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--color-rule); font-size: var(--text-xs); font-weight: 500; line-height: 1; white-space: nowrap; color: var(--color-muted); }
.due--soon { box-shadow: inset 0 0 0 1px var(--color-edge); color: var(--color-ink-2); }
.due--today { box-shadow: none; background: var(--color-accent-2-dim); color: var(--color-accent-2); }
.due--late { box-shadow: none; background: var(--color-accent-2); color: var(--color-accent-2-ink); }
.meter { display: block; flex: 1; height: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-sunk); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); transform-origin: left center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-sm); min-width: 0; }
.crumbs-tail { display: flex; align-items: baseline; gap: var(--space-sm); min-width: 0; }
.crumbs-tail h2 { font-size: var(--text-xl); }
.crumbs-sep { font-size: var(--text-lg); color: var(--color-edge); }
.crumbs:not(:has(.crumbs-tail[style*="none"])) h1 { color: var(--color-muted); }
.clickable { cursor: pointer; transition: color var(--dur-micro) var(--ease-out); }
.clickable:hover { color: var(--color-accent-hi); }

/* todo: overview */
.todo-home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-md); align-items: start; }
.projects-grid, .due-soon { overflow: hidden; }
.project-card { display: grid; gap: var(--space-2xs); padding: var(--space-sm) var(--space-lg); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.project-card + .project-card, .due-row + .due-row { box-shadow: inset 0 1px 0 var(--color-split); }
.project-card:hover, .due-row:hover { background-color: var(--color-lift); }
.project-card:active, .due-row:active { background-color: var(--color-lift-2); }
.project-name { justify-self: start; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; }
.project-stats { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: var(--space-md); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.project-progress { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.due-soon-title { padding: var(--space-md) var(--space-lg) var(--space-xs); font-size: var(--text-md); letter-spacing: 0; }
.due-row { display: flex; align-items: flex-start; gap: var(--space-md); padding: var(--space-xs) var(--space-lg); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.due-row-main { flex: 1; min-width: 0; }
.due-row-title { font-size: var(--text-sm); font-weight: 500; line-height: 1.4; }
.due-row-where, .due-row-desc { font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
.due-row-where span { color: var(--color-edge); }

/* todo: board */
.board { --bs-gutter-x: var(--space-md); --bs-gutter-y: 0; }
.board-col { overflow: hidden; container-type: inline-size; }
.category-column { transition: opacity var(--dur-micro) var(--ease-out); }
.category-header { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-sm) var(--space-xs) var(--space-lg); cursor: grab; }
.category-title { flex: 1; margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: 0; line-height: 1.3; color: var(--color-ink); }
.category-size-select { width: auto; min-height: var(--space-lg); padding: 0 var(--space-lg) 0 var(--space-xs); border-radius: var(--radius-pill); background-position: right var(--space-2xs) center; font-size: var(--text-xs); color: var(--color-muted); }
.category-items-container { min-height: var(--space-xl); transition: background-color var(--dur-short) var(--ease-out); }
.category-items-container.drag-over { background-color: var(--color-accent-dim); }
.board-empty { margin: 0; padding: var(--space-sm) var(--space-lg) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.todo-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-lg); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), opacity var(--dur-micro) var(--ease-out); }
.todo-item + .todo-item { box-shadow: inset 0 1px 0 var(--color-split); }
.todo-item:hover { background-color: var(--color-lift); }
.todo-item.dragging, .category-column.dragging { opacity: 0.5; }
.todo-item.drag-over-top { box-shadow: inset 0 2px 0 var(--color-accent); }
.todo-item.drag-over-bottom { box-shadow: inset 0 -2px 0 var(--color-accent); }
.category-column.drag-over-left .board-col { box-shadow: var(--glass-hi), -3px 0 0 var(--color-accent); }
.category-column.drag-over-right .board-col { box-shadow: var(--glass-hi), 3px 0 0 var(--color-accent); }
.drag-handle { position: absolute; left: var(--space-2xs); top: var(--space-xs); width: var(--space-sm); height: var(--space-md); background: var(--i-grip) center / contain no-repeat; opacity: 0.3; cursor: grab; transition: opacity var(--dur-micro) var(--ease-out); }
.todo-item:hover .drag-handle { opacity: 0.9; }
.todo-item-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
@container (min-width: 26rem) {
  .todo-item-head { flex-direction: row; justify-content: space-between; gap: var(--space-sm); }
}
.todo-item-title { min-width: 0; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; overflow-wrap: break-word; }
.todo-item-desc { margin-top: var(--space-3xs); font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
.todo-item.is-done .todo-item-title { font-weight: 400; color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-edge); }
.todo-subitems-container { display: grid; gap: var(--space-2xs); margin-top: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-inner); background: var(--color-sunk); cursor: default; }
.todo-subitem { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--text-xs); line-height: 1.45; color: var(--color-ink-2); }
.todo-subitem .form-check-input { width: var(--space-sm); height: var(--space-sm); margin-top: var(--space-3xs); }
.todo-subitem label { flex: 1; margin: 0; cursor: pointer; transition: color var(--dur-micro) var(--ease-out); }
.todo-subitem label:hover { color: var(--color-accent-hi); }
.todo-subitem.completed label { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-edge); }
.todo-subitems-meter { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }

/* todo: item dialog */
.item-details-section, .tasks-section { height: 100%; }
.tasks-list { display: grid; gap: var(--space-xs); max-height: 22rem; overflow-y: auto; scrollbar-color: var(--color-rule) transparent; }
.task-item { padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm); border-radius: var(--radius-inner); background: var(--color-sunk); }
.task-item-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.task-item-header .form-check-input { margin: 0 var(--space-xs) 0 0; }
.task-title { flex: 1; font-size: var(--text-sm); }
.task-item.completed .task-title { color: var(--color-muted) !important; }
.task-actions { display: flex; gap: var(--space-3xs); }
.task-description { margin: var(--space-2xs) 0 var(--space-2xs) var(--space-lg); font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
#no-tasks-placeholder { border-radius: var(--radius-inner); background: var(--color-sunk); color: var(--color-muted) !important; font-size: var(--text-sm); }

@media (max-width: 70rem) {
  .todo-home { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 48rem) and (max-width: 80rem) {
  .board > .category-column { flex-grow: 1; min-width: 17rem; }
}
@media (max-width: 48rem) {
  .board > .category-column { margin-bottom: var(--space-md) !important; }
  .category-size-select { display: none; }
  .drag-handle { display: none; }
  .project-stats { grid-template-columns: auto auto; }
  .project-progress { grid-column: 1 / -1; }
  .crumbs-tail h2 { font-size: var(--text-lg); }
}
.page-tools .form-select { width: auto; max-width: 16rem; }
.category-title, .project-name { text-wrap: wrap; }

/* finance */
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--space-md); }
.totals-group { padding: var(--space-md) var(--space-lg); }
.totals-group + .totals-group { box-shadow: inset 1px 0 0 var(--color-split); }
.totals-group h2 { margin-bottom: var(--space-xs); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--color-muted); }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.fig { min-width: 0; padding-inline: var(--space-md); border-left: 1px solid var(--color-split); }
.fig:first-child { padding-left: 0; border-left: 0; }
.fig:last-child { padding-right: 0; }
.fig dt { font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); white-space: nowrap; }
.fig dd { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig-sub { display: block; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--color-muted); }
.green-text, .red-text { color: var(--color-ink); }
#leftover.green-text, #yearLeftover.green-text { color: var(--color-accent-hi); }
#leftover.red-text, #yearLeftover.red-text { color: var(--color-accent-2); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.cal-nav h2 { font-size: var(--text-lg); text-align: center; }
.ledgers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); align-items: start; }
.ledger { min-width: 0; overflow: hidden; }
.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-sm) var(--space-xs) var(--space-lg); }
.ledger-head h2 { font-size: var(--text-md); letter-spacing: 0; }
.ledger-sub { padding: var(--space-xs) var(--space-lg); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; color: var(--color-muted); }
.ledger-part + .ledger-part { padding-top: var(--space-xs); }
.ledger tbody tr { cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.ledger tbody tr:hover > * { background-color: var(--color-lift); }
.ledger td[data-amount] { width: 1%; text-align: right; white-space: nowrap; }
.parent-entry td { font-weight: 500; }
.child-entry td[data-description] { padding-left: var(--space-xl); color: var(--color-ink-2); }
.parent-badge { display: inline-block; margin-left: var(--space-2xs); color: var(--color-muted); vertical-align: middle; }
.parent-badge svg { display: inline; }

@media (max-width: 84rem) {
  .totals { grid-template-columns: minmax(0, 1fr); }
  .totals-group + .totals-group { box-shadow: inset 0 1px 0 var(--color-split); }
}
@media (max-width: 70rem) {
  .ledgers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  .ledgers { grid-template-columns: minmax(0, 1fr); }
  .totals-group { padding: var(--space-md); }
  .figs { grid-template-columns: minmax(0, 1fr); }
  .fig { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); padding: var(--space-xs) 0; border-left: 0; border-top: 1px solid var(--color-split); }
  .fig:first-child { padding-top: 0; border-top: 0; }
  .fig:last-child { padding-bottom: 0; }
  .fig dd { font-size: var(--text-lg); text-align: right; }
  .cal-nav { flex-wrap: wrap; }
  .cal-nav h2 { order: -1; flex: 1 0 100%; text-align: left; }
  .table > :not(caption) > * > * { padding-inline: var(--space-md); }
  .ledger-head, .ledger-sub { padding-left: var(--space-md); }
  .child-entry td[data-description] { padding-left: var(--space-lg); }
}

/* notes */
.folders-grid { grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: var(--space-xs); margin-bottom: var(--space-md) !important; padding-bottom: var(--space-2xs); overflow-x: auto; scrollbar-width: none; }
.folder-card { display: flex; align-items: center; gap: var(--space-xs); min-height: var(--ctl-h); padding: 0 var(--space-md); border-radius: var(--radius-pill); background: var(--color-lift); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.folder-card:hover { background: var(--color-lift-2); color: var(--color-ink); }
.folder-card.active { background: var(--color-accent-dim); color: var(--color-ink); }
.folder-count { font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.folder-card.active .folder-count { color: var(--color-ink-2); }
.notes-grid { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.note-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-lg); align-items: baseline; padding: var(--space-xs) var(--space-lg); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.note-card + .note-card { box-shadow: inset 0 1px 0 var(--color-split); }
.note-card:hover { background-color: var(--color-lift); }
.note-card:active { background-color: var(--color-lift-2); }
.note-title { font-size: var(--text-sm); font-weight: 500; line-height: 1.4; }
.note-preview { grid-column: 1; overflow: hidden; font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); text-overflow: ellipsis; white-space: nowrap; }
.note-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.note-folder { display: inline-flex; align-items: center; min-height: calc(var(--space-md) + var(--space-2xs)); padding: 0 var(--space-xs); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--color-rule); }
#noteModal .modal-header { gap: var(--space-md); }
#noteModal .tox-tinymce { border: 1px solid var(--color-edge); border-radius: var(--radius-inner); }
#noteModal .tox .tox-editor-header, #noteModal .tox .tox-toolbar-overlord, #noteModal .tox .tox-toolbar__primary, #noteModal .tox .tox-statusbar, #noteModal .tox .tox-menubar { background: var(--color-paper-3) !important; box-shadow: none !important; }
#noteModal .tox .tox-editor-header { border-bottom: 1px solid var(--color-split) !important; }
#noteModal .tox .tox-statusbar { border-top: 1px solid var(--color-split) !important; color: var(--color-muted) !important; }
#noteModal .tox .tox-edit-area__iframe, #noteModal .tox .tox-edit-area, #noteModal .tox .tox-sidebar-wrap { background: var(--color-sunk) !important; }
#noteModal .tox .tox-tbtn--select { background: var(--color-lift) !important; }
.modal-footer > [id^="delete"]:not(:first-child) { order: -1; margin-right: auto; }

/* noteboard */
.content.p-0 { padding: 0 !important; }
.notes-canvas { position: relative; width: 100%; min-height: calc(100dvh - var(--space-4xl)); border-radius: var(--radius-card); background-color: var(--color-sunk); background-image: radial-gradient(circle, var(--color-rule) 1px, transparent 1px); background-size: var(--space-lg) var(--space-lg); box-shadow: var(--glass-hi); overflow: auto; }
.notes-canvas-spacer { position: absolute; pointer-events: none; }
.notes-canvas .sticky-note { position: absolute; display: flex; flex-direction: column; min-width: 11rem; min-height: 7.5rem; border-radius: var(--radius-note); box-shadow: 0 0 0 1px var(--note-ring), var(--shadow-note); color: var(--note-ink); overflow: hidden; transition: opacity var(--dur-micro) var(--ease-out); }
.notes-canvas .sticky-note.dragging, .notes-canvas .sticky-note.resizing { opacity: 0.9; cursor: grabbing; }
.notes-canvas .note-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: var(--space-2xs); padding: var(--space-3xs) var(--space-xs); border-bottom: 1px solid var(--note-rule); cursor: grab; }
.notes-canvas .note-header:active { cursor: grabbing; }
.notes-canvas .note-title { flex: 1; min-width: 0; min-height: var(--ctl-h-sm); padding: var(--space-3xs) var(--space-2xs); border: 0; border-radius: var(--space-2xs); background: transparent; font-size: var(--text-sm); font-weight: 600; color: var(--note-ink); text-overflow: ellipsis; }
.notes-canvas .note-title:focus { background: var(--note-lift); outline: 2px solid var(--note-ink); outline-offset: -2px; }
.notes-canvas .note-title::placeholder, .notes-canvas .note-content::placeholder { color: var(--note-muted); opacity: 1; }
.notes-canvas .note-actions { display: flex; flex-shrink: 0; gap: var(--space-3xs); }
.notes-canvas .note-btn { position: relative; display: inline-grid; place-items: center; width: var(--space-lg); height: var(--space-lg); padding: 0; border: 0; border-radius: var(--space-2xs); background: transparent; color: var(--note-muted); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.notes-canvas .note-btn:hover { background: var(--note-line); color: var(--note-ink); }
.notes-canvas .note-btn:active { background: var(--note-lift); }
.notes-canvas .note-btn:focus-visible { outline: 2px solid var(--note-ink); outline-offset: -2px; }
.note-swatch { width: var(--space-sm); height: var(--space-sm); border: 2px solid currentColor; border-radius: 50%; }
.notes-canvas .note-content { flex: 1; padding: var(--space-xs) var(--space-sm); border: 0; background: transparent; font-family: inherit; font-size: var(--text-sm); line-height: 1.45; color: var(--note-ink); resize: none; }
.notes-canvas .note-content:focus { outline: 2px solid var(--note-ink); outline-offset: -2px; }
/* Note bodies are user-typed plain text with space-aligned columns, so they keep a fixed-width face (lint 64 reads this as a label; it is not one). */
.notes-canvas .note-content.mono-content { font-family: var(--font-code); font-size: var(--text-xs); line-height: 1.4; white-space: pre; tab-size: 4; }
.notes-canvas .note-resize-handle { position: absolute; right: 0; bottom: 0; width: var(--space-md); height: var(--space-md); background: linear-gradient(135deg, transparent 50%, var(--note-line) 50%); cursor: se-resize; }
.notes-canvas .color-picker-popup { position: absolute; top: 100%; right: 0; z-index: var(--z-dropdown); display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2xs); min-width: 8rem; padding: var(--space-xs); border-radius: var(--radius-inner); background: var(--color-paper-3); box-shadow: var(--glass-hi), var(--shadow-note); }
.notes-canvas .color-picker-option { width: var(--space-lg); height: var(--space-lg); border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out); }
.notes-canvas .color-picker-option:hover { border-color: var(--color-ink); }
.notes-notification { position: fixed; top: var(--space-lg); right: var(--space-lg); z-index: var(--z-toast); display: flex; align-items: center; gap: var(--space-sm); min-width: 15rem; box-shadow: var(--shadow-pop); }
.canvas-controls { position: absolute; top: var(--space-sm); right: var(--space-sm); z-index: var(--z-raised); display: flex; gap: var(--space-xs); }
.notes-fullscreen-mode { overflow: hidden; }
.notes-fullscreen-mode .notes-canvas.fullscreen { position: fixed; inset: 0; z-index: var(--z-fullscreen); width: 100%; height: 100dvh; min-height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
.notes-fullscreen-mode .canvas-controls { display: none; }
.fullscreen-controls { position: absolute; top: var(--space-md); right: var(--space-md); z-index: var(--z-raised); display: flex; align-items: center; gap: var(--space-xs); }

/* assets */
.category-section { margin-bottom: var(--space-xl); }
.category-section > .category-header { align-items: flex-start; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-sm); padding: 0; cursor: default; }
.category-section .category-title { font-size: var(--text-md); letter-spacing: var(--tracking-display); }
.category-description { margin-top: var(--space-2xs); max-width: 65ch; font-size: var(--text-sm); color: var(--color-muted); }
.category-section > [id$="-assets"] { border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--glass-hi); overflow: hidden; }
.category-section > [id$="-assets"] > p { margin: 0; padding: var(--space-lg); font-size: var(--text-sm); }
.asset-item { padding: var(--space-sm) var(--space-lg); }
.asset-item + .asset-item { box-shadow: inset 0 1px 0 var(--color-split); }
.asset-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); }
.asset-title-section { flex: 1; min-width: 0; }
.asset-name { display: inline-block; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; }
.asset-description { max-width: 65ch; font-size: var(--text-xs); color: var(--color-muted); }
.asset-actions { display: flex; gap: var(--space-xs); }
.edit-toggle-btn.btn-outline-warning { --bs-btn-bg: var(--color-accent-dim); --bs-btn-hover-bg: var(--color-accent-dim); }
.asset-table-container { margin-top: var(--space-sm); border-radius: var(--radius-inner); background: var(--color-sunk); overflow-x: auto; }
.asset-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.asset-table th, .asset-table td { padding: var(--space-xs) var(--space-sm); text-align: left; vertical-align: middle; }
.asset-table th { font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.asset-table td { border-top: 1px solid var(--color-split); color: var(--color-ink); user-select: text; }
.asset-item.editing-mode .editable-cell { cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.asset-item.editing-mode .editable-cell:hover { background-color: var(--color-lift); }
.asset-item.editing-mode .cell-editing { padding: var(--space-3xs) var(--space-2xs); }
.inline-edit-input { width: 100%; }
.row-actions-header, .row-actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.row-actions-cell .btn, .move-column-btn, .remove-column-btn, .remove-row-btn { display: inline-grid; place-items: center; width: var(--ctl-h-sm); min-height: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font-size: var(--text-sm); line-height: 1; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.row-actions-cell .btn:hover, .move-column-btn:hover, .remove-column-btn:hover, .remove-row-btn:hover { background: var(--color-lift); color: var(--color-ink); }
.row-actions-cell .btn:active, .move-column-btn:active, .remove-column-btn:active, .remove-row-btn:active { background: var(--color-lift-2); }
.row-actions-cell .btn:disabled, .move-column-btn:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; }
.delete-row-btn:hover, .remove-column-btn:hover, .remove-row-btn:hover { color: var(--color-error); }
.table-row-controls { padding: var(--space-xs) var(--space-sm); border-top: 1px solid var(--color-split); }
.table-editor { margin-top: var(--space-sm); padding: var(--space-sm); border-radius: var(--radius-inner); background: var(--color-sunk); }
.column-row { gap: var(--space-2xs); margin-bottom: var(--space-xs) !important; }
.column-row .column-input { flex: 1; }

/* checklist */
.checklist-header-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) !important; }
.checklist-header-controls .form-select { width: auto; min-width: 12rem; max-width: 100%; }
#statusMessage { min-height: var(--space-lg); margin-bottom: var(--space-xs) !important; }
.checklist-add-category { margin-bottom: var(--space-md); }
.category-card { margin-bottom: var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--glass-hi); overflow: hidden; }
.category-card .category-header { justify-content: space-between; cursor: default; }
.category-body { padding: 0; }
.checklist-item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-lg); box-shadow: inset 0 1px 0 var(--color-split); transition: background-color var(--dur-micro) var(--ease-out); }
.checklist-item:hover { background-color: var(--color-lift); }
.checklist-item input[type="checkbox"] { margin: 0; }
.checklist-item label { flex: 1; margin: 0; font-size: var(--text-sm); line-height: 1.45; cursor: pointer; }
.checklist-item label.completed { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-edge); }
.item-actions { opacity: 0.45; transition: opacity var(--dur-micro) var(--ease-out); }
.checklist-item:hover .item-actions, .item-actions:focus-within { opacity: 1; }
.remove-item-btn:hover { color: var(--color-error); }
.category-card .empty-category { padding: var(--space-md) var(--space-lg); text-align: left; box-shadow: inset 0 1px 0 var(--color-split); }

@media (max-width: 48rem) {
  .note-card { grid-template-columns: minmax(0, 1fr); padding-inline: var(--space-md); }
  .note-meta { grid-column: 1; grid-row: auto; }
  .asset-item { padding-inline: var(--space-md); }
  .asset-table th, .asset-table td { white-space: nowrap; }
  .checklist-item { padding-left: var(--space-md); min-height: var(--hit); }
  .checklist-header-controls .form-select { flex: 1 0 100%; }
  .category-card .category-header { padding-left: var(--space-md); }
}

/* bucketlist */
.bucketlist-grid { overflow: hidden; }
.bucketlist-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "title goal done foot" "desc goal done foot"; gap: var(--space-3xs) var(--space-lg); align-items: center; padding: var(--space-sm) var(--space-lg); transition: background-color var(--dur-micro) var(--ease-out); }
.bucketlist-item + .bucketlist-item { box-shadow: inset 0 1px 0 var(--color-split); }
.bucketlist-item:hover { background-color: var(--color-lift); }
.bucketlist-title { grid-area: title; justify-self: start; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; cursor: pointer; transition: color var(--dur-micro) var(--ease-out); }
.bucketlist-title:hover { color: var(--color-accent-hi); }
.bucketlist-description { grid-area: desc; max-width: 65ch; font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); }
.bucketlist-goal { grid-area: goal; }
.bucketlist-completed-date { grid-area: done; }
.bucketlist-goal, .bucketlist-completed-date { justify-self: end; font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bucketlist-goal { color: var(--color-accent-2); }
.bucketlist-completed-date { color: var(--color-accent-hi); }
.bucketlist-footer { grid-area: foot; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-sm); }
.bucketlist-meta { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.bucketlist-check-btn { display: inline-grid; place-items: center; width: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0; border: 1px solid var(--color-edge); border-radius: 50%; background: transparent; color: var(--color-ink-2); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.bucketlist-check-btn:hover { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-accent-ink); }
.bucketlist-check-btn:active { background: var(--color-accent-hi); }
.bucketlist-item.completed .bucketlist-title { color: var(--color-ink-2); }
.bucketlist-grid .bucketlist-empty-state { padding: var(--space-xl) var(--space-lg); }

/* diary */
.diary-calendar { margin-bottom: var(--space-md); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.calendar-header h2 { font-size: var(--text-lg); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); }
.calendar-day { display: flex; flex-direction: column; min-height: var(--space-2xl); padding: var(--space-xs); border-radius: var(--radius-inner); background: var(--color-lift); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.calendar-day:hover { background: var(--color-lift-2); }
.calendar-day.calendar-head { min-height: 0; padding: var(--space-2xs) var(--space-xs); background: transparent; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); cursor: default; }
.calendar-day.other-month { background: transparent; color: var(--color-muted); cursor: default; }
.calendar-day.has-entry { background: var(--color-accent-dim); color: var(--color-ink); }
.calendar-day.has-entry:hover { background: var(--color-accent-dim); box-shadow: inset 0 0 0 1px var(--color-accent); }
.calendar-day-number { font-weight: 500; font-variant-numeric: tabular-nums; }
.calendar-day-indicator { display: none; }
.entries-grid { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.e-diary-card { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "head head head" "meta read foot" "body body body"; align-items: center; column-gap: var(--space-md); padding: var(--space-sm) var(--space-lg); }
.e-diary-card + .e-diary-card { box-shadow: inset 0 1px 0 var(--color-split); }
.e-diary-header { grid-area: head; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); }
.e-diary-title { flex: 1; min-width: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.3; }
.e-diary-header-right { display: flex; align-items: center; gap: var(--space-xs); }
.e-diary-date { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.e-diary-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.e-diary-mood, .e-diary-weather { display: inline-flex; align-items: center; min-height: calc(var(--space-md) + var(--space-2xs)); padding: 0 var(--space-xs); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--color-rule); font-size: var(--text-xs); color: var(--color-muted); }
.e-diary-content-wrapper { display: contents; }
.e-diary-read-btn { grid-area: read; justify-self: start; min-height: var(--ctl-h-sm); padding: var(--space-2xs) 0; border: 0; background: none; font-size: var(--text-sm); font-weight: 500; color: var(--color-accent-hi); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.e-diary-read-btn:hover { text-decoration-color: currentColor; }
.e-diary-read-btn:active { color: var(--color-ink); }
.e-diary-read-btn.active { color: var(--color-muted); }
.e-diary-content { grid-area: body; max-width: 68ch; margin: var(--space-2xs) 0 var(--space-xs); font-size: var(--text-md); line-height: 1.65; color: var(--color-ink-2); white-space: pre-wrap; }
.e-diary-footer { grid-area: foot; justify-self: end; font-size: var(--text-xs); color: var(--color-muted); }

/* count */
.counters-grid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: var(--space-md); }
.counter-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name edit" "value controls" "sub sub" "progress progress" "target target" "desc desc" "meta meta"; align-items: center; align-content: start; gap: var(--space-2xs) var(--space-md); padding: var(--space-md) var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--glass-hi); }
.counter-name { grid-area: name; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; }
.counter-edit { grid-area: edit; justify-self: end; }
.counter-value { grid-area: value; font-family: var(--font-display); font-size: var(--text-3xl); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter-subcounter { grid-area: sub; font-size: var(--text-sm); color: var(--color-ink-2); font-variant-numeric: tabular-nums; }
.counter-progress { grid-area: progress; margin-top: var(--space-xs); }
.counter-target { grid-area: target; font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.counter-controls { grid-area: controls; display: flex; gap: var(--space-xs); }
.counter-btn { display: inline-grid; place-items: center; width: var(--ctl-h); height: var(--ctl-h); padding: 0; border: 0; border-radius: 50%; background: var(--color-lift); color: var(--color-ink); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.counter-btn:hover { background: var(--color-lift-2); }
.counter-btn:active { transform: translateY(1px); }
.counter-btn.increment { color: var(--color-accent-hi); }
.counter-description { grid-area: desc; margin-top: var(--space-xs); font-size: var(--text-sm); line-height: 1.5; color: var(--color-muted); }
.counter-meta { grid-area: meta; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-split); font-size: var(--text-xs); color: var(--color-muted); }

/* settings */
.page-lead { max-width: 65ch; margin-bottom: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.settings-row { --bs-gutter-x: var(--space-md); --bs-gutter-y: var(--space-md); margin-bottom: var(--space-md); }
.settings-row .card + .card { margin-top: var(--space-md) !important; }
.settings-row .card-body { font-size: var(--text-sm); }
.settings-row .card-body > p.text-muted { max-width: 65ch; margin-bottom: var(--space-md); }
.settings-row ul { margin: 0; padding-left: var(--space-md); }
.settings-row li + li { margin-top: var(--space-2xs); }
.settings-row .form-check { margin-bottom: var(--space-xs) !important; }
.settings-row .form-check-label small span + span { margin-left: var(--space-sm); }
.settings-row .w-100 { margin-top: var(--space-xs); }
#loading { padding: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }

@media (max-width: 48rem) {
  .bucketlist-item { padding-inline: var(--space-md); }
  .e-diary-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "meta" "read" "body" "foot"; row-gap: var(--space-2xs); padding-inline: var(--space-md); }
  .e-diary-footer { justify-self: start; }
  .e-diary-header { flex-direction: column; gap: var(--space-2xs); }
  .e-diary-header-right { width: 100%; justify-content: space-between; }
  .diary-calendar { padding-inline: var(--space-sm); }
  .calendar-day { min-height: var(--hit); padding: var(--space-2xs); }
  .counters-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 62rem) {
  .bucketlist-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title foot" "desc desc" "goal goal" "done done"; }
  .bucketlist-goal, .bucketlist-completed-date { justify-self: start; margin-top: var(--space-2xs); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .spinner-border { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
}
.form-check .form-check-input[type="checkbox"] { border-radius: var(--space-2xs); }
select.form-control { appearance: none; padding-right: var(--space-xl); background-image: var(--i-chev); background-repeat: no-repeat; background-position: right var(--space-sm) center; background-size: var(--space-sm) var(--space-sm); cursor: pointer; }
.modal-footer { gap: var(--space-xs); }
#noteModal .tox .tox-tbtn, #noteModal .tox .tox-split-button { background: transparent !important; }
#noteModal .tox .tox-tbtn:hover, #noteModal .tox .tox-tbtn--enabled, #noteModal .tox .tox-tbtn--select { background: var(--color-lift-2) !important; }

/* calendar */
/* calendar */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.cal-main { min-width: 0; }
.cal-month { padding: var(--space-md); container-type: inline-size; }
.cal-day { min-width: 0; min-height: 6.75rem; gap: var(--space-2xs); padding: var(--space-2xs); }
.cal-day.other-month { cursor: pointer; }
.cal-day.other-month:hover { background: var(--color-lift); }
.cal-day.other-month .cal-day-entries { opacity: 0.6; }
.cal-day.is-selected { box-shadow: inset 0 0 0 1px var(--color-accent); }
.cal-day-num { display: inline-grid; place-items: center; align-self: flex-start; min-width: 1.5rem; height: 1.5rem; padding: 0 var(--space-2xs); border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; font-size: var(--text-xs); line-height: 1; cursor: pointer; }
.cal-day.is-today .cal-day-num { background: var(--color-accent); color: var(--color-accent-ink); }
.cal-day-entries { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs); }
.cal-entry, .cal-more { display: block; width: 100%; padding: 0 var(--space-2xs); border: 0; border-radius: var(--space-2xs); background: transparent; color: var(--color-muted); font-size: var(--text-xs); line-height: 1.5; text-align: left; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color var(--dur-micro) var(--ease-out); }
.cal-entry--own { color: var(--color-ink); font-weight: 500; }
.cal-entry:hover, .cal-more:hover { color: var(--color-accent-hi); }
.cal-entry:active, .cal-more:active { color: var(--color-ink); }
.cal-entry-time { font-weight: 400; color: var(--color-muted); }
.cal-kind { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: var(--space-2xs); box-shadow: inset 0 0 0 1px var(--color-rule); font-size: var(--text-xs); font-weight: 500; line-height: 1; color: var(--color-muted); vertical-align: text-bottom; }
.cal-day-count { display: none; }

.cal-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-xs) var(--space-lg); margin-top: var(--space-sm); padding-inline: var(--space-xs); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--color-muted); }
.cal-note { margin: 0; font-size: var(--text-xs); color: var(--color-error); }
#calendarLoading p { margin: var(--space-xs) 0 0; }

/* calendar: ruled rows of the agenda and of a picked day */
.cal-agenda, .cal-daypanel { min-width: 0; overflow: hidden; }
.cal-agenda { container-type: inline-size; }
.cal-agenda .state p { margin-top: var(--space-xs); }
.cal-daypanel { margin-top: var(--space-md); }
.cal-daypanel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-sm) var(--space-xs) var(--space-lg); }
.cal-daypanel-head h3, .cal-agenda-title { font-size: var(--text-md); letter-spacing: 0; }
.cal-empty { margin: 0; padding: var(--space-xs) var(--space-lg) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.cal-agenda-title { padding: var(--space-md) var(--space-lg) var(--space-xs); }
.cal-agenda-month { padding: var(--space-sm) var(--space-lg) var(--space-xs); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--color-ink); }
.cal-agenda-date { display: flex; align-items: baseline; gap: var(--space-xs); padding: var(--space-xs) var(--space-lg) var(--space-3xs); box-shadow: inset 0 1px 0 var(--color-split); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; color: var(--color-muted); }
.cal-agenda-date.is-today { color: var(--color-accent-hi); }
.cal-rows { margin: 0; padding: 0; list-style: none; }
.cal-rows + .cal-agenda-date { margin-top: var(--space-2xs); }
.cal-row { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-sm); width: 100%; padding: var(--space-2xs) var(--space-lg); border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.cal-row:hover { background-color: var(--color-lift); }
.cal-row:active { background-color: var(--color-lift-2); }
.cal-row:focus-visible { outline-offset: -2px; }
.cal-row-time { font-size: var(--text-xs); color: var(--color-muted); }
.cal-row-main { display: grid; min-width: 0; }
.cal-row-title { font-size: var(--text-sm); line-height: 1.4; color: var(--color-ink-2); overflow-wrap: anywhere; }
.cal-row--own .cal-row-title { font-weight: 500; color: var(--color-ink); }
.cal-row-meta { font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
.cal-row-sep { color: var(--color-edge); }
.cal-row-go { align-self: center; color: var(--color-muted); }

/* calendar: event dialog */
.cal-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }

/* narrow cells keep the title and drop the time; a narrow agenda tightens its gutters */
@container (max-width: 42rem) {
  .cal-entry-time { display: none; }
}
@container (max-width: 18rem) {
  .cal-row { grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: var(--space-xs); }
  .cal-row, .cal-agenda-date, .cal-agenda-month, .cal-agenda-title { padding-inline: var(--space-md); }
}
@media (min-width: 70rem) {
  .cal-layout { grid-template-columns: minmax(0, 1fr) clamp(16rem, 28%, 21rem); }
}
@media (max-width: 48rem) {
  .cal-month { padding: var(--space-sm) var(--space-xs); }
  .cal-day { align-items: center; gap: 0; min-height: var(--hit); }
  .cal-day-num { align-self: center; }
  .cal-day-entries, .cal-legend { display: none; }
  .cal-day-count { display: inline-grid; place-items: center; min-width: 1rem; height: 1rem; padding: 0 var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-lift-2); font-size: var(--text-xs); line-height: 1; color: var(--color-muted); }
  .cal-day-count.has-own { color: var(--color-ink); }
  .cal-row, .cal-agenda-date, .cal-agenda-month, .cal-agenda-title, .cal-empty { padding-inline: var(--space-md); }
  .cal-daypanel-head { padding-left: var(--space-md); }
  .cal-row { min-height: var(--hit); align-content: center; }
}
@media (max-width: 30rem) {
  .cal-form-row { grid-template-columns: minmax(0, 1fr); }
}

/* core */
/* settings: import and earlier versions */
.version-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-xs); }
.version-row + .version-row { border-top: 1px solid var(--color-split); }
#import-status { min-height: var(--space-lg); margin: var(--space-xs) 0; font-size: var(--text-xs); }
#import-types { margin-bottom: var(--space-xs); }

/* sidebar: groups and footer actions */
.shell-menu { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--color-rule) transparent; }
.shell-menu nav { display: grid; }
.nav-group { margin: var(--space-md) 0 var(--space-xs); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0; color: var(--color-accent-hi); }
.nav-list .nav-link { min-height: calc(var(--space-lg) + var(--space-xs)); }
.shell-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); margin-top: auto; padding-top: var(--space-sm); }
.shell-foot .btn:last-child { grid-column: 1 / -1; }
.shell-foot .btn[aria-current="page"] { --bs-btn-bg: var(--color-accent-dim); --bs-btn-hover-bg: var(--color-accent-dim); }
@media (max-width: 62rem) {
  .shell-menu { max-height: calc(100dvh - var(--shell-h)); }
  .shell-foot { display: flex; flex-wrap: wrap; margin-top: 0; }
}

/* home */
/* home: today overview (rows reuse .due-row, .due, .meter, .figs from above) */
.home-date { font-size: var(--text-sm); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.home-today { grid-template-rows: auto auto minmax(0, 1fr); gap: var(--space-md); }
.home-side { display: grid; gap: var(--space-md); align-content: start; min-width: 0; }
.home-block { min-width: 0; overflow: hidden; container-type: inline-size; }
.home-head { display: flex; align-items: baseline; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) var(--space-xs); }
.home-head h2 { font-size: var(--text-md); letter-spacing: 0; }
.home-sum { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.home-go { margin-left: auto; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out); }
.home-go:hover { color: var(--color-accent-hi); text-decoration-color: currentColor; }
.home-note { margin: 0; padding: var(--space-2xs) var(--space-lg) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.home-note a { color: var(--color-ink-2); transition: color var(--dur-micro) var(--ease-out); }
.home-note a:hover { color: var(--color-accent-hi); }
.home-item + .home-note { padding-top: var(--space-xs); box-shadow: inset 0 1px 0 var(--color-split); font-size: var(--text-xs); }
.home-item { color: inherit; text-decoration: none; }
.home-item:focus-visible, .home-more:focus-visible { outline-offset: -2px; }
.home-more { display: block; padding: var(--space-xs) var(--space-lg) var(--space-sm); box-shadow: inset 0 1px 0 var(--color-split); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); text-decoration: none; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.home-more:hover { background-color: var(--color-lift); color: var(--color-ink); }
.home-more:active { background-color: var(--color-lift-2); }
.home-plus { color: var(--color-accent-hi); }
.home-minus { color: var(--color-accent-2); }

/* home: this month */
.home-money { display: block; padding: var(--space-2xs) var(--space-lg) var(--space-md); transition: background-color var(--dur-micro) var(--ease-out); }
.home-money:hover { background-color: var(--color-lift); }
.home-money:active { background-color: var(--color-lift-2); }
.home-money .fig { padding-inline: var(--space-sm); }
.home-money .fig:first-child { padding-left: 0; }
.home-money .fig:last-child { padding-right: 0; }
.home-money .fig dd { font-size: var(--text-lg); }
@container (max-width: 28rem) {
  .home-money .figs { grid-template-columns: minmax(0, 1fr); }
  .home-money .fig { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); padding: var(--space-xs) 0; border-left: 0; border-top: 1px solid var(--color-split); }
  .home-money .fig:first-child { padding-top: 0; border-top: 0; }
  .home-money .fig:last-child { padding-bottom: 0; }
  .home-money .fig dd { text-align: right; }
}

/* home: counters */
.home-counter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2xs) var(--space-md); }
.home-counter .meter { grid-column: 1 / -1; grid-row: 2; }
.home-counter-value { font-size: var(--text-sm); font-weight: 500; text-align: right; white-space: nowrap; }
.home-counter-goal { font-weight: 400; color: var(--color-muted); }
@container (min-width: 26rem) {
  .home-counter { grid-template-columns: minmax(0, 1fr) 7rem minmax(6.5rem, auto); }
  .home-counter .meter { grid-column: 2; grid-row: 1; }
  .home-counter-value { grid-column: 3; }
}

/* home: diary */
.home-diary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-2xs) var(--space-lg) var(--space-md); }

/* home: coming up */
.home-soon { align-items: baseline; }
.home-when { flex: 0 0 6rem; font-size: var(--text-xs); color: var(--color-ink-2); white-space: nowrap; }
.home-when--today { color: var(--color-accent-2); }
.home-soon .due-row-main { font-size: var(--text-sm); line-height: 1.4; }
.home-soon .due-row-title { margin-right: var(--space-2xs); }
.home-kind { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }

/* home: section index, compact */

@media not all and (max-width: 62rem) {
  .home-today > .home-block--tasks { grid-column: 1; grid-row: 1; }
  .home-today > .home-block--soon { grid-column: 1; grid-row: 2; }
  .home-today > .home-side { grid-column: 2; grid-row: 1 / span 3; }
}
/* one column: today, month, counters, diary, coming up, sections, about */
@media (max-width: 62rem) {
  .home-today { grid-template-rows: none; }
  .home-side { display: contents; }
  .home-block--tasks { order: 1; }
  .home-side > * { order: 2; }
  .home-block--soon { order: 3; }
  .home-side > .home-about { order: 5; }
}
@media (max-width: 40rem) {
  .home-head, .home-note, .home-more, .home-money, .home-diary, .home-block .due-row { padding-inline: var(--space-md); }
  .home-when { flex-basis: 5rem; }
}

/* insights */
/* insights: finance year overview, diary year view, count habits */

/* a quiet view button stays lit while its view is open */
.year-toggle[aria-pressed="true"] { --bs-btn-bg: var(--color-accent-dim); --bs-btn-hover-bg: var(--color-accent-dim); --bs-btn-active-bg: var(--color-accent-dim); }

/* the empty and failed-load message of both year views */
#yearState p { margin: var(--space-xs) 0 0; }

/* finance: year overview */
.year-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.year-chart { min-width: 0; padding: var(--space-sm) var(--space-lg) var(--space-md); }
.year-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-md); margin-bottom: var(--space-sm); }
.year-chart-head h2 { font-size: var(--text-md); letter-spacing: 0; }
.year-key { display: flex; gap: var(--space-md); margin: 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--color-muted); }
.year-key li { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.year-key li::before { content: ""; width: var(--space-xs); height: var(--space-xs); border-radius: var(--space-3xs); background: var(--color-accent); }
.year-key .year-key--expense::before { background: var(--color-accent-2); }
.year-chart-box { position: relative; height: 16rem; }
.year-ledger { min-width: 0; overflow: hidden; }
.year-table-scroll { overflow-x: auto; scrollbar-color: var(--color-rule) transparent; }
.year-table td, .year-table thead th + th { text-align: right; white-space: nowrap; }
.year-table tbody th, .year-table tfoot th { font-weight: 400; }
.year-table tbody th { width: 28%; }
.year-row-empty th, .year-row-empty td { color: var(--color-muted); }
.year-table tfoot th, .year-table tfoot td { font-weight: 500; }
.year-table .year-count { font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); }
.year-table .year-short { color: var(--color-accent-2); }
.year-table .year-over { color: var(--color-accent-hi); }
.year-month-short { display: none; }
.year-note { margin: 0; padding: var(--space-xs) var(--space-lg) var(--space-sm); border-top: 1px solid var(--color-split); font-size: var(--text-xs); color: var(--color-muted); }

/* diary: year view */
.diary-year { margin-bottom: var(--space-md); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.diary-year-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-sm) var(--space-xl); margin-bottom: var(--space-md); }
.diary-year-head h2 { font-size: var(--text-lg); }
.diary-year-figs { display: flex; margin: 0; }
.diary-year-scroll { overflow-x: auto; padding-bottom: var(--space-2xs); scrollbar-color: var(--color-rule) transparent; }
.diary-year-grid { display: grid; grid-template-columns: max-content repeat(31, minmax(var(--space-lg), 1fr)); gap: var(--space-3xs); align-items: center; min-width: max-content; max-width: 54rem; }
.yd-corner, .yd-month { position: sticky; left: 0; z-index: var(--z-base); align-self: stretch; display: flex; align-items: center; padding-right: var(--space-xs); background: var(--color-paper-2); font-size: var(--text-xs); line-height: 1; color: var(--color-muted); }
.yd-daynum { font-size: var(--text-xs); line-height: 1.6; text-align: center; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.yd-month.is-current, .yd-daynum.is-current { font-weight: 500; color: var(--color-ink); }
.yd { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--space-2xs); background: var(--color-sunk); }
button.yd { cursor: pointer; }
button.yd:hover { box-shadow: inset 0 0 0 2px var(--color-ink); }
.yd--amazing { background: var(--color-accent); }
.yd--happy { background: color-mix(in oklab, var(--color-accent) 64%, var(--color-paper-2)); }
.yd--good { background: color-mix(in oklab, var(--color-accent) 36%, var(--color-paper-2)); }
.yd--okay { background: var(--color-edge); }
.yd--sad { background: color-mix(in oklab, var(--color-accent-2) 36%, var(--color-paper-2)); }
.yd--stressed { background: color-mix(in oklab, var(--color-accent-2) 64%, var(--color-paper-2)); }
.yd--angry { background: var(--color-accent-2); }
.yd--none { background: transparent; box-shadow: inset 0 0 0 1px var(--color-edge); }
.diary-year-key { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: var(--space-md) 0 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--color-muted); }
.diary-year-key li { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.diary-year-key .yd { flex: none; width: var(--space-sm); border-radius: var(--space-3xs); }

/* count: habits */
.counter-card--habit { grid-template-areas: "name edit" "value streak" "week week" "sub sub" "progress progress" "target target" "desc desc" "meta meta"; }
.habit-streak { grid-area: streak; justify-self: end; display: grid; justify-items: end; font-size: var(--text-xs); line-height: 1.35; color: var(--color-muted); white-space: nowrap; }
.habit-streak b { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.habit-week { grid-area: week; display: grid; grid-template-columns: repeat(7, auto); justify-content: space-between; max-width: 18rem; margin-top: var(--space-xs); }
.habit-day { display: grid; justify-items: center; gap: var(--space-2xs); }
.habit-dow { font-size: var(--text-xs); line-height: 1; color: var(--color-muted); }
.habit-day.is-today .habit-dow { font-weight: 500; color: var(--color-ink); }
.habit-tick { width: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0; border: 0; border-radius: 50%; background-color: var(--color-sunk); background-repeat: no-repeat; background-position: center; background-size: var(--space-md) var(--space-md); box-shadow: inset 0 0 0 1px var(--color-edge); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.habit-tick:hover { background-color: var(--color-lift-2); }
.habit-tick:active { transform: translateY(1px); }
.habit-day.is-today .habit-tick { box-shadow: inset 0 0 0 1px var(--color-accent-2); }
.habit-tick[aria-pressed="true"], .habit-day.is-today .habit-tick[aria-pressed="true"] { background-color: var(--color-accent); background-image: var(--i-tick); box-shadow: inset 0 1px 0 var(--color-lit); }
.habit-tick[aria-pressed="true"]:hover { background-color: var(--color-accent-hi); }

@media (max-width: 48rem) {
  .year-chart { padding-inline: var(--space-md); }
  .year-chart-box { height: 13rem; }
  .year-month-long { display: none; }
  .year-month-short { display: inline; }
  .year-table > :not(caption) > * > * { padding-inline: var(--space-xs); }
  .year-table > :not(caption) > * > :first-child { padding-left: var(--space-md); }
  .year-table > :not(caption) > * > :last-child { padding-right: var(--space-md); }
  .year-table tbody th { width: auto; }
  .year-table .year-count { display: block; }
  .year-note { padding-inline: var(--space-md); }
  .diary-year { padding-inline: var(--space-sm); }
  .diary-year-figs { flex-direction: column; width: 100%; }
}

/* people-health */
/* people and health: shared */
.people-state > p, .health-state > p { margin: var(--space-xs) 0 0; }
.people-filters, .health-kinds { display: grid; }
.people-filters .folder-card, .health-kinds .folder-card { border: 0; }

/* people */
.people-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); margin-bottom: var(--space-md); }
.people-bar[hidden] { display: none; }
.people-filters { min-width: 0; margin-bottom: 0 !important; padding-bottom: 0; }
.people-search { width: 15rem; height: var(--ctl-h); padding-block: 0; }
.people-list { overflow: hidden; container-type: inline-size; }
.people-none { margin: 0; padding: var(--space-xl) var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); text-align: center; }
.people-head, .person-row { display: grid; grid-template-columns: minmax(0, 1fr) 17rem 14rem var(--space-md); align-items: center; column-gap: var(--space-lg); padding: var(--space-xs) var(--space-lg); }
.people-head { padding-top: var(--space-sm); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.people-rows, .person-gifts { margin: 0; padding: 0; list-style: none; }
.person { box-shadow: inset 0 1px 0 var(--color-split); }
.person-row { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.person-row:hover { background-color: var(--color-lift); }
.person-row:active { background-color: var(--color-lift-2); }
.person-row:focus-visible { outline-offset: -2px; }
.person-who { display: grid; min-width: 0; }
.person-name { font-size: var(--text-sm); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.person-relation, .person-sub, .person-label { font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
.person-cell { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs) var(--space-xs); min-width: 0; font-size: var(--text-sm); line-height: 1.4; }
.person-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.person-chev, .health-chev { display: inline-grid; place-items: center; color: var(--color-muted); transition: transform var(--dur-micro) var(--ease-out); }
[aria-expanded="true"] > .person-chev, [aria-expanded="true"] > .health-chev { transform: rotate(180deg); }
.person-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) var(--space-xl); padding: var(--space-sm) var(--space-lg) var(--space-md); background: var(--color-sunk); box-shadow: inset 0 1px 0 var(--color-split); }
.person-detail[hidden] { display: none; }
.person-detail-part { display: grid; align-content: start; gap: var(--space-xs); min-width: 0; }
.person-facts { display: grid; gap: var(--space-2xs); margin: 0; font-size: var(--text-sm); }
.person-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--space-sm); align-items: baseline; }
.person-facts dt { font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); }
.person-facts dd { margin: 0; overflow-wrap: anywhere; }
.person-facts a { text-decoration-color: var(--color-edge); transition: color var(--dur-micro) var(--ease-out); }
.person-facts a:hover { color: var(--color-accent-hi); }
.person-notes { max-width: 65ch; margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--color-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.person-quiet { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.person-gift { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); min-height: var(--ctl-h-sm); }
.person-gift .form-check { flex: 1; min-width: 0; cursor: pointer; }
.person-gift .form-check-label { overflow-wrap: anywhere; cursor: pointer; }
.person-gift.is-done .form-check-label { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-edge); }
.person-gift .icon-btn:hover { color: var(--color-error); }
.person-gift-add { display: flex; gap: var(--space-xs); }
.person-gift-add .form-control { flex: 1; min-width: 0; }
.person-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.people-birthday-fields { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 10rem); gap: var(--space-xs); }
.people-birthday-fields.is-invalid > * { border-color: var(--color-error); }

@container (max-width: 46rem) {
  .people-head { display: none; }
  .person-row { grid-template-columns: minmax(0, 1fr) var(--space-md); row-gap: var(--space-2xs); padding-block: var(--space-sm); }
  .person-who { grid-column: 1; }
  .person-chev { grid-column: 2; grid-row: 1; }
  .person-cell { grid-column: 1 / -1; }
  .person-label { position: static; width: 5.5rem; height: auto; overflow: visible; clip-path: none; }
  .person-detail { grid-template-columns: minmax(0, 1fr); }
}

/* health */
.health-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.health-parts[hidden] { display: none; }
.health-part { container-type: inline-size; }
.health-part .ledger-head { min-height: calc(var(--ctl-h-sm) + var(--space-sm) + var(--space-xs)); }
.health-empty { margin: 0; padding: var(--space-xs) var(--space-lg) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.health-rows { margin: 0; padding: 0; list-style: none; }
.health-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-sm); padding-inline: var(--space-lg); box-shadow: inset 0 1px 0 var(--color-split); transition: background-color var(--dur-micro) var(--ease-out); }
.health-row:hover { background-color: var(--color-lift); }
.health-open { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs) var(--space-md); align-items: baseline; width: 100%; min-width: 0; padding: var(--space-xs) 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.health-open:focus-visible, .health-more:focus-visible, .health-cell-open:focus-visible { outline-offset: -2px; }
.health-log-entry .health-open { grid-template-columns: 5.5rem minmax(0, 1fr); }
.health-when, .health-what { display: grid; min-width: 0; }
.health-when { font-size: var(--text-sm); line-height: 1.4; }
.health-title { font-size: var(--text-sm); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.health-meta { font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); overflow-wrap: anywhere; }
.health-dot { color: var(--color-edge); }
.health-note { max-width: 65ch; }
.health-medication.is-inactive .health-title { color: var(--color-muted); font-weight: 400; }
.health-more { display: flex; align-items: center; gap: var(--space-xs); width: 100%; min-height: var(--ctl-h); padding: 0 var(--space-lg); border: 0; background: transparent; box-shadow: inset 0 1px 0 var(--color-split); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.health-more:hover { background-color: var(--color-lift); color: var(--color-ink); }
.health-more:active { background-color: var(--color-lift-2); }
.health-more .health-chev { margin-left: auto; color: inherit; }
.health-kinds { margin-bottom: var(--space-sm) !important; padding-inline: var(--space-lg); }
.health-trend { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); padding: 0 var(--space-lg) var(--space-sm); }
.health-latest { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; }
.health-latest-unit { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; letter-spacing: 0; color: var(--color-muted); }
.health-spark { color: var(--color-accent); overflow: visible; }
.health-table { overflow-x: auto; }
.health-table .health-figure { text-align: right; }
.health-table .health-unit, .health-table .health-change { color: var(--color-muted); }
.health-table td:last-child, .health-table th:last-child { width: 28%; }
.health-cell-open { padding: 0; border: 0; background: transparent; color: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.health-active { align-items: center; gap: var(--space-xs); cursor: pointer; }
.health-active .form-check-input { margin: 0; }
.health-active .form-check-label { min-width: 3.25rem; font-size: var(--text-xs); color: var(--color-muted); cursor: pointer; }
.health-log-text { font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

@container (max-width: 26rem) {
  .health-log-entry .health-open { grid-template-columns: minmax(0, 1fr); }
  .health-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs); }
}
@media (max-width: 70rem) {
  .health-parts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 48rem) {
  .people-head, .person-row, .person-detail, .people-none { padding-inline: var(--space-md); }
  .health-row, .health-more, .health-kinds, .health-trend, .health-empty { padding-inline: var(--space-md); }
  .health-row, .health-more { min-height: var(--hit); }
  .person-gift { min-height: var(--hit); }
}
@media (max-width: 47.98rem) {
  .people-field-gap { margin-top: var(--space-md); }
}
@media (max-width: 40rem) {
  .people-search { flex: 1 1 100%; width: auto; height: var(--hit); }
  .people-birthday-fields { grid-template-columns: 5rem minmax(0, 1fr) 6.5rem; }
}

/* search */
/* search: the sidebar button */
.search-open { display: flex; align-items: center; gap: var(--space-xs); width: 100%; min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: var(--color-lift); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; line-height: 1; text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.search-open:hover { background: var(--color-lift-2); color: var(--color-ink); }
.search-open:active { background: var(--color-lift-2); }
.search-open > span { flex: 1; }
.search-key { display: inline-block; min-width: var(--space-lg); padding: 0 var(--space-2xs); border-radius: var(--space-2xs); background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule); color: var(--color-muted); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; line-height: 1.5; text-align: center; }

/* search: the palette */
html.search-locked { overflow: hidden; }
.search-overlay { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-modal); display: flex; align-items: flex-start; justify-content: center; height: var(--search-vh, 100dvh); padding: var(--space-3xl) var(--gutter) var(--space-xl); background: color-mix(in oklab, var(--color-scrim) 72%, transparent); overscroll-behavior: contain; animation: search-fade var(--dur-micro) var(--ease-out); }
.search-panel { display: flex; flex-direction: column; width: 100%; max-width: 40rem; max-height: 100%; border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--glass-hi), var(--shadow-pop); overflow: hidden; animation: search-rise var(--dur-short) var(--ease-out); }
.search-panel:focus { outline: none; }
@keyframes search-fade { from { opacity: 0; } }
@keyframes search-rise { from { opacity: 0; transform: translateY(var(--space-xs)); } }
.search-head { display: flex; flex-shrink: 0; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg); box-shadow: inset 0 -1px 0 var(--color-split); }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field > svg { position: absolute; top: 50%; left: var(--space-sm); color: var(--color-muted); transform: translateY(-50%); pointer-events: none; }
.search-input { padding-left: var(--space-xl); }
.search-title { flex: 1; font-size: var(--text-md); line-height: 1.3; }
.search-body { min-height: 0; padding-bottom: var(--space-xs); overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--color-rule) transparent; }
.search-group-title { display: flex; align-items: baseline; gap: var(--space-xs); padding: var(--space-sm) var(--space-lg) var(--space-2xs); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.search-group-title .num { color: var(--color-edge); }
.search-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 0 var(--space-lg); align-items: baseline; padding: var(--space-xs) var(--space-lg); color: inherit; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.search-row + .search-row { box-shadow: inset 0 1px 0 var(--color-split); }
.search-row:hover { color: inherit; }
.search-row:active { background-color: var(--color-lift-2); }
.search-row.is-active { background-color: var(--color-lift); }
.search-row.is-active::before { content: ""; position: absolute; top: 50%; left: calc(var(--space-xs) - var(--space-3xs)); width: var(--space-xs); height: var(--space-xs); border-radius: 50%; background: var(--color-accent); transform: translateY(-50%); }
.search-row-title { overflow: hidden; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.search-row-where { max-width: 18rem; overflow: hidden; font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.search-row-where span { color: var(--color-edge); }
.search-row-snip { grid-column: 1 / -1; overflow: hidden; font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); text-overflow: ellipsis; white-space: nowrap; }
.search-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search-quick .search-group-title { grid-column: 1 / -1; }
.search-quick .search-row + .search-row { box-shadow: inset 1px 0 0 var(--color-split); }
.search-more { font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-2); }
.search-panel mark { padding: 0; border-radius: var(--space-3xs); background: var(--color-accent-dim); color: var(--color-ink); }
.search-hint { margin: 0; padding: var(--space-sm) var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.search-problem { color: var(--color-error); }
.search-panel .state { padding-block: var(--space-xl); }
.search-panel .state h2 { margin-bottom: var(--space-xs); font-size: var(--text-md); }
.search-panel .state p + p { margin-top: var(--space-md); }
.search-panel .state a, .search-flash a { color: var(--color-ink); text-decoration: underline; transition: color var(--dur-micro) var(--ease-out); }
.search-panel .state a:hover, .search-flash a:hover { color: var(--color-accent-hi); }
.search-flash { margin: var(--space-sm) var(--space-lg) 0; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-inner); background: var(--color-accent-dim); color: var(--color-ink); font-size: var(--text-sm); overflow-wrap: anywhere; }
.search-flash span { color: var(--color-ink-2); }
.search-foot { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); padding: var(--space-xs) var(--space-lg); box-shadow: inset 0 1px 0 var(--color-split); font-size: var(--text-xs); color: var(--color-muted); }
.search-foot .search-key + .search-key { margin-left: var(--space-3xs); }

/* search: quick add forms */
.search-form-view { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.search-form { display: grid; gap: var(--space-md); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.search-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem); gap: var(--space-md); }
.search-form textarea.form-control { resize: vertical; }
.search-error { margin: 0; font-size: var(--text-sm); color: var(--color-error); }
.search-form-foot { display: flex; justify-content: flex-end; gap: var(--space-xs); }
.search-form-view > .search-form-foot { padding: 0 var(--space-lg) var(--space-lg); }

@media (max-width: 62rem) {
  .search-open { min-height: var(--hit); margin-top: var(--space-xs); padding-inline: var(--space-md); font-size: var(--text-md); }
  .search-open .search-key { display: none; }
}
@media (max-width: 40rem) {
  .search-overlay { padding: var(--space-md); }
  .search-head { padding-left: var(--space-md); }
  .search-group-title, .search-row, .search-hint { padding-inline: var(--space-md); }
  .search-row { grid-template-columns: minmax(0, 1fr); }
  .search-row-where { order: 1; max-width: none; text-align: left; }
  .search-quick .search-row { padding-right: var(--space-xs); }
  .search-row.is-active::before { left: var(--space-2xs); width: var(--space-2xs); height: var(--space-2xs); }
  .search-flash { margin-inline: var(--space-md); }
  .search-foot { display: none; }
  .search-form { padding: var(--space-md); }
  .search-form-row { grid-template-columns: minmax(0, 1fr); }
  .search-form-view > .search-form-foot { padding: 0 var(--space-md) var(--space-md); }
}

/* todo */
/* todo: recurring items */
.due-wrap { display: inline-flex; align-items: center; flex-shrink: 0; gap: var(--space-2xs); }
.repeat-mark { display: inline-grid; place-items: center; flex-shrink: 0; order: 1; color: var(--color-muted); }
.repeat-mark svg { display: block; }
.due-row .repeat-mark { order: -1; }
@container (min-width: 26rem) {
  .todo-item-head .repeat-mark { order: -1; }
}
.repeat-custom { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.repeat-custom[hidden] { display: none; }
.repeat-custom .form-control { flex: none; width: 5rem; }
.repeat-custom .form-select { flex: 1; min-width: 0; }

/* todo: overview filters and row checkbox */
.due-filters.folders-grid { display: flex; flex-wrap: wrap; margin: 0 0 var(--space-xs) !important; padding: var(--space-3xs) var(--space-lg) var(--space-2xs); }
.due-filters .folder-card { border: 0; }
.due-row-check:disabled { cursor: default; }

/* workouts-media */
/* workouts and media: shared */
.workout-chips, .media-chips { display: grid; }
button.folder-card { border: 0; }
#workoutsEmpty p, #workoutsError p, #mediaEmpty p, #mediaError p, #mediaNoMatch p { max-width: 60ch; margin: var(--space-xs) auto 0; }
.pips { display: inline-flex; align-items: center; gap: var(--space-3xs); vertical-align: middle; }
.pips i { display: block; width: var(--space-2xs); height: var(--space-sm); border-radius: var(--radius-pill); background: var(--color-rule); }
.pips i.on { background: var(--color-ink-2); }

/* workouts: this week */
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-xs); max-width: 24rem; margin: 0; padding: 0; list-style: none; }
.week-day { display: grid; justify-items: center; gap: var(--space-2xs); font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); }
.week-day-mark { display: grid; place-items: center; width: var(--ctl-h-sm); height: var(--ctl-h-sm); border-radius: 50%; box-shadow: inset 0 0 0 1px var(--color-rule); font-weight: 500; }
.week-day.is-today .week-day-name { color: var(--color-ink); }
.week-day.is-today .week-day-mark { box-shadow: inset 0 0 0 1px var(--color-edge); color: var(--color-ink); }
.week-day.is-done .week-day-mark { box-shadow: none; background: var(--color-accent); color: var(--color-accent-ink); }

/* workouts: log */
.workout-log, .media-list { overflow: hidden; }
.workout-week + .workout-week { box-shadow: inset 0 1px 0 var(--color-split); }
.workout-week-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-md); padding: var(--space-sm) var(--space-lg) var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }
.workout-week-head h2 { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; line-height: 1.5; color: var(--color-ink-2); }
.workout-week-range { margin-left: var(--space-xs); font-weight: 400; color: var(--color-muted); }
.workout-week-totals { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font-variant-numeric: tabular-nums; }
.workout-rows, .media-rows { margin: 0; padding: 0; list-style: none; }
.workout-row { display: grid; grid-template-columns: 6.5rem minmax(5rem, 9rem) 4.5rem 5rem auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3xs) var(--space-lg); padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-lg); box-shadow: inset 0 1px 0 var(--color-split); font-size: var(--text-sm); line-height: 1.4; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.workout-row:hover, .media-row:hover { background-color: var(--color-lift); }
.workout-row:active, .media-row:active { background-color: var(--color-lift-2); }
.workout-facts, .media-meta { display: contents; }
.workout-date { order: -1; color: var(--color-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.workout-type { min-width: 0; font-weight: 500; overflow-wrap: break-word; }
.workout-dur, .workout-dist { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workout-dist { color: var(--color-ink-2); }
.workout-notes, .media-notes { min-width: 0; font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); overflow-wrap: break-word; }

/* media */
#mediaStatusChips { margin-bottom: var(--space-xs) !important; }
.media-row { display: grid; grid-template-columns: minmax(0, 1fr) 4rem 3rem 5.5rem 5.5rem auto; align-items: center; gap: var(--space-2xs) var(--space-lg); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-lg); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.media-row + .media-row { box-shadow: inset 0 1px 0 var(--color-split); }
.media-main { min-width: 0; }
.media-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-sm); line-height: 1.4; }
.media-title { min-width: 0; font-weight: 500; overflow-wrap: break-word; }
.media-creator { font-size: var(--text-xs); color: var(--color-muted); }
.media-notes { max-width: 80ch; }
.media-row--done .media-title { color: var(--color-ink-2); }
.media-status { font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.media-row--doing .media-status { color: var(--color-accent-2); }
.media-row--done .media-status { color: var(--color-accent-hi); }
.media-act { display: flex; justify-content: flex-end; }
.media-finished { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 48rem) {
  .week-days { max-width: none; }
  .workout-week-head { padding-inline: var(--space-md); }
  .workout-row { grid-template-columns: minmax(0, 1fr) auto; padding-inline: var(--space-md) var(--space-xs); padding-block: var(--space-xs); }
  .workout-type { grid-column: 1; grid-row: 1; }
  .workout-facts { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs) var(--space-sm); font-size: var(--text-xs); color: var(--color-muted); }
  .workout-date { order: 0; color: inherit; }
  .workout-dist { color: inherit; }
  .workout-facts > :empty, .workout-notes:empty { display: none; }
  .workout-edit { grid-column: 2; grid-row: 1 / span 2; }
  .workout-notes { grid-column: 1 / -1; grid-row: 3; padding-right: var(--space-xs); }
  .media-row { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: var(--space-xs); padding-inline: var(--space-md) var(--space-xs); }
  .media-main { grid-column: 1 / span 2; grid-row: 1; }
  .media-edit { grid-column: 3; grid-row: 1; align-self: start; }
  .media-meta { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); }
  .media-meta > :empty { display: none; }
  .media-act { grid-column: 2 / span 2; grid-row: 2; padding-right: var(--space-2xs); }
}

/* calendar: entries stay inside their day */
.cal-month .calendar-day { min-width: 0; overflow: hidden; }
.cal-month .calendar-day-number { min-height: var(--ctl-h-sm); }

/* home when logged out: no sidebar menu, the sections and how the data is kept */
.app:has(.welcome) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.app:has(.welcome) .shell { position: static; flex-flow: row nowrap; align-items: center; height: auto; min-height: var(--shell-h); padding: 0 var(--gutter); border-right: 0; border-bottom: 1px solid var(--color-rule); }
.app:has(.welcome) .shell-menu, .app:has(.welcome) .shell-toggle { display: none !important; }
.app:has(.welcome) .brand { align-self: center; }
.welcome-lead { max-width: 60ch; margin-bottom: var(--space-lg); font-size: var(--text-md); color: var(--color-ink-2); }

/* health: three parts. Measurements on the left over both rows, Medication and Log stacked beside it */
.health-parts { grid-template-rows: auto 1fr; }
.health-part:first-child { grid-row: span 2; }
@media (max-width: 70rem) {
  .health-parts { grid-template-rows: none; }
  .health-part:first-child { grid-row: auto; }
}

/* workouts: schedules */
/* workouts-plans */
/* workouts: the planned session of today, above the log */
#plansEmpty p { max-width: 60ch; margin: var(--space-xs) auto 0; }
.planned-today { display: grid; gap: var(--space-2xs); margin-bottom: var(--space-md); }
.planned-today[hidden] { display: none; }
.planned-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); min-height: var(--ctl-h-sm); margin: 0; font-size: var(--text-sm); line-height: 1.4; color: var(--color-muted); }
.planned-name { margin-right: var(--space-xs); font-weight: 500; color: var(--color-ink); overflow-wrap: anywhere; }
.planned-done { font-size: var(--text-xs); font-weight: 500; color: var(--color-accent-hi); }

/* workouts: the week of the active schedule */
.plan-week { margin-bottom: var(--space-md); }
.plan-week-head { align-items: baseline; justify-content: flex-start; flex-wrap: wrap; row-gap: 0; padding-right: var(--space-lg); }
.plan-week-sub { font-size: var(--text-xs); color: var(--color-muted); }
.plan-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0; padding: 0 var(--space-xs); list-style: none; box-shadow: inset 0 1px 0 var(--color-split); }
.plan-week-day { display: grid; align-content: start; gap: var(--space-3xs); min-width: 0; padding: var(--space-xs) var(--space-sm) var(--space-sm); }
.plan-week-day + .plan-week-day { box-shadow: inset 1px 0 0 var(--color-split); }
.plan-week-date { display: flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); white-space: nowrap; }
.plan-week-day.is-today .plan-week-date { font-weight: 500; color: var(--color-ink); }
.plan-week-day.is-today .plan-week-date::before, .plan-state::before { content: ""; flex-shrink: 0; width: calc(var(--space-2xs) + var(--space-3xs)); height: calc(var(--space-2xs) + var(--space-3xs)); border-radius: 50%; background: var(--color-accent); }
.plan-week-plans { display: grid; justify-items: start; gap: var(--space-3xs); min-width: 0; min-height: var(--space-lg); }
.plan-week-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; line-height: 1.4; text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: color var(--dur-micro) var(--ease-out); }
.plan-week-open:hover { color: var(--color-accent-hi); }

/* workouts: schedules and the editor of the open one */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.plan-rows { margin: 0; padding: 0; list-style: none; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); padding-right: var(--space-sm); box-shadow: inset 0 1px 0 var(--color-split); transition: background-color var(--dur-micro) var(--ease-out); }
.plan-row:hover { background-color: var(--color-lift); }
.plan-row.is-selected { background-color: var(--color-lift-2); }
.plan-open { display: grid; width: 100%; min-width: 0; padding: var(--space-xs) 0 var(--space-xs) var(--space-lg); border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.plan-open:focus-visible { outline-offset: -2px; }
.plan-name { font-size: var(--text-sm); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.plan-meta { font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.plan-row.is-selected .plan-meta { color: var(--color-ink-2); }
.plan-state { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: var(--ctl-h-sm); padding-inline: var(--space-sm); font-size: var(--text-xs); font-weight: 500; color: var(--color-accent-hi); white-space: nowrap; }

.plan-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); min-width: 0; }
.plan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-xs) var(--space-lg); padding: var(--space-2xs) var(--space-sm) 0 var(--space-lg); }
.plan-title { display: grid; flex: 1 1 16rem; gap: var(--space-2xs); min-width: 0; padding-block: var(--space-2xs); }
.plan-notes { max-width: 65ch; margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-tools, .plan-day-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.plan-none { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.plan-none--day { padding: var(--space-2xs) var(--space-lg) var(--space-sm); }

.plan-day.is-picked { box-shadow: inset 0 0 0 1px var(--color-accent); }
.plan-day-head { flex-wrap: wrap; row-gap: var(--space-2xs); }
.plan-day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-sm); min-width: 0; }
.plan-day-title h3 { letter-spacing: 0; overflow-wrap: anywhere; }
.plan-day-meta { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.plan-day-tools { gap: var(--space-2xs); margin-left: auto; }
.plan-day-tools .btn { margin-right: var(--space-2xs); }
/* positioned, so the hidden label of the actions column scrolls with the table instead of widening the page */
.plan-table { position: relative; overflow-x: auto; scrollbar-color: var(--color-rule) transparent; }
/* fixed columns, so the figures line up from one day to the next */
.plan-table .table { table-layout: fixed; min-width: 44rem; }
.plan-table .table > :not(caption) > * > * { padding: var(--space-2xs) var(--space-sm); vertical-align: middle; overflow-wrap: anywhere; }
.plan-table .table > thead > tr > th { padding-block: var(--space-xs); }
.plan-table .table > :not(caption) > * > :first-child { padding-left: var(--space-lg); }
.plan-table .plan-ex-name { font-weight: 500; }
.plan-table th.plan-ex-name { width: 26%; font-weight: 500; }
.plan-table .plan-ex-sets { width: 3.25rem; text-align: right; }
.plan-table th.plan-ex-reps { width: 6rem; }
.plan-table th.plan-ex-load { width: 7rem; }
.plan-table .plan-ex-notes { color: var(--color-ink-2); }
.plan-table th.plan-ex-notes { color: var(--color-muted); }
.plan-table .table > :not(caption) > * > .plan-ex-acts { width: 7.25rem; padding-left: var(--space-xs); white-space: nowrap; }
.plan-ex-btns { display: inline-flex; }
.plan-day-foot { padding: var(--space-xs) var(--space-md) var(--space-sm); box-shadow: inset 0 1px 0 var(--color-split); }

@media (min-width: 80rem) {
  .plan-layout { grid-template-columns: 17rem minmax(0, 1fr); }
}
@media (max-width: 48rem) {
  .plan-week-head { padding-right: var(--space-md); }
  .plan-week-days { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .plan-week-day { grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: var(--space-sm); min-height: var(--ctl-h); padding: var(--space-2xs) var(--space-md); }
  .plan-week-day + .plan-week-day { box-shadow: inset 0 1px 0 var(--color-split); }
  .plan-week-plans { min-height: 0; }
  .plan-open, .plan-head { padding-left: var(--space-md); }
  .plan-none--day { padding-inline: var(--space-md); }
  .plan-day-foot { padding-inline: var(--space-sm); }
  .plan-table .table > :not(caption) > * > :first-child { padding-left: var(--space-md); }
}
