/* ═══════════════════════════════════════════════════════════════════════════
   DISCIPLINE MIRROR — Full CSS (base + light-mode + redesign v2)
   Lazy-loaded when disciplineMirror.openModal() is called.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Standing section host (#dxStandingSection / #bxMirrorInline) ────────────
   Shared wrapper built by disciplineMirror/sectionHost.js's
   createMirrorSectionHost() — both deskShell.js (desktop Discipline room)
   and mobileShell.js (mobile Discipline tab) insert this same host, so its
   base styling lives here (loaded by both shells via mountInline()'s
   loadCSS('css/lazy/mirror.css') call) rather than in a desktop-only file
   (One Mirror Phase C, docs/ONE_MIRROR_INSIGHTS_PLAN.md §3 Phase C).
   ─────────────────────────────────────────────────────────────────────────── */

.dx-standing-section {
  padding: 0 16px 32px;
}

/* Build 2 (spec §3.2 — the mono rule): JetBrains Mono is for numbers and
   timestamps only, never a label. "Discipline Mirror" becomes sentence-case
   DM Sans at 13px, matching every other section heading in the room. */
.dx-standing-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-mute, #475569);
  margin-bottom: 16px;
}

body.light-theme .dx-standing-label { color: #9aaabb; }

/* Loading state shown while all queries run in parallel */
.bx-dm-loading {
  padding: 40px 24px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #475569;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DISCIPLINE MIRROR REDESIGN — Surface System, Rings, Grade Chips
   Tickets 3-7: replaces dashed borders with elevation tokens, adds radial rings
   and metallic grade chips, surfaces Commitment Cycle layer in modal.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Surface tokens (scoped to analytics card) ─────────────────────────────── */
.bx-analytics-card {
  --bx-sf1-bg:     linear-gradient(180deg, #0f172a 0%, #0b1322 100%);
  --bx-sf1-border: #1e293b;
  --bx-sf1-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  --bx-ring-ok:    #10b981;
  --bx-ring-warn:  #f59e0b;
  --bx-ring-bad:   #ef4444;
  --bx-ring-track: #1e293b;
  --bx-ring-idle:  #2d3a52;
}

/* ── Top row: 60 / 40 split ─────────────────────────────────────────────────── */
.bx-mirror-top-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* ── Hero Identity card ─────────────────────────────────────────────────────── */
.bx-identity-hero {
  background: var(--bx-sf1-bg);
  border: 1px solid var(--bx-sf1-border);
  border-radius: 6px;
  box-shadow: var(--bx-sf1-shadow);
  padding: 18px 20px;
}
.bx-identity-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
}
.bx-identity-hero-loading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #475569;
  padding: 8px 0;
}
/* Override issuance to sit at the bottom of the hero card */
.bx-identity-issuance-bottom {
  margin-top: auto;
  padding-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #475569;
  letter-spacing: 0.8px;
}

/* ── Cycle Trajectory card ─────────────────────────────────────────────────── */
.bx-cycle-card {
  background-color: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 4px;
  box-shadow: var(--bx-sf1-shadow);
  padding: 20px;
  color: #94a3b8;
}
.bx-cycle-card-inner  { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.bx-cycle-label       { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: #64748b; text-transform: uppercase; }
.bx-cycle-header-row  { display: flex; justify-content: space-between; align-items: center; }
.bx-cycle-id          { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: #e2e8f0; letter-spacing: 1px; }
.bx-cycle-projected-row { display: flex; align-items: center; gap: 10px; }
.bx-cycle-projected-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: #64748b; letter-spacing: 1.2px; text-transform: uppercase; }
.bx-cycle-no-data     { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: #475569; }
.bx-cycle-day-counter { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #94a3b8; }
.bx-cycle-empty       { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #475569; }
.bx-cycle-begin-btn {
  background: transparent;
  border: 1px solid #1e293b;
  border-radius: 4px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 4px;
  align-self: flex-start;
  transition: border-color 0.15s, color 0.15s;
}
.bx-cycle-begin-btn:hover { border-color: #334155; color: #94a3b8; }

/* Stage badges */
.bx-cycle-stage-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}
.bx-stage-cooldown { background: rgba(239,68,68,0.12);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.bx-stage-vacation { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.bx-stage-verdict  { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.bx-cycle-stage-copy { font-size: 10px; color: #64748b; }

/* Probation pill */
.bx-probation-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
}

/* Progress bar */
/* Razor tension line */
.bx-tension-line-container {
  height: 2px;
  background-color: #1e293b;
  margin-top: 4px;
}
.bx-tension-line-fill {
  height: 100%;
  background-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56,189,248,0.4);
  transition: width 0.5s ease;
  min-width: 2px;
}

/* Streak row */
.bx-cycle-streak-row   { display: flex; justify-content: flex-start; align-items: center; gap: 12px; margin-top: auto; }
.bx-cycle-streak-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: #64748b; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.bx-cycle-streak-dots  { display: flex; gap: 5px; align-items: center; }

/* Streak Square Notch Pips */
.bx-streak-pip {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 0;
  background-color: #1e293b;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
  flex-shrink: 0;
}

/* ── Grade chips ─────────────────────────────────────────────────────────────── */
.bx-grade-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}

/* ── Grade Coin — Minted Obsidian (conic-gradient machined rim) ─────────────── */

/* 1. Base Container: The Machined Metallic Rim */
.bx-grade-coin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 12px 24px rgba(0,0,0,0.9), 0 4px 8px rgba(0,0,0,0.6);
  flex-shrink: 0;
  transform-style: preserve-3d;
  animation: vault-turn 12s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* 2. Obsidian Core: raised center with deep trench around it */
.bx-grade-coin::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a2d34 0%, #111216 60%, #050508 100%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.9),
    inset 0 2px 4px rgba(255,255,255,0.1),
    inset 0 -4px 8px rgba(0,0,0,0.9);
  z-index: 1;
}

/* 3. Engraved Text: stamped into the stone */
.bx-grade-coin-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  z-index: 2;
  text-transform: uppercase;
  line-height: 1;
}

/* PLATINUM */
.bx-grade-coin-platinum {
  background: conic-gradient(from 135deg, #2a3a4a, #8fa8c0, #ffffff, #8fa8c0, #2a3a4a, #8fa8c0, #ffffff, #8fa8c0, #2a3a4a);
}
.bx-grade-coin-platinum .bx-grade-coin-text {
  color: #c8d8e8;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(255,255,255,0.3);
}

/* GOLD */
.bx-grade-coin-gold {
  background: conic-gradient(from 135deg, #5c4208, #d4a017, #ffe566, #d4a017, #5c4208, #d4a017, #ffe566, #d4a017, #5c4208);
}
.bx-grade-coin-gold .bx-grade-coin-text {
  color: #d4a017;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(255,229,102,0.3);
}

/* SILVER */
.bx-grade-coin-silver {
  background: conic-gradient(from 135deg, #1a2a3a, #7a8a9a, #e8eaec, #7a8a9a, #1a2a3a, #7a8a9a, #e8eaec, #7a8a9a, #1a2a3a);
}
.bx-grade-coin-silver .bx-grade-coin-text {
  color: #9baab6;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(232,234,236,0.3);
}

/* BRONZE */
.bx-grade-coin-bronze {
  background: conic-gradient(from 135deg, #3d1c02, #a65d1b, #f0a060, #a65d1b, #3d1c02, #a65d1b, #f0a060, #a65d1b, #3d1c02);
}
.bx-grade-coin-bronze .bx-grade-coin-text {
  color: #cd7f32;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(240,160,96,0.3);
}

/* BROKEN / FAIL — The Blood Mark */
.bx-grade-coin-broken,
.bx-grade-coin-fail {
  background: conic-gradient(from 135deg, #2a0000, #7f1d1d, #ef4444, #7f1d1d, #2a0000, #7f1d1d, #ef4444, #7f1d1d, #2a0000);
}
.bx-grade-coin-broken .bx-grade-coin-text,
.bx-grade-coin-fail .bx-grade-coin-text {
  color: #dc2626;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(239,68,68,0.3);
}

/* VOIDED */
.bx-grade-coin-voided {
  background: conic-gradient(from 135deg, #0f172a, #334155, #64748b, #334155, #0f172a, #334155, #64748b, #334155, #0f172a);
}
.bx-grade-coin-voided .bx-grade-coin-text {
  color: #64748b;
  text-shadow: -1px -1px 2px #000, 1px 1px 1px rgba(100,116,139,0.3);
}
/* Grade dots (compact history) */
.bx-grade-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: default;
  vertical-align: middle;
  flex-shrink: 0;
}
.bx-grade-dot-empty  { background: #1e293b; border-color: #334155; }

/* Cycle history dots row (in insight card) */
.bx-cycle-history-dots { display: flex; gap: 7px; align-items: center; padding: 8px 0 4px; }

/* ── Engine ring panel ───────────────────────────────────────────────────────── */
.bx-mirror-ring-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
  background: var(--bx-sf1-bg) !important;
  border: 1px solid var(--bx-sf1-border) !important;
  border-radius: 6px;
  box-shadow: var(--bx-sf1-shadow);
  gap: 4px;
}

/* SVG ring */
.bx-ring {
  width: 96px;
  height: 96px;
  display: block;
  overflow: visible;
}
.bx-ring-track {
  fill: none;
  stroke: var(--bx-ring-track, #1e293b);
  stroke-width: 8;
}
.bx-ring-fill {
  fill: none;
  stroke: var(--bx-ring-idle, #2d3a52);
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}
/* Ring fill color driven by tone parent class */
.bx-tone-ok   .bx-ring-fill { stroke: var(--bx-ring-ok,   #10b981); }
.bx-tone-warn .bx-ring-fill { stroke: var(--bx-ring-warn, #f59e0b); }
.bx-tone-bad  .bx-ring-fill { stroke: var(--bx-ring-bad,  #ef4444); }

.bx-ring-num {
  fill: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}
.bx-ring-unit {
  fill: #64748b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.bx-ring-meta { font-size: 10px; color: #64748b; text-align: center; }
.bx-ring-drag { font-size: 10px; color: #94a3b8; text-align: center; margin-top: 2px; max-width: 160px; }

/* ── Kill dashed borders on existing mirror + insight panels ─────────────────── */
.bx-mirror-panel {
  border-style: solid !important;
}
.bx-insight-card {
  border-style: solid !important;
}

/* ── 3-column insights row ────────────────────────────────────────────────────── */
.bx-insights-3col {
  grid-template-columns: repeat(3, 1fr) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHT MODE — all new Mirror Redesign classes
   ═══════════════════════════════════════════════════════════════════════════════ */

body.light-theme .bx-analytics-card {
  --bx-sf1-bg:     linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --bx-sf1-border: #e2e8f0;
  --bx-sf1-shadow: inset 0 1px 0 rgba(0,0,0,0.02), 0 1px 3px rgba(15,23,42,0.06);
  --bx-ring-ok:    #059669;
  --bx-ring-warn:  #d97706;
  --bx-ring-bad:   #dc2626;
  --bx-ring-track: #e2e8f0;
  --bx-ring-idle:  #cbd5e1;
}

body.light-theme .bx-identity-hero,
body.light-theme .bx-cycle-card {
  background-color: var(--bg-inset);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
body.light-theme .bx-mirror-ring-panel {
  border-color: #e2e8f0 !important;
}

body.light-theme .bx-identity-hero-loading { color: #94a3b8; }

body.light-theme .bx-cycle-label       { color: #94a3b8; }
body.light-theme .bx-cycle-id          { color: #1e293b; }
body.light-theme .bx-cycle-projected-label,
body.light-theme .bx-cycle-day-counter,
body.light-theme .bx-cycle-streak-label { color: #64748b; }
body.light-theme .bx-cycle-no-data     { color: #94a3b8; }
body.light-theme .bx-cycle-empty       { color: #94a3b8; }
body.light-theme .bx-cycle-begin-btn   { border-color: #cbd5e1; color: #94a3b8; }
body.light-theme .bx-cycle-begin-btn:hover { border-color: #94a3b8; color: #475569; }
body.light-theme .bx-cycle-stage-copy  { color: #94a3b8; }

body.light-theme .bx-cycle-progress-bar { background: #e2e8f0; }

body.light-theme .bx-grade-dot-empty  { background: #f1f5f9; border-color: #cbd5e1; }

body.light-theme .bx-ring-num  { fill: #1e293b; }
body.light-theme .bx-ring-unit { fill: #94a3b8; }
body.light-theme .bx-ring-meta { color: #94a3b8; }
body.light-theme .bx-ring-drag { color: #64748b; }

body.light-theme .bx-identity-issuance-bottom { color: #94a3b8; }

body.light-theme .bx-mirror-top-row .bx-identity-label { color: #64748b; }
body.light-theme .bx-mirror-top-row .bx-identity-name  { color: #1e293b; }
body.light-theme .bx-mirror-top-row .bx-identity-status-line { color: #475569; }

/* ── Day compliance dot grid (Cycle Trajectory card) ────────────────────────── */
/* ── Day Grid — Blackbox Flight Recorder Blocks ──────────────────────────────── */
@keyframes anxious-pulse {
  0%, 100% { border-color: #475569; box-shadow: none; }
  50%       { border-color: #94a3b8; box-shadow: 0 0 8px rgba(148,163,184,0.2); }
}

.bx-day-grid { margin: 4px 0 2px; }
.bx-day-grid-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bx-day-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.bx-day-block {
  display: inline-block;
  width: 14px;
  height: 24px;
  border-radius: 1px;
  cursor: default;
  flex-shrink: 0;
}

/* Aligned / completed — tactical green */
.bx-day-block-aligned {
  background-color: #1a2e25;
  border-top: 2px solid #2ea043;
  border-left: 1px solid #1a2e25;
  border-right: 1px solid #1a2e25;
  border-bottom: 1px solid #1a2e25;
}
.bx-day-block-partial {
  background-color: #2a1e08;
  border-top: 2px solid #d97706;
  border-left: 1px solid #2a1e08;
  border-right: 1px solid #2a1e08;
  border-bottom: 1px solid #2a1e08;
}
.bx-day-block-non {
  background-color: #2a0f0f;
  border-top: 2px solid #dc2626;
  border-left: 1px solid #2a0f0f;
  border-right: 1px solid #2a0f0f;
  border-bottom: 1px solid #2a0f0f;
}

/* Today — anxiously waiting, slow pulse */
.bx-day-block-pending {
  background-color: transparent;
  border: 1px solid #475569;
  animation: anxious-pulse 3s infinite ease-in-out;
}

/* Future — barely visible dark trenches, must recede */
.bx-day-block-future {
  background-color: #111418;
  border: 1px solid #1e242c;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* No trade data */
.bx-day-block-notrade {
  background-color: #0f1115;
  border: 1px solid #1a1a22;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  opacity: 0.6;
}

/* ── Void grade (auto-voided cycle — subscription gap) ──────────────────────── */
.bx-grade-dot-voided {
  background: #1e293b;
  border-color: #334155;
  border-style: dashed;
  opacity: 0.7;
}

/* ── Light mode overrides: keep blocks readable ──────────────────────────────── */
body.light-theme .bx-day-grid-label    { color: #94a3b8; }
body.light-theme .bx-day-block-future  { background-color: #e8ecf0; border-color: #cbd5e1; box-shadow: none; }
body.light-theme .bx-day-block-notrade { background-color: #e2e8f0; border-color: #cbd5e1; box-shadow: none; opacity: 0.7; }
body.light-theme .bx-day-block-pending { border-color: #94a3b8; }
body.light-theme .bx-grade-dot-voided  { background: #f1f5f9; border-color: #e2e8f0; }


/* ══════════════════════════════════════════════════════════════════════════════
   DISCIPLINE MIRROR — Mirror Dashboard v2 (claude.ai/design project
   7006513c-38db-43cb-9d7a-c1210f6b5317) — gold / Space Grotesk reskin.
   dm- prefix. Originally scoped under #bxAnalytics (the standalone analytics
   modal); that modal is retired (One Mirror Phase B, 2026-07-09) — these
   classes are now bare and render inside #bxMirrorInline, whose --dm-tone*
   custom properties are set directly by index.js's _setToneVars(host, tone)
   before paint, not inherited from a #bxAnalytics ancestor. The tone-color
   system itself (ok/warn/bad/neutral → green/amber/red/blue) is unchanged —
   only card chrome (radius, gradients, type) and animation were reskinned.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Five-zone page ───────────────────────────────────────────────────────
   .dm-mirror-page wraps Z1–Z5; each zone is a <section data-zone="zN">. Z1
   (the hero) carries no eyebrow — it IS the page title. All wide zone content
   (heatmap, journey cards) scrolls inside its own overflow-x:auto container
   further down this file — the page itself never scrolls horizontally.
   Zone entrance: each zone starts hidden/offset and fades+slides in the first
   time it's scrolled into view (index.js's _wireZoneAnimation adds
   .is-revealed via IntersectionObserver); .dm-zone-snap disables the
   transition for a zone already seen on an earlier paint, so a repaint never
   replays the entrance. */
.dm-mirror-page { padding: 18px 20px 24px; }
.dm-zone {
  margin-bottom: 32px;
  opacity: 0; transform: translateY(34px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1);
}
.dm-zone.is-revealed { opacity: 1; transform: translateY(0); }
.dm-zone.dm-zone-snap { transition: none; }
.dm-zone.dm-zone-snap .dm-ribbon-bar,
.dm-zone.dm-zone-snap .dm-db,
.dm-zone.dm-zone-snap .dm-hm-cell { transition: none; }
.dm-zone:last-of-type { margin-bottom: 0; }
.dm-zone-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 14px;
}
.dm-zone-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #E8A33D);
  box-shadow: 0 0 8px rgba(232, 163, 61, 0.6);
  flex-shrink: 0;
}
.dm-zone-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}
.dm-zone-skel {
  height: 160px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--bg-inset,#0a0f1e) 25%, var(--border-subtle,#1e293b) 50%, var(--bg-inset,#0a0f1e) 75%);
  background-size: 200% 100%;
  animation: bx-mv2-shimmer 1.6s infinite;
}
/* CS-06 — genuine failure state, replaces .dm-zone-skel when the fuller
   prefetch/repaint threw (index.js's repaint .catch()). Static, not
   shimmering — a shimmer implies "still loading," this zone isn't. */
.dm-zone-err {
  min-height: 160px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle,#1e293b);
  background: var(--bg-inset,#0a0f1e);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
}
body.light-theme .dm-zone-eyebrow { color: #94a3b8; }
body.light-theme .dm-zone-skel { background: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%); background-size: 200% 100%; }
body.light-theme .dm-zone-err { background: #f8fafc; border-color: #e2e8f0; color: #64748b; }

/* ── Sticky jump nav — lets a user jump straight to a zone instead of
   scrolling the whole page linearly; active tab tracks scroll position via
   index.js's _wireZoneJumpNav. .bx-mv2-wrap has no fixed height (wraps its
   content), so position:sticky sticks within it — from the top of the wrap
   down through the last zone, then scrolls away with the page.
   Phase 4a (nav-hierarchy fix): `top` used to be a flat 0, which put this
   in-page nav flush against the top of the viewport — level with (and
   visually on top of) the desktop room switcher (.dx-room-nav,
   deskShell.css), which is the more important, cross-room nav and is now
   ALSO pinned. Rather than resolve that with z-index (two sticky bars both
   fighting for top:0), deskShell.js publishes the room nav's live height on
   <html> as --dx-roomnav-h so this bar sticks just below it instead of
   under it. This markup is shared with mobile (disciplineMirror/index.js),
   where the Mirror lives inside .dxm-panel and there is no room nav — desk-
   Shell.js never runs there, so the var is simply absent and the `0px`
   fallback reproduces the old flush-top behaviour unchanged. */
.dm-jump-nav {
  position: sticky;
  top: var(--dx-roomnav-h, 0px);
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 14px;
  margin: -14px -14px 18px;
  background: rgba(10, 16, 28, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
/* Jump-nav targets stop below both sticky bars (room nav + this nav). */
.bx-mv2-wrap [data-zone] { scroll-margin-top: calc(var(--dx-roomnav-h, 0px) + 72px); }
.dm-jump-nav::-webkit-scrollbar { display: none; }
.dm-jump-btn {
  flex: 0 0 auto;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8595ad;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dm-jump-btn:hover {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}
.dm-jump-btn:active {
  transform: scale(0.95);
}
.dm-jump-btn.dm-jump-active {
  color: #fff;
  border-color: #E8A33D;
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.3), rgba(232, 163, 61, 0.1));
  box-shadow: 0 0 14px -2px rgba(232, 163, 61, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
body.light-theme .dm-jump-nav { background: var(--bg-card, #fff); border-color: var(--border-subtle, #e2e8f0); }
body.light-theme .dm-jump-btn { color: #64748b; border-color: #e2e8f0; }
body.light-theme .dm-jump-btn:hover { color: #334155; border-color: #cbd5e1; }
@media (max-width: 640px) {
  .dm-jump-nav { margin: -12px -12px 14px; padding: 10px 10px; gap: 6px; }
  .dm-jump-btn { font-size: 10.5px; padding: 7px 11px; }
}

/* ── Hero card ── */
.dm-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #101927 0%, #090e18 100%);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
  padding: 30px 32px 28px; margin-bottom: 16px;
  display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start;
  transition: border-color .4s;
  box-shadow: 0 20px 60px -20px var(--dm-tone-g), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.dm-orb {
  position: absolute; width: 640px; height: 640px;
  background: radial-gradient(circle, var(--dm-tone-g) 0%, transparent 65%);
  right: -120px; top: 50%; transform: translate(0,-50%);
  pointer-events: none; animation: dmDrift 11s ease-in-out infinite;
}
.dm-orb2 {
  position: absolute; width: 240px; height: 240px;
  background: radial-gradient(circle, var(--dm-tone-g) 0%, transparent 70%);
  left: -60px; bottom: -60px; pointer-events: none; opacity: .35;
}
@keyframes dmDrift {
  0%,100%{transform:translate(0,-50%) scale(1)}
  50%    {transform:translate(0,-50%) scale(1.06)}
}
.dm-hero-l { position: relative; z-index: 1; }
.dm-hero-eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: #8595ad; text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.dm-hero-eyebrow::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,#232B37,transparent); }
.dm-hero-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  animation: mirrorPulse 2.4s ease-in-out infinite;
}
@keyframes mirrorPulse { 0%,100%{opacity:.55} 50%{opacity:1} }
.dm-hero-verdict {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px; font-weight: 800; line-height: .98;
  letter-spacing: -.03em; color: #f1f5f9;
  text-transform: uppercase; margin-bottom: 14px;
  text-shadow: 0 0 90px var(--dm-tone-g);
}
.dm-rank-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--dm-tone-d); border: 1px solid var(--dm-tone-b); margin-bottom: 10px;
}
.dm-rank-lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; color: #94a3b8; text-transform: uppercase; }
.dm-rank-val { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--dm-tone); }

.dm-dna-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; width: 100%; }
.dm-dna-dot {
  flex: 1; min-width: 12px; max-width: 44px; height: 8px; border-radius: 4px;
  background: var(--dna-c, rgba(255,255,255,.08)); flex-shrink: 0;
  transition: transform .15s ease, box-shadow .15s ease; cursor: default;
}
.dm-dna-dot:hover { transform: scaleY(1.3); }
.dm-dna-dot.dm-dna-a { background: linear-gradient(90deg, #2ee6a0, #0ba96b) !important; box-shadow: 0 0 10px rgba(46,230,160,.55); }
.dm-dna-dot.dm-dna-p { background: linear-gradient(90deg, #ffd97a, #e8a33d) !important; box-shadow: 0 0 8px rgba(232,163,61,.45); }
.dm-dna-dot.dm-dna-n { background: linear-gradient(90deg, #ff8a9e, #e8593f) !important; box-shadow: 0 0 8px rgba(232,89,63,.45); }
.dm-dna-dot.dm-dna-t { background: rgba(232,163,61,.25); border: 1px dashed #E8A33D; box-shadow: 0 0 8px rgba(232,163,61,.4); }
.dm-dna-dot.dm-dna-f { background: rgba(255,255,255,.08); }

.dm-hero-lines { margin-bottom: 16px; }
.dm-hero-line { font-family: 'Space Grotesk', sans-serif; font-size: 15px; color: #B4BDCB; line-height: 1.6; }
.dm-hero-line + .dm-hero-line { margin-top: 2px; }
.dm-hero-quote {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-style: italic; color: #8B95A5; line-height: 1.6;
  padding: 12px 0; margin: 12px 0;
  border-top: 1px solid #1e293b; border-bottom: 1px solid #1e293b;
}
.dm-hero-insight {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; color: #f59e0b;
  padding: 9px 14px; border-radius: 10px;
  background: rgba(245,158,11,.07); border: 1px solid rgba(240,165,0,.2);
  margin-bottom: 16px;
}

/* 14-day ribbon (Mirror Dashboard v2) */
.dm-ribbon-wrap {
  background: rgba(14, 24, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dm-ribbon-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8595ad;
}
.dm-ribbon-row { display: flex; gap: 6px; align-items: flex-end; height: 56px; }
.dm-ribbon-bar {
  flex: 1; border-radius: 5px; min-height: 6px; background: var(--rb-bg);
  height: 8%;
  transition: height .55s cubic-bezier(.22,1,.36,1), background .3s;
}
.dm-zone.is-revealed .dm-ribbon-bar { height: var(--rb-h); }

/* Build 2 (spec §8) — the Mirror's collapsed mode */
.dm-collapsed-line {
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: #64748b;
  padding: 4px 2px 8px;
}
body.light-theme .dm-collapsed-line { color: #7a746c; }

/* Real check-in status */
.dm-checkin-done {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding: 16px 20px; border-radius: 12px; font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 600;
}
.dm-checkin-kept   { background: rgba(14,203,129,.08); border: 1px solid rgba(14,203,129,.28); color: #0ECB81; }
.dm-checkin-broken { background: rgba(230,57,70,.08);  border: 1px solid rgba(230,57,70,.28);  color: #FF6B75; }

/* Structured Hero Meta Badges */
.dm-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.dm-hero-meta-item {
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.8), rgba(9, 16, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.dm-hero-meta-lbl {
  font-family: 'DM Sans', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8595ad;
  text-transform: uppercase;
}
.dm-hero-meta-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.1;
}

/* Bleed-avoided line (B3 "rupee-ize") */
.dm-bleed-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #1e293b;
  font-size: 12px; color: #94a3b8; line-height: 1.5;
}
.dm-bleed-txt b { color: #0ECB81; font-weight: 700; }
.dm-bleed-set,
.dm-bleed-edit {
  background: transparent; border: 1px solid rgba(255,255,255,.12); color: #94a3b8;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.dm-bleed-set:hover,
.dm-bleed-edit:hover { border-color: #0ECB81; color: #0ECB81; }
.dm-bleed-edit {
  border: none; padding: 0; font-size: 9px; letter-spacing: 1px; text-decoration: underline;
  background: none; color: #475569;
}
.dm-bleed-edit:hover { background: none; color: #0ECB81; }
.dm-bleed-input {
  background: rgba(4,6,14,.5); border: 1px solid rgba(255,255,255,.12); color: #f1f5f9;
  font-family: var(--font-mono); font-size: 12px; padding: 5px 8px; border-radius: 4px;
  width: 110px;
}
.dm-bleed-input:focus { outline: none; border-color: #0ECB81; }
.dm-bleed-save {
  background: rgba(14,203,129,.12); border: 1px solid rgba(14,203,129,.35); color: #0ECB81;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px; cursor: pointer;
}
.dm-bleed-save:disabled { opacity: .6; cursor: default; }

/* Hero right column — three stacked cards (streak / cycle progress / score),
   Mirror Dashboard v2 layout. All three share the same card shell. */
.dm-hero-r { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.dm-streak-card,
.dm-cycle-card,
.dm-score-card {
  background: linear-gradient(160deg,#0F141C,#0A0D13); border: 1px solid var(--dm-tone-b); border-radius: 18px;
  padding: 20px 22px;
  backdrop-filter: blur(12px);
}
.dm-score-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; }

/* Current streak */
.dm-hs-lbl { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #94a3b8; margin-bottom: 10px; }
.dm-hs-row { display: flex; align-items: baseline; gap: 8px; }
.dm-hs-num { font-family: 'Space Grotesk', sans-serif; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.dm-hs-unit { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 600; color: #8B95A5; }
.dm-hs-ctx { font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: #8B95A5; margin-top: 8px; }

/* Cycle progress ring */
.dm-cycle-card { display: flex; align-items: center; gap: 16px; }
.dm-cycle-r-txt { min-width: 0; flex: 1; }
.dm-cycle-lbl { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #64748b; margin-bottom: 6px; }
.dm-cycle-day { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: #F7F9FC; line-height: 1.25; }
.dm-cycle-left { font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: #8B95A5; margin-top: 4px; }

/* Discipline score */
.dm-score-lbl { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #64748b; }
.dm-score-info {
  display: inline-block;
  cursor: help;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.7;
}
.dm-score-info:hover, .dm-score-info:focus { opacity: 1; }
.dm-score-foot { font-family: var(--font-mono); font-size: 9px; color: #94a3b8; letter-spacing: .4px; text-align: center; max-width: 190px; line-height: 1.5; }
/* Build 2 §8.1 (ratified §14.1) — EXEC FIDELITY / FRESHNESS demoted behind a
   "see the details" expand. Demotion only: the numbers themselves, their
   computation, and their internal layout are untouched. Native <details> so
   no JS wiring is needed and it degrades to plain-visible content if CSS
   fails to load. */
.dm-details-expand { width: 100%; margin-top: 4px; }
.dm-details-toggle {
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: #64748b;
  cursor: pointer; list-style: none; text-align: center; padding: 4px 0;
  user-select: none;
}
.dm-details-toggle::-webkit-details-marker { display: none; }
.dm-details-toggle:hover { color: #94a3b8; }
.dm-details-expand .dm-mini-grid { margin-top: 10px; }

.dm-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.dm-mini-stat {
  background: rgba(4,6,14,.5); border: 1px solid #1e293b; border-radius: 12px;
  padding: 12px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.dm-mini-v { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: #f1f5f9; line-height: 1; }
.dm-mini-l { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #64748b; margin-top: 4px; }

/* Velocity badge (hero) */
.dm-vel { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 9px; padding: 3px 9px; border-radius: 20px; margin-top: 4px; }
.dm-vel-up   { color: #0ECB81; background: rgba(14,203,129,.10); border: 1px solid rgba(14,203,129,.18); }
.dm-vel-dn   { color: #E63946; background: rgba(230,57,70,.10);  border: 1px solid rgba(230,57,70,.18); }
.dm-vel-flat { color: #94a3b8; background: #0a0f1e; border: 1px solid #1e293b; }

/* Hero ring SVG */
.dm-ring-cnt { fill: #f1f5f9; }

/* Decay banner */
.dm-decay-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(26, 12, 18, 0.9) 100%);
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 18px;
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.dm-decay-head { display: flex; align-items: center; gap: 8px; }
.dm-decay-blip { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; animation: dmDecayPulse 1.4s ease-in-out infinite; }
@keyframes dmDecayPulse { 0%,100%{opacity:.7;transform:scale(1)} 50%{opacity:1;transform:scale(1.1)} }
.dm-decay-tag { font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.08em; font-weight: 700; text-transform: uppercase; }
.dm-decay-msg { font-family: 'DM Sans', sans-serif; font-size: 13px; letter-spacing: 0; line-height: 1.4; color: #fca5a5; }
.dm-decay-sub { font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0; color: #f87171; }

/* Metrics row */
.dm-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 14px; }
.dm-metric-card {
  background: #0f172a; border: 1px solid #1e293b; border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  transition: border-color .3s;
}
.dm-metric-card.dm-ok   { border-color: rgba(14,203,129,.22); }
.dm-metric-card.dm-warn { border-color: rgba(240,165,0,.22); }
.dm-metric-card.dm-bad  { border-color: rgba(230,57,70,.22); }
.dm-metric-lbl  { font-family: var(--font-mono); font-size: 8px; letter-spacing: 2.5px; color: #64748b; text-transform: uppercase; }
.dm-metric-foot { font-family: var(--font-mono); font-size: 9px; color: #94a3b8; line-height: 1.5; max-width: 180px; text-align: center; }

/* Trend bars card */
.dm-trend-card {
  background: #0f172a; border: 1px solid #1e293b; border-radius: 14px;
  padding: 22px 20px; display: flex; flex-direction: column; gap: 8px;
}
.dm-trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding-top: 8px; }
.dm-trend-bar  { flex: 1; border-radius: 3px 3px 0 0; min-width: 4px; position: relative; }
.dm-trend-bar-val {
  position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 7px; color: #64748b; white-space: nowrap; display: none;
}
.dm-trend-bar:hover .dm-trend-bar-val { display: block; }
.dm-trend-label  { font-family: var(--font-mono); font-size: 8px; letter-spacing: 2px; color: #64748b; text-transform: uppercase; margin-top: 6px; }
.dm-trend-latest { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 1; }

/* Commitment card */
.dm-commit-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: start;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-commit-id  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; color: #f1f5f9; letter-spacing: 0; margin-bottom: 4px; }
.dm-commit-day { font-family: 'Space Grotesk', var(--font-mono), monospace; font-size: 13px; font-weight: 600; color: #8595ad; margin-bottom: 16px; }
.dm-prog-wrap  { margin-bottom: 16px; }
.dm-prog-head  { display: flex; justify-content: space-between; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #8595ad; text-transform: uppercase; margin-bottom: 7px; }
.dm-prog-bar   { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.dm-prog-fill  { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #E8A33D, #FFD97A); width: 0; transition: width 1.5s cubic-bezier(.33,1,.68,1); box-shadow: 0 0 10px rgba(232, 163, 61, 0.6); }
.dm-streak-row   { display: flex; align-items: center; gap: 12px; }
.dm-streak-num   { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 700; line-height: 1; color: #f1f5f9; }
.dm-streak-label { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #8595ad; margin-top: 4px; }
.dm-day-grid-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dm-day-grid-lbl { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .02em; color: #f1f5f9; }
.dm-day-legend { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .dm-day-legend { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 16px; }
}
.dm-dl-item { display: inline-flex; align-items: center; gap: 6px; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500; color: #94a3b8; }
.dm-dl-sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.dm-dl-a { background: #2EE6A0; box-shadow: 0 0 6px rgba(46, 230, 160, 0.5); }
.dm-dl-p { background: #F0A500; box-shadow: 0 0 6px rgba(240, 165, 0, 0.4); }
.dm-dl-n { background: #E63946; box-shadow: 0 0 6px rgba(230, 57, 70, 0.4); }
.dm-dl-f { background: #0B0F15; border: 1.5px solid #2A323F; }
.dm-day-grid  { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-db        {
  width: 20px; height: 34px; border-radius: 7px; flex-shrink: 0; cursor: default;
  opacity: 0; transition: transform .15s ease, opacity .5s ease, box-shadow .2s ease;
}
.dm-zone.is-revealed .dm-db { opacity: 1; }
.dm-db:hover  { transform: scaleY(1.12); }
.dm-db-a { background: linear-gradient(180deg, rgba(46, 230, 160, 0.28), rgba(11, 169, 107, 0.12)); border: 1px solid rgba(46, 230, 160, 0.3); border-top: 3px solid #2EE6A0; box-shadow: 0 0 8px rgba(46, 230, 160, 0.25); }
.dm-db-p { background: linear-gradient(180deg, rgba(240, 165, 0, 0.25), rgba(208, 143, 0, 0.1));  border: 1px solid rgba(240, 165, 0, 0.3);  border-top: 3px solid #F0A500; }
.dm-db-n { background: linear-gradient(180deg, rgba(230, 57, 70, 0.25), rgba(214, 48, 61, 0.1));  border: 1px solid rgba(230, 57, 70, 0.3);  border-top: 3px solid #E63946; }
.dm-db-t { background: rgba(232, 163, 61, 0.1); border: 1.5px dashed #E8A33D; animation: dmBlink 2s ease-in-out infinite; box-shadow: 0 0 8px rgba(232, 163, 61, 0.3); }
.dm-db-f { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.dm-db-s { background: transparent; border: 1.5px solid #64748b; } /* no answer: hollow */
/* repaired: the day stays red (it is on the calendar and in the seal) and wears a small green tick */
.dm-db-rep { position: relative; }
.dm-db-rep::after { content: '\2713'; position: absolute; top: -7px; right: -6px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font: 700 9px/1 sans-serif; background: #0d1210; color: #88dca8; border: 1px solid #88dca8; }
.dm-dl-rep { position: relative; overflow: visible; }
.dm-dl-rep::after { content: ''; position: absolute; top: -3px; right: -3px; width: 6px; height: 6px; border-radius: 50%; background: #88dca8; }
body.light-theme .dm-db-rep::after { background: #fff; color: #1f9d63; border-color: #1f9d63; }
body.light-theme .dm-dl-rep::after { background: #1f9d63; }
/* How you recover: "Broke on Thu 9 Nov, back on Fri — repaired" */
.dm-rec-list { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(148, 163, 184, .16); display: grid; gap: 6px; }
.dm-rec-list li { font-family: 'DM Sans', sans-serif; font-size: 12.5px; line-height: 1.4; color: #aab6c8; }
.dm-rec-list li.is-repaired::before { content: '\2713'; display: inline-block; margin-right: 6px; color: #88dca8; font-weight: 700; }
body.light-theme .dm-rec-list li { color: #475569; }
body.light-theme .dm-rec-list li.is-repaired::before { color: #1f9d63; }
@keyframes dmBlink { 0%,100%{opacity:1} 50%{opacity:.25} }
.dm-no-commit {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px;
  text-align: center;
}
.dm-no-commit-ico  { font-size: 32px; line-height: 1; filter: drop-shadow(0 0 10px rgba(232, 163, 61, 0.4)); }
.dm-no-commit-lbl  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .02em; color: #f1f5f9; }
.dm-commit-begin-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.22), rgba(232, 163, 61, 0.08));
  border: 1.5px solid #E8A33D;
  color: #fff;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px -2px rgba(232, 163, 61, 0.35);
  transition: transform 0.12s ease, filter 0.15s ease;
}
.dm-commit-begin-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.dm-commit-begin-cta:active {
  transform: scale(0.96);
}

/* Charts — sparklines */
.dm-charts   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dm-chart-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-chart-lbl  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 14.5px; letter-spacing: .02em; color: #f1f5f9; margin-bottom: 14px; }

/* Truth Room Phase 3 — Day-0 zones + walked-away count */
.dm-daybox {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-daybox-quote { font-family: 'Space Grotesk', sans-serif; font-size: 15.5px; font-weight: 500; color: #e2e8f0; line-height: 1.5; }
.dm-daybox-sub { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #8595ad; margin-top: 8px; }

/* Triggers zone ("what's breaking you") */
.dm-trig-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-trig-empty {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #8595ad;
  line-height: 1.5;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.dm-trig-card:has(> .dm-trig-empty),
.dm-break-card:has(> .dm-trig-empty) {
  padding: 18px 24px;
}
.dm-trig-card:has(> .dm-trig-empty) .dm-chart-lbl,
.dm-break-card:has(> .dm-trig-empty) .dm-chart-lbl {
  margin-bottom: 2px;
}
.dm-trig-bars { display: flex; flex-direction: column; gap: 18px; }
.dm-trig-row-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.dm-trig-lbl { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 600; color: #e2e8f0; }
.dm-trig-lbl-top { font-weight: 700; color: #F0B45A; text-shadow: 0 0 12px rgba(240, 180, 90, 0.35); }
.dm-trig-count { font-family: 'Space Grotesk', var(--font-mono), monospace; font-size: 13px; font-weight: 700; color: #8595ad; }
.dm-trig-track { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.dm-trig-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #334155, #64748b); transition: width 1s cubic-bezier(.22,1,.36,1); }
.dm-trig-fill-top { background: linear-gradient(90deg, #E8A33D, #FFD97A); box-shadow: 0 0 12px rgba(232, 163, 61, 0.5); }
.dm-trig-callout {
  margin-top: 20px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.12), rgba(20, 16, 28, 0.85));
  border: 1px solid rgba(232, 163, 61, 0.35);
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; line-height: 1.55; color: #E8C68D;
  box-shadow: 0 4px 16px -2px rgba(232, 163, 61, 0.2);
}
.dm-trig-callout strong { color: #F0B45A; }

/* "When you break" */
.dm-break-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-break-bars { display: flex; gap: 16px; align-items: flex-end; height: 96px; padding-top: 8px; }
.dm-break-col { display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; flex: 0 0 40px; }
.dm-break-v { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: #FF6B75; }
.dm-break-bar {
  width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #FF6B75, #D6303D);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35); height: 4%;
  transition: height .9s cubic-bezier(.22,1,.36,1);
}
.dm-zone.is-revealed .dm-break-bar { height: var(--bb-h); }
.dm-break-foot { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #8595ad; margin-top: 12px; }

/* "When you trade" */
.dm-dh-sub  { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: #B4BDCB; line-height: 1.5; margin-bottom: 4px; }
.dm-dh-gate { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #8595ad; display: block; margin-top: 8px; }
.dm-dh-bars { display: flex; gap: 4px; align-items: flex-end; height: 72px; padding-top: 8px; margin-top: 14px; }
.dm-dh-col  { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.dm-dh-bar {
  width: 100%; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #4A5768, #2C3644);
  height: 4%; transition: height .9s cubic-bezier(.22,1,.36,1);
}
.dm-dh-bar-hot { background: linear-gradient(180deg, #FFD97A, #E8A33D); box-shadow: 0 0 10px rgba(232, 163, 61, 0.5); }
.dm-zone.is-revealed .dm-dh-bar { height: var(--dh-h); }
.dm-dh-foot { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #8595ad; margin-top: 10px; }

/* "The same rule, again" — Rule-Break Ledger */
.dm-ledger-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-ledger-row  { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.dm-ledger-row:first-of-type { border-top: none; padding-top: 4px; }
.dm-ledger-rule    { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; color: #FFD97A; line-height: 1.35; }
.dm-ledger-meta     { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #8595ad; margin-top: 6px; }
.dm-ledger-reasons  { font-family: 'Space Grotesk', sans-serif; font-size: 13.5px; color: #e2e8f0; margin-top: 10px; line-height: 1.6; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 10px 14px; }

/* Recovery profile */
.dm-rec-grid { display: flex; gap: 12px; }
.dm-rec-box { flex: 1; background: rgba(10, 18, 30, 0.85); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 18px 12px; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.dm-rec-box-v { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; color: #F7F9FC; line-height: 1; }
.dm-rec-box-l { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .2px; color: #8595ad; margin-top: 8px; text-transform: uppercase; }
.dm-rec-foot { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #8595ad; margin-top: 12px; }

/* Heatmap */
.dm-hm-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-hm-wrap    { overflow-x: auto; }
.dm-hm-inner   { display: flex; gap: 5px; align-items: flex-start; min-width: fit-content; }
.dm-hm-days    { display: flex; flex-direction: column; gap: 5px; padding-top: 22px; }
.dm-hm-dl      { height: 20px; font-family: var(--font-mono); font-size: 10px; color: #64748b; display: flex; align-items: center; justify-content: center; width: 20px; }
.dm-hm-col     { display: flex; flex-direction: column; gap: 5px; }
.dm-hm-wk      { height: 18px; text-align: center; font-family: var(--font-mono); font-size: 8px; color: #64748b; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.dm-hm-verified { color: #0ECB81; font-size: 10px; font-weight: 700; line-height: 1; }
.dm-hm-unverified { font-size: 6.5px; font-weight: 600; color: #8A92A1; letter-spacing: 0.5px; opacity: 0.75; }
.dm-hm-cell    { width: 22px; height: 22px; border-radius: 6px; cursor: pointer; transition: transform .12s, opacity .4s ease; border: 1px solid rgba(0,0,0,.2); position: relative; display: flex; align-items: center; justify-content: center; opacity: 0; }
.dm-zone.is-revealed .dm-hm-cell { opacity: 1; }
.dm-hm-cell:hover { transform: scale(1.35); z-index: 10; position: relative; }
.dm-hm-daynum  { font-family: var(--font-mono); font-size: 8.5px; line-height: 1; color: rgba(255,255,255,.55); pointer-events: none; user-select: none; }
.dm-c0 { background: transparent; border: 1.5px solid #475569; } /* no answer: hollow, distinct from broken */
.dm-c1 { background: #2EE6A0; box-shadow: 0 0 8px rgba(46, 230, 160, 0.45); }
.dm-c2 { background: #F0A500; }
.dm-c3 { background: #E63946; }
.dm-c4 { background: #E63946; }
.dm-c5 { background: #F59E0B; box-shadow: 0 0 10px rgba(245,158,11,.6); }
.dm-c6 { background: #1e293b; }
.dm-c7 { background: #0a0f1e; border: 1.5px dashed #F0A500; }
.dm-c7 .dm-hm-daynum { color: rgba(240,165,0,.85); }
.dm-hm-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.dm-leg      { display: flex; align-items: center; gap: 6px; font-family: 'DM Sans', sans-serif; font-size: 11px; color: #94a3b8; }
.dm-leg-sw   { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-sizing: border-box; }

/* Insights row */
.dm-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dm-ins-card {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-ins-lbl  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 14.5px; letter-spacing: .02em; color: #f1f5f9; margin-bottom: 16px; }
.dm-strk-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dm-strk-n   { font-family: 'Space Grotesk', sans-serif; font-size: 56px; font-weight: 700; line-height: 1; color: #f1f5f9; }
.dm-strk-flame-big { font-size: 40px; line-height: 1; filter: drop-shadow(0 0 12px rgba(255,100,0,.5)); }
.dm-strk-sub  { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .2px; color: #8595ad; margin-top: 4px; }
.dm-strk-best { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dm-strk-best-n { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; color: #f1f5f9; }
.dm-strk-best-l { font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: .2px; color: #8595ad; }
.dm-strk-neg   { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.dm-strk-neg-n { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.dm-strk-neg-l { font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: .2px; color: #8595ad; }
.dm-rec-row    { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.dm-rec-k { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #8595ad; }
.dm-rec-v { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: #f1f5f9; }
.dm-rec-foot { font-size: 12px; color: #8595ad; line-height: 1.6; margin-top: 10px; font-style: italic; }

/* Cycle Journey */
.dm-cycle-journey {
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.9) 0%, rgba(9, 15, 26, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 26px 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dm-cj-hdr   { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.dm-cj-title { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 14.5px; letter-spacing: .02em; color: #f1f5f9; }
.dm-cj-count { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #8595ad; }
.dm-cj-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.dm-cj-scroll::-webkit-scrollbar { height: 3px; }
.dm-cj-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
/* CS-13 — trend-forward summary, shown only when computeCycleJourneyTrend()
   (sections.js) reads the account as genuinely improving. Sits between the
   header and the card row so it's the dominant first read, without hiding
   or reordering the honest per-cycle cards beneath it. */
.dm-cj-trend {
  display: flex; align-items: center; gap: 7px;
  margin: -8px 0 16px; padding: 9px 14px;
  border-radius: 10px;
  background: rgba(14, 203, 129, 0.08);
  border: 1px solid rgba(14, 203, 129, 0.28);
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 700;
  color: #0ECB81; letter-spacing: .01em;
}
.dm-cj-trend-arrow { font-size: 14px; line-height: 1; }
.dm-cc {
  flex: 0 0 184px; min-height: 236px; border-radius: 18px; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 0; scroll-snap-align: start; text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.9), rgba(9, 14, 24, 0.98));
  box-shadow: 0 6px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform .2s, box-shadow .2s; cursor: default;
}
.dm-cc:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.dm-cc-gold     { border-color: rgba(232, 163, 61, 0.5) !important; box-shadow: 0 8px 24px -4px rgba(232, 163, 61, 0.25) !important; }
.dm-cc-silver   { border-color: rgba(184, 194, 208, 0.4) !important; }
.dm-cc-bronze   { border-color: rgba(180, 90, 28, 0.4) !important; }
.dm-cc-platinum { border-color: rgba(200, 215, 230, 0.4) !important; }
.dm-cc-fail,
.dm-cc-broken   { background: rgba(239,68,68,.05); border-color: rgba(239,68,68,.25); }
.dm-cc-voided   { border-color: rgba(133, 149, 173, 0.30); } /* CS-13: neutral, not red — an absence/billing void, not a broken contract */
.dm-cc-meta   { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; text-align: left; }
.dm-cc-cycle  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; font-size: 14px; color: #f1f5f9; }
.dm-cc-dur    { font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); color: #8595ad; }
.dm-cc-date   { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #8595ad; margin-bottom: 8px; text-align: left; }
.dm-cc-medal  { margin: 4px auto 10px; display: block; }
.dm-cc-grade  { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: .08em; line-height: 1; margin-bottom: 12px; }
.dm-cc-grade.gold     { color: #f59e0b; text-shadow: 0 0 20px rgba(245,158,11,.4); }
.dm-cc-grade.silver   { color: #94a3b8; }
.dm-cc-grade.bronze   { color: #cd7f32; }
.dm-cc-grade.platinum { color: #c8d8e8; }
.dm-cc-grade.fail,
.dm-cc-grade.broken   { color: #ef4444; }
.dm-cc-grade.voided   { color: #8595ad; } /* CS-13 — matches .dm-cc-cause.neutral, not the fail red */
.dm-cc-bar-wrap { margin-bottom: 6px; }
.dm-cc-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.dm-cc-bar-fill { height: 100%; border-radius: 3px; }
.dm-cc-days  { font-family: 'Space Grotesk', var(--font-mono), monospace; font-size: 10px; font-weight: 600; color: #94a3b8; }
.dm-cc-cause { font-size: 11px; color: #ef4444; margin-top: auto; padding-top: 8px; font-weight: 600; letter-spacing: .3px; }
.dm-cc-cause.ok      { color: #0ECB81; }
.dm-cc-cause.neutral { color: #8595ad; }
.dm-cc-align { font-family: 'Space Grotesk', var(--font-mono), monospace; font-size: 10px; color: #8595ad; margin-top: 4px; }

/* Graveyard — tombstones */
.dm-grave {
  background: linear-gradient(180deg, #09080d 0%, #040306 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.dm-grave-hdr   { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.dm-grave-cross { font-size: 18px; color: #8595ad; }
.dm-grave-title { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: #8595ad; text-transform: uppercase; }
.dm-tombstones  { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 16px; }
.dm-tombstone {
  position: relative;
  background: radial-gradient(185deg, #241a28 0%, #15101a 40%, #0a080c 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 2px solid rgba(239, 68, 68, 0.45);
  border-radius: 50% 50% 10px 10px / 28% 28% 10px 10px;
  padding: 32px 14px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  cursor: default; transition: transform .3s, box-shadow .3s;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: visible; min-height: 200px;
}
.dm-tombstone::before {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 120%; height: 10px;
  background: radial-gradient(ellipse,rgba(0,0,0,.7) 0%,transparent 70%);
  pointer-events: none;
}
.dm-tombstone:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.12); }
.dm-ts-cross { font-size: 16px; color: rgba(239,68,68,.7); margin-bottom: 8px; letter-spacing: 1px; line-height: 1; }
.dm-ts-cycle { font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: #8595ad; margin-bottom: 2px; text-transform: uppercase; }
.dm-ts-days  { font-family: 'Space Grotesk', var(--font-mono), monospace; font-size: 36px; font-weight: 800; color: #e2e8f0; line-height: 1; margin: 4px 0 2px; }
.dm-ts-unit  { font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: #8595ad; text-transform: uppercase; }
.dm-ts-divider { width: 36px; height: 1px; background: rgba(239, 68, 68, 0.4); margin: 10px auto 8px; }
.dm-ts-cause  { font-size: 11.5px; font-weight: 700; color: #f87171; letter-spacing: .5px; }
.dm-ts-date   { font-family: 'DM Sans', sans-serif; font-size: 10px; color: #8595ad; margin-top: 8px; }
.dm-grave-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 50px 20px; text-align: center; }
.dm-ge-cross  { font-size: 28px; color: #475569; }
.dm-ge-title  { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 3px; color: #8595ad; text-transform: uppercase; }
.dm-ge-sub    { font-size: 12.5px; color: #8595ad; font-style: italic; }

/* Responsive */
@media (max-width: 1200px) {
  .dm-hero { grid-template-columns: 1fr; }
  .dm-hero-r { flex-direction: row; flex-wrap: wrap; gap: 12px; justify-content: center; }
  .dm-streak-card, .dm-cycle-card, .dm-score-card { flex: 1; min-width: 220px; max-width: 360px; }
  .dm-mini-grid  { flex: 1; min-width: 240px; }
}
@media (max-width: 980px) {
  .dm-metrics    { grid-template-columns: 1fr; }
  .dm-charts     { grid-template-columns: 1fr; }
  .dm-commit-card { grid-template-columns: 1fr; gap: 20px; }
  .dm-hero-verdict { font-size: 48px; letter-spacing: -2px; }
}

/* Mobile Discipline tab (360px baseline) */
@media (max-width: 768px) {
  .dx-standing-section { padding: 0 0 20px 0 !important; width: 100% !important; margin: 0 !important; }
  .dx-standing-label   { margin-bottom: 10px !important; font-size: 12px !important; }
  .bx-mv2-wrap        { border: none !important; background: transparent !important; border-radius: 0 !important; overflow: visible !important; box-shadow: none !important; width: 100% !important; margin: 0 !important; }
  .dm-mirror-page     { padding: 0 !important; width: 100% !important; }
  .dm-jump-nav        { margin: 0 0 12px 0 !important; padding: 6px 4px 8px !important; gap: 6px !important; width: 100% !important; border-radius: 12px !important; background: rgba(10, 16, 28, 0.95) !important; box-sizing: border-box !important; }
  .dm-jump-btn        { font-size: 11px !important; padding: 7px 11px !important; }
  .dm-zone            { width: 100% !important; margin-bottom: 16px !important; box-sizing: border-box !important; }
  .dm-hero            { padding: 18px 14px 16px !important; border-radius: 18px !important; width: 100% !important; box-sizing: border-box !important; margin-bottom: 12px !important; }
  .dm-hero-verdict    { font-size: 34px !important; letter-spacing: -1px !important; }
  .dm-hero-meta       { display: grid; grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; width: 100% !important; }
  .dm-hero-meta-item  { padding: 8px 6px !important; border-radius: 10px !important; text-align: center; }
  .dm-hero-share-wrap { width: 100% !important; margin-top: 14px !important; }
  .dm-hero-share-wrap .dx-share-affordance { width: 100% !important; display: flex !important; gap: 8px !important; }
  .dm-hero-share-wrap .dx-share-btn { flex: 1 1 0 !important; min-width: 0 !important; padding: 10px 8px !important; font-size: 11px !important; }
  .dm-ribbon-row      { height: 48px; }
  .dm-streak-card, .dm-cycle-card, .dm-score-card { width: 100%; max-width: none; }
  .dm-mini-grid       { width: 100%; }
  .dm-trig-card,
  .dm-break-card,
  .dm-ledger-card,
  .dm-ins-card,
  .dm-commit-card,
  .dm-chart-card,
  .dm-hm-card,
  .dm-cycle-journey   { padding: 14px 12px !important; border-radius: 16px !important; width: 100% !important; box-sizing: border-box !important; }
  .dm-cc              { flex-basis: 150px; }
  .dm-rec-grid        { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .dm-hero-verdict   { font-size: 30px !important; letter-spacing: -0.5px !important; }
  .dm-hero-meta      { grid-template-columns: repeat(3, 1fr) !important; gap: 4px !important; }
  .dm-hero-meta-item { padding: 6px 4px !important; border-radius: 10px !important; }
  .dm-hero-meta-val  { font-size: 14px !important; }
  .dm-hero-meta-lbl  { font-size: 11px !important; }
  .dm-daybox         { padding: 14px !important; border-radius: 14px !important; }
  .dm-daybox-quote   { font-size: 13px !important; }
}

/* Light mode */
body.light-theme .dm-hero         { background: #ffffff; }
body.light-theme .dm-streak-card,
body.light-theme .dm-cycle-card,
body.light-theme .dm-score-card   { background: rgba(241,245,249,.7); }
body.light-theme .dm-mini-stat,
body.light-theme .dm-rec-box      { background: rgba(241,245,249,.8); }
body.light-theme .dm-metric-card,
body.light-theme .dm-trend-card,
body.light-theme .dm-chart-card,
body.light-theme .dm-hm-card,
body.light-theme .dm-ins-card,
body.light-theme .dm-commit-card,
body.light-theme .dm-trig-card,
body.light-theme .dm-break-card,
body.light-theme .dm-daybox,
body.light-theme .dm-cycle-journey { background: #ffffff; border-color: #e2e8f0; }
body.light-theme .dm-daybox-quote { color: #475569; }
body.light-theme .dm-daybox-sub   { color: #94a3b8; }
body.light-theme .dm-hero-line    { color: #475569; }
body.light-theme .dm-hero-quote   { color: #94a3b8; border-color: #e2e8f0; }
body.light-theme .dm-hs-ctx,
body.light-theme .dm-cycle-left   { color: #64748b; }
body.light-theme .dm-cycle-day    { color: #1e293b; }
body.light-theme .dm-bleed-line   { color: #64748b; border-color: #e2e8f0; }
body.light-theme .dm-bleed-set    { border-color: #cbd5e1; color: #64748b; }
body.light-theme .dm-bleed-set:hover,
body.light-theme .dm-bleed-edit:hover { color: #0ECB81; }
body.light-theme .dm-bleed-edit   { color: #94a3b8; }
body.light-theme .dm-bleed-input  { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
body.light-theme .dm-ribbon-head  { color: #94a3b8; }
body.light-theme .dm-trig-lbl     { color: #475569; }
body.light-theme .dm-trig-empty   { color: #94a3b8; }
body.light-theme .dm-trig-track   { background: #e2e8f0; }
body.light-theme .dm-dh-sub       { color: #475569; }
body.light-theme .dm-dh-gate,
body.light-theme .dm-dh-foot      { color: #94a3b8; }
body.light-theme .dm-ledger-card  { background: #ffffff; border-color: #e2e8f0; }
body.light-theme .dm-ledger-row   { border-color: #e2e8f0; }
body.light-theme .dm-ledger-meta  { color: #94a3b8; }
body.light-theme .dm-ledger-reasons { color: #475569; }
body.light-theme .dm-day-legend .dm-dl-item { color: #475569; }
body.light-theme .dm-grave        { background: linear-gradient(180deg,#f1f5f9 0%,#e2e8f0 100%); border-color: #e2e8f0; }
body.light-theme .dm-ts-cycle     { color: #94a3b8; }
body.light-theme .dm-ts-days      { color: #64748b; }
body.light-theme .dm-ts-unit      { color: #94a3b8; }
body.light-theme .dm-ts-cause     { color: #dc2626; }
body.light-theme .dm-ts-date      { color: #94a3b8; }

/* ── Mirror v2 inline card (Phase 2 UI coherence) ─── */
.bx-mv2-wrap{font-family:var(--font,'Space Grotesk',sans-serif);border:1px solid var(--border-subtle,#1e293b);border-radius:10px;overflow:hidden;background:var(--bg-card,#0f172a);}

.bx-mv2-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  background: rgba(10, 16, 28, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 16px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #8595ad;
  text-align: center;
}

/* Empty state */
.bx-mv2-empty{padding:48px 24px;display:flex;align-items:center;justify-content:center;background:var(--bg-card,#0f172a);}
.bx-mv2-empty-msg{font-size:14px;color:var(--text-dim,#64748b);text-align:center;line-height:1.6;}

/* Loading skeleton */
.bx-mv2-loading .bx-mv2-skel-body{height:180px;background:linear-gradient(90deg,var(--bg-inset,#0a0f1e) 25%,var(--border-subtle,#1e293b) 50%,var(--bg-inset,#0a0f1e) 75%);background-size:200% 100%;animation:bx-mv2-shimmer 1.6s infinite;}
@keyframes bx-mv2-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Light-mode overrides */
body.light-theme .bx-mv2-wrap{background:var(--bg-card,#fff);border-color:var(--border-subtle,#e2e8f0);}
body.light-theme .bx-mv2-bar{background:var(--bg-inset,#f8fafc);}
body.light-theme .bx-mv2-heat{background:var(--bg-card,#fff);}
body.light-theme .bx-mv2-foot{background:var(--bg-inset,#f8fafc);}
body.light-theme .bx-mv2-hc{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.06);}
/* ── end Mirror v2 inline card ─── */

/* ── Graveyard stone vocabulary (Phase 3 UI coherence) ─── */
/* Dark-locked: hardcoded dark values inside .bx-grave-wrap scope, never responds to body.light-theme */
.bx-grave-wrap{margin-top:24px;}
.bx-grave-hdr{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.bx-grave-title{font-family:'DM Sans', sans-serif;font-weight:600;font-size:13px;letter-spacing:.2px;color:rgba(237,239,243,.25);}
.bx-grave-wrap .grave{
  background:linear-gradient(180deg,#0a0f1e,color-mix(in oklab,#000 28%,#0a0f1e));
  border:1px solid #1e293b;border-radius:20px;padding:26px 24px 22px;
  color:#EDEFF3;text-align:center;
}
.bx-grave-wrap .grave-stones{display:flex;gap:20px;flex-wrap:wrap;justify-content:center;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.06);}
.bx-grave-wrap .stone-col{display:flex;flex-direction:column;align-items:center;gap:6px;opacity:.72;}
.bx-grave-wrap .stone-col:nth-child(even){transform:translateY(4px) scale(.9);}
.bx-grave-wrap .stone{line-height:1;filter:drop-shadow(0 2px 5px rgba(0,0,0,.7));display:block;}
.bx-grave-wrap .stone-svg{display:block;}
.bx-grave-wrap .stone-flaw{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#5A626F;max-width:90px;line-height:1.3;text-align:center;}
.bx-grave-wrap .stone-date{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.1em;color:#3C4450;}
.bx-grave-wrap .grave-stones-empty{display:flex;gap:14px;justify-content:center;margin-bottom:20px;opacity:.6;}
.bx-grave-wrap .grave-stones-empty .stone:nth-child(even){transform:translateY(4px) scale(.86);}
.bx-grave-wrap .grave-empty-msg{font-size:12px;color:rgba(237,239,243,.3);margin-bottom:16px;font-family:'JetBrains Mono',monospace;letter-spacing:.06em;}
.bx-grave-wrap .grave-line{font-size:13px;line-height:1.65;color:rgba(237,239,243,.6);margin-bottom:10px;max-width:58ch;margin-left:auto;margin-right:auto;}
.bx-grave-wrap .grave-line b{color:#EDEFF3;font-weight:600;}
.bx-grave-wrap .grave-quote{font-size:12px;color:rgba(237,239,243,.35);font-style:italic;}
.bx-grave-wrap .grave-quote em{font-style:normal;color:rgba(237,239,243,.5);}
/* dark-lock: .bx-grave-wrap intentionally never inherits body.light-theme overrides — graveyard is always dark */
/* ── end Graveyard stone vocabulary ─── */

/* Phase 1: Record heatmap — shrink cells on phones and anchor the scroll to the
   right end, so the NOW week is the one that stays in view if it has to scroll. */
.dm-hm-wrap { direction: rtl; }
.dm-hm-wrap > .dm-hm-inner { direction: ltr; }
@media (max-width: 480px) {
  .dm-hm-inner { gap: 4px; }
  .dm-hm-days, .dm-hm-col { gap: 4px; }
  .dm-hm-cell { width: clamp(16px, calc((100vw - 120px) / 9), 22px); height: clamp(16px, calc((100vw - 120px) / 9), 22px); }
  .dm-hm-dl { height: clamp(16px, calc((100vw - 120px) / 9), 22px); width: 16px; }
  .dm-hm-daynum { font-size: 8.5px; }
}

/* Desktop two-column Discipline room (>=1100px): the Mirror card's
   `overflow: hidden` made it the nearest scroll container, so .dm-jump-nav's
   position: sticky never engaged. `clip` keeps the rounded-corner clipping
   without creating a scroll container. Desktop shell only. */
@media (min-width: 1100px) {
  body.dx-desk-shell .bx-mv2-wrap { overflow: clip; }
}

/* ── Phase 3: hero = the Record's first screen; weekly kept bars ─────────── */
.dxk-hero { padding: 4px 0 8px; min-width: 0; }
.dxk-wks { display: flex; align-items: flex-end; gap: 10px; padding-top: 8px; overflow-x: auto; }
.dxk-wk { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.dxk-wk-bar { width: 100%; max-width: 40px; height: 96px; display: flex; align-items: flex-end; border-radius: 8px; background: rgba(255, 255, 255, .05); overflow: hidden; }
body.light-theme .dxk-wk-bar { background: rgba(0, 0, 0, .06); }
.dxk-wk-bar i { display: block; width: 100%; border-radius: 8px 8px 0 0; }
.dxk-wk b { font: 700 12px/1 var(--font-sans, sans-serif); color: var(--dxs-text-1, #e9ebee); }
.dxk-wk span { font: 500 10.5px/1 var(--font-sans, sans-serif); color: var(--dxs-text-3, #94a197); white-space: nowrap; }
