/* dash.css — the shell and every widget of a dashboard, read only from tokens (base-tokens.css, then the page's
   tokens.css). A page places and dresses in its own <style>; nothing here names a colour. */
*, *::before, *::after { box-sizing: border-box; }
/* a part the page hides is hidden, whatever display its own rule gives it (a table's bar of what is selected, with nothing selected) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-weight: var(--body-weight); font-size: var(--text-size); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
/* A click or the guided tour never shows a focus ring; a key the visitor presses does (dash.js sets data-kbd, as vulk.dev #477).
   A field shows its focus by its caret and a darker edge, never a ring. */
:root[data-kbd] :where(a, button, select, [tabindex]):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
/* the browser's own ring too: the tour moves focus by script, and Chrome draws its default ring for that (a Tideline card, 2/11) */
:root:not([data-kbd]) :focus { outline: none; }
.di { width: var(--icon-size); height: var(--icon-size); flex: none; stroke-width: var(--icon-stroke); }
.d-skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--pop-shadow); }
.d-skip:focus { top: 12px; }
.d-num, .dk-value, .dw-fig-v, .dt-num, .dl-v, .dst dd, .dp-v, .dph-facts dd, .dpf-stats dd, .dc-center-v { font-variant-numeric: tabular-nums; }

/* ——— shell ——— */
.d-root { min-height: 100dvh; background: var(--bg); }
.d-app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100dvh; }
[data-side="right"] .d-app { grid-template-columns: minmax(0, 1fr) var(--nav-w); }
[data-side="right"] .d-nav { order: 2; border-right: 0; border-left: 1px solid var(--nav-line); }
[data-nav="rail"] .d-app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
[data-nav="top"] .d-app, [data-nav="tabs"] .d-app, [data-nav="dock"] .d-app { grid-template-columns: minmax(0, 1fr); }

.d-nav { position: sticky; top: 0; height: 100dvh; overflow: auto; display: flex; flex-direction: column; gap: 18px; padding: var(--nav-pad); background: var(--nav-bg); color: var(--nav-ink); border-right: 1px solid var(--nav-line); scrollbar-width: none; }
[data-nav="float"] .d-nav { top: 14px; height: calc(100dvh - 28px); margin: 14px 0 14px 14px; border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); }
[data-nav="float"][data-side="right"] .d-nav { margin: 14px 14px 14px 0; }
[data-nav="float"] .d-app { grid-template-columns: calc(var(--nav-w) + 14px) minmax(0, 1fr); }
.d-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 18px; letter-spacing: var(--display-tracking); color: var(--brand-ink, var(--nav-ink)); }
.d-mark { display: inline-grid; place-items: center; width: var(--mark-size, 32px); height: var(--mark-size, 32px); flex: none; }
.d-mark svg { width: 100%; height: 100%; }
.d-nav-links { display: grid; gap: 14px; }
.d-nav-group ul { display: grid; gap: 2px; }
.d-nav-label { margin: 0 0 6px 12px; font-size: var(--small-size); color: var(--nav-muted); font-weight: var(--label-weight); }
.d-nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--nav-item-h); padding: 0 12px; border-radius: var(--nav-radius); color: var(--nav-muted); font-weight: var(--label-weight); text-align: left; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.d-nav-item:hover { background: color-mix(in oklab, var(--nav-active-bg) 55%, transparent); color: var(--nav-ink); }
.d-nav-item[aria-current="page"] { background: var(--nav-active-bg); color: var(--nav-active-ink); }
.d-nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-badge { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--badge-bg, var(--accent)); color: var(--badge-ink, var(--on-accent)); font-size: 11px; font-weight: 600; }
.d-nav-foot-wrap { display: grid; gap: 2px; margin-top: auto; }
.d-promo { position: relative; display: grid; gap: 6px; margin-top: auto; padding: 16px; border-radius: var(--radius); background: var(--promo-bg, var(--accent-soft)); color: var(--promo-ink, var(--ink)); overflow: hidden; }
.d-promo-img { width: 100%; height: 92px; object-fit: cover; border-radius: calc(var(--radius) - 6px); margin-bottom: 6px; }
.d-promo-t { font-weight: 600; font-family: var(--font-display); }
.d-promo-s { font-size: var(--small-size); color: var(--promo-muted, var(--muted)); }
.d-promo-cta { margin-top: 6px; justify-self: start; }
.d-nav-foot-wrap + .d-me, .d-promo + .d-me { margin-top: 0; }
.d-promo + .d-nav-foot-wrap { margin-top: 10px; }
.d-me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px; border-radius: var(--nav-radius); background: var(--me-bg, transparent); }
.d-nav-foot-wrap ~ .d-me { margin-top: 0; }
.d-me-t { display: grid; min-width: 0; line-height: 1.25; }
.d-me-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-me-t small { color: var(--muted); font-size: var(--small-size); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.di-pair { display: inline-grid; flex: none; } .di-pair > .di { grid-area: 1 / 1; }
.di-pair .is-on { opacity: 0; } [aria-current="page"] .di-pair .is-on { opacity: 1; } [aria-current="page"] .di-pair .is-rest { opacity: 0; }

/* rail: icons only, names as tips */
[data-nav="rail"] .d-nav { align-items: center; padding: var(--nav-pad) 12px; }
/* only the side nav folds to icons: the phone menu (.d-drawer) is outside .d-nav and keeps its names */
[data-nav="rail"] .d-nav :is(.d-brand-name, .d-nav-text, .d-nav-label, .d-promo) { display: none; }
[data-nav="rail"] .d-nav .d-nav-item { justify-content: center; width: 48px; padding: 0; }
/* the dock pins it to the icon's corner too, or it sits in the row like one more item (Pressmark on a phone, 2/11) */
:is([data-nav="rail"], [data-nav="dock"]) .d-nav .d-badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
[data-nav="rail"] .d-nav .d-me { padding: 4px; }
[data-nav="rail"] .d-nav .d-me-t { display: none; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; translate: 0 -50%; padding: 6px 10px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 120ms; z-index: 20; }
[data-tip]:hover::after, :root[data-kbd] [data-tip]:focus-visible::after { opacity: 1; }
[data-side="right"] [data-tip]::after { left: auto; right: calc(100% + 12px); }
/* in the header a tip opens under its button and toward the page, so even unseen it never widens a phone page */
.d-root .d-top [data-tip]::after { left: auto; right: 0; top: calc(100% + 8px); bottom: auto; translate: none; }

/* dock: the nav floats at the bottom of the page */
[data-nav="dock"] .d-nav { position: fixed; z-index: 30; left: 50%; bottom: 18px; top: auto; translate: -50% 0; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px; border: var(--card-border); border-radius: 999px; box-shadow: var(--pop-shadow); overflow: visible; }
[data-nav="dock"] .d-nav :is(.d-brand, .d-nav-label, .d-nav-text, .d-promo, .d-me, .d-nav-foot-wrap) { display: none; }
[data-nav="dock"] .d-nav :is(.d-nav-links, .d-nav-group ul) { display: flex; gap: 4px; }
[data-nav="dock"] .d-nav .d-nav-item { width: 46px; height: 46px; min-height: 0; padding: 0; justify-content: center; border-radius: 999px; }
[data-nav="dock"] [data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 10px); translate: -50% 0; }
[data-nav="dock"] .d-body { padding-bottom: 104px; }
[data-nav="dock"] .d-top .d-brand { margin-right: auto; }
[data-nav="dock"] .d-actions { margin-left: auto; }
@media (max-width: 560px) { [data-nav="dock"] .d-top .d-brand-name { display: none; } }

/* body and top bar */
.d-body { min-width: 0; display: flex; flex-direction: column; padding: 0 var(--page-pad) var(--page-pad); max-width: var(--page-max); width: 100%; margin-inline: auto; }
.d-top { position: relative; z-index: 10; display: flex; align-items: center; gap: 14px; min-height: var(--top-h); padding: 12px 0; }
.d-ib.d-menu { display: none; }
.d-heading { flex: 1; min-width: 0; }
.d-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--title-size); line-height: 1.12; letter-spacing: var(--display-tracking); }
.d-sub { margin-top: 4px; color: var(--muted); }
.d-top-links { display: flex; align-items: center; }
.d-top-links .d-nav-group ul { display: flex; gap: 4px; }
.d-top-links .d-nav-label { display: none; }
.d-top-links .d-nav-item { width: auto; min-height: 38px; padding: 0 14px; border-radius: 999px; }
.d-top-links .d-nav-item .di { display: var(--top-link-icons, none); }
[data-nav="top"] .d-top .d-brand, [data-nav="tabs"] .d-top .d-brand { margin-right: 10px; }
[data-nav="top"] .d-heading, [data-nav="tabs"] .d-heading { display: none; }
[data-nav="top"] .d-body::after, [data-nav="tabs"] .d-body::after { content: none; }
.d-actions { display: flex; align-items: center; gap: 8px; }
.d-top-me { display: inline-flex; align-items: center; gap: 10px; }
.d-search { position: relative; display: flex; align-items: center; gap: 8px; width: clamp(200px, 24vw, 320px); height: var(--control-h); padding: 0 12px; border-radius: var(--search-radius, var(--radius-sm)); background: var(--search-bg, var(--surface)); border: var(--search-border, 1px solid var(--line)); color: var(--muted); }
.d-search.is-wide { flex: 1; width: auto; max-width: 520px; }
.d-search:focus-within { border-color: color-mix(in oklab, var(--ink) 34%, var(--line)); }
.d-search-in { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--ink); }
.d-search-in::placeholder { color: var(--faint); }
.d-search-in::-webkit-search-cancel-button { display: none; }
.d-kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); font: 600 11px/1 var(--font-body); color: var(--faint); }
.d-search-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; padding: 6px; border-radius: var(--radius-sm); background: var(--raised); box-shadow: var(--pop-shadow); border: 1px solid var(--line); }
.d-opt { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.d-opt small { color: var(--muted); }
.d-opt[aria-selected="true"] { background: var(--sunken); }
.d-opt.is-empty { color: var(--muted); cursor: default; }

/* controls */
.d-ib { position: relative; display: inline-grid; place-items: center; width: var(--control-h); height: var(--control-h); border-radius: var(--ib-radius, 999px); background: var(--ib-bg, var(--surface)); border: var(--ib-border, 1px solid var(--line)); color: var(--ib-ink, var(--ink)); transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.d-ib:hover { background: var(--ib-hover, var(--sunken)); }
.d-ib--sm { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); }
.d-ib--sm .di { width: 18px; height: 18px; }
.d-ib--accent { background: var(--accent); color: var(--on-accent); border: 0; }
.d-ib:disabled { opacity: 0.4; cursor: default; }
.d-theme .is-sun { display: none; }
[data-scheme="dark"] .d-theme .is-sun { display: block; }
[data-scheme="dark"] .d-theme .is-moon { display: none; }
.d-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--neg); box-shadow: 0 0 0 2px var(--ib-bg, var(--surface)); }
.d-dot[data-count="0"] { display: none; }
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h); padding: 0 16px; border-radius: var(--btn-radius, var(--radius-sm)); font-weight: 600; white-space: nowrap; transition: filter var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 120ms var(--ease); }
/* the primary action is never a flat fill (the owner rejected solid buttons, 27/10): the approved treatment of PR #1915 —
   an inset top highlight, a shadow tinted by the accent, a sheen that sweeps across on hover — and every button presses */
.d-btn--accent { position: relative; isolation: isolate; overflow: hidden; background: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.34), 0 1px 2px color-mix(in oklab, var(--accent) 45%, transparent), 0 8px 18px -10px color-mix(in oklab, var(--accent) 80%, transparent); }
.d-btn--accent::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 32%, rgb(255 255 255 / 0.3) 50%, transparent 68%); transform: translateX(-130%); transition: transform 640ms var(--ease); }
.d-btn--accent:hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.42), 0 2px 5px color-mix(in oklab, var(--accent) 50%, transparent), 0 14px 26px -12px color-mix(in oklab, var(--accent) 90%, transparent); }
.d-btn--accent:hover::after { transform: translateX(130%); }
.d-btn:active, .d-ib:active, .d-seg-b:active, .d-chip:active { transform: scale(0.97); }
.d-btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.d-btn--ghost:hover { background: var(--sunken); }
.d-btn .di { width: 18px; height: 18px; }
.d-link { color: var(--link, var(--accent)); font-weight: 600; font-size: var(--small-size); }
.d-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.d-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--seg-radius, 999px); background: var(--seg-bg, var(--sunken)); border: var(--seg-border, 0); }
.d-seg-b { min-height: calc(var(--control-h) - 8px); padding: 0 12px; border-radius: var(--seg-radius, 999px); color: var(--muted); font-weight: 500; font-size: var(--small-size); white-space: nowrap; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.d-seg-b:hover { color: var(--ink); }
.d-seg-b[aria-pressed="true"] { background: var(--seg-on-bg, var(--surface)); color: var(--seg-on-ink, var(--ink)); box-shadow: var(--seg-on-shadow, 0 1px 2px rgb(0 0 0 / 0.08)); }
.d-seg--sm .d-seg-b { min-height: 26px; padding: 0 10px; }
.d-switch { position: relative; width: 42px; height: 24px; flex: none; border-radius: 99px; background: var(--switch-off, var(--line)); transition: background var(--dur) var(--ease); }
.d-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: translate var(--dur) var(--ease); }
.d-switch[aria-checked="true"] { background: var(--accent); }
.d-switch[aria-checked="true"] i { translate: 18px 0; }

/* people */
.d-av { flex: none; border-radius: 50%; object-fit: cover; background: var(--sunken); }
.d-av--xs { width: 26px; height: 26px; }
.d-av--sm { width: 36px; height: 36px; }
.d-av--md { width: 40px; height: 40px; }
.d-av--lg { width: 72px; height: 72px; }
.d-av--ini { display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.d-stack { display: inline-flex; }
.d-stack .d-av { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.d-stack .d-av:first-child { margin-left: 0; }

/* the heading in the page, with its own actions, instead of in the bar */
.d-pagehead { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: var(--pagehead-m, 4px 0 22px); }
.d-pagehead .d-heading { flex: 1 1 320px; }
.d-page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ——— the screen grid ——— */
.d-main { flex: 1; min-width: 0; outline: none; }
.d-screen { display: grid; grid-template-columns: var(--cols); grid-template-rows: var(--rows, auto); grid-template-areas: var(--areas, none); gap: var(--gap); align-content: start; }
.d-screen[hidden] { display: none; }
.d-intro { grid-column: 1 / -1; }
.dw { position: relative; min-width: 0; container-type: inline-size; display: flex; flex-direction: column; gap: 14px; padding: var(--pad); border-radius: var(--radius); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); }
.dw:is(:hover, :focus-within) { z-index: 3; } /* a card is a size container, so a stacking context: the one in use rises over its neighbours */
.dw-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dw-ht { min-width: 0; }
.dw-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: var(--h2-size); font-weight: var(--h2-weight, 600); letter-spacing: var(--h2-tracking, -0.01em); }
.dw-title .di { width: 18px; height: 18px; color: var(--muted); }
.dw-sub { margin-top: 2px; color: var(--muted); font-size: var(--small-size); }
.dw-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: -4px; }
.dw-fig-v { font-family: var(--font-num); font-weight: var(--num-weight); font-size: var(--fig-size, var(--kpi-size)); letter-spacing: var(--num-tracking); line-height: 1.1; }
.dw-fig-s { color: var(--muted); font-size: var(--small-size); }
.d-delta { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 5px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.d-delta .di { width: 14px; height: 14px; }
.d-delta.is-pos { color: var(--pos); background: color-mix(in oklab, var(--pos) 12%, transparent); }
.d-delta.is-neg { color: var(--neg); background: color-mix(in oklab, var(--neg) 12%, transparent); }
.d-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); background: var(--sunken); }
.d-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.d-status[data-tone="pos"] { color: var(--pos); background: color-mix(in oklab, var(--pos) 13%, transparent); }
.d-status[data-tone="neg"] { color: var(--neg); background: color-mix(in oklab, var(--neg) 13%, transparent); }
.d-status[data-tone="warn"] { color: var(--warn); background: color-mix(in oklab, var(--warn) 15%, transparent); }
.d-status[data-tone="info"] { color: var(--info); background: color-mix(in oklab, var(--info) 13%, transparent); }
.d-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--sunken); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.d-bar { position: relative; display: block; height: var(--bar-h, 8px); border-radius: 99px; background: var(--track, var(--sunken)); overflow: hidden; }
.d-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--c, var(--accent)); transition: width 600ms var(--ease); }
.d-empty { display: grid; justify-items: center; gap: 10px; padding: 28px 12px; color: var(--muted); text-align: center; }
.d-empty .di { width: 28px; height: 28px; opacity: 0.6; }

/* kpi */
.dw--kpi { gap: 10px; }
.dk-top { display: flex; align-items: center; gap: 10px; }
.dk-i { display: inline-grid; place-items: center; width: var(--kpi-icon, 38px); height: var(--kpi-icon, 38px); border-radius: var(--kpi-icon-radius, 12px); background: var(--kpi-icon-bg, var(--accent-soft)); color: var(--kpi-icon-ink, var(--accent)); }
.dk-label { flex: 1; color: var(--kpi-label-ink, var(--muted)); font-weight: var(--label-weight); }
.dk-mid { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; }
.dk-value { font-family: var(--font-num); font-weight: var(--num-weight); font-size: var(--kpi-size); letter-spacing: var(--num-tracking); line-height: 1.08; }
.dk-spark { height: var(--spark-h, 42px); }
.dk-foot { color: var(--muted); font-size: var(--small-size); }

/* charts */
.dc-wrap { position: relative; flex: 1; min-height: var(--chart-h); }
.dc-host, .dc-host.dc { position: absolute; inset: 0; } /* the host fills its wrap, so the chart takes the height the card gives it */
.dc { position: relative; outline: none; }
:root[data-kbd] .dc:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 8px; }
.dc-svg { display: block; overflow: visible; }
.dc-grid { stroke: var(--grid-line); stroke-width: 1; stroke-dasharray: var(--grid-dash); shape-rendering: crispEdges; }
.dc-zero { stroke: var(--axis-line, var(--grid-line)); stroke-width: 1; shape-rendering: crispEdges; }
.dc-ylab, .dc-xlab { fill: var(--axis-ink); font-size: 11.5px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.dc-val { fill: var(--ink); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-line { stroke-linecap: round; stroke-linejoin: round; }
/* ridges: each row rises from its floor in turn, back to front */
.dc-ridge-base { stroke: var(--line); stroke-width: 1; }
.dc-enter .dc-ridge { opacity: 0; transform: translateY(10px); }
.dc-entered .dc-ridge { opacity: 1; transform: none; transition: opacity 600ms var(--ease) calc(var(--i) * 90ms), transform 700ms var(--ease) calc(var(--i) * 90ms); }
.dc-line.is-dashed { stroke-dasharray: 0.012 0.01; }
.dc-line.is-faint { stroke-opacity: 0.55; stroke-width: 1.5; }
.dc-dot { fill: var(--surface); stroke-width: 2; }
.dc-end { stroke: var(--surface); stroke-width: 2.5; }
.dc-today { stroke: var(--axis-ink); stroke-dasharray: 3 4; }
.dc-pin { pointer-events: none; }
.dc-pin-rule { stroke: var(--pin-rule, var(--axis-ink)); stroke-width: 1; }
.dc-pin-dot { fill: var(--pin-dot, var(--surface)); stroke: var(--pin-ring, var(--accent)); stroke-width: 3; }
.dc-pin-chip rect { fill: var(--pin-bg, var(--tip-bg)); }
.dc-pin-chip text { fill: var(--pin-ink, var(--tip-ink)); font: 600 12.5px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.dc-pin--bar rect, .dc-pin-tail { fill: var(--pin-bg, var(--tip-bg)); }
.dc-pin--bar text { fill: var(--pin-ink, var(--tip-ink)); font: 600 12.5px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.dc.is-pickable .dc-svg { cursor: pointer; }
.dc-bar.is-hatch { pointer-events: none; }
.dc-enter .dc-pin { opacity: 0; }
.dc-entered .dc-pin { opacity: 1; transition: opacity 500ms var(--ease) 600ms; }
.dc-cross { stroke: var(--cross, var(--axis-ink)); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.dc-mark { fill: var(--surface); stroke-width: 2.5; pointer-events: none; }
.dc-track { fill: var(--track, var(--sunken)); }
.dc-track-arc { stroke: var(--track, var(--sunken)); }
.dc-bar-g { transition: opacity 160ms; }
.dc-series:has(.dc-bar-g.is-on) .dc-bar-g:not(.is-on) { opacity: var(--dim, 0.5); }
.dc-arc { transition: opacity 160ms, stroke-width 160ms; }
.dc-series:has(.dc-arc.is-on) .dc-arc:not(.is-on) { opacity: 0.45; }
.dc-center-v { fill: var(--ink); font-family: var(--font-num); font-weight: var(--num-weight); font-size: var(--center-size, 24px); letter-spacing: var(--num-tracking); }
.dc-center-l { fill: var(--muted); font-size: 12px; }
.dc-gtick { stroke: var(--faint); stroke-width: 1.25; }
.dc-cell { transition: opacity 120ms; }
.dc-series:has(.dc-cell.is-on) .dc-cell:not(.is-on) { opacity: 0.6; }
.dc-bubble { fill-opacity: 0.75; stroke: var(--surface); stroke-width: 1.5; }
.dc-bubble.is-on { fill-opacity: 1; }
.dc-funnel.is-on { filter: brightness(1.06); }
.dc-candle line { stroke-width: 1.25; }
.dc-candle.is-up { color: var(--pos); } .dc-candle.is-down { color: var(--neg); }
.dc-candle line { stroke: currentColor; } .dc-candle rect { fill: currentColor; }
.dc-tip { position: absolute; left: 0; top: 0; z-index: 15; display: grid; gap: 4px; min-width: 140px; padding: 10px 12px; border-radius: 10px; background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; line-height: 1.3; pointer-events: none; box-shadow: var(--pop-shadow); }
.dc-tip[hidden] { display: none; }
.dc-tip-h { font-weight: 600; margin-bottom: 2px; }
.dc-tip-r { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; }
.dc-tip-r i { width: 8px; height: 8px; border-radius: 2px; }
.dc-tip-r em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dc-legend:empty { display: none; }
.dc-key { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--small-size); }
.dc-key i { width: 10px; height: 10px; border-radius: var(--key-radius, 3px); flex: none; }
.dc-key em { font-style: normal; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
button.dc-key[aria-pressed="false"] { opacity: 0.45; }
button.dc-key[aria-pressed="false"] span { text-decoration: line-through; }

/* first draw: lines draw in, bars rise, arcs sweep */
.dc-enter .dc-line:not(.is-dashed) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.dc-enter .dc-area, .dc-enter .dc-line.is-dashed, .dc-enter .dc-end, .dc-enter .dc-dot, .dc-enter .dc-cell, .dc-enter .dc-bubble, .dc-enter .dc-funnel, .dc-enter .dc-candle { opacity: 0; }
.dc-enter .dc-bar-g, .dc-enter .dc-bar { transform: scaleY(0.001); transform-origin: 50% 100%; transform-box: fill-box; }
.dc-enter .dc-hbar { transform: scaleX(0.001); transform-origin: 0 50%; }
.dc-enter .dc-arc { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.dc-entered .dc-line:not(.is-dashed) { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms var(--ease) calc(var(--i, 0) * 120ms); }
.dc-entered .dc-area, .dc-entered .dc-line.is-dashed, .dc-entered .dc-end, .dc-entered .dc-dot, .dc-entered .dc-cell, .dc-entered .dc-bubble, .dc-entered .dc-funnel, .dc-entered .dc-candle { opacity: 1; transition: opacity 700ms var(--ease) 200ms; }
.dc-entered .dc-bar-g, .dc-entered .dc-bar { transform: none; transition: transform 700ms var(--ease) calc(var(--i, 0) * 22ms), opacity 160ms; }
.dc-entered .dc-hbar { transform: none; transition: transform 700ms var(--ease) calc(var(--i, 0) * 40ms); }
.dc-entered .dc-arc { stroke-dashoffset: 0; transition: stroke-dashoffset 1000ms var(--ease) calc(var(--i, 0) * 90ms), opacity 160ms; }

/* tables */
.dt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dt-search { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); background: var(--field-bg, transparent); }
.dt-search:focus-within { border-color: color-mix(in oklab, var(--ink) 34%, var(--line)); }
.dt-search .di { width: 16px; height: 16px; }
.dt-search input { width: 150px; border: 0; background: none; outline: none; color: var(--ink); font-size: var(--small-size); }
.dt-pick { display: none; position: relative; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); background: var(--field-bg, transparent); }
.dt-pick.is-only { display: inline-flex; }
.dt-pick:focus-within { border-color: color-mix(in oklab, var(--ink) 34%, var(--line)); }
.dt-pick .di { width: 16px; height: 16px; flex: none; }
.dt-pick-sel { appearance: none; border: 0; background: none; outline: none; color: var(--ink); font: inherit; font-size: var(--small-size); padding-right: 2px; cursor: pointer; }
/* a narrow card: the tools take the whole line, the search grows, the filter folds into its menu */
@container (max-width: 600px) {
  .dw-h:has(.dt-tools) > .dt-tools { flex: 1 1 100%; }
  .dt-tools .dt-search { flex: 1 1 140px; min-width: 0; }
  .dt-tools .dt-search input { width: 100%; min-width: 0; }
  .dt-tools .dt-filter { display: none; }
  .dt-tools .dt-pick { display: inline-flex; }
}
@container (max-width: 380px) { .dt-tools .dt-export span { display: none; } }
.dt-scroll { position: relative; overflow-x: auto; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
.dt { width: 100%; border-collapse: collapse; font-size: var(--table-size, 13.5px); }
.dt th { padding: 0 12px 10px; text-align: left; color: var(--muted); font-weight: var(--label-weight); font-size: var(--small-size); white-space: nowrap; border-bottom: 1px solid var(--line); }
.dt th.is-end, .dt td.is-end { text-align: right; }
.dt th:first-child, .dt td:first-child { padding-left: 0; }
.dt th:last-child, .dt td:last-child { padding-right: 0; }
.dt td { padding: var(--row-pad, 12px) 12px; border-bottom: 1px solid var(--row-line, var(--line)); white-space: nowrap; vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr { transition: background 120ms; }
.dt tbody tr:not(.dt-empty):hover { background: var(--row-hover, color-mix(in oklab, var(--sunken) 60%, transparent)); }
.dt tr.is-sel { background: var(--accent-soft); }
.dt-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: inherit; }
.dt-sort .di { width: 14px; height: 14px; opacity: 0.45; }
th[aria-sort="ascending"] .dt-sort, th[aria-sort="descending"] .dt-sort { color: var(--ink); }
th[aria-sort="ascending"] .dt-sort .di, th[aria-sort="descending"] .dt-sort .di { opacity: 1; color: var(--accent); }
.dt-sel { width: 28px; }
/* a row's own menu, last in the row; the selection's actions, in the bar over the table */
.dt-rowact { width: 44px; text-align: end; }
.dt-bulk .d-btn { height: 30px; padding: 0 12px; font-size: var(--small-size); background: var(--surface); }
.dt-bulk .d-btn .di { width: 15px; height: 15px; }
.dt-bulk .dt-bulk-clear { margin-left: auto; }
.d-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dt input[type="checkbox"], .dl-check { width: 17px; height: 17px; accent-color: var(--accent); }
.dt-person, .dt-thumb { display: inline-flex; align-items: center; gap: 10px; }
.dt-person > span, .dt-thumb > span { display: grid; line-height: 1.25; }
.dt-person b, .dt-thumb b { font-weight: 600; }
.dt-person small, .dt-thumb small, .dt-date small { color: var(--muted); font-size: 12px; }
.dt-date { display: grid; color: var(--muted); }
.dt-thumb img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.dt-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.dt-num { font-weight: 600; }
.dt-prog { display: inline-grid; grid-template-columns: 90px auto; align-items: center; gap: 8px; }
.dt-prog em { font-style: normal; color: var(--muted); font-size: 12px; }
.dt-tags { display: inline-flex; gap: 4px; }
.dt-stars { color: var(--warn); letter-spacing: 1px; } .dt-stars span { color: var(--line); }
.dt-foot { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: var(--small-size); }
.dt-pages { display: flex; gap: 2px; }
.dt-bulk { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: var(--small-size); font-weight: 600; }

/* lists */
.dl { display: grid; gap: var(--list-gap, 2px); }
.dl-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: var(--list-line, 1px solid var(--line)); }
.dl-row:last-child { border-bottom: 0; }
/* a narrow list puts the status under the name instead of squeezing the name to a few letters */
@container (max-width: 340px) {
  .dl-row:has(> .d-status) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 5px; }
  .dl-row:has(> .d-status) > :not(.dl-t, .d-status) { grid-column: 1; grid-row: 1 / span 2; }
  .dl-row:has(> .d-status) > :is(.dl-t, .d-status) { grid-column: 2; }
  .dl-row:has(> .d-status) > .d-status { justify-self: start; }
}
.dl-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.dl-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-t small { color: var(--muted); font-size: var(--small-size); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 380px) { .dl-t :is(b, small) { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; } } /* a narrow list wraps a long name or line to two lines rather than cutting it */
.dl-v { font-weight: 600; white-space: nowrap; }
.dl-v.is-pos { color: var(--pos); } .dl-v.is-neg { color: var(--ink); }
.dl-i { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--list-icon-radius, 12px); background: var(--sunken); color: var(--ink); }
.dl-i[data-tone="pos"] { background: color-mix(in oklab, var(--pos) 14%, transparent); color: var(--pos); }
.dl-i[data-tone="neg"] { background: color-mix(in oklab, var(--neg) 14%, transparent); color: var(--neg); }
.dl-i[data-tone="accent"] { background: var(--accent-soft); color: var(--accent); }
.dl-img { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; }
.dl-bar { width: 90px; flex: none; }
.dl-count { color: var(--muted); font-size: var(--small-size); }
.dl--check .dl-row.is-done .dl-t b { text-decoration: line-through; color: var(--muted); }

/* progress */
.dp { display: grid; gap: 16px; }
.dp-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.dp-t { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dp-t b { font-weight: 500; }
.dp-t .di { width: 18px; height: 18px; color: var(--muted); }
.dp-v { font-weight: 600; }
.dp-v small { color: var(--muted); font-weight: 400; }
.dp-bar { grid-column: 1 / -1; }

/* calendar */
.dcal-nav { display: flex; align-items: center; gap: 6px; }
.dcal-m { min-width: 120px; text-align: center; font-weight: 600; font-size: var(--small-size); }
.dcal { display: grid; gap: 6px; }
.dcal-w, .dcal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dcal-w span { text-align: center; color: var(--faint); font-size: 11.5px; }
.dcal-d { position: relative; display: grid; place-items: center; aspect-ratio: var(--day-ratio, 1); min-height: 32px; border-radius: var(--day-radius, 10px); font-size: 13px; font-variant-numeric: tabular-nums; }
.dcal-d:hover { background: var(--sunken); }
.dcal-d.is-today { color: var(--accent); font-weight: 700; }
.dcal-d[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.dcal-d i { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.dcal-d i b { width: 4px; height: 4px; border-radius: 50%; }
.dcal-d[aria-pressed="true"] i b { background: var(--on-accent) !important; }
.dcal-list { display: grid; gap: 8px; }
.dcal-list li { display: grid; padding: 8px 12px; border-left: 3px solid var(--c, var(--accent)); border-radius: 4px; background: color-mix(in oklab, var(--c, var(--accent)) 8%, transparent); }
.dcal-list li.is-empty { border-left-color: var(--line); background: none; color: var(--muted); }
.dcal-list small { color: var(--muted); }

/* schedule */
.dsch { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: repeat(var(--rows), var(--hour-h, 50px)) 0; }
.dsch-h { grid-column: 1; grid-row: calc(var(--r) + 1); translate: 0 -0.6em; color: var(--faint); font-size: 11.5px; }
.dsch-h::after { content: ''; position: absolute; left: 52px; right: 0; margin-top: 0.6em; border-top: 1px dashed var(--line); }
.dsch-b { grid-column: 2; grid-row: calc(var(--a) + 1) / calc(var(--z) + 1); z-index: 1; margin: 3px calc(50% * (1 - var(--lane))) 3px calc(50% * var(--lane)); width: auto; display: grid; align-content: start; gap: 1px; padding: 6px 10px; border-radius: 10px; background: color-mix(in oklab, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); overflow: hidden; margin-block: calc(3px + var(--ft, 0) * var(--hour-h, 50px)) calc(3px + var(--fb, 0) * var(--hour-h, 50px)); } /* grid rows are whole hours; the half hours are margins */
.dsch-b b { font-size: 13px; } .dsch-b small { color: var(--muted); font-size: 12px; }
.dsch-b.is-solo { margin-inline: 0; } /* a block nothing overlaps takes the whole lane */
.dsch-b.is-short { grid-auto-flow: column; justify-content: start; align-items: center; align-content: center; gap: 8px; padding-block: 1px; } /* under an hour: title and place on one line */
.dsch-b.is-short small, .dsch-b.is-short b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* kanban */
.dkb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(var(--kb-col-min, 220px), 1fr); gap: var(--gap); overflow-x: auto; }
.dkb-col { display: flex; flex-direction: column; gap: 10px; min-height: 120px; padding: 12px; border-radius: var(--radius); background: var(--col-bg, var(--sunken)); transition: outline-color 120ms; outline: 2px dashed transparent; outline-offset: -2px; }
.dkb-col.is-over { outline-color: var(--accent); }
.dkb-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.dkb-h em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 500; }
.dkb-dot { width: 8px; height: 8px; border-radius: 50%; }
.dkb-list { display: grid; gap: 10px; }
.dkb-more { height: 34px; border-radius: calc(var(--radius) - 8px); color: var(--muted); font-size: 12.5px; font-weight: 500; border: 1px dashed var(--line); }
.dkb-more:hover { color: var(--ink); background: var(--surface); }
.dkb-card { display: grid; gap: 8px; padding: 14px; border-radius: calc(var(--radius) - 6px); background: var(--surface); border: 1px solid var(--line); cursor: grab; }
.dkb-card.is-drag { opacity: 0.5; }
.dkb-card small { color: var(--muted); font-size: var(--small-size); }
.dkb-meta { display: flex; align-items: center; gap: 8px; }
.dkb-meta .d-av { margin-left: auto; }
.dkb-due { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.dkb-due .di { width: 14px; height: 14px; }

/* photo */
.dw--photo { padding: 0; overflow: hidden; isolation: isolate; justify-content: flex-end; min-height: 220px; }
.dph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.dph-copy { display: grid; gap: 6px; padding: var(--pad); color: var(--photo-ink, #fff); background: var(--photo-scrim, linear-gradient(to top, rgb(8 10 14 / 0.62), rgb(8 10 14 / 0.18) 62%, transparent)); }
.dph-k { font-size: var(--small-size); opacity: 0.85; }
.dph-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--photo-title, 22px); letter-spacing: var(--display-tracking); line-height: 1.15; }
.dph-s { opacity: 0.86; max-width: 42ch; }
.dph-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; }
.dph-facts dt { font-size: 12px; opacity: 0.8; } .dph-facts dd { font-weight: 600; font-size: 16px; }
.dph-cta { justify-self: start; margin-top: 6px; }

/* profile, chat, stats, note, toggles */
.dpf { display: grid; justify-items: center; gap: 10px; text-align: center; }
.dpf-t { display: grid; } .dpf-t b { font-size: 16px; } .dpf-t small { color: var(--muted); }
.dpf-stats { display: grid; grid-auto-flow: column; gap: 18px; } .dpf-stats dt { color: var(--muted); font-size: 12px; } .dpf-stats dd { font-weight: 600; }
.dch { flex: 1; display: grid; align-content: end; gap: 10px; min-height: 0; overflow: auto; }
.dch-m { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.dch-m p { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--sunken); }
.dch-m small { color: var(--faint); font-size: 11px; white-space: nowrap; }
.dch-m.is-me { margin-left: auto; flex-direction: row-reverse; }
.dch-m.is-me p { background: var(--accent); color: var(--on-accent); border-radius: 14px 14px 4px 14px; }
.dch-form { display: flex; gap: 8px; }
.dch-in { flex: 1; min-width: 0; height: var(--control-h); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--field-bg, transparent); outline: none; color: var(--ink); }
.dch-in:focus { border-color: color-mix(in oklab, var(--ink) 34%, var(--line)); }
.dst { display: grid; grid-template-columns: repeat(var(--stat-cols, 2), minmax(0, 1fr)); gap: 16px; }
.dst-i { display: grid; gap: 4px; }
.dst-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sunken); margin-bottom: 4px; }
.dst dt { color: var(--muted); font-size: var(--small-size); }
.dst dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-family: var(--font-num); font-weight: var(--num-weight); font-size: var(--stat-size, 20px); letter-spacing: var(--num-tracking); }
.dw--note { overflow: hidden; }
.dn-img { width: 100%; height: 120px; object-fit: cover; border-radius: calc(var(--radius) - 8px); }
.dn-copy { display: grid; gap: 8px; justify-items: start; }
.dn-i { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.dn-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 18px; letter-spacing: var(--display-tracking); }
.dn-s { color: var(--muted); }
.dtg { display: grid; gap: 10px; }
.dtg-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--sunken); transition: background var(--dur) var(--ease); }
.dtg-i.is-on { background: var(--toggle-on-bg, var(--accent-soft)); }
.dtg-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); }
.dtg-t { flex: 1; display: grid; line-height: 1.25; } .dtg-t small { color: var(--muted); font-size: 12px; }

/* event and timer */
.dev { display: grid; gap: 8px; align-content: start; flex: 1; }
.dev-k { color: var(--muted); font-size: var(--small-size); }
.dev-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--event-size, 24px); line-height: 1.15; letter-spacing: var(--display-tracking); color: var(--event-ink, var(--accent)); }
.dev-s { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: var(--small-size); }
.dev-s .di { width: 15px; height: 15px; }
.dev-w::before { content: '·'; margin-right: 6px; }
.dev-cta { width: 100%; }
.dw--event.is-live .dev-cta { background: var(--pos); }
.dw--timer { overflow: hidden; isolation: isolate; color: var(--timer-ink, var(--ink)); }
.dtm-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.dtm-v { font-family: var(--font-num); font-weight: var(--num-weight); font-size: min(var(--timer-size, 40px), 21cqi); white-space: nowrap; letter-spacing: var(--num-tracking); line-height: 1; font-variant-numeric: tabular-nums; }
.dtm-task { color: var(--timer-muted, var(--muted)); font-size: var(--small-size); }
.dtm-ctl { display: flex; gap: 10px; margin-top: auto; }
.dtm-b { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--timer-btn, var(--surface)); color: var(--timer-btn-ink, var(--ink)); transition: transform var(--dur) var(--ease); }
.dtm-b:hover { transform: scale(1.06); }
.dtm-stop { background: var(--timer-stop, var(--neg)); color: #fff; }
.dl-action { display: inline-flex; align-items: center; gap: 6px; }
.dl-action .di { width: 15px; height: 15px; }

/* popovers, drawer, tab bar, toast */
.d-pop { position: fixed; z-index: 50; width: min(360px, calc(100vw - 24px)); padding: 8px; border-radius: var(--radius); background: var(--raised); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--pop-shadow); }
.d-pop[hidden] { display: none; }
.d-pop-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
.d-pop-list { display: grid; max-height: 380px; overflow: auto; }
.d-note { display: flex; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; }
.d-note:hover { background: var(--sunken); }
.d-note.is-new { background: var(--accent-soft); }
.d-note.is-new:hover { background: color-mix(in oklab, var(--accent-soft), var(--accent) 8%); }
.d-note-i { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--sunken); }
.d-note-t { display: grid; gap: 2px; line-height: 1.3; font-size: 13px; }
.d-note-t span { color: var(--muted); } .d-note-t small { color: var(--faint); font-size: 11.5px; }
.d-drawer { position: fixed; inset: 0; z-index: 60; display: flex; }
.d-drawer[hidden] { display: none; }
/* the panel lies over the page, so it always carries the page's own paint under the nav's: a nav that is see-through on a
   computer (Keelson's sits on the page) drew its names over the page on a phone (2/11) */
.d-drawer-panel { position: relative; z-index: 1; width: min(300px, 84vw); height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px; background: linear-gradient(var(--nav-bg), var(--nav-bg)), var(--bg); color: var(--nav-ink); box-shadow: var(--pop-shadow); }
.d-drawer-panel nav { display: grid; gap: 14px; }
.d-drawer-scrim { position: absolute; inset: 0; background: rgb(8 10 14 / 0.42); }
.d-tabbar { display: none; }
.d-toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; translate: -50% 20px; padding: 10px 16px; border-radius: 999px; background: var(--tip-bg); color: var(--tip-ink); font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 200ms, translate 200ms var(--ease); }
.d-toast.is-on { opacity: 1; translate: -50% 0; }
[data-nav="dock"] .d-toast { bottom: 96px; }
.d-toast.has-act { display: inline-flex; align-items: center; gap: 14px; padding-right: 8px; }
.d-toast.has-act.is-on { pointer-events: auto; }
.d-toast-b { height: 28px; padding: 0 12px; border-radius: 999px; color: inherit; font-weight: 600; background: color-mix(in oklab, var(--tip-ink) 16%, transparent); }
.d-toast-b:hover { background: color-mix(in oklab, var(--tip-ink) 26%, transparent); }

/* ——— the system: account, dialogs, forms, menus, inbox, sign-out, import, settings and help ——— */
button.d-me { width: 100%; color: inherit; text-align: left; transition: background var(--dur) var(--ease); }
button.d-me:hover { background: color-mix(in oklab, var(--nav-active-bg) 55%, transparent); }
button.d-top-me { padding: 0 10px 0 0; border-radius: 999px; color: inherit; text-align: left; transition: background var(--dur) var(--ease); }
button.d-top-me:hover { background: var(--sunken); }
button.d-top-me:not(:has(.d-me-t)) { padding: 0; }
.d-btn:disabled, .dtm-b:disabled { opacity: 0.42; cursor: default; filter: none; transform: none; }
.d-btn--danger { background: var(--neg); color: #fff; }
.d-btn--danger:hover { filter: brightness(1.06); }
.d-btn--quiet-danger { margin-right: auto; padding-inline: 10px; color: var(--neg); }
.d-btn--quiet-danger:hover { background: color-mix(in oklab, var(--neg) 10%, transparent); }
.d-btn.is-done { color: var(--pos); border-color: currentColor; }
button.d-link { display: inline-flex; align-items: center; gap: 6px; }
button.d-link .di { width: 16px; height: 16px; }

/* rows and blocks that open what they stand for */
.dl-row.is-link { margin-inline: -8px; padding-inline: 8px; border-radius: 12px; cursor: pointer; transition: background 120ms; }
.dl-row.is-link:hover { background: color-mix(in oklab, var(--sunken) 70%, transparent); }
.dt tr.is-link { cursor: pointer; }
.dt tr.is-link:focus-visible { outline-offset: -2px; }
.dsch-b[role="button"] { cursor: pointer; transition: filter 120ms; }
.dsch-b[role="button"]:hover { filter: brightness(0.97); }
.dkb-card:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.dkb-none { padding: 14px 10px; border: 1px dashed var(--line); border-radius: calc(var(--radius) - 8px); color: var(--faint); font-size: var(--small-size); text-align: center; }
@keyframes d-new { from { background-color: color-mix(in oklab, var(--accent) 22%, var(--surface)); } }
.is-new { animation: d-new 1.6s var(--ease); }
.dc-table { margin-top: -4px; }
.dc-table[hidden] { display: none; }

/* dialogs: the native modal; on a phone it rises from the bottom as a sheet */
.d-dlg { width: min(520px, calc(100vw - 32px)); max-width: none; max-height: min(88dvh, 860px); padding: 0; border: 0; border-radius: var(--dlg-radius, var(--radius)); background: var(--raised); color: var(--ink); box-shadow: var(--pop-shadow); overflow: hidden; }
.d-dlg.is-sm { width: min(440px, calc(100vw - 32px)); }
.d-dlg.is-wide { width: min(760px, calc(100vw - 32px)); }
.d-dlg::backdrop { background: rgb(10 14 26 / 0.46); }
.d-dlg[open] { animation: d-dlg-in 220ms var(--ease); }
@keyframes d-dlg-in { from { opacity: 0; translate: 0 10px; } }
.d-dlg-in { display: flex; flex-direction: column; max-height: inherit; }
.d-dlg-h { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 14px 24px; }
.d-dlg-ht { flex: 1; min-width: 0; display: grid; gap: 4px; }
.d-dlg-k { color: var(--accent); font-size: var(--small-size); font-weight: 600; }
.d-dlg-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.2; letter-spacing: var(--display-tracking); overflow-wrap: anywhere; }
.d-dlg-s, .d-dlg-p { color: var(--muted); }
.d-dlg-x { margin: -4px -6px 0 0; }
.d-dlg-b { display: grid; gap: 18px; min-height: 0; overflow: auto; padding: 4px 24px 24px; }
.d-dlg-f { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }

/* forms */
.d-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.d-form > .d-field { grid-column: 1 / -1; }
.d-form > .d-field:has(input[type="date"], select):not(.is-wide) { grid-column: span 1; }
.d-form-f { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.d-form-st { margin-right: auto; color: var(--pos); font-size: var(--small-size); font-weight: 500; }
.d-form-st:empty { display: none; }
.d-field { display: grid; gap: 7px; min-width: 0; }
.d-field-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--small-size); font-weight: 600; color: var(--ink); }
.d-field-o { color: var(--faint); font-weight: 400; }
.d-field-h { color: var(--muted); font-size: 12px; }
.d-field-e { display: flex; gap: 6px; color: var(--neg); font-size: 12px; font-weight: 500; }
.d-field-e[hidden] { display: none; }
.d-in { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--field-bg, var(--surface)); color: var(--ink); outline: none; transition: border-color 120ms, box-shadow 120ms; }
.d-in::placeholder { color: var(--faint); }
.d-in:focus { border-color: color-mix(in oklab, var(--ink) 34%, var(--line)); }
.d-in[type="date"] { color-scheme: light dark; }
.d-ta { height: auto; min-height: 104px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.d-field.is-bad .d-in { border-color: var(--neg); }
.d-sel { position: relative; display: block; }
.d-sel select { appearance: none; padding-right: 36px; cursor: pointer; }
.d-sel .di { position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.d-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.d-icon-opt { position: relative; }
.d-icon-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.d-icon-opt span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); transition: border-color 120ms, color 120ms, background 120ms; }
.d-icon-opt input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
:root[data-kbd] .d-icon-opt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.d-form--card { grid-template-columns: minmax(0, 1fr); }
.d-form--card > .d-field:has(input[type="date"], select) { grid-column: 1 / -1; }

/* menus and floating popovers, anchored to their button */
.d-pop--float { position: fixed; }
.d-menu-pop { width: auto; min-width: 236px; max-width: calc(100vw - 24px); padding: 6px; }
.d-menu-list { display: grid; gap: 1px; }
.d-menu-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 9px; color: var(--ink); text-align: left; font-weight: 500; }
.d-menu-i .di { width: 18px; height: 18px; color: var(--muted); }
.d-menu-i span { flex: 1; }
.d-menu-i small { color: var(--accent); font-size: 12px; font-weight: 600; }
.d-menu-i:hover, .d-menu-i:focus-visible { background: var(--sunken); outline: none; }
.d-menu-i.is-danger, .d-menu-i.is-danger .di { color: var(--neg); }
.d-menu-sep { height: 1px; margin: 5px 4px; border: 0; background: var(--line); }
.d-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.d-menu-head > span { display: grid; min-width: 0; line-height: 1.3; }
.d-menu-head small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* the inbox */
.d-inbox { display: flex; flex-direction: column; max-height: min(520px, calc(100dvh - 120px)); }
.d-inbox .d-pop-list { min-height: 0; }
.d-thread { display: flex; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; }
.d-thread:hover { background: var(--sunken); }
.d-thread.is-new { background: var(--accent-soft); }
.d-thread .d-note-t > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.d-inbox .d-pop-h { justify-content: flex-start; gap: 8px; }
.d-inbox .d-pop-h small { margin-left: auto; color: var(--muted); font-size: 12px; }
.d-inbox .d-pop-h .d-in-read { margin-left: auto; }
.d-in-thread { flex: 1; min-height: 120px; max-height: 330px; padding: 4px 8px 10px; align-content: end; }
.d-in-empty { padding: 24px 8px; color: var(--muted); text-align: center; }
.d-inbox .dch-form { padding: 8px; border-top: 1px solid var(--line); }

/* signed out */
.d-out { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: var(--out-bg, var(--bg)); animation: d-dlg-in 260ms var(--ease); }
.d-out-card { display: grid; justify-items: center; gap: 12px; max-width: 400px; padding: 40px 32px; border-radius: var(--radius); background: var(--surface); text-align: center; box-shadow: var(--pop-shadow); }
.d-out-mark { --mark-size: 44px; margin-bottom: 6px; }
.d-out-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 26px; letter-spacing: var(--display-tracking); }
.d-out-s { color: var(--muted); margin-bottom: 8px; }
.d-out-in { min-width: 200px; }

/* import */
.d-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 28px 18px; border-radius: var(--radius-sm); border: 1.5px dashed var(--line); background: color-mix(in oklab, var(--sunken) 50%, transparent); text-align: center; cursor: pointer; transition: border-color 120ms, background 120ms; }
.d-drop:hover, .d-drop.is-over, .d-drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.d-drop-in { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.d-drop-i { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 50%; background: var(--surface); color: var(--accent); }
.d-drop small { color: var(--muted); max-width: 46ch; }
.d-imp-sample { margin-top: -8px; }
.d-imp-out:empty { display: none; }
.d-imp-out { display: grid; gap: 12px; }
.d-imp-msg { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); }
.d-imp-msg .di { width: 18px; height: 18px; color: var(--pos); margin-top: 1px; }
.d-imp-msg.is-bad .di { color: var(--neg); }
.d-imp-skip { display: grid; gap: 2px; padding-left: 26px; color: var(--muted); font-size: 12.5px; }
.d-imp-prev td, .d-cht td, .d-cht th { padding-block: 9px; }

/* the phone sheet */
.d-share { display: flex; flex-wrap: wrap; gap: 8px; }
.d-share .d-in { flex: 1 1 220px; color: var(--muted); }
.d-os { justify-self: start; }
.d-steps { display: grid; gap: 10px; counter-reset: step; }
.d-steps li { display: flex; gap: 12px; align-items: baseline; counter-increment: step; }
.d-steps li::before { content: counter(step); display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }

/* a measure opened, details of a record */
.d-mx-fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.d-mx-chart { min-height: 240px; }
.d-mx-chart.is-tall { min-height: min(380px, 52dvh); }
.d-mx-facts, .d-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.d-facts.is-4 { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.d-mx-facts > div, .d-facts > div { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sunken); min-width: 0; }
.d-mx-facts dt, .d-facts dt { color: var(--muted); font-size: 12px; }
.d-mx-facts dd, .d-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.d-mx-facts dd small { color: var(--muted); font-weight: 400; }
.d-who { display: flex; align-items: center; gap: 16px; }
.d-who > div { display: grid; gap: 2px; min-width: 0; }
.d-who b { font-size: 16px; }
.d-who .d-link { overflow-wrap: anywhere; }
.d-who-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.d-who-list > span { margin-right: 6px; }

/* settings and help pages */
.d-photo { display: flex; align-items: center; gap: 16px; grid-column: 1 / -1; }
.d-photo-b { position: relative; overflow: hidden; }
.d-photo-in { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.d-data { display: grid; }
.d-data li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.d-data li:last-child { border-bottom: 0; }
.d-data .d-btn { height: 34px; padding: 0 12px; }
.dw:has(.d-data) .d-form-f, .dw:has(.d-look) .dtg { margin-top: 4px; }
.d-look { flex-wrap: wrap; }
.d-look .d-seg-b { display: inline-flex; align-items: center; gap: 6px; }
.d-look .d-seg-b .di { width: 16px; height: 16px; }
.d-help-q { height: 42px; }
.d-help-q input { width: 100%; }
.d-faq { display: grid; }
.d-faq-i { border-bottom: 1px solid var(--line); }
.d-faq-i:last-child { border-bottom: 0; }
.d-faq-i summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.d-faq-i summary::-webkit-details-marker { display: none; }
.d-faq-i summary .di { width: 18px; height: 18px; color: var(--muted); transition: rotate var(--dur) var(--ease); }
.d-faq-i[open] summary .di { rotate: 180deg; }
.d-faq-i p { padding: 0 28px 16px 0; color: var(--muted); }
.d-faq-none[hidden] { display: none; }
.d-keys { display: grid; gap: 2px; }
.d-keys > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.d-keys > div:last-child { border-bottom: 0; }
.d-keys dt { display: flex; gap: 4px; }
.d-keys dd { color: var(--muted); text-align: right; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); font: 600 12px/1 var(--font-body); color: var(--ink); }
.d-reqs { display: grid; gap: 8px; }
.d-reqs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--sunken); }
.d-reqs-w:empty { display: none; }
.d-reqs-w { display: grid; gap: 8px; }

@media (max-width: 560px) {
  .d-dlg, .d-dlg.is-sm, .d-dlg.is-wide { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .d-dlg[open] { animation-name: d-sheet-in; }
  @keyframes d-sheet-in { from { translate: 0 40px; opacity: 0.6; } }
  .d-dlg-h { padding: 20px 16px 12px 18px; }
  .d-dlg-b { padding: 4px 18px calc(20px + env(safe-area-inset-bottom)); }
  .d-dlg-f { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .d-dlg-f .d-btn, .d-form-f .d-btn { flex: 1 1 auto; }
  .d-btn--quiet-danger { flex: 0 0 auto !important; }
  .d-form { grid-template-columns: minmax(0, 1fr); }
  .d-form > .d-field:has(input[type="date"], select):not(.is-wide) { grid-column: 1 / -1; }
  .d-keys dd { font-size: 12.5px; }
}

/* loading: the frame stays, what it holds shimmers */
.is-booting .dw > *, .dw[aria-busy="true"] > :not(.dw-h):not(.dc-legend) { visibility: hidden; }
.is-booting .dw::after, .dw[aria-busy="true"]::after { content: ''; position: absolute; inset: calc(var(--pad) + 30px) var(--pad) var(--pad); border-radius: calc(var(--radius) - 8px);
  background: linear-gradient(100deg, var(--sunken) 30%, color-mix(in oklab, var(--sunken) 50%, var(--surface)) 50%, var(--sunken) 70%) 0 0 / 300% 100%; animation: d-shimmer 1.1s linear infinite; }
.is-booting .dw::after { inset: var(--pad); }
.dw--photo[aria-busy="true"]::after { display: none; }
.dw--photo[aria-busy="true"] > * { visibility: visible; }
@keyframes d-shimmer { to { background-position: -150% 0; } }

/* a sidebar with its fold button beside the brand, and a search of its own under them */
.d-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.d-nav-search .d-search { width: 100%; }
/* folded by the person: the same icon rail as a narrow window */
[data-folded][data-nav="sidebar"] .d-app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
[data-folded][data-nav="sidebar"] .d-nav { align-items: center; padding-inline: 12px; }
[data-folded][data-nav="sidebar"] :is(.d-nav .d-brand-name, .d-nav .d-nav-text, .d-nav .d-nav-label, .d-nav .d-promo, .d-nav .d-me-t, .d-nav-search) { display: none; }
[data-folded][data-nav="sidebar"] .d-nav .d-nav-item { justify-content: center; width: 48px; padding: 0; }
[data-folded][data-nav="sidebar"] .d-nav-head { flex-direction: column; }
@media (max-width: 1180px) {
  .d-fold { display: none; }
  /* the window is too narrow for the sidebar's own search: it goes back to the bar */
  [data-nav="sidebar"] .d-nav-search { display: none; }
}

/* ——— responsive ——— */
@media (max-width: 1180px) {
  [data-nav="sidebar"] .d-app, [data-nav="float"] .d-app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  [data-nav="sidebar"][data-side="right"] .d-app, [data-nav="float"][data-side="right"] .d-app { grid-template-columns: minmax(0, 1fr) var(--rail-w); }
  [data-nav="sidebar"] .d-nav, [data-nav="float"] .d-nav { align-items: center; padding-inline: 12px; margin: 0; top: 0; height: 100dvh; border-radius: 0; }
  :is([data-nav="sidebar"], [data-nav="float"]) :is(.d-nav .d-brand-name, .d-nav .d-nav-text, .d-nav .d-nav-label, .d-nav .d-promo, .d-nav .d-me-t) { display: none; }
  :is([data-nav="sidebar"], [data-nav="float"]) .d-nav .d-nav-item { justify-content: center; width: 48px; padding: 0; }
  :is([data-nav="sidebar"], [data-nav="float"]) .d-nav .d-badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .d-screen.has-md { grid-template-columns: var(--cols-md); grid-template-areas: var(--areas-md); grid-template-rows: auto; }
  .d-top-links .d-nav-item { padding: 0 10px; }
}
@media (max-width: 900px) {
  .d-app, [data-side="right"] .d-app, [data-nav] .d-app { grid-template-columns: minmax(0, 1fr); }
  [data-nav]:not([data-nav="dock"]) .d-nav, .d-top-links { display: none; }
  .d-ib.d-menu { display: inline-grid; }
  [data-nav="dock"] .d-ib.d-menu { display: none; }
  .d-screen, .d-screen.has-md { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; grid-template-rows: auto; }
  .d-screen > .dw { grid-row: auto !important; grid-column: span 2 !important; } /* the desktop areas are inline styles, so the phone flow has to outrank them */
  .d-screen > .dw--kpi { grid-column: span 1 !important; }
  .d-search { width: auto; flex: 1; }
  .d-top { flex-wrap: wrap; }
  .d-top > .d-seg--top { order: 9; overflow-x: auto; max-width: 100%; }
  .d-top > .d-heading { flex-basis: 100%; order: 8; }
  [data-nav="top"] .d-heading, [data-nav="tabs"] .d-heading { display: block; }
  .d-body { padding: 0 16px 24px; }
  .d-mobile-tabs .d-body { padding-bottom: 96px; }
}
@media (max-width: 900px) {
  .d-tabbar { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-around; padding: 6px; border-radius: 22px; background: var(--nav-bg); border: 1px solid var(--nav-line); box-shadow: var(--pop-shadow); }
  .d-tab { display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 14px; color: var(--nav-muted); font-size: 11px; font-weight: 500; }
  .d-tab[aria-current="page"] { color: var(--nav-active-ink); background: var(--nav-active-bg); }
}
@media (max-width: 560px) {
  .d-screen > .dw, .d-screen > .dw--kpi { grid-column: 1 / -1 !important; }
  .d-search .d-kbd { display: none; }
  /* on a phone the search folds to its icon; tapping it opens the field across the bar */
  .d-top { position: relative; }
  .d-search:not(:focus-within) { flex: 0 0 auto; width: var(--control-h); padding: 0; justify-content: center; }
  .d-search:not(:focus-within) .d-search-in { position: absolute; inset: 0; opacity: 0; }
  .d-search:focus-within { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 45; width: auto; }
  .d-top-me .d-me-t, .d-cta span { display: none; }
  .d-top { gap: 8px; }
  .d-actions { gap: 4px; margin-left: auto; }
  .dt-search input { width: 110px; }
  .dw { --pad: 16px; }
  .d-title { font-size: min(24px, var(--title-size)); }
  .dk-value { font-size: min(var(--kpi-size-sm, 28px), var(--kpi-size)); }
  .dw-fig-v { font-size: min(var(--kpi-size-sm, 28px), var(--fig-size, var(--kpi-size))); }
}

@media (max-width: 480px) {
  /* on a phone the appearance lives in Settings, so the header keeps to one row */
  .d-top .d-theme { display: none; }
}
@media (max-width: 420px) {
  [data-nav="top"] .d-top .d-brand-name, [data-nav="tabs"] .d-top .d-brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .dc-enter .dc-line:not(.is-dashed) { stroke-dashoffset: 0; }
  .dc-enter .dc-area, .dc-enter .dc-line.is-dashed, .dc-enter .dc-end, .dc-enter .dc-dot, .dc-enter .dc-cell, .dc-enter .dc-bubble, .dc-enter .dc-funnel, .dc-enter .dc-candle, .dc-enter .dc-pin, .dc-enter .dc-ridge { opacity: 1; transform: none; }
  .dc-enter .dc-bar-g, .dc-enter .dc-bar, .dc-enter .dc-hbar { transform: none; }
  .dc-enter .dc-arc { stroke-dashoffset: 0; }
  .is-booting .dw::after, .dw[aria-busy="true"]::after, .dmp::before { animation: none; }
}

/* —— map: a real map (map.js) with routes and moving markers; the frame keeps a ratio, or fills its card —— */
.dw--map { display: flex; flex-direction: column; }
.dmp { position: relative; aspect-ratio: var(--map-ratio, 4 / 3); border-radius: var(--map-radius, var(--radius-sm)); overflow: hidden; background: var(--map-land); isolation: isolate; }
.dmp.is-fill { flex: 1; aspect-ratio: auto; min-height: var(--map-min-h, 300px); }
.dmp-gl { position: absolute; inset: 0; transition: opacity 420ms var(--ease); }
/* until the first tiles have drawn, the frame shimmers like every card that is loading; then the map fades in */
.dmp:not(.is-ready) .dmp-gl { opacity: 0; }
.dmp:not(.is-ready)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, var(--sunken) 30%, color-mix(in oklab, var(--sunken) 50%, var(--surface)) 50%, var(--sunken) 70%) 0 0 / 300% 100%; animation: d-shimmer 1.1s linear infinite; }
.dmp:has(.dmp-off:not([hidden]))::before { display: none; }
:root[data-kbd] .dmp-gl .maplibregl-canvas:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.dmp-ctl { position: absolute; z-index: 3; top: 10px; right: 10px; display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.3); }
.dmp-b { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.dmp-b .di { width: 16px; height: 16px; }
.dmp-b:hover { background: var(--sunken); }
.dmp-b:disabled { color: var(--faint); background: var(--surface); cursor: default; }
:root[data-kbd] .dmp-b:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.dmp-off { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--sunken); color: var(--muted); text-align: center; }
.dmp-off[hidden] { display: none; }
.dmp-off p { margin: 0; }
.dmp-pin { z-index: 2; }
.dmp-pin:hover, .dmp-pin:focus-within { z-index: 3; }
/* a small map keeps its markers to their dots; the name shows on the one pointed at or focused */
.dmp { container-type: inline-size; }
@container (max-width: 460px) { .dmp-m span { display: none; } .dmp-m:hover span, .dmp-m:focus-visible span { display: block; } }
.dmp-m { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--map-ink, #fff); font: 600 11.5px/1 var(--font-body); cursor: pointer; }
.dmp-m i { width: 22px; height: 22px; border-radius: 50%; background: var(--marker, var(--accent)); box-shadow: 0 0 0 5px color-mix(in oklab, var(--marker, var(--accent)) 30%, transparent), 0 2px 8px rgb(0 0 0 / 0.35); border: 3px solid var(--map-ink, #fff); flex: none; transition: transform 160ms var(--ease); }
.dmp-m span { padding: 4px 7px; border-radius: 7px; background: var(--map-chip, rgb(10 14 20 / 0.78)); white-space: nowrap; }
.dmp-m[data-tone="warn"] { --marker: var(--warn); } .dmp-m[data-tone="neg"] { --marker: var(--neg); } .dmp-m[data-tone="pos"] { --marker: var(--pos); }
.dmp-m:hover i, .dmp-m:focus-visible i { transform: scale(1.12); }
.dmp-m:focus-visible { outline: none; }
:root[data-kbd] .dmp-m:focus-visible span { outline: 2px solid var(--ring); outline-offset: 2px; }
.dmp .maplibregl-ctrl-attrib { margin: 0 8px 8px 0; border-radius: 8px; background: color-mix(in oklab, var(--surface) 84%, transparent); color: var(--muted); font: 400 10.5px/1.5 var(--font-body); }
.dmp .maplibregl-ctrl-attrib a { color: inherit; }
.dmp .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 22px; }
:root[data-scheme="dark"] .dmp .maplibregl-ctrl-attrib-button { filter: invert(1) brightness(0.8); }
.dmp .maplibregl-cooperative-gesture-screen { background: color-mix(in oklab, var(--ink) 55%, transparent); color: var(--surface); font: var(--label-weight) 14px/1.35 var(--font-body); }
.dmp-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--small-size); }
.dmp-key li { display: inline-flex; align-items: center; gap: 7px; }
.dmp-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.dmp-key [data-tone="warn"] i { background: var(--warn); } .dmp-key [data-tone="neg"] i { background: var(--neg); } .dmp-key [data-tone="pos"] i { background: var(--pos); }

/* —— a chip in the bar: a fact you can open (today, a site, a shift) —— */
.d-chip { display: inline-flex; align-items: center; gap: 8px; height: var(--control-h); padding: 0 14px; border: var(--ib-border, 1px solid var(--line)); border-radius: var(--chip-radius, var(--radius-sm)); background: var(--ib-bg, var(--surface)); color: var(--ink); font: 500 var(--text-size)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background 140ms, border-color 140ms; }
.d-chip:hover { background: var(--sunken); }
.d-chip .di { width: 17px; height: 17px; color: var(--muted); }
:root[data-kbd] .d-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* —— a figure's target under it (income against what was expected) —— */
.dk-goal { display: grid; gap: 8px; }
.dk-goal-l { justify-self: end; color: var(--muted); font-size: var(--small-size); }
.dk-goal-l b { color: var(--ink); font-weight: var(--label-weight); }
.dk-bar { --bar-h: var(--goal-h, 10px); }

/* —— small facts under a list row's title, each with its icon —— */
.dl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--muted); font-size: var(--small-size); }
.dl-meta > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dl-meta .di { width: 15px; height: 15px; }
.dl-meta [data-tone="neg"] .di { color: var(--neg); }
.dl-meta [data-tone="warn"] .di { color: var(--warn); }
.dl-meta [data-tone="pos"] .di { color: var(--pos); }

/* —— facts beside a chart (the shares a ring stands for) —— */
.dw-facts { display: grid; gap: 10px; margin: 0; }
.dw-facts > div { display: flex; align-items: baseline; gap: 10px; }
.dw-facts dt { order: 2; color: var(--muted); font-size: var(--small-size); }
.dw-facts dd { margin: 0; font-family: var(--font-num); font-weight: var(--num-weight); font-size: var(--fact-size, 17px); letter-spacing: var(--num-tracking); }
.dst-go { flex: none; }

/* —— a list's way onward, under its rows; a light button on a dark card —— */
.d-btn--light { background: var(--light-btn, var(--ink)); color: var(--light-btn-ink, var(--surface)); border: 0; }
.d-btn--light:hover { background: color-mix(in oklab, var(--light-btn, var(--ink)) 88%, var(--surface)); }
.dl-foot { width: 100%; justify-content: flex-start; margin-top: auto; }
.dl-foot > span { flex: 1; text-align: left; }
.dw--list:has(.dl-foot) { display: flex; flex-direction: column; }
.dt-act { flex: none; }
.dt-text { white-space: nowrap; }
.dmp-m[data-kind="hub"] i { border-radius: 7px; }

/* reduce motion (the page's own setting, or ?still for a capture): every transition and animation lands at once, so
   what is drawn is the end state and never a frame on the way there */
.is-still *, .is-still *::before, .is-still *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
