/* AdvisorCal design system — Steward & Heir editorial finance aesthetic.
 *
 * Originally a warm-professional cognac palette (April 2026 handoff). As of
 * the Steward & Heir redesign (May 2026, Phase 8), the `--ac-*` tokens are
 * now mapped to Steward values so every existing surface that uses the
 * `.ac-*` classes inherits the new aesthetic without component-level edits.
 * The `--ah-*` block below holds the canonical Steward token set; the
 * `--ac-*` block here is a compatibility bridge.
 *
 * Load via <link rel="stylesheet" href="/design/tokens.css">. */
:root {
  /* Surfaces — warm parchment tonal layers (Steward) */
  --ac-bg: #f8f6f0;             /* Steward paper */
  --ac-bg-2: #f5f3ed;            /* Steward paper-dim */
  --ac-surface: #ffffff;
  --ac-surface-2: #f0eee8;       /* Steward paper-low */
  --ac-ink: #1b1c18;             /* Steward on-surface */
  --ac-ink-2: #414846;           /* Steward on-surface-variant */
  --ac-mute: #717976;            /* Steward outline-mute */
  --ac-mute-2: #c1c8c5;           /* Steward outline-strong */
  --ac-line: #dcdad4;            /* Steward outline */
  --ac-line-2: #c1c8c5;          /* Steward outline-strong */

  /* Accent — Forest (Steward primary). Was cognac in the original palette. */
  --ac-accent: #1b3a33;          /* Steward forest */
  --ac-accent-2: #03241e;         /* Steward forest-deep */
  --ac-accent-wash: #e8ece6;      /* Steward sage-wash */

  /* Semantic */
  --ac-positive: #4a7a52;
  --ac-positive-wash: #e8ece6;    /* sage tint */
  --ac-warn: #735c00;             /* Steward gold */
  --ac-warn-wash: #ffe088;        /* Steward gold-fixed */
  --ac-danger: #ba1a1a;           /* Steward error */
  --ac-danger-wash: #ffdad6;      /* Steward error-wash */

  /* Charts — Steward palette (forest / gold / sage / mute / clay) */
  --ac-chart-1: #1b3a33;
  --ac-chart-2: #735c00;
  --ac-chart-3: #2e4c45;
  --ac-chart-4: #717976;
  --ac-chart-5: #ecbe96;

  /* Radii — softer / more rounded for editorial feel */
  --ac-radius: 8px;
  --ac-radius-lg: 16px;
  --ac-radius-xl: 24px;

  /* Elevation — soft diffused tonal shadows (Steward) */
  --ac-shadow-1: 0 1px 2px rgba(28, 26, 22, 0.04);
  --ac-shadow-2: 0 4px 20px rgba(28, 26, 22, 0.04);
  --ac-shadow-3: 0 12px 48px rgba(28, 26, 22, 0.08);

  /* Typography — Steward stack */
  --ac-font-ui: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ac-font-serif: 'Libre Caslon Text', 'Cormorant Garamond', Georgia, serif;
  --ac-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  --ac-size: 16px;
}

/* Utility classes — prefixed with .ac- so they never collide with existing
 * dashboard styles. Opt-in: add class="ac-surface" to a page wrapper to
 * inherit the new system. */

.ac-surface {
  background: var(--ac-bg);
  color: var(--ac-ink);
  font-family: var(--ac-font-ui);
  font-size: var(--ac-size);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ac-display {
  font-family: var(--ac-font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.ac-mono { font-family: var(--ac-font-mono); font-variant-ligatures: none; }
.ac-muted { color: var(--ac-mute); }
.ac-overline {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ac-mute);
  font-weight: 500;
}

/* Cards */
.ac-card {
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-lg);
}
.ac-card-pad { padding: 20px; }
.ac-card-pad-lg { padding: 28px; }
.ac-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ac-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ac-card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Buttons */
.ac-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--ac-radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ac-line-2);
  background: var(--ac-surface);
  color: var(--ac-ink);
  transition: all 120ms;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.ac-btn:hover { border-color: var(--ac-ink-2); }
.ac-btn-primary {
  background: var(--ac-ink);
  color: var(--ac-bg);
  border-color: var(--ac-ink);
}
.ac-btn-primary:hover { background: var(--ac-ink-2); }
.ac-btn-accent {
  background: var(--ac-accent);
  color: #fff;
  border-color: var(--ac-accent);
}
.ac-btn-accent:hover { background: var(--ac-accent-2); border-color: var(--ac-accent-2); }
.ac-btn-ghost { border-color: transparent; background: transparent; }
.ac-btn-ghost:hover { background: rgba(28, 26, 22, 0.05); border-color: transparent; }
.ac-btn-danger { background: var(--ac-danger); color: white; border-color: var(--ac-danger); }
.ac-btn-sm { padding: 5px 10px; font-size: 12px; }

/* Badges */
.ac-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ac-bg-2);
  color: var(--ac-ink-2);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--ac-line);
}
.ac-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-mute); }
.ac-badge-new { background: var(--ac-positive-wash); color: var(--ac-positive); border-color: transparent; }
.ac-badge-new .ac-badge-dot { background: var(--ac-positive); }
.ac-badge-warm { background: var(--ac-warn-wash); color: var(--ac-warn); border-color: transparent; }
.ac-badge-off { color: var(--ac-mute); }
.ac-badge-on { background: var(--ac-ink); color: var(--ac-bg); border-color: var(--ac-ink); }
.ac-badge-danger { background: var(--ac-danger-wash); color: var(--ac-danger); border-color: transparent; }

/* Toggle */
.ac-toggle {
  width: 34px;
  height: 20px;
  background: var(--ac-line-2);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 150ms;
  flex-shrink: 0;
  border: 0;
  padding: 0;
}
.ac-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: left 150ms;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ac-toggle.on { background: var(--ac-ink); }
.ac-toggle.on::after { left: 16px; }

/* Inputs */
.ac-input,
.ac-select,
.ac-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ac-line-2);
  border-radius: var(--ac-radius);
  background: var(--ac-surface);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--ac-ink);
  transition: border-color 120ms;
}
.ac-input:focus,
.ac-select:focus,
.ac-textarea:focus { border-color: var(--ac-ink); }
.ac-field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ac-ink-2);
  margin-bottom: 6px;
}
.ac-field-help { font-size: 12px; color: var(--ac-mute); margin-top: 6px; }

/* Tables */
.ac-tbl { width: 100%; border-collapse: collapse; }
.ac-tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--ac-mute);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ac-line);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ac-surface-2);
}
.ac-tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ac-line);
  font-size: 14px;
  color: var(--ac-ink-2);
}
.ac-tbl tr:last-child td { border-bottom: 0; }
.ac-tbl tr.ac-clickable { cursor: pointer; transition: background 100ms; }
.ac-tbl tr.ac-clickable:hover { background: var(--ac-surface-2); }

/* Tabs */
.ac-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--ac-line);
  margin-bottom: 24px;
}
.ac-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ac-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  font-family: inherit;
}
.ac-tab.active { color: var(--ac-ink); border-bottom-color: var(--ac-ink); }
.ac-tab:hover { color: var(--ac-ink); }

/* Segmented control */
.ac-segmented {
  display: inline-flex;
  background: var(--ac-bg-2);
  border: 1px solid var(--ac-line);
  border-radius: 7px;
  padding: 2px;
}
.ac-segmented button {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 5px;
  color: var(--ac-mute);
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.ac-segmented button.active {
  background: var(--ac-surface);
  color: var(--ac-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Chips (filter pills) */
.ac-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--ac-line-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--ac-surface);
  cursor: pointer;
  color: var(--ac-ink);
  font-family: inherit;
}
.ac-chip.active { background: var(--ac-ink); color: var(--ac-bg); border-color: var(--ac-ink); }

/* KPI tiles */
.ac-kpi {
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-lg);
  padding: 20px;
}
.ac-kpi-label {
  font-size: 12px;
  color: var(--ac-mute);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  font-weight: 500;
}
.ac-kpi-value {
  font-family: var(--ac-font-serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--ac-ink);
}
.ac-kpi-delta {
  font-size: 12px;
  color: var(--ac-mute);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ac-kpi-delta.up { color: var(--ac-positive); }
.ac-kpi-delta.down { color: var(--ac-danger); }

/* Mono code block */
.ac-code {
  background: var(--ac-ink);
  color: #f0eadb;
  font-family: var(--ac-font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  position: relative;
}

/* Drawer / modal */
.ac-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 26, 22, 0.35);
  z-index: 100;
  animation: ac-fade 160ms ease-out;
}
@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }
.ac-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 640px;
  max-width: 94vw;
  background: var(--ac-bg);
  box-shadow: -10px 0 40px rgba(28, 26, 22, 0.15);
  z-index: 101;
  display: flex;
  flex-direction: column;
  animation: ac-slide 200ms ease-out;
}
@keyframes ac-slide { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ac-drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--ac-line);
  display: flex; justify-content: space-between; align-items: center;
}
.ac-drawer-body { flex: 1; overflow-y: auto; padding: 24px; }

/* Sidebar nav (warm aesthetic) */
.ac-sidebar {
  background: var(--ac-bg-2);
  border-right: 1px solid var(--ac-line);
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ac-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 20px;
}
.ac-sidebar-logo-mark {
  width: 28px; height: 28px;
  background: var(--ac-ink);
  color: var(--ac-bg);
  display: grid; place-items: center;
  border-radius: 6px;
  font-family: var(--ac-font-serif);
  font-size: 17px;
}
.ac-sidebar-logo-name { font-family: var(--ac-font-serif); font-size: 22px; color: var(--ac-ink); }
.ac-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ac-ink-2);
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background 120ms;
  border: 0;
  background: none;
  font-family: inherit;
}
.ac-nav-item:hover { background: rgba(28, 26, 22, 0.04); }
.ac-nav-item.active {
  background: var(--ac-ink);
  color: var(--ac-bg);
}
.ac-nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ac-line-2);
  color: var(--ac-ink-2);
}
.ac-nav-item.active .ac-nav-badge { background: rgba(255, 255, 255, 0.18); color: var(--ac-bg); }

/* Topbar */
.ac-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--ac-line);
  background: var(--ac-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.ac-topbar h1 {
  font-family: var(--ac-font-serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ac-ink);
}
.ac-topbar .ac-crumb { color: var(--ac-mute); font-size: 13px; margin-right: 10px; }

/* ──────────────────────────────────────────────────────────────────
 * Steward & Heir extension — added 2026-05-14
 * Premium editorial finance aesthetic for the platform redesign.
 * Parchment + Forest palette, Libre Caslon serif headlines, Manrope
 * body. Tokens are namespaced --ah-* so they coexist with the original
 * --ac-* set above. Opt pages in by adding class="ah-surface" to a
 * page wrapper. Source: stitch_advisorcal_platform_redesign/steward_heir/
 * DESIGN.md + developer_redesign_handoff_guide_1.md.
 * ────────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces — warm parchment tonal layers */
  --ah-paper: #f8f6f0;
  --ah-paper-dim: #f5f3ed;
  --ah-paper-low: #f0eee8;
  --ah-paper-high: #eae8e2;
  --ah-card: #ffffff;
  --ah-outline: #dcdad4;
  --ah-outline-strong: #c1c8c5;

  /* Brand — forest greens */
  --ah-forest: #1b3a33;
  --ah-forest-deep: #03241e;
  --ah-forest-soft: #2e4c45;
  --ah-mint: #accec4;
  --ah-mint-fixed: #c7eadf;
  --ah-sage-wash: #e8ece6;

  /* Ink + text */
  --ah-ink: #1b1c18;
  --ah-ink-variant: #414846;
  --ah-ink-mute: #717976;
  --ah-on-forest: #ffffff;
  --ah-on-forest-soft: #83a49b;

  /* Accents */
  --ah-gold: #735c00;
  --ah-gold-soft: #fed65b;
  --ah-gold-fixed: #ffe088;
  --ah-clay: #321901;
  --ah-clay-soft: #ecbe96;

  /* Semantic */
  --ah-error: #ba1a1a;
  --ah-error-wash: #ffdad6;
  --ah-on-error: #93000a;

  /* Typography */
  --ah-font-display: 'Libre Caslon Text', 'Cormorant Garamond', Georgia, serif;
  --ah-font-body: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing — 8px base, editorial generosity */
  --ah-space-1: 4px;
  --ah-space-2: 8px;
  --ah-space-3: 16px;
  --ah-space-4: 24px;
  --ah-space-5: 32px;
  --ah-space-6: 48px;
  --ah-space-7: 64px;
  --ah-gutter: 24px;
  --ah-margin: 64px;
  --ah-margin-mobile: 20px;
  --ah-container: 1280px;

  /* Radii — rounded, welcoming */
  --ah-radius-sm: 4px;
  --ah-radius: 8px;
  --ah-radius-md: 12px;
  --ah-radius-lg: 16px;
  --ah-radius-xl: 24px;
  --ah-radius-2xl: 32px;
  --ah-radius-full: 9999px;

  /* Elevation — soft diffused tonal shadows */
  --ah-shadow-sm: 0 1px 2px rgba(28, 26, 22, 0.04);
  --ah-shadow: 0 4px 20px rgba(28, 26, 22, 0.04);
  --ah-shadow-md: 0 8px 28px rgba(28, 26, 22, 0.06);
  --ah-shadow-lg: 0 12px 48px rgba(28, 26, 22, 0.08);
  --ah-shadow-glow: 0 0 0 4px rgba(27, 58, 51, 0.08);
}

/* Page wrapper opt-in */
.ah-surface {
  background: var(--ah-paper);
  color: var(--ah-ink);
  font-family: var(--ah-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

/* Typography utilities */
.ah-display {
  font-family: var(--ah-font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.02em;
  color: var(--ah-forest);
}
.ah-headline {
  font-family: var(--ah-font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  color: var(--ah-forest);
}
.ah-headline-md {
  font-family: var(--ah-font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  color: var(--ah-forest);
}
.ah-italic { font-style: italic; font-weight: 400; }
.ah-body-lg { font-size: 18px; line-height: 28px; color: var(--ah-ink-variant); }
.ah-body { font-size: 16px; line-height: 24px; color: var(--ah-ink-variant); }
.ah-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.02em;
  color: var(--ah-ink);
}
.ah-overline {
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ah-ink-mute);
}

/* Card — the system hallmark: pure white, large radius, generous padding,
 * 1px outline, soft diffused shadow. */
.ah-card {
  background: var(--ah-card);
  border: 1px solid var(--ah-paper-high);
  border-radius: var(--ah-radius-xl);
  box-shadow: var(--ah-shadow);
  padding: var(--ah-space-5);
}
.ah-card-pad-lg { padding: var(--ah-space-6); }
.ah-card-flat { box-shadow: none; }
.ah-card-tonal {
  background: var(--ah-paper-dim);
  border: 1px solid var(--ah-outline);
}
.ah-card-inverse {
  background: var(--ah-forest);
  color: var(--ah-on-forest);
  border-color: var(--ah-forest);
}

/* Buttons — forest primary, sage secondary, ghost */
.ah-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--ah-radius);
  font-family: var(--ah-font-body);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--ah-outline);
  background: var(--ah-card);
  color: var(--ah-ink);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.ah-btn:hover { border-color: var(--ah-forest); }
.ah-btn:active { transform: scale(0.97); }
.ah-btn-primary {
  background: var(--ah-forest);
  color: var(--ah-on-forest);
  border-color: var(--ah-forest);
  box-shadow: var(--ah-shadow-sm);
}
.ah-btn-primary:hover {
  background: var(--ah-forest-deep);
  border-color: var(--ah-forest-deep);
  box-shadow: var(--ah-shadow-md);
}
.ah-btn-secondary {
  background: var(--ah-sage-wash);
  color: var(--ah-forest);
  border-color: var(--ah-sage-wash);
}
.ah-btn-secondary:hover { background: var(--ah-mint); border-color: var(--ah-mint); }
.ah-btn-ghost { background: transparent; border-color: transparent; }
.ah-btn-ghost:hover { background: var(--ah-sage-wash); border-color: transparent; }
.ah-btn-pill { border-radius: var(--ah-radius-full); }
.ah-btn-sm { padding: 6px 14px; font-size: 13px; }

/* Chips — sage-wash pills with tight tracking */
.ah-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--ah-sage-wash);
  border-radius: var(--ah-radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ah-forest);
  font-family: var(--ah-font-body);
}
.ah-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ah-forest);
}
.ah-chip-warning { background: var(--ah-error-wash); color: var(--ah-on-error); }
.ah-chip-strategic { background: var(--ah-gold-fixed); color: var(--ah-gold); }
.ah-chip-warning .ah-chip-dot { background: var(--ah-error); }
.ah-chip-strategic .ah-chip-dot { background: var(--ah-gold); }

/* Inputs — subtle fill, focus to forest */
.ah-input,
.ah-select,
.ah-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--ah-font-body);
  font-size: 15px;
  background: var(--ah-paper-dim);
  border: 1px solid transparent;
  border-bottom-color: var(--ah-outline);
  border-radius: var(--ah-radius);
  color: var(--ah-ink);
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.ah-input:focus,
.ah-select:focus,
.ah-textarea:focus {
  border-color: var(--ah-forest);
  background: var(--ah-card);
}

/* Sidebar — fixed-left 256px column, paper-dim background */
.ah-sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 256px;
  height: 100vh;
  background: var(--ah-paper);
  border-right: 1px solid var(--ah-outline);
  padding: 32px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 50;
}
.ah-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}
.ah-sidebar-brand-mark {
  width: 40px; height: 40px;
  background: var(--ah-forest);
  color: var(--ah-on-forest);
  display: grid; place-items: center;
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow-sm);
}
.ah-sidebar-brand-name {
  font-family: var(--ah-font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ah-ink);
  margin: 0;
}
.ah-sidebar-brand-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ah-ink-mute);
  margin-top: 4px;
}
.ah-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.ah-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--ah-radius);
  font-family: var(--ah-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ah-ink-variant);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}
.ah-nav-item:hover { background: var(--ah-sage-wash); color: var(--ah-ink); }
.ah-nav-item.active {
  background: var(--ah-card);
  color: var(--ah-ink);
  box-shadow: var(--ah-shadow-sm);
}
.ah-nav-item.active .ah-nav-icon { color: var(--ah-forest); }
.ah-nav-icon { color: var(--ah-ink-variant); }
.ah-sidebar-footer-card {
  background: var(--ah-forest);
  color: var(--ah-on-forest);
  padding: 14px;
  border-radius: var(--ah-radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Top bar — sticky, transparent blur, active-household chip */
.ah-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--ah-margin);
  background: rgba(248, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 218, 212, 0.5);
}
.ah-topbar-title {
  font-family: var(--ah-font-display);
  font-size: 24px;
  line-height: 32px;
  color: var(--ah-forest);
  margin: 0;
}

/* Main canvas — 1280px max-width, generous editorial spacing */
.ah-canvas {
  margin-left: 256px;
  min-height: 100vh;
  background: var(--ah-paper);
}
.ah-container {
  max-width: var(--ah-container);
  margin: 0 auto;
  padding: 48px var(--ah-margin) 96px;
}

/* KPI tile (Steward variant) */
.ah-kpi {
  background: var(--ah-card);
  border: 1px solid var(--ah-paper-high);
  border-radius: var(--ah-radius-xl);
  box-shadow: var(--ah-shadow);
  padding: 28px;
}
.ah-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ah-ink-mute);
  margin-bottom: 12px;
}
.ah-kpi-value {
  font-family: var(--ah-font-display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ah-forest);
  margin: 0;
}
.ah-kpi-delta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ah-ink-mute);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Floating action button — bottom-right, forest fill */
.ah-fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  border-radius: var(--ah-radius-full);
  background: var(--ah-forest);
  color: var(--ah-on-forest);
  border: 0;
  display: grid;
  place-items: center;
  box-shadow: var(--ah-shadow-lg);
  cursor: pointer;
  transition: transform 150ms ease;
  z-index: 60;
}
.ah-fab:hover { transform: scale(1.05); }
.ah-fab:active { transform: scale(0.95); }
