/* ClearyFi data-page components (window.ClearyFi builders).
 *
 * Every data page loads style.css first (shared tokens, shell, fonts) and this file layers on
 * the data-specific components. Everything here uses the shipped warm palette — paper #f6f3ee,
 * terracotta --accent, rounded corners, soft shadows — so a new page looks like it was always
 * part of ClearyFi. See docs/STYLE_GUIDE.md.
 *
 * Tokens come from style.css; only the data-specific few (audit badges, wash tints) plus a
 * shared soft-shadow are declared here.
 */

:root {
  --accent-wash: #f3e4d5;
  --accent-wash-border: #e6cbae;
  --gaap-color: #3d6a8a;
  --gaap-bg: #e4edf2;
  --gaap-border: #cddce4;
  --ext-color: #b04a3a;
  --ext-bg: #f5e2da;
  --ext-border: #e8c4b4;
  --shadow-soft: 0 18px 40px -26px rgba(40, 30, 15, 0.35);
}

/* The `hidden` attribute must win over our flex/grid `display` rules (a flex/grid display
 * otherwise overrides the UA `[hidden] { display: none }`). */
[hidden] { display: none !important; }

/* numbers are always tabular */
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- page shell + masthead (matches the Explorer hero) ---------- */

.page {
  max-width: 1440px;
  margin: 0 auto;
  /* 28px, not 32: the v3 prototype's frame is 210 sidebar + 28 + 178 rail + 20 + 694 content +
     20 + 262 right rail + 28, which is exactly 1440. At 32 the content column came out 38px wide
     of the design and the view rail had to give the space back. (V3-P5a, measured 2026-07-31.) */
  padding: 12px 28px 72px;
}

.masthead-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 6px;
}

.masthead h1 {
  margin: 0;
  font-weight: 800;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.masthead-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--mono-muted);
  text-align: right;
  line-height: 1.7;
}

/* single hairline rule under the masthead (the Explorer's rule, not a ledger double rule) */
.rule-double {
  margin-top: 16px;
  border-top: 1px solid var(--border-tint-rule);
}

.lede {
  margin: 16px 0 0;
  max-width: 640px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-body);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 34px 0 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
}
.section-head .n { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.section-head h2 { margin: 0; font-weight: 800; font-size: 21px; letter-spacing: -0.015em; }

.micro {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mono-muted);
}

/* ---------- ticker chip ---------- */

.ticker-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: var(--ink);
  color: var(--bg-page);
  padding: 3px 9px;
  border-radius: 7px;
}

/* ---------- segmented control ---------- */

.segmented {
  display: inline-flex;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
}
.segmented button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border: none;
  border-right: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented button:last-child { border-right: none; }
.segmented button.on { background: var(--accent); color: #fff; }
.segmented button:hover:not(.on) { background: var(--bg-badge); }

.btn-inverse {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg-page);
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn-inverse:hover { opacity: 0.88; }

/* ---------- status chips (STYLE_GUIDE §7) ---------- */
/* Distinguished by glyph + label + border, never color alone (warm palette). */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.chip .glyph { font-size: 9px; line-height: 1; }

.chip-ok { color: var(--ink-soft); background: transparent; border: 1px solid var(--border-strong); }
.chip-approx { color: var(--ext-color); background: var(--ext-bg); border: 1px solid var(--ext-border); }
.chip-na { color: var(--ink-soft); background: var(--bg-badge); border: 1.5px solid var(--border-strong); }
.chip-nm { color: var(--ink-soft); background: transparent; border: 1.5px dashed var(--mono-muted); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.legend-item { display: flex; align-items: center; gap: 7px; }
.legend-item .desc { font-size: 11px; color: var(--ink-soft); }

/* ---------- metric card ---------- */

.card-grid {
  display: grid;
  /* Responsive, but capped at 4 columns: each column is at least the larger of 240px or the
     width that yields exactly 4 across (accounting for the 3 gaps), so wide pages top out at 4
     and narrower ones fall back to 3/2/1 fluidly. */
  grid-template-columns: repeat(auto-fill, minmax(max(240px, (100% - 3 * 16px) / 4), 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.metric-card.na { background: var(--bg-tint); box-shadow: none; }

.metric-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.metric-name { font-weight: 600; font-size: 14px; line-height: 1.25; }

.metric-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
}
.metric-value.drained { color: var(--mono-muted); font-size: 20px; }

.metric-basis {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mono-muted);
  /* the basis is a caption of the value above it -- pull it up out of the card's 10px flex
     gap so the number + its "TTM"/"AS-OF" label read as one tightly-coupled unit */
  margin-top: -5px;
}

/* Bottom-pinned actions zone: margin-top:auto drops it to the card floor so the disclosure
   links line up across every card in a row, and a hairline separates the value/insight zone
   above from the audit affordances below (fixed internal zones, less ragged whitespace). */
.metric-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-tint-rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-soft);
  border-left: 2px solid var(--ext-border);
  padding-left: 8px;
}

/* intra-year quarterly sparkline (FY cards) */
.spark-wrap { display: flex; align-items: center; gap: 8px; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
.spark-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mono-muted);
}

/* ---------- provenance / "show your work" ---------- */

.provenance { margin-top: 0; } /* spacing owned by .metric-actions gap */
.provenance summary {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}
.provenance summary::-webkit-details-marker { display: none; }
.provenance summary::before { content: "+ "; }
.provenance[open] summary::before { content: "\2212 "; }
.provenance[open] summary { color: var(--accent-ink); }
.provenance-body {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-body);
}
.provenance-body dt {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
  margin-top: 8px;
}
.provenance-body dt:first-child { margin-top: 0; }
.provenance-body dd { margin: 2px 0 0; font-family: var(--font-mono); }

/* source badges (reset display/margin so style.css's marketing .badge can't leak in) */
.badge {
  display: inline-block;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 5px;
}
.badge-gaap { color: var(--gaap-color); background: var(--gaap-bg); border: 1px solid var(--gaap-border); }
.badge-ext { color: var(--ext-color); background: var(--ext-bg); border: 1px solid var(--ext-border); }

/* ---------- disclosure / data-notes ---------- */

.disclosure {
  margin-top: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 14px 18px;
}
.disclosure summary {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "+ "; }
.disclosure[open] summary::before { content: "\2212 "; }
.disclosure ul { margin: 12px 0 0; padding-left: 18px; }
.disclosure li { font-size: 12.5px; line-height: 1.55; color: var(--ink-body); margin-bottom: 7px; }

/* ---------- search bar ---------- */

.searchbar { display: flex; gap: 8px; align-items: stretch; }
.searchbar input {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--ink);
  min-width: 220px;
}
.searchbar input:focus { outline: none; border-color: var(--accent); }
.searchbar input::placeholder { color: var(--mono-muted); }

/* ---------- shared states ---------- */

.state {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  background: var(--bg-tint);
}
.state-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.state-title.err { color: var(--ext-color); }
.state-copy { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-body); max-width: 560px; }

.state-loading .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  animation: clearyfiPulse 1s ease-in-out infinite;
}
@keyframes clearyfiPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.shimmer {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border-strong) 0, var(--bg-card) 200px, var(--border-strong) 400px);
  background-size: 600px;
  animation: clearyfiShimmer 1.1s linear infinite;
  margin-top: 12px;
}
@keyframes clearyfiShimmer { 0% { background-position: -420px 0; } 100% { background-position: 420px 0; } }
.cold-note { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--mono-muted); }

.http-code { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.08em; color: var(--ext-color); }
.recovery-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- footer (renamed to avoid the marketing .site-footer in style.css) ---------- */

.app-footer {
  max-width: 1040px;
  margin: 56px auto 0;
  padding: 18px 32px 0;
  border-top: 1px solid var(--border-tint-rule);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.app-footer a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
}
.app-footer a:hover { color: var(--accent-hover); }
.app-footer .tagline { font-family: var(--font-mono); font-size: 11px; color: var(--mono-muted); margin-left: auto; }

/* Inside the app shell the footer spans the content column (not the old centered 1040px)
 * and pins to the bottom of short pages (.app-main is a flex column). */
body.app #footer { margin-top: auto; }
body.app .app-footer { max-width: none; margin: 44px 0 0; padding: 18px 28px 26px; }

/* ---------- Plot charts (Phase 5, vendored Observable Plot — STYLE_GUIDE §6) ----------
 *
 * Every ClearyFi.* Plot builder (divergingBars today; more land alongside it) returns a DOM node
 * wrapped the same way: a mono eyebrow title, a horizontally-scrollable body holding Plot's own
 * SVG, and an honesty caption. Card chrome matches .trend-chart's (bg-tint, soft border, rounded)
 * so a chart never looks like a foreign widget dropped onto the page.
 */

.plot-chart {
  margin: 4px 0 22px;
  padding: 16px 18px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
.plot-chart-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 10px;
}
/* Plot renders a fixed-width SVG (width/height attributes, not a scaling viewBox); scroll it
 * inside its own box on narrow viewports rather than distorting it with max-width or letting it
 * overflow the page body. */
.plot-chart-body { overflow-x: auto; }
.plot-chart-body svg { display: block; }
.plot-chart-caption {
  margin: 12px 2px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--mono-muted);
}
.plot-chart-note {
  margin: 4px 2px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mono-muted);
}

/* Off-map / unknown filer tallies beside the holder choropleth (Phase 1 institutional viz).
   Foreign/territory and location-unknown filers are never on the map, so they're surfaced
   here as chips rather than silently dropped. */
.geo-tallies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 2px 0;
}
.geo-tally {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.geo-tally-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
}
.geo-tally-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

/* ---------- composition chart + concentration stat tiles (Phase 5.1/5.2) ---------- */

.composition-block {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 12px;
}
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-tile-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
}
.stat-tile-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat-tile-note { font-size: 10.5px; line-height: 1.4; color: var(--ink-soft); }

/* Plot returns a bare <svg> sized to its own width/height attrs; scale it to the card via CSS
   (aspect ratio preserved -- Plot's default viewBox keeps the bars proportional, never
   stretched). #composition-chart-mount / #holders-chart-mount are the innerHTML placeholders
   manager.js / company.js append the Plot-backed compositionBars() fragment into -- each of its
   two nodes is its own chartCard() root (`.plot-chart`), so no dedicated outer-card class is
   needed here. */
#composition-chart-mount:empty, #holders-chart-mount:empty { display: none; }
.composition-bars svg { display: block; width: 100%; height: auto; }

/* Part-to-whole strip: one 100%-stacked bar, ordered top-1/top-2-5/top-6-10/other bands with a
   2px surface gap between them (the flex `gap` shows --bg-page through, and the container's
   overflow:hidden + border-radius keeps the ends visually rounded without rounding every
   segment). Direct labels sit inside a band when there's room; otherwise they move to the
   outside legend below -- never clipped (Phase 5 polish: composition redesign). */
.composition-strip-bar {
  display: flex;
  gap: 2px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-page);
}
.composition-strip-seg {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 2px;
}
.composition-strip-seg-label {
  /* Standardized chart typography (matches the diverging chart's rows): mono 10.5px. */
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}
.composition-strip-outside {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 2px 0;
}
.composition-strip-outside-item {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.composition-strip-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex: 0 0 auto;
}

/* ---------- paginated table (client-side pager, ClearyFi.paginatedTable) ---------- */

.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 10px 2px 0;
}
.pager-btn {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  cursor: pointer;
}
.pager-btn:hover:not(:disabled) { background: var(--bg-badge); }
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-label { font-family: var(--font-mono); font-size: 10.5px; color: var(--mono-muted); }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  /* max-width:100% caps .page (a flex item of the column-flex .app-main) at the viewport
     instead of letting it grow to its min-content, so the bounded width cascades down and the
     tab strip below scrolls within it rather than dragging the whole page wider than the screen.
     (min-width:0 alone is only a floor and doesn't stop the cross-axis min-content growth.) */
  .page { padding: 12px 20px 56px; min-width: 0; max-width: 100%; }
  /* Tab strips wider than a phone viewport scroll sideways instead of clipping. The
     min-width:0 is load-bearing: as flex items, the strip and its wrapper default to
     min-width:auto and won't shrink below their content width, so without this the
     overflow-x never engages and the strip drags the whole page wider than the viewport. */
  .controls-left, .controls-right { min-width: 0; max-width: 100%; }
  .segmented { max-width: 100%; min-width: 0; overflow-x: auto; }
  .segmented button { flex: 0 0 auto; }
  .masthead h1 { font-size: 28px; }
  .masthead-meta { text-align: left; }
  .card-grid { grid-template-columns: 1fr; }
  .app-footer .tagline { margin-left: 0; }
  /* Wide paginated tables scroll inside their own box on phones instead of pushing the whole page
     sideways (project floor: tables scroll in an overflow-x:auto container). The sticky header goes
     static here -- a page-level sticky can't work inside a scroll box, and a 10-row page hardly
     needs one. Scoped to mobile so desktop keeps its viewport-sticky headers. */
  .paged-table { overflow-x: auto; }
  .paged-table .stmt-table th { position: static; }
}/* Peer distribution strip (V3-P1). Marks are sized/filled inline from tokens by the builder --
   these rules carry only what CSS owns: the pointer affordance and focus ring on a clickable peer,
   and the mono axis labels. One fill for every peer (STYLE_GUIDE §6): the focal is distinguished by
   shape and size, never by being the only coloured mark. */
/* The strip sits in a tinted, bordered plot panel -- the v3 prototype's peerDots container
   (66px, --bg-tint, 8px radius, --border-tint border). No gridlines: the prototype has none. */
.dist-strip { display: block; overflow: visible;
  background: var(--bg-tint); border: 1px solid var(--border-tint); border-radius: 8px; }
.dist-strip-dot { opacity: 0.6; }
.dist-strip-dot.is-clickable { cursor: pointer; }
.dist-strip-dot.is-clickable:hover { opacity: 1; fill: var(--ink-soft); }
.dist-strip-dot.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dist-strip-axis {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}
.dist-strip-axis.is-median { font-weight: 600; }



/* ---------- metric tile + drawer (ClearyFi.metricTile, V3-P4) ----------
   A shared component, so it lives here rather than in company.css: /components renders it
   too, and a builder whose styles ship with one page is a builder that breaks on the next.
   Layout follows prototype.dc.html:964-1010. */

.mtile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  background: var(--bg-card);
  border: 1px solid var(--border-tint-rule);
  border-radius: 10px;
  overflow: hidden;
}
.mtile {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border-tint-rule);
  border-bottom: 1px solid var(--border-tint-rule);
}
/* An open tile takes the whole row. Two reasons, both visible without it: the drawer stretched
   its row-mates into tall empty columns, and the history chart was squeezed into one ~180px
   column, well under a legible width (§12.6 — author a chart at its container width). */
.mtile.open { background: var(--bg-tint); grid-column: 1 / -1; }
.mtile.open .mtile-spark-slot { min-height: 0; }
/* The tile face is a plain container now: the VALUE is the affordance that opens the drawer
   (dashed underline, the prototype's `cue`), and "+ chart" is a separate action. */
.mtile-face { padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mtile-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mono-muted);
  overflow-wrap: anywhere;
}
.mtile-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  align-self: flex-start;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
}
.mtile-value.has-cue { cursor: pointer; border-bottom: 1px dashed var(--mono-muted); }
.mtile-value.has-cue:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.mtile-value.has-cue:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mtile-tray {
  align-self: flex-start;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mono-muted);
}
.mtile-tray:hover { color: var(--accent-ink); }
.mtile-tray:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* N/A and N/M drain rather than disappear — an absent value stays visible and labelled. */
.mtile.drained .mtile-value { color: var(--mono-muted); font-size: 17px; }
.mtile-spark-slot { display: block; min-height: 26px; }
.mtile-spark svg { display: block; }
.mtile-foot {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--mono-muted);
}
.mtile-status { font-size: 10px; line-height: 1; }
.mtile-status.status-ok { color: var(--ink-soft); }
.mtile-status.status-approximate { color: var(--caution); }
.mtile-status.status-na, .mtile-status.status-nm { color: var(--mono-muted); }
.mtile-basis { letter-spacing: 0.05em; }
.mtile-move { color: var(--ink-soft); }
.mtile-move-note { color: var(--mono-muted); }
.mtile .tile-peer { padding: 0 13px 10px; display: flex; align-items: center; gap: 8px; }
.mtile-drawer {
  border-top: 1px solid var(--border-tint);
  padding: 11px 13px 13px;
  background: var(--bg-tint);
}
.mtile-drawer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.mdh-left { display: inline-flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.mdh-title { font-weight: 800; font-size: 14px; color: var(--ink); }
.mdh-latest { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.mdh-change { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.mdh-right { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.mdh-right .pbtn { font-size: 10px; padding: 3px 8px; }
.mtile-notes { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-family: var(--font-mono); font-size: 10px; color: var(--mono-muted); }
.tile-prov { margin-top: 9px; }
.tile-prov summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mono-muted);
  list-style: none;
}
.tile-prov summary::-webkit-details-marker { display: none; }
.tile-prov summary::before { content: "+ "; }
.tile-prov[open] summary::before { content: "\2212 "; }
.tile-prov .tile-prov-body { margin-top: 8px; }
.mtile-drawer-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mono-muted);
}
.mtile-compare { font-family: var(--font-mono); font-size: 10px; color: var(--accent); }
.tile-prov-body {
  margin: 0 0 9px;
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
  gap: 4px 12px;
  font-size: 11.5px;
}
.tile-prov-body dt { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mono-muted); }
.tile-prov-body dd { margin: 0; color: var(--ink-body); text-wrap: pretty; }
.mtile-hist:empty { display: none; }

/* Shaded snapshot sparkline (prototype microSpark :5649-5660): area in --accent-wash under a
   --ink-soft line, last point marked. Shading is per-segment, so a gap stays a gap. */
.spark-area polygon { fill: var(--accent-wash); opacity: 0.55; stroke: none; }
.spark-area polyline { stroke: var(--ink-soft); stroke-width: 1.3; fill: none; }
.spark-area circle { fill: var(--accent); }

/* Peer position as a number, not a bar (operator, 2026-07-27). */
.tile-pctile { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.mtile .tile-peer { gap: 6px; }
