/*
 * Mizani — the Mpangaj + Karibu design system (the frontend contract,
 * §4 "Design system — Mizani"). The single stylesheet authority for colour, type,
 * spacing, status and component rules; it replaced theme-override.css and the
 * selectable Clean theme on 2026-09-28.
 *
 * How it works without a Tailwind rebuild: the precompiled tailwind.min.css reads
 * every colour, font and radius through CSS variables declared inside
 * `@layer theme`. Unlayered declarations always beat layered ones, so the :root
 * block below re-points every utility (`bg-slate-100`, `text-brand-600`,
 * `rounded-xl`, …) at the Mizani palette app-wide. This file is linked AFTER the
 * layout's inline <style>, so its component rules win at equal specificity.
 *
 * Contrast (measured, WCAG 2.x): ink 15.0, ink-2 8.8, muted 5.8 on canvas; white on
 * primary 9.2; every status pair ≥ 6.6; focus ring 4.7 against canvas.
 */

:root {
  /* ── Mizani tokens ─────────────────────────────────────────────────────── */
  --mz-canvas: #F5F4EF;
  --mz-surface: #FFFFFF;
  --mz-sunken: #EEEDE7;
  --mz-ink: #16211C;
  --mz-ink-2: #3B4741;
  --mz-muted: #56625B;
  --mz-line: #DDDBD2;
  --mz-line-strong: #C9C6BB;

  --mz-primary: #0E5147;
  --mz-primary-hover: #0B4139;
  --mz-primary-press: #0A332D;
  --mz-primary-tint: #E4EFEC;
  --mz-focus: #1F7A6A;

  --mz-rail: #0F2B27;
  --mz-rail-raised: #163A34;
  --mz-rail-active: #1B5B51;
  --mz-rail-text: #D5E2DD;
  --mz-rail-muted: #9DB5AD;

  --mz-verified-ink: #1B5E3C;   --mz-verified-bg: #E4F1E8;
  --mz-reported-ink: #6F4E0A;   --mz-reported-bg: #FAF0D4;
  --mz-disputed-ink: #8A3310;   --mz-disputed-bg: #FBE7DD;
  --mz-overdue-ink: #9B2317;    --mz-overdue-bg: #FBE6E3;
  --mz-unknown-ink: #454B52;    --mz-unknown-bg: #ECEBE6;
  --mz-info-ink: #1D4A73;       --mz-info-bg: #E3EDF6;

  --mz-radius-control: 8px;
  --mz-radius-card: 12px;
  --mz-shadow-overlay: 0 12px 32px -8px rgba(15, 43, 39, .28), 0 2px 6px rgba(15, 43, 39, .08);

  --mz-font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mz-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --mz-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* ── Tailwind variables re-pointed at Mizani ───────────────────────────── */
  --font-sans: var(--mz-font-ui);
  --font-serif: var(--mz-font-display);
  --font-mono: var(--mz-font-mono);

  --color-slate-50:  #F9F8F4;
  --color-slate-100: var(--mz-canvas);
  --color-slate-200: var(--mz-line);
  --color-slate-300: var(--mz-line-strong);
  --color-slate-400: #979C93;           /* non-text only (icons, disabled strokes) */
  --color-slate-500: #5B675F;
  --color-slate-600: var(--mz-muted);
  --color-slate-700: var(--mz-ink-2);
  --color-slate-800: var(--mz-ink);
  --color-slate-900: #0F1A16;
  --color-slate-950: #0A120F;

  --color-brand-50:  var(--mz-primary-tint);
  --color-brand-100: #CFE3DE;
  --color-brand-500: var(--mz-primary);
  --color-brand-600: var(--mz-primary-hover);
  --color-brand-700: var(--mz-rail-raised);
  --color-brand-900: var(--mz-rail);

  --color-indigo-50:  var(--mz-primary-tint);
  --color-indigo-200: #B9D2CB;
  --color-indigo-300: var(--mz-rail-muted);
  --color-indigo-500: var(--mz-primary);
  --color-indigo-600: var(--mz-primary-hover);
  --color-indigo-700: var(--mz-primary-press);
  --color-teal-50:  var(--mz-primary-tint);
  --color-teal-500: var(--mz-primary);
  --color-teal-700: var(--mz-primary-press);

  /* Blue was only ever muted text on the dark rail; it follows the rail palette. */
  --color-blue-50:  var(--mz-info-bg);
  --color-blue-100: #D2E2F0;
  --color-blue-200: var(--mz-rail-text);
  --color-blue-300: var(--mz-rail-muted);
  --color-blue-400: var(--mz-rail-muted);
  --color-blue-500: #3A6F9E;
  --color-blue-600: #2A5B87;
  --color-blue-700: var(--mz-info-ink);

  /* Orange was the "create" accent. Mizani has one primary action colour. */
  --color-orange-50:  var(--mz-primary-tint);
  --color-orange-100: #CFE3DE;
  --color-orange-500: var(--mz-primary);
  --color-orange-600: var(--mz-primary-hover);
  --color-orange-700: var(--mz-primary);
  --color-orange-800: var(--mz-primary-hover);

  /* Green / emerald: the verified grade. */
  --color-emerald-50:  var(--mz-verified-bg);
  --color-emerald-100: #CDE6D6;
  --color-emerald-200: #A9D3B8;
  --color-emerald-300: #7FBD97;
  --color-emerald-400: #7FC29B;         /* legible on the dark rail */
  --color-emerald-500: #2F7D52;
  --color-emerald-600: var(--mz-verified-ink);
  --color-emerald-700: #174F33;
  --color-emerald-800: #123D28;
  --color-green-50:  var(--mz-verified-bg);
  --color-green-200: #A9D3B8;
  --color-green-600: var(--mz-verified-ink);
  --color-green-700: #174F33;

  /* Amber: reported / pending. */
  --color-amber-50:  var(--mz-reported-bg);
  --color-amber-100: #F4E3B0;
  --color-amber-200: #EAD08A;
  --color-amber-300: #DDB75C;
  --color-amber-400: #CC9D35;
  --color-amber-500: #A87B1C;
  --color-amber-600: #8A6310;
  --color-amber-700: var(--mz-reported-ink);
  --color-amber-800: #553B07;

  /* Red / rose: overdue, failure, destructive. */
  --color-red-50:  var(--mz-overdue-bg);
  --color-red-100: #F6D0CB;
  --color-red-200: #EDB0A8;
  --color-red-300: #E08A7F;
  --color-red-400: #CF5F51;
  --color-red-500: #B83A2B;
  --color-red-600: var(--mz-overdue-ink);
  --color-red-700: #7E1C12;
  --color-red-800: #62160E;
  --color-rose-50:  var(--mz-overdue-bg);
  --color-rose-600: var(--mz-overdue-ink);
  --color-rose-700: #7E1C12;
  --color-pink-50:  var(--mz-disputed-bg);
  --color-pink-200: #EFC3AE;
  --color-pink-500: #B4532A;
  --color-pink-700: var(--mz-disputed-ink);

  /* Sky / violet / purple: neutral information and category chips. */
  --color-sky-50:  var(--mz-info-bg);
  --color-sky-200: #B9D0E6;
  --color-sky-400: #5C8DBB;
  --color-sky-500: #3A6F9E;
  --color-sky-600: #2A5B87;
  --color-sky-700: var(--mz-info-ink);
  --color-sky-800: #173B5C;
  --color-violet-50:  var(--mz-info-bg);
  --color-violet-200: #B9D0E6;
  --color-violet-500: #3A6F9E;
  --color-violet-600: #2A5B87;
  --color-violet-700: var(--mz-info-ink);
  --color-violet-800: #173B5C;
  --color-purple-50:  var(--mz-info-bg);
  --color-purple-100: #D2E2F0;
  --color-purple-500: #3A6F9E;
  --color-purple-600: #2A5B87;
  --color-purple-700: var(--mz-info-ink);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 12px;
  --radius-3xl: 16px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body { background-color: var(--mz-canvas); color: var(--mz-ink); font-family: var(--mz-font-ui); }
body.bg-white { background-color: var(--mz-surface); }
:focus-visible { outline: 2px solid var(--mz-focus); outline-offset: 2px; }
.tabular, .mz-amount, [data-money] { font-variant-numeric: tabular-nums; }
.font-serif { letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* Cards: hairline structure, no decorative shadow. */
.card-shadow { box-shadow: none; border: 1px solid var(--mz-line); }
.rounded-2xl.card-shadow, .bg-white.rounded-2xl { border-radius: var(--mz-radius-card); }

/* ── Navigation rail (sidebar) ───────────────────────────────────────────── */
aside#main-sidebar { background: var(--mz-rail); }
.nav-group-label {
  font-family: var(--mz-font-ui); font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mz-rail-muted); padding: 0 12px 6px;
}
.nav-item {
  border-radius: var(--mz-radius-control); font-size: 14px; padding: 9px 12px; gap: 11px;
  color: var(--mz-rail-text); position: relative;
}
.nav-item:not(.active) { color: var(--mz-rail-text); }
.nav-item:not(.active):hover { background: var(--mz-rail-raised); color: #fff; }
.nav-item.active { background: var(--mz-rail-active); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: #7FC29B;
}
.nav-item:focus-visible { outline-color: #7FC29B; }

/* ── Phone header and tab bar ────────────────────────────────────────────── */
#mobile-header { background: var(--mz-rail); }
.bottom-nav { background: var(--mz-surface); border-top: 1px solid var(--mz-line); }
.bottom-nav-item { color: var(--mz-muted); position: relative; }
.bottom-nav-item.active, .bottom-nav-item[aria-current="page"] { color: var(--mz-primary); }
.bottom-nav-item.active::before, .bottom-nav-item[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--mz-primary);
}
.bottom-nav-item span { font-size: 12px; font-weight: 600; }

/* Page identity on the phone header (MZ-2): title over the account context. */
.mz-phone-identity { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mz-phone-title { color: #fff; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mz-phone-context { color: var(--mz-rail-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Account context chip (desktop top bar). */
.mz-context {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 12rem;
  padding: 4px 12px 4px 6px; border: 1px solid var(--mz-line); border-radius: 999px;
  background: var(--mz-surface); color: var(--mz-ink-2); font-size: 13px; font-weight: 600;
}
.mz-context-mark {
  width: 26px; height: 26px; border-radius: 999px; background: var(--mz-primary-tint);
  color: var(--mz-primary); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.mz-context-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-context-meta { color: var(--mz-muted); font-weight: 500; white-space: nowrap; }

/* ── Page action (the view's one primary action, MZ-2) ───────────────────── */
.ui-primary-action {
  background: var(--mz-primary) !important; color: #fff !important;
  border-radius: var(--mz-radius-control) !important; box-shadow: none !important;
  min-height: 44px; font-weight: 600;
}
.ui-primary-action:hover { background: var(--mz-primary-hover) !important; }
.ui-primary-action:active { background: var(--mz-primary-press) !important; }

/* ── Buttons: one shape, five roles (FRONTEND_REPOSITIONING_SPEC §4 "Buttons") ──
   The role is chosen by the CRUD intent of the action, never by taste:
     mz-btn-primary    Save / Confirm / Send, and the page's one main Create — filled
     mz-btn-secondary  Edit, view, change, assign, any other action on a record — outlined
     mz-btn-quiet      Cancel / Close / Back / dismiss — plain neutral text
     mz-btn-danger     Delete, remove, revoke, reverse, withdraw — red outline
   Create is always written "+ Add …": filled when it is the page's main action,
   outlined (mz-btn-secondary) when it sits inside a card, panel or dialog.
     mz-btn-danger-solid  the final confirm inside a destructive dialog only
   Labels are always words. The only icons a button carries are the + on Create and
   the × that closes a dialog. Hover only ever deepens a button (filled → darker,
   outlined → a faint wash); no button lightens or changes hue on hover. */
/* Declared in Tailwind's `components` layer so its utilities (hidden, md:hidden, w-full,
   ml-auto …) still win over these defaults; unlayered rules would beat every utility. */
@layer components {
.mz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 0 16px; border-radius: var(--mz-radius-control); font-size: 14px; font-weight: 600;
  line-height: 1.2; cursor: pointer; border: 1px solid transparent; text-decoration: none;
  white-space: nowrap; box-shadow: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
@media (pointer: coarse), (max-width: 767px) { .mz-btn { min-height: 44px; } }
.mz-btn:disabled, .mz-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.mz-btn-primary { background: var(--mz-primary); color: #fff; }
.mz-btn-primary:hover { background: var(--mz-primary-hover); color: #fff; }
.mz-btn-primary:active { background: var(--mz-primary-press); }
.mz-btn-secondary { background: var(--mz-surface); color: var(--mz-ink); border-color: var(--mz-line-strong); }
.mz-btn-secondary:hover { background: var(--mz-sunken); color: var(--mz-ink); }
.mz-btn-quiet { background: transparent; color: var(--mz-ink-2); padding: 0 12px; }
.mz-btn-quiet:hover { background: var(--mz-sunken); color: var(--mz-ink); }
.mz-btn-danger { background: var(--mz-surface); color: var(--mz-overdue-ink); border-color: #EDB0A8; }
.mz-btn-danger:hover { background: var(--mz-overdue-bg); color: var(--mz-overdue-ink); }
.mz-btn-danger-solid { background: var(--mz-overdue-ink); color: #fff; }
.mz-btn-danger-solid:hover { background: #7E1D13; color: #fff; }
/* Compact: the same roles inside table rows and cards. Still 44 px to touch. */
.mz-btn-sm, td .mz-btn, .ui-data-card .mz-btn, .ui-entity-footer .mz-btn, .mz-row-actions .mz-btn {
  min-height: 32px; padding: 0 12px; font-size: 13px;
}
@media (pointer: coarse), (max-width: 767px) {
  .mz-btn-sm, td .mz-btn, .ui-data-card .mz-btn, .ui-entity-footer .mz-btn, .mz-row-actions .mz-btn { min-height: 44px; }
}
.mz-btn-block { display: flex; width: 100%; }
/* The only icon-only button: closes a dialog or panel. */
.mz-btn-close {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--mz-radius-control); color: var(--mz-muted); background: transparent;
  border: 0; cursor: pointer; flex-shrink: 0;
}
.mz-btn-close:hover { background: var(--mz-sunken); color: var(--mz-ink); }
@media (pointer: coarse), (max-width: 767px) { .mz-btn-close { width: 44px; height: 44px; } }
/* ── Card exception: compact entity cards (unit and building grids) ──────────
   A card is too narrow for a row of worded buttons, so its record actions are
   icon buttons from the fixed vocabulary in core/ui.js (CARD_ICONS) — never an
   ad-hoc icon. Same role colours as everywhere else (secondary outline, danger
   red); a title tooltip and aria-label always carry the words. Create never sits
   on a card. */
.mz-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mz-card-actions .mz-btn.mz-btn-icon {
  width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; gap: 0;
}
.mz-btn-icon svg { width: 16px; height: 16px; flex-shrink: 0; }
@media (pointer: coarse), (max-width: 767px) {
  .mz-card-actions .mz-btn.mz-btn-icon { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
/* The status label on a unit card's photo is itself the status control. */
.mz-status-toggle { cursor: pointer; border: 0; gap: 6px; }
.mz-status-toggle:hover { filter: brightness(0.96); }
@media (pointer: coarse), (max-width: 767px) { .mz-status-toggle { min-height: 44px; } }
/* A row's actions are always visible and sit together at the right of the row. */
.mz-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mz-row-actions .mz-btn, .mz-row-chevron { flex-shrink: 0; }

/* ── Rows: a row looks clickable only when it is ─────────────────────────────
   Tables whose rows open a record carry .mz-row-link on the <tr> (and a › cell);
   every other row stays still — no pointer, no hover wash. */
.mz-row-link { cursor: pointer; transition: background-color .12s; }
.mz-row-link:hover { background: var(--mz-primary-tint); }
.mz-row-link:focus-visible { outline: 2px solid var(--mz-focus); outline-offset: -2px; }
.mz-row-chevron { color: var(--mz-muted); width: 28px; text-align: right; }
.mz-row-link:hover .mz-row-chevron { color: var(--mz-primary); }
}

/* ── Status: the evidence grades (label + glyph, never colour alone) ─────── */
.mz-status {
  display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 9px 2px 7px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent;
}
.mz-status::before { font-size: 11px; line-height: 1; font-weight: 700; }
.mz-status-verified { color: var(--mz-verified-ink); background: var(--mz-verified-bg); }
.mz-status-verified::before { content: "\2713"; }                 /* ✓ */
.mz-status-reported { color: var(--mz-reported-ink); background: var(--mz-reported-bg); }
.mz-status-reported::before { content: "\25F7"; }                 /* ◷ clock */
.mz-status-disputed { color: var(--mz-disputed-ink); background: var(--mz-disputed-bg); }
.mz-status-disputed::before { content: "\2691"; }                 /* ⚑ flag */
.mz-status-overdue { color: var(--mz-overdue-ink); background: var(--mz-overdue-bg); }
.mz-status-overdue::before { content: "!"; }
.mz-status-unknown { color: var(--mz-unknown-ink); background: var(--mz-unknown-bg); border: 1px dashed #9A9E95; }
.mz-status-unknown::before { content: "?"; }
.mz-status-info { color: var(--mz-info-ink); background: var(--mz-info-bg); }
.mz-status-info::before { content: "\2022"; }                     /* • */
.mz-status-neutral { color: var(--mz-ink-2); background: var(--mz-sunken); }

/* The long-standing .status-pill follows the same shape. */
.status-pill { border-radius: 999px; font-size: 12px; letter-spacing: 0; }

/* ── Panels, figures and sections (Overview and dense views) ─────────────── */
.mz-page { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 768px) { .mz-page { padding: 24px 28px; gap: 24px; } }
.mz-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.mz-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mz-muted); }
.mz-h1 { font-family: var(--mz-font-display); font-weight: 500; font-size: clamp(1.5rem, 1.3rem + .9vw, 1.875rem); line-height: 1.15; color: var(--mz-ink); letter-spacing: -0.01em; }
.mz-h2 { font-size: 16px; font-weight: 650; color: var(--mz-ink); }
.mz-sub { font-size: 13px; color: var(--mz-muted); }

.mz-panel { background: var(--mz-surface); border: 1px solid var(--mz-line); border-radius: var(--mz-radius-card); }
.mz-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 16px 16px 12px; }
@media (min-width: 768px) { .mz-panel-head { padding: 18px 20px 12px; } }
.mz-panel-body { padding: 0 16px 16px; }
@media (min-width: 768px) { .mz-panel-body { padding: 0 20px 20px; } }

/* Position ledger: one row per figure; label + definition left, amount right. */
.mz-position { container-type: inline-size; }
.mz-position-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@container (min-width: 620px) { .mz-position-grid { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.mz-figure { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--mz-sunken); }
.mz-figure-label { font-size: 14px; color: var(--mz-ink-2); min-width: 0; }
.mz-figure-def { display: block; font-size: 12px; color: var(--mz-muted); margin-top: 2px; }
.mz-figure-value { font-size: 16px; font-weight: 650; color: var(--mz-ink); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.mz-figure-value .mz-cur { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--mz-muted); margin-right: 4px; }
.mz-figure-lead { padding: 4px 0 14px; border-top: 0; align-items: flex-end; }
.mz-figure-lead .mz-figure-value { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 650; letter-spacing: -0.01em; }
.mz-figure-lead .mz-figure-value .mz-cur { font-size: 13px; }
.mz-figure-value.is-overdue { color: var(--mz-overdue-ink); }
.mz-figure-value.is-reported { color: var(--mz-reported-ink); }
.mz-figure-value.is-disputed { color: var(--mz-disputed-ink); }
.mz-figure-value.is-verified { color: var(--mz-verified-ink); }
.mz-currency-block + .mz-currency-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--mz-line); }
.mz-note { font-size: 12px; color: var(--mz-muted); }
.mz-note-warn { font-size: 13px; color: var(--mz-reported-ink); background: var(--mz-reported-bg); border-radius: var(--mz-radius-control); padding: 8px 12px; }

/* Facts row: small labelled numbers with their definitions. */
.mz-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; }
.mz-fact { padding: 12px 16px; border-top: 1px solid var(--mz-sunken); }
@media (min-width: 768px) { .mz-fact { padding: 14px 20px; border-top: 0; border-left: 1px solid var(--mz-sunken); } .mz-fact:first-child { border-left: 0; } }
.mz-fact-value { font-size: 20px; font-weight: 650; color: var(--mz-ink); font-variant-numeric: tabular-nums; }
.mz-fact-label { font-size: 13px; font-weight: 600; color: var(--mz-ink-2); }
.mz-fact-def { font-size: 12px; color: var(--mz-muted); }

/* Work list rows (queue items on Overview). */
.mz-work-list { list-style: none; margin: 0; padding: 0; }
.mz-work-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px;
  text-align: left; background: none; border: 0; border-top: 1px solid var(--mz-sunken); cursor: pointer; color: inherit;
}
@media (min-width: 768px) { .mz-work-row { padding: 10px 20px; } }
.mz-work-row:hover { background: #FAFAF7; }
.mz-work-main { flex: 1 1 auto; min-width: 0; }
.mz-work-title { font-size: 14px; font-weight: 600; color: var(--mz-ink); overflow-wrap: anywhere; }
.mz-work-meta { font-size: 12px; color: var(--mz-muted); overflow-wrap: anywhere; }
.mz-work-chev { color: var(--mz-line-strong); flex-shrink: 0; }
.mz-bands { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
@media (min-width: 768px) { .mz-bands { padding: 0 20px 14px; } }

/* ── Empty, error and loading states ─────────────────────────────────────── */
.mz-empty { padding: 20px 16px; display: flex; gap: 12px; align-items: flex-start; }
@media (min-width: 768px) { .mz-empty { padding: 20px; } }
.mz-empty-title { font-size: 14px; font-weight: 600; color: var(--mz-ink); }
.mz-empty-text { font-size: 13px; color: var(--mz-muted); }
.mz-error { padding: 14px 16px; font-size: 13px; color: var(--mz-overdue-ink); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mz-skeleton { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--mz-sunken) 0%, #F6F5F1 50%, var(--mz-sunken) 100%); background-size: 200% 100%; animation: mz-shimmer 1.4s ease-in-out infinite; }
@keyframes mz-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.mz-skeleton-line { height: 14px; margin: 12px 0; }
.mz-skeleton-figure { height: 34px; width: 55%; margin: 6px 0 14px; }

.mz-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The closed More sheet is off-screen AND hidden from focus and assistive tech;
   visibility flips after the slide-out, like the phone sidebar (MZ-2). */
#more-sheet { visibility: hidden; transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear .28s; }
#more-sheet.open { visibility: visible; transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s; }

/* Desktop top bar: the display-currency picker only where there is room for its
   label; the account chip narrows on a tablet-width content area. */
.mz-topbar-currency { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--mz-muted); }
@media (min-width: 1100px) { .mz-topbar-currency { display: flex; } }
@media (min-width: 1100px) { .mz-context { max-width: 18rem; } }
.mz-more { padding: 12px 16px; border-top: 1px solid var(--mz-sunken); }
@media (min-width: 768px) { .mz-more { padding: 12px 20px; } }

/* Position breakdown: a native disclosure, closed on a phone, open on desktop. */
.mz-breakdown > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 13px; font-weight: 600; color: var(--mz-primary);
}
.mz-breakdown > summary::-webkit-details-marker { display: none; }
.mz-breakdown > summary::after { content: "\25BE"; transition: transform .15s; }
.mz-breakdown[open] > summary::after { transform: rotate(180deg); }
