/* Analytics screens (profitability, operations, CFO), in the control-tower look (docs/UI_CONTROL_TOWER.md) and the
   brand of docs/UI_BRAND.md: cards with the turquoise tick and a 13 px title, KPI tiles with caps labels and Source
   Sans 3 600 numbers, dense tables with ice caps heads, teal filter chips, quiet turquoise-tinted chart grids.
   Everything is scoped under .an-root and uses only the tokens of tokens.css, so light/dark follows the app's
   data-theme. */
.an-root {
  --hair: var(--line);
  --ring: var(--line);
  --page: var(--bg);
  --bad: var(--crit);
  --bad-ink: var(--crit-text);
  --bad-wash: var(--crit-soft);
  --warn-ink: var(--warn-text);
  --warn-wash: var(--warn-soft);
  --good-ink: var(--good-text);
  --accent-wash: var(--accent-soft);
  color: var(--ink);
  font: var(--fs-body)/var(--lh-body) var(--font-ui);
}
.an-root *, .an-root *::before, .an-root *::after { box-sizing: border-box; }
.an-root button, .an-root input, .an-root select { font: inherit; color: inherit; }
.an-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.an-root .an-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* toolbar: period line, filters, tab strip (sits under the app topbar, inside <main>) */
.an-root .an-bar { margin: -12px -14px 12px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); }
@media (min-width: 900px) and (min-height: 640px) {
  .an-root .an-bar { position: sticky; top: 0; z-index: 6; backdrop-filter: blur(8px); }
}
.an-root .an-subline { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.an-root .an-sub { color: var(--muted); font-size: var(--fs-small); }
.an-root .an-filters { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; }
.an-root .an-fgroup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-root .an-flabel { font: 600 var(--fs-cap)/1 var(--font-ui); letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); }
/* filter chips: one bordered group per filter (the segmented look), the pressed one accent on the soft fill */
.an-root .an-chips { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.an-root .an-chip { border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 0; padding: 3px 9px; font-size: var(--fs-meta); font-weight: 500; cursor: pointer; line-height: 16px; }
.an-root .an-chip:last-child { border-right: 0; }
.an-root .an-chip:hover { background: var(--surface-2); color: var(--ink); }
.an-root .an-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); } /* the chips sit as one segmented control: the active segment's 2 px teal underline (base.css .seg) */
.an-root .an-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); cursor: pointer; user-select: none; color: var(--ink-2); }
.an-root .an-toggle input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.an-root .an-tabs { display: flex; gap: 2px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.an-root .an-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 761px) { .an-root .an-tabs { flex-wrap: wrap; overflow-x: visible; } }
.an-root .an-tab { padding: 6px 10px 8px; font: 500 var(--fs-small)/1 var(--font-ui); color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.an-root .an-tab:hover { color: var(--ink); }
.an-root .an-tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }
.an-root .an-tab .n { font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); margin-left: 4px; }
.an-root .an-tabsep { align-self: center; font: 600 var(--fs-xs) var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding: 0 6px 0 12px; margin-left: 6px; }

/* layout */
.an-root .an-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.an-root .an-c12 { grid-column: span 12; } .an-root .an-c8 { grid-column: span 8; } .an-root .an-c7 { grid-column: span 7; }
.an-root .an-c6 { grid-column: span 6; } .an-root .an-c5 { grid-column: span 5; } .an-root .an-c4 { grid-column: span 4; }
@media (max-width: 1100px) { .an-root .an-c8, .an-root .an-c7, .an-root .an-c6, .an-root .an-c5, .an-root .an-c4 { grid-column: span 12; } }
.an-root .an-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); padding: 9px 11px 11px; min-width: 0; }
/* a card's title: 13 px / 600 with the 3 × 14 px turquoise-to-teal tick of the primitives' .card-h */
.an-root .an-card > h2 { display: flex; align-items: center; gap: 7px; font: 600 var(--fs-h3)/var(--lh-h3) var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0 0 2px; }
.an-root .an-card > h2::before { content: ""; flex: none; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(var(--accent-bright), var(--accent)); }
/* the mono sub-label after the title (dom.js section(): the chart type, from data-sub) */
.an-root .an-card > h2[data-sub]::after { content: attr(data-sub); font: 400 var(--fs-xs)/14px var(--font-mono); color: var(--muted); white-space: nowrap; }
.an-root .an-note { color: var(--muted); font-size: var(--fs-meta); line-height: var(--lh-meta); margin: 0 0 var(--sp-2); }
.an-root .an-mt6 { margin-top: 6px; } .an-root .an-mt8 { margin-top: 8px; } .an-root .an-mt10 { margin-top: 10px; }
.an-root .an-mt12 { margin-top: 12px; } .an-root .an-mt14 { margin-top: 14px; } .an-root .an-mt16 { margin-top: 16px; }
.an-root .an-mb6 { margin-bottom: 6px; } .an-root .an-mb8 { margin-bottom: 8px; }
.an-root .an-loading { color: var(--muted); }
.an-root .an-empty { color: var(--muted); padding: 24px; text-align: center; }
.an-root .an-empty .btn { margin-left: 6px; }
.an-root .an-empty-state { max-width: 640px; margin: 24px auto; padding: 24px 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
/* the brand's empty state (components.css .empty): an ice wash on the card and its turquoise dashed edge */
.an-root .an-empty-state:not(.error) { background: linear-gradient(180deg, var(--ice-1), var(--surface) 70%), var(--surface); border: 1px dashed var(--accent-line); }
.an-root .an-empty-state .eyebrow { margin: 0 0 -4px; }
/* a block, not the card title's flex row: the .h-rule bar (base.css, an ::after) then sits under the heading, not beside it */
.an-root .an-empty-state h2 { display: block; font: 600 var(--fs-h2)/var(--lh-h2) var(--font-head); letter-spacing: var(--ls-title); text-transform: none; color: var(--ink); margin: 0; }
.an-root .an-empty-state h2::before { display: none; }
.an-root .an-empty-state p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.an-root .an-empty-state .an-sub { font-size: var(--fs-small); }
.an-root .an-empty-state.error h2 { color: var(--crit-text); }

/* hero + tiles */
.an-root .an-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: var(--gap); }
@media (max-width: 1100px) { .an-root .an-hero { grid-template-columns: 1fr; } }
.an-root .an-herocard { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--e1); padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.an-root .an-herolabel { font: 600 var(--fs-cap) var(--font-ui); letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); }
.an-root .an-herofig { font: 600 var(--fs-money-xl)/var(--lh-money-xl) var(--font-head); letter-spacing: var(--ls-title); margin-top: 4px; font-variant-numeric: tabular-nums; }
.an-root .an-herosub { color: var(--ink-2); font-size: var(--fs-body); margin-top: 6px; }
.an-root .an-herosub b { font-weight: 600; color: var(--ink); }
.an-root .an-bar100 { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.an-root .an-bar100.thick { height: 12px; border-radius: var(--r-xs); }
.an-root .an-bar100 i { display: block; height: 100%; }
.an-root .an-legend { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: var(--fs-meta); color: var(--ink-2); }
.an-root .an-legend span { display: inline-flex; align-items: center; gap: 6px; }
.an-root .an-sw, .an-root .an-tip .an-sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; flex: none; }
.an-root .an-swl, .an-root .an-tip .an-swl { width: 14px; height: 2px; border-radius: 1px; display: inline-block; flex: none; }
/* KPI tiles: the primitives' KPI strip (separate 8 px cards, caps label, Source Sans 3 600 23 px number, one muted
   line); inside a card they are the inset mini tiles */
.an-root .an-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(128px, (100% - 56px) / 8), 1fr)); gap: var(--sp-2); }
.an-root .an-card .an-tiles { margin-top: var(--sp-2); grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 6px; }
/* a row the tiles do not fill: its last tile takes the rest of the row, so no grey gap shows through; five tiles are one row of five */
@media (max-width: 760px) {
  .an-root .an-tiles, .an-root .an-card .an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.an-root .an-tile { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ice-1), var(--surface) 36px), var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); padding: 8px 10px 7px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* the KPI cell's short turquoise hairline (base.css .kpi::before); the inset tiles inside a card go without it */
.an-root .an-tile::before { content: ""; position: absolute; left: 10px; top: 0; width: 28px; height: 2px; border-radius: 0 0 2px 2px; background: var(--rule); opacity: .75; pointer-events: none; }
.an-root .an-card .an-tile { background: var(--surface-2); box-shadow: none; padding: 6px 8px; }
.an-root .an-card .an-tile::before { display: none; }
.an-root .an-tile .l { font-size: var(--fs-cap); font-weight: 600; letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); line-height: 14px; overflow: hidden; text-overflow: ellipsis; }
.an-root .an-tile .v { font: 600 var(--fs-kpi)/var(--lh-kpi) var(--font-head); letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.an-root .an-card .an-tile .v { font-size: var(--fs-topbar); line-height: 20px; }
/* the inset tiles are --surface-2: --muted is under 4.5:1 there in dark, the secondary ink is not */
.an-root .an-card .an-tile .l, .an-root .an-card .an-tile .d { color: var(--ink-2); }
.an-root .an-tile .d { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--muted); }

/* attention chips */
.an-root .an-alerts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.an-root .an-alert { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-tile); padding: 8px 10px; background: var(--surface); flex: 1 1 220px; cursor: pointer; text-align: left; box-shadow: var(--e1); }
.an-root .an-alert.bad { border-left: 3px solid var(--crit); }
.an-root .an-alert.warn { border-left: 3px solid var(--warn); }
.an-root .an-alert:hover { border-color: var(--line-2); background: var(--surface-2); }
.an-root .an-alert.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.an-root .an-alert .ic { width: 20px; height: 20px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 var(--fs-small) var(--font-mono); flex: none; }
.an-root .an-alert.bad .ic { background: var(--bad-wash); color: var(--bad-ink); }
.an-root .an-alert.warn .ic { background: var(--warn-wash); color: var(--warn-ink); }
/* nothing to look at (a zero count): no status edge, a neutral icon */
.an-root .an-alert.ok .ic { background: var(--surface-2); color: var(--ink-2); }
.an-root .an-alert b { display: block; font-weight: 700; font-size: var(--fs-small); }
.an-root .an-alert span { color: var(--muted); font-size: var(--fs-meta); }

/* charts */
.an-root .an-chart { position: relative; width: 100%; }
.an-root .an-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.an-root .an-chart text { font: var(--fs-xs) var(--font-ui); fill: var(--muted); font-variant-numeric: tabular-nums; }
.an-root .an-chart .lbl { fill: var(--ink-2); font-size: var(--fs-meta); }
.an-root .an-chart .lblb { fill: var(--ink); font-weight: 600; font-size: var(--fs-meta); }
.an-root .an-chart .grid-l { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.an-root .an-chart .base-l { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.an-root .an-chart .hit { fill: transparent; cursor: pointer; }
.an-root .an-chart .hit.crosshair { cursor: crosshair; }
.an-root .an-chart .hit:hover + .mk { filter: brightness(1.08); }
.an-root .an-chart .hrow { cursor: pointer; }
.an-root .an-chart .hrow:hover .hbg { fill: var(--accent-soft); }
.an-root .an-chart .hbg { fill: transparent; }
.an-root .an-tip { position: fixed; z-index: 70; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--e2); border-radius: var(--r-md); padding: 7px 9px; font-size: var(--fs-small); min-width: 150px; max-width: 300px; opacity: 0; transition: opacity .08s; left: 0; top: 0; }
.an-root .an-tip.on { opacity: 1; }
.an-root .an-tip .th { font-weight: 600; margin-bottom: 4px; color: var(--ink-2); font-size: var(--fs-meta); }
.an-root .an-tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.an-root .an-tip .tr .k { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.an-root .an-tip .tr .val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* tables */
.an-root .an-tbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.an-root .an-tbar-l { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; min-width: 0; }
.an-root .an-search { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 4px 9px; min-width: 0; width: 280px; max-width: 100%; height: var(--control-h); font-size: var(--fs-small); }
.an-root .an-tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
/* the dense table: caps heads, 29 px rows, mono-free numbers right-aligned and tabular, the hovered row tinted */
.an-root .an-tscroll table { border-collapse: collapse; width: 100%; font-size: var(--fs-table); }
.an-root .an-tscroll th, .an-root .an-tscroll td { padding: 5px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.an-root .an-tscroll td { height: var(--row-h-dense); }
.an-root .an-tscroll th { padding: 6px 9px; font: 600 var(--fs-cap)/1.2 var(--font-ui); letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); background: var(--ice-1); position: sticky; top: 0; z-index: 1; cursor: pointer; user-select: none; box-shadow: inset 0 -1px 0 var(--line); }
.an-root .an-tscroll th:hover { color: var(--ink-2); }
.an-root .an-tscroll th.l, .an-root .an-tscroll td.l { text-align: left; }
.an-root .an-tscroll th .ar { color: var(--accent-text); margin-left: 3px; }
.an-root .an-tscroll td.name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.an-root .an-tscroll td.wrapcell { white-space: normal; min-width: 180px; }
.an-root .an-tscroll tbody tr { cursor: pointer; }
.an-root .an-tscroll tbody.static tr { cursor: default; }
.an-root .an-tscroll tbody tr:hover td { background: var(--sel); }
.an-root .an-tscroll tbody.static tr:hover td { background: transparent; }
.an-root .an-tscroll tfoot td { font-weight: 600; background: var(--surface-2); border-bottom: 0; }
.an-root .an-neg { color: var(--bad-ink); }
.an-root .an-pos { color: var(--good-ink); }
.an-root .an-pill { display: inline-block; font: 600 var(--fs-meta)/16px var(--font-ui); padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); }
.an-root .an-pill.bad { background: var(--bad-wash); color: var(--bad-ink); }
.an-root .an-pill.warn { background: var(--warn-wash); color: var(--warn-ink); }
.an-root .an-more { display: flex; justify-content: center; gap: var(--sp-2); padding: var(--sp-2); color: var(--muted); font-size: var(--fs-meta); align-items: center; flex-wrap: wrap; }
.an-root .an-meter { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: var(--surface-3); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.an-root .an-meter i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }

/* key/value, prose */
.an-root .an-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.an-root .an-kv > div { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 8px; }
.an-root .an-kv .l { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--ink-2); } /* on --surface-2 */
.an-root .an-kv .v { font: 600 var(--fs-topbar)/20px var(--font-head); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .an-root .an-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-root .an-prose { max-width: 72ch; color: var(--ink-2); }
.an-root .an-prose p { margin: 0 0 10px; }
.an-root .an-prose b { color: var(--ink); }
.an-root .an-methods { margin-top: 10px; }
.an-root .an-methods summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.an-root .an-methods-b { margin-top: 8px; }
.an-root .an-kvlist { display: grid; grid-template-columns: auto auto; gap: 3px 16px; font-size: var(--fs-small); justify-content: start; margin: 0; }
.an-root .an-kvlist dt { color: var(--muted); }
.an-root .an-kvlist dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.an-root .an-kvlist.wide { grid-template-columns: minmax(130px, auto) 1fr; }
.an-root .an-kvlist.wide dd { text-align: left; }

/* cash-plan assumptions */
.an-root .an-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; }
.an-root .an-form label { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.an-root .an-form input[type=number] { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 4px 8px; font-variant-numeric: tabular-nums; width: 100%; height: var(--control-h); font-weight: 400; }
.an-root .an-form .hint { font-size: var(--fs-meta); font-weight: 400; color: var(--muted); }
.an-root .an-form .chk { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-root .an-form .chk input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.an-root .an-form .chk .hint { flex-basis: 100%; }

/* payment calendar */
.an-root .an-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.an-root .an-cal .dow { font: 600 var(--fs-cap) var(--font-ui); letter-spacing: var(--ls-cap); color: var(--muted); text-transform: uppercase; padding: 2px 4px; }
.an-root .an-cal .day { min-height: 72px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-meta); text-align: left; }
.an-root .an-cal .day:hover { border-color: var(--line-2); }
.an-root .an-cal .day.off { background: transparent; border-style: dashed; opacity: .45; cursor: default; }
.an-root .an-cal .day.today { box-shadow: 0 0 0 2px var(--accent); }
.an-root .an-cal .day.sel { border-color: var(--accent); background: var(--accent-soft); }
.an-root .an-cal .dn { font-weight: 600; color: var(--ink-2); font-family: var(--font-mono); }
.an-root .an-cal .o { color: var(--bad-ink); font-variant-numeric: tabular-nums; }
.an-root .an-cal .i { color: var(--good-ink); font-variant-numeric: tabular-nums; }
.an-root .an-cal .st { display: inline-block; font: 600 var(--fs-xs) var(--font-ui); background: var(--warn-wash); color: var(--warn-ink); border-radius: var(--r-pill); padding: 0 6px; align-self: flex-start; }
@media (max-width: 700px) { .an-root .an-cal .day { min-height: 54px; font-size: var(--fs-xs); } .an-root .an-cal .i, .an-root .an-cal .o { display: none; } }

/* drill-down drawer */
.an-root .an-scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--map-bg) 38%, transparent); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .15s; }
.an-root .an-scrim.on { opacity: 1; pointer-events: auto; }
.an-root .an-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); z-index: 56; transform: translateX(100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; display: flex; flex-direction: column; border-left: 1px solid var(--line); box-shadow: var(--e3); }
.an-root .an-drawer.on { transform: none; visibility: visible; transition: transform .2s ease; }
.an-root .an-dhead { padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--surface); }
.an-root .an-dhead .kind { font: 600 var(--fs-cap) var(--font-ui); letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); }
.an-root .an-dhead h3 { margin: 2px 0 0; font: 600 var(--fs-h2)/var(--lh-h2) var(--font-head); letter-spacing: var(--ls-title); }
.an-root .an-dbody { overflow-y: auto; padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: var(--gap); }
.an-root .an-dbody > * { flex-shrink: 0; } /* the KPI grid clips (overflow hidden) and would otherwise shrink to nothing */
.an-root .an-x { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); width: var(--control-h); height: var(--control-h); cursor: pointer; font-size: var(--fs-topbar); line-height: 1; flex: none; color: var(--ink-2); }
.an-root .an-x:hover { background: var(--surface-2); }

/* phone touch heights for the small buttons and the filter chips */
@media (max-width: 767px) { .an-root .btn.sm, .an-root .btn.xs, .an-root .an-chip { min-height: 36px; } }
@media (max-width: 600px) {
  .an-root .an-search { width: 100%; }
  .an-root .an-card { padding: 9px 10px 10px; }
}
@media (prefers-reduced-motion: reduce) { .an-root * { transition: none !important; } }
