/* =========================================================
   Teddy AuthorityMap — v2 (Auralis-grammar overlay)
   Loaded AFTER ../styles.css. Re-tunes tokens, swaps typography,
   replaces the hero, and adds Auralis-grammar primitives.
   ========================================================= */

:root {
  /* --- Re-tuned palette (overrides original tokens) --- */
  --bg: #ffffff;
  --paper: #ffffff;
  --bg-soft: #fafafa;
  --ink: #111827;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;

  /* --- New v2 tokens --- */
  --primary: #cc8066;
  --primary-700: #a8654d;
  --primary-100: rgba(204, 128, 102, 0.08);
  --accent: #e7a184;
  --accent-soft: rgba(231, 161, 132, 0.18);
  --surface: #191c21;
  --surface-2: #20242b;
  --surface-line: rgba(255, 255, 255, 0.08);
  --on-surface: #e5e7eb;
  --on-surface-2: #9ca3af;

  /* Semantic indicators kept for audit data clarity, but re-tuned */
  --green: #16a34a;
  --blue: #2563eb;
  --red: #dc2626;
  --gold: #cc8066; /* repurposed: gold → primary orange in this v2 layer */
  --plum: #7c3aed;

  /* Type — Geist + JetBrains Mono */
  --font-display: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --display-lg: clamp(2.5rem, 1rem + 5.5vw, 5.5rem);
  --display-md: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  --display-sm: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  --label-md: 0.75rem;

  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-card-hover: 0 1px 2px rgba(17, 24, 39, 0.05), 0 16px 36px rgba(17, 24, 39, 0.1);
  --shadow-cta: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 28px rgba(204, 128, 102, 0.32);

  font-family: var(--font-body);
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

/* =========================================================
   Typography overrides
   ========================================================= */
h1,
h2,
h3,
h4,
.section-heading h2,
.brand b,
.hero-copy h2,
.identity-graphic h3,
.tier-card h3,
.panel-title h3,
.michelle-callout h3,
.score-radar-cap,
.path-step,
.button {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

.utility {
  font-family: var(--font-mono);
  font-size: var(--label-md);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* =========================================================
   App shell
   ========================================================= */
.app-shell {
  background: var(--bg);
}

/* Sidebar — tighten the cream-paper feel into clean white */
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
}

html.is-scrolled .sidebar {
  box-shadow: 4px 0 20px rgba(17, 24, 39, 0.04);
}

.brand {
  border-bottom: 1px solid var(--line);
}

.brand b,
.brand strong {
  color: var(--ink);
}

.brand small,
.brand-copy small {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  color: var(--muted);
}

.brand-logo {
  filter: none;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease;
}
.nav-link:hover {
  color: var(--ink);
}
.nav-link.is-active {
  color: var(--primary);
  background: var(--primary-100);
}

/* Sidebar status note */
.sidebar-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.status-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(204, 128, 102, 0.18);
  animation: v2-pulse 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes v2-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(204, 128, 102, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(204, 128, 102, 0); }
}

/* Topbar */
.topbar {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  color: var(--ink);
  font-weight: 600;
}

.client-pill {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.client-pill strong {
  color: var(--ink);
  font-family: var(--font-display);
}

.client-pill span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* =========================================================
   Hero — full Auralis treatment
   ========================================================= */
.hero-section {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Aurora layer */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 22%,
    rgba(0, 0, 0, 0.6) 50%,
    #000 70%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 22%,
    rgba(0, 0, 0, 0.6) 50%,
    #000 70%
  );
}

.aurora__layer {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  will-change: transform;
}

.aurora__layer--core {
  width: 62vw;
  height: 62vw;
  top: -18%;
  right: -18%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(204, 128, 102, 0.5) 0%,
    rgba(204, 128, 102, 0.16) 35%,
    rgba(204, 128, 102, 0) 70%
  );
  animation: v2-aurora-1 18s ease-in-out infinite;
}

.aurora__layer--conic {
  width: 52vw;
  height: 52vw;
  top: 6%;
  right: -4%;
  background: conic-gradient(
    from 200deg at 50% 50%,
    rgba(231, 161, 132, 0) 0deg,
    rgba(231, 161, 132, 0.4) 90deg,
    rgba(204, 128, 102, 0.46) 180deg,
    rgba(124, 45, 18, 0.3) 270deg,
    rgba(231, 161, 132, 0) 360deg
  );
  opacity: 0.65;
  filter: blur(80px);
  animation: v2-aurora-conic 28s linear infinite;
}

.aurora__layer--peach {
  width: 42vw;
  height: 42vw;
  bottom: -22%;
  right: 6%;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(231, 161, 132, 0.5) 0%,
    rgba(231, 161, 132, 0.14) 40%,
    rgba(231, 161, 132, 0) 70%
  );
  animation: v2-aurora-3 30s ease-in-out infinite;
}

@keyframes v2-aurora-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6%, 5%) scale(1.06); }
}
@keyframes v2-aurora-3 {
  0%, 100% { transform: translate(0, 0) scale(0.95); }
  50%      { transform: translate(-4%, 6%) scale(1.05); }
}
@keyframes v2-aurora-conic {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(5%, -7%) scale(1.08) rotate(180deg); }
  100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

@media (max-width: 720px) {
  .hero-aurora {
    mask-image: linear-gradient(to right, transparent 45%, #000 90%);
    -webkit-mask-image: linear-gradient(to right, transparent 45%, #000 90%);
    opacity: 0.7;
  }
}

/* Signal mesh canvas */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(
    ellipse 80% 60% at 60% 40%,
    #000 40%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 60% 40%,
    #000 40%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Hero copy + board sit above the canvas/aurora */
.hero-copy,
.hero-board {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 24px;
  max-width: 56ch;
}

.hero-brand-icon {
  width: 48px;
  height: 48px;
  display: block;
}

.hero-copy h2 {
  font-family: var(--font-display);
  font-size: var(--display-lg);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  max-width: 18ch;
}

.hero-copy h2 .accent {
  color: var(--primary);
}

.hero-copy p {
  color: var(--muted);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.55;
}

/* Pill eyebrow with live dot */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9999px;
  width: fit-content;
}
.live-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(204, 128, 102, 0.18);
  animation: v2-pulse 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* Hero meta row */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta strong {
  color: var(--ink);
  font-weight: 500;
}

/* Hero board (right side) */
.hero-board {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.ring-label {
  color: var(--muted);
}

/* Score ring — tint to primary orange */
.score-ring {
  /* Original CSS uses --score for conic angle. We override the conic colors. */
  background: conic-gradient(
    var(--primary) calc(var(--score) * 1%),
    rgba(204, 128, 102, 0.12) 0
  ) !important;
}
.score-ring::before {
  background: var(--paper) !important;
}
.score-ring span {
  color: var(--ink) !important;
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
}
.score-ring small {
  color: var(--muted) !important;
  font-family: var(--font-body) !important;
}

/* Review pools */
.review-pools strong {
  color: var(--ink);
  font-family: var(--font-display);
}
.review-pools small {
  color: var(--primary);
}
.review-pools span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Board grid stat cards */
.board-grid strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.board-grid span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Engine strip */
.engine-strip-label {
  color: var(--muted);
}

.engine-mark {
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.engine-name {
  color: var(--ink);
  font-family: var(--font-display);
}

/* =========================================================
   Buttons
   ========================================================= */
.button {
  font-family: var(--font-body);
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0;
  transition:
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-cta);
}
.button.primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.button.secondary:hover {
  background: var(--bg-soft);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* =========================================================
   Section bands & headings
   ========================================================= */
.section-band {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.section-band:nth-of-type(even) {
  background: var(--bg-soft);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: var(--display-md);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-heading p {
  color: var(--muted);
}

/* =========================================================
   Panels (the universal card)
   ========================================================= */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.panel:hover {
  border-color: var(--line-strong);
}

.panel-title h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.panel-title span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tier cards (Identity section) */
.tier-card {
  position: relative;
}
.tier-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.tier-number {
  font-family: var(--font-mono);
  color: var(--primary);
  background: var(--primary-100);
  border: 1px solid rgba(204, 128, 102, 0.2);
}

/* Canonical card */
.canonical-card .canonical-grid b {
  font-family: var(--font-display);
  color: var(--ink);
}
.canonical-card .canonical-grid span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   Identity comparison — fragmented vs aligned
   ========================================================= */
.identity-graphic {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.identity-graphic.fragmented .confidence.low {
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.identity-graphic.aligned .confidence.high {
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.entity-center strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.entity-center span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.signal-list li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.surface-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.surface-card.warning {
  border-color: rgba(204, 128, 102, 0.28);
}

.surface-card.good {
  border-color: rgba(22, 163, 74, 0.28);
}

.surface-card .field-row span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.surface-card .match { color: var(--green); }
.surface-card .drift { color: var(--primary); }
.surface-card .miss  { color: var(--red); }

.result-box.bad {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--red);
}
.result-box.good {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.2);
  color: var(--green);
}
.result-box strong {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}
.result-box p {
  color: var(--ink);
}

/* =========================================================
   Coverage / track / intent / clarity bars — orange tint
   ========================================================= */
.coverage-meter span,
.track span,
.intent-track span,
.clarity-track span,
.score-bar span {
  background: var(--primary) !important;
}

.coverage-meter,
.track,
.intent-track,
.clarity-track {
  background: rgba(204, 128, 102, 0.1) !important;
}

/* =========================================================
   Score radar — elevated to "diagnostic console" treatment
   ========================================================= */
.score-radar-figure {
  position: relative;
  margin: 32px 0 24px;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 40px) clamp(32px, 4vw, 40px);
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 45%,
      rgba(204, 128, 102, 0.07) 0%,
      rgba(204, 128, 102, 0) 70%
    ),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Dotted instrument backdrop — masked to fade at the edges */
.score-radar-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(204, 128, 102, 0.18) 1px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: center center;
  mask-image: radial-gradient(circle at 50% 45%, #000 22%, rgba(0, 0, 0, 0) 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 22%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
  opacity: 0.4;
}

/* Mono frame labels in the panel corners */
.score-radar-figure::after {
  content: "Readiness · 0–5";
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.score-radar {
  position: relative;
  z-index: 1;
}

/* Top-right mono label via the .score-radar host */
.score-radar::before {
  content: "Axes · 07";
  position: absolute;
  top: -6px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
}

/* Polygon — orange with soft glow */
#scoreRadar svg polygon {
  fill: rgba(204, 128, 102, 0.16) !important;
  stroke: var(--primary) !important;
  stroke-width: 1.75 !important;
  filter: drop-shadow(0 0 10px rgba(204, 128, 102, 0.35));
}

/* Inner rings — soft dotted */
#scoreRadar svg circle[stroke-opacity="0.28"] {
  stroke: var(--line-strong) !important;
  stroke-opacity: 0.55 !important;
  stroke-dasharray: 2 4 !important;
}

/* Outer max ring — primary tint, dashed */
#scoreRadar svg circle[stroke-opacity="0.7"] {
  stroke: var(--primary) !important;
  stroke-opacity: 0.45 !important;
  stroke-dasharray: 4 6 !important;
}

/* Spokes — calmed down */
#scoreRadar svg line {
  stroke: var(--line-strong) !important;
  stroke-opacity: 0.5 !important;
}

/* Score dots — bigger, with subtle drop-shadow for depth */
#scoreRadar svg circle[stroke-width="2.5"] {
  r: 7 !important;
  stroke: var(--paper) !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 1px 2px rgba(17, 24, 39, 0.18));
}

/* Axis labels — Geist display, refined */
.score-radar__label text {
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  fill: var(--ink) !important;
  letter-spacing: -0.005em;
}

.score-radar__num {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
}

.score-radar-cap {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
}
.score-radar-cap span {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 500;
}

/* =========================================================
   Engine bars + intent + clarity
   ========================================================= */
.engine-bars b,
.intent-board b,
.clarity-map b {
  font-family: var(--font-display);
  color: var(--ink);
}

.engine-bars small,
.intent-board small,
.clarity-map small {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* =========================================================
   Chip cloud (Buyer Proof)
   ========================================================= */
.chip {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chip b {
  font-family: var(--font-display);
  font-weight: 500;
}
.chip i {
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--primary);
}

.chip-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.chip-stars {
  color: #f5b500;
  letter-spacing: 1px;
  font-size: 0.95rem;
  line-height: 1;
}

.chip-rating {
  font-family: var(--font-display, inherit);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1;
}

.chip-source__meta {
  padding-left: 8px;
  border-left: 1px solid rgba(20, 21, 18, 0.12);
  text-transform: uppercase;
}

/* =========================================================
   Reddit callout
   ========================================================= */
.reddit-callout {
  background: linear-gradient(
    135deg,
    rgba(204, 128, 102, 0.04) 0%,
    rgba(231, 161, 132, 0.06) 100%
  );
  border-color: rgba(204, 128, 102, 0.2);
}

.reddit-mark {
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-mono);
}

/* =========================================================
   Source heatmap — keep semantic per-state colors but refine
   for v2 (cleaner backgrounds, mono labels, subtle borders)
   ========================================================= */
.heat-cell {
  font-family: var(--font-mono);
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  border-radius: 6px;
  font-size: 10px !important;
  border-width: 1px;
}
.heat-cell.strong   { background: #16a34a; color: #ffffff; border-color: rgba(22, 163, 74, 0.6); }
.heat-cell.anchored { background: #115e59; color: #ffffff; border-color: rgba(17, 94, 89, 0.7); }
.heat-cell.review   { background: rgba(22, 163, 74, 0.14); color: #15803d; border-color: rgba(22, 163, 74, 0.3); }
.heat-cell.some     { background: rgba(204, 128, 102, 0.85); color: #ffffff; border-color: rgba(204, 128, 102, 0.7); }
.heat-cell.mixed    { background: rgba(204, 128, 102, 0.18); color: var(--primary-700); border-color: rgba(204, 128, 102, 0.32); }
.heat-cell.low      { background: rgba(220, 38, 38, 0.12); color: var(--red); border-color: rgba(220, 38, 38, 0.3); }
.heat-cell.risk     { background: #dc2626; color: #ffffff; border-color: rgba(220, 38, 38, 0.7); }
.heat-cell.unknown  { background: var(--bg-soft); color: var(--muted-2); border-color: var(--line); }

.heat-row:not(.heat-head):hover {
  background: var(--bg-soft);
}

/* Engine column headers — logo + label */
.heat-engine-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.heat-engine-logo {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.heat-engine-logo img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.heat-engine-name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On narrow screens hide the label, keep just the logo so the column doesn't overflow */
@media (max-width: 900px) {
  .heat-engine-name { display: none; }
}

/* =========================================================
   Michelle callout (Competitors)
   ========================================================= */
.michelle-callout,
.territorial-callout {
  background: var(--surface);
  color: var(--on-surface);
  border-color: var(--surface-line);
}
.michelle-callout .utility,
.territorial-callout .utility { color: var(--accent); }
.michelle-callout h3,
.territorial-callout h3 { color: #ffffff; }
.michelle-callout .michelle-col,
.territorial-callout .michelle-col {
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
}
.michelle-callout .michelle-col span,
.territorial-callout .michelle-col span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.michelle-callout .michelle-col b,
.territorial-callout .michelle-col b {
  color: #ffffff;
  font-family: var(--font-display);
}
.michelle-callout .michelle-col li,
.territorial-callout .michelle-col li {
  color: var(--on-surface-2);
}
.michelle-callout .michelle-col li.match,
.territorial-callout .michelle-col li.match { color: #4ade80; }
.michelle-callout .michelle-col li.miss,
.territorial-callout .michelle-col li.miss  { color: #fca5a5; }
.michelle-callout .michelle-foot,
.territorial-callout .michelle-foot {
  color: var(--on-surface-2);
}
.michelle-callout .michelle-foot b,
.territorial-callout .michelle-foot b {
  color: var(--accent);
}

/* =========================================================
   Path flow (WSHFC)
   ========================================================= */
.path-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-display);
  color: var(--ink);
}
.path-step.strong {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-700);
  box-shadow: var(--shadow-cta);
}

/* =========================================================
   Filter buttons (Playbook)
   ========================================================= */
.filter-button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9999px;
}
.filter-button.is-selected {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}
.filter-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.filter-button.is-selected:hover {
  color: #ffffff;
}

/* =========================================================
   Fix queue / retest / drafts (light cards)
   ========================================================= */
.fix-card,
.retest-card,
.draft-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.fix-card:hover,
.retest-card:hover,
.draft-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.fix-card .meta,
.retest-card .meta,
.draft-card .meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Week grid — kept dark on purpose (calendar moment, intentionally inverted) */
.week-card {
  background: var(--surface) !important;
  color: var(--on-surface) !important;
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.week-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(204, 128, 102, 0.4);
}
.week-card span {
  color: var(--accent) !important;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.week-card h3 {
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 600;
}
.week-card ul {
  color: var(--on-surface) !important;
}
.week-card li {
  color: var(--on-surface) !important;
}
.week-card li::marker {
  color: var(--primary);
}

/* Bucket badges on fix-card / wshfc-card — re-tune to v2 typography */
.badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  border-radius: 9999px;
  border: 1px solid transparent;
}
.badge.fix-now {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.24);
}
.badge.needs-approval {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.24);
}
.badge.defer {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.22);
}

/* =========================================================
   Methodology / proof
   ========================================================= */
.methodology-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.proof-card span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.proof-card strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.source-drawer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-drawer summary {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}

.source-list a {
  color: var(--primary);
  font-family: var(--font-body);
}

.source-list a:hover {
  color: var(--primary-700);
}

/* =========================================================
   Failure receipt cards (AI errors) — elevated rhythm
   ========================================================= */
.receipt,
.failure-card.receipt {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
  /* More breathing between sections */
  gap: 16px !important;
  padding: 20px !important;
  min-height: 0 !important;
}
.receipt:hover,
.failure-card.receipt:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Top accent bar removed — severity meter carries the risk signal */

/* Avatar */
.receipt__avatar {
  background: var(--bg-soft) !important;
  border: 1px solid var(--line) !important;
  width: 36px !important;
  height: 36px !important;
}
.receipt__avatar img {
  width: 20px !important;
  height: 20px !important;
}

/* Engine name + meta */
.receipt__engine {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: var(--ink) !important;
  letter-spacing: -0.005em !important;
}
.receipt__meta {
  font-family: var(--font-mono) !important;
  font-size: 0.6875rem !important;
  letter-spacing: 0.16em !important;
  color: var(--muted) !important;
  margin-top: 4px !important;
  text-transform: uppercase;
}

/* FALSE stamp — tighten */
.receipt__stamp {
  font-family: var(--font-mono) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.22em !important;
  padding: 4px 8px 3px !important;
}

/* Receipt bubble/truth styling — moved to polish-10 block (~line 2860).
   Prior !important rules removed to allow current design to take effect. */

/* Headline + risk — keep together visually with tighter gap between, more space around */
.receipt h3.receipt__headline {
  font-family: var(--font-display) !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  margin: 6px 0 0 !important;
}
.receipt__risk {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--muted) !important;
  margin: 6px 0 0 !important;
}

/* Footer — pinned, with refined fix-lever typography */
.receipt__foot {
  padding-top: 14px !important;
  margin-top: auto !important;
  border-top: 1px dashed var(--line) !important;
  gap: 10px !important;
}
.receipt__fix {
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  color: var(--ink) !important;
}
.receipt__fix b {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.16em !important;
  color: var(--muted) !important;
  margin-right: 8px !important;
  text-transform: uppercase;
}

/* =========================================================
   Masked reveal
   ========================================================= */
.masked-reveal { visibility: visible; }
html.js .masked-reveal[data-masked-reveal] { visibility: hidden; }
html.js .masked-reveal.is-split { visibility: visible; }

.masked-reveal .word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1;
}
.masked-reveal .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.masked-reveal.is-revealed .word {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js .masked-reveal[data-masked-reveal] { visibility: visible; }
  .masked-reveal .word { transform: none; transition: none; }
  .aurora__layer { animation: none; }
  .live-pill .dot, .status-dot { animation: none; }
}

/* =========================================================
   Misc — nav active indicator + pill bar
   ========================================================= */
.nav-list::before,
.nav-list .active-indicator {
  background: var(--primary-100) !important;
  border-radius: 6px;
}

/* =========================================================
   Before / after retest board (v2 overlay)
   ========================================================= */
.retest-section {
  margin-top: 56px;
}

.compact-heading h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* AI Overview snippet cards */
.snippet-mock {
  margin: 8px 0 32px;
  gap: 20px;
}

.snippet-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.snippet-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.snippet-card--before {
  border-top: 3px solid var(--red);
}
.snippet-card--after {
  border-top: 3px solid var(--primary);
}

.snippet-engine {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.snippet-state-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.snippet-state-badge--before {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}
.snippet-state-badge--after {
  color: var(--primary);
  background: var(--primary-100);
  border-color: rgba(204, 128, 102, 0.3);
}

.snippet-body {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 400;
}

.snippet-body s {
  color: var(--red);
  text-decoration-color: rgba(220, 38, 38, 0.7);
}

.snippet-body strong {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 62%, var(--accent-soft) 62%);
}

.snippet-cite {
  border-top: 1px dashed var(--line);
}

.snippet-cite-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.snippet-cite-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  border-color: var(--line);
}

.snippet-cite-pill--strong {
  background: var(--primary-100);
  color: var(--primary-700);
  border-color: rgba(204, 128, 102, 0.25);
}

.snippet-cite-pill--weak {
  background: rgba(220, 38, 38, 0.06);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.22);
}

.snippet-cite-pill--missing {
  border-color: var(--line);
  color: var(--muted-2);
}

.snippet-stamp {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 9.5px;
}

.snippet-stamp--false {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border-top-color: rgba(220, 38, 38, 0.35);
  border-bottom-color: rgba(220, 38, 38, 0.35);
}

.snippet-stamp--projected {
  color: var(--primary);
  background: var(--primary-100);
  border-top-color: rgba(204, 128, 102, 0.35);
  border-bottom-color: rgba(204, 128, 102, 0.35);
}

.snippet-arrow {
  color: var(--muted-2);
}

/* Retest trajectory board */
.retest-board {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 8px 20px;
}

.retest-row {
  border-top-color: var(--line);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.retest-row b {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.retest-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
}

.retest-head em {
  font-family: var(--font-mono);
  color: var(--primary);
  border-color: rgba(204, 128, 102, 0.4);
  background: var(--primary-100);
  font-weight: 500;
}

.retest-spark-axis {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.retest-foot {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

/* =========================================================
   Competitors — Classification clarity (v2 overlay)
   ========================================================= */
.clarity-map {
  gap: 16px;
}

.clarity-row {
  border-bottom-color: var(--line);
  padding-bottom: 14px;
}

.clarity-row b {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.clarity-row small {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 12px;
}

.clarity-row strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.clarity-track {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  height: 16px;
}

.clarity-track > span {
  border-radius: 999px;
}

.clarity-track::after {
  border-left-color: var(--muted-2);
  opacity: 0.6;
}

.clarity-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  opacity: 1;
  letter-spacing: 0.02em;
}

.clarity-row--you {
  background: var(--primary-100);
  border: 1px solid rgba(204, 128, 102, 0.18);
  border-radius: 10px;
  padding: 12px 12px 14px;
  margin: 0 -12px;
}

.clarity-row--you + .clarity-row {
  border-top-color: var(--line);
}

.clarity-you-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #ffffff;
  background: var(--ink);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
}

.clarity-legend {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-top-color: var(--line);
}

.clarity-legend b {
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 600;
}

.clarity-legend-line {
  border-top-color: var(--muted-2);
  opacity: 0.6;
}

/* Why this matters — gap callout + mini table polish */
.gap-callout {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}

.gap-callout strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.gap-callout p {
  color: var(--muted);
  line-height: 1.55;
}

.mini-table {
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.mini-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.mini-row:last-child {
  border-bottom: 0;
}

.mini-row b {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.mini-row small {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 12px;
}

.mini-row span {
  font-family: var(--font-body);
  color: var(--muted);
  line-height: 1.5;
}

/* Baseline pills — re-tuned for v2 palette */
.baseline {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  border-radius: 999px;
  padding: 0 10px;
  min-height: 22px;
}

.baseline.weak,
.baseline.risky,
.baseline.weak-mixed {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
}

.baseline.mixed,
.baseline.should-be-strong {
  color: var(--primary-700);
  background: var(--primary-100);
}

.baseline.strong,
.baseline.stronger {
  color: var(--green);
  background: rgba(22, 163, 74, 0.1);
}

/* =========================================================
   POLISH LAYER — cross-cutting refinements (desktop + mobile)
   Loaded last; intentionally additive.
   ========================================================= */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --topbar-h: 96px;
  --ring-focus: 0 0 0 2px var(--paper), 0 0 0 4px rgba(204, 128, 102, 0.55);
}

/* Anchor jumps land below the sticky topbar */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-h);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.section-band,
.hero-section { scroll-margin-top: var(--topbar-h); }

/* Selection color — small detail, big polish signal */
::selection {
  background: rgba(204, 128, 102, 0.22);
  color: var(--ink);
}

/* Tabular numerals everywhere numbers carry signal */
.hero-meta strong,
.hero-meta span,
.board-grid strong,
.review-pools strong,
.score-ring span,
.canonical-grid b,
.clarity-num,
.retest-spark-axis,
.engine-bars,
.intent-board,
.score-grid,
.heat-row,
.mini-row,
.failure-card.receipt {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

/* Focus-visible — applied broadly, never on mouse */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
.nav-link:focus-visible,
.filter-button:focus-visible,
.score-ring:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: 8px;
}
.button:focus-visible {
  border-radius: 8px;
}
.filter-button:focus-visible,
.client-pill:focus-visible {
  border-radius: 9999px;
}

/* Button active depth — Stripe-y press */
.button {
  position: relative;
}
.button.primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08) inset, 0 4px 14px rgba(204, 128, 102, 0.28);
  transition-duration: 80ms;
}
.button.secondary:active {
  transform: translateY(0);
  background: var(--bg-soft);
  transition-duration: 80ms;
}

/* Brand icon micro-hover */
.hero-brand-icon {
  transition: transform 480ms var(--ease-out-expo);
}
.hero-section:hover .hero-brand-icon {
  transform: rotate(-6deg) scale(1.04);
}

/* Topbar — subtle elevation only when scrolled past hero */
html.is-scrolled .topbar {
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04), 0 6px 18px rgba(17, 24, 39, 0.04);
}

/* Sidebar nav — make active state read as a clear pill on hover */
.nav-link {
  border-radius: 6px;
  padding-left: 12px;
  padding-right: 12px;
}
.nav-link:hover { background: var(--bg-soft); }
.nav-link.is-active:hover { background: var(--primary-100); }

/* Panel: deepen hover with a tiny lift */
.panel {
  will-change: transform;
}
.panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}

/* Score ring — refined inner paper edge + tighter type */
.score-ring {
  box-shadow:
    inset 0 0 0 1px rgba(204, 128, 102, 0.18),
    0 12px 28px rgba(204, 128, 102, 0.16),
    0 1px 2px rgba(17, 24, 39, 0.04);
  transition: transform 360ms var(--ease-out-expo), box-shadow 360ms var(--ease-out-expo);
}
.score-ring:hover {
  transform: scale(1.01);
  box-shadow:
    inset 0 0 0 1px rgba(204, 128, 102, 0.28),
    0 18px 36px rgba(204, 128, 102, 0.22),
    0 1px 2px rgba(17, 24, 39, 0.06);
}
.score-ring::before {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(17, 24, 39, 0.04) !important;
}
.score-ring span {
  letter-spacing: -0.04em !important;
  font-feature-settings: "tnum" 1;
}

/* Hero meta — give numbers prominence and fix mobile rhythm */
.hero-meta {
  align-items: center;
}
.hero-meta strong,
.hero-meta .num-suffix {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  font-weight: 500;
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.hero-meta .stat-num {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
}
.hero-meta .num-suffix {
  font-style: normal;
}
.hero-meta .meta-label {
  font-style: normal;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  margin-left: 8px;
}
.hero-meta .meta-label.inline-mark {
  margin-left: 0;
}

/* Live pill — slight highlight for premium feel */
.live-pill {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(17, 24, 39, 0.04);
}

/* Identity surface cards — hover */
.surface-card {
  transition: transform 280ms var(--ease-out-expo), box-shadow 280ms var(--ease-out-expo), border-color 280ms var(--ease-out-expo);
}
.surface-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

/* Tier card — orange number chip more refined */
.tier-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Filter buttons — active scale-press */
.filter-button {
  transition: transform 160ms var(--ease-out-expo), background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.filter-button:active { transform: scale(0.97); }

/* Source list links — stripe-style underline */
.source-list a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 280ms var(--ease-out-expo), color 160ms ease;
}
.source-list a:hover {
  background-size: 100% 1px;
}

/* Source drawer — refined open/close affordance */
.source-drawer summary {
  cursor: pointer;
  padding: 16px 18px;
  list-style: none;
  position: relative;
  transition: background 160ms ease;
}
.source-drawer summary::-webkit-details-marker { display: none; }
.source-drawer summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 280ms var(--ease-out-expo), color 160ms ease;
}
.source-drawer[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--primary);
}
.source-drawer summary:hover { background: var(--bg-soft); }
.source-drawer summary:hover::after { color: var(--primary); }

/* Score radar — tiny halo bump on the polygon for that "instrument feels alive" effect */
#scoreRadar svg polygon {
  transition: filter 480ms var(--ease-out-expo);
}
.score-radar-figure:hover #scoreRadar svg polygon {
  filter: drop-shadow(0 0 14px rgba(204, 128, 102, 0.45)) !important;
}

/* Snippet cards — subtle directional lift */
.snippet-card--before:hover { border-color: rgba(220, 38, 38, 0.35); }
.snippet-card--after:hover  { border-color: rgba(204, 128, 102, 0.45); }

/* Path step strong — shimmering edge */
.path-step.strong {
  background-image: linear-gradient(135deg, var(--primary) 0%, #cc8066 100%);
}
.path-step.strong:hover {
  filter: brightness(1.04);
}

/* Heatmap rows — finer gridlines + zebra polish */
.heat-row + .heat-row { border-top: 1px solid var(--line); }
.heatmap-cell { transition: filter 160ms ease, transform 160ms ease; }
.heatmap-cell:hover { filter: brightness(1.06); transform: scale(1.02); z-index: 1; position: relative; }

/* Receipt cards — stagger the top accent stroke into a 4px more deliberate stroke */
.failure-card.receipt {
  border-top-width: 3px;
}

/* Drafts panel-stack rhythm */
.panel-stack > .panel + .panel { margin-top: 16px; }

/* Clarity track refined fill — make the bar feel more "filled" with subtle gradient */
.clarity-track > span {
  background: linear-gradient(90deg, var(--primary) 0%, #cc8066 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
.clarity-row--you .clarity-track > span {
  background: linear-gradient(90deg, var(--primary-700) 0%, var(--primary) 100%) !important;
}

/* =========================================================
   POLISH — desktop-specific (≥ 1024)
   ========================================================= */
@media (min-width: 1024px) {
  /* Section bands — slightly more breathing on large screens for that "editorial" cadence */
  .section-band {
    padding-top: clamp(64px, 6vw, 112px);
    padding-bottom: clamp(64px, 6vw, 112px);
  }
  /* Hero — slightly tighter top, more dramatic bottom */
  .hero-section { padding-bottom: clamp(64px, 6vw, 96px); }

  /* Tier-grid — tighten spacing between cards */
  .tier-grid { gap: 20px; }
}

/* =========================================================
   POLISH — mobile-specific (≤ 720)
   ========================================================= */
@media (max-width: 720px) {
  /* Topbar utility line shouldn't dominate */
  .topbar h1 { letter-spacing: -0.025em; }

  /* Hero copy tightens */
  .hero-copy {
    gap: 18px;
    max-width: none;
  }
  .hero-copy h2 {
    line-height: 0.98;
    letter-spacing: -0.025em;
  }

  /* Hero meta — switch to a 2-col grid where each cell reads as a stat */
  .hero-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding-top: 18px;
  }
  .hero-meta span {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    line-height: 1.2;
  }
  .hero-meta strong,
  .hero-meta .num-suffix {
    font-size: 1.5rem;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .hero-meta .meta-label {
    margin-left: 0;
  }
  /* Chips with multiple numbers (e.g. "207 reviews · 4.94 ★") flow inline + wrap */
  .hero-meta .chip-multinum {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
    row-gap: 2px;
  }
  .hero-meta .chip-multinum > strong {
    font-size: 1.1rem;
  }
  .hero-meta .chip-multinum > .meta-label {
    font-size: 0.6875rem;
  }

  /* Hero board — tighter padding so card doesn't feel crammed at small widths */
  .hero-board {
    padding: 24px 20px !important;
    border-radius: 14px;
  }

  /* Review pools — fix the 1fr clip and tighten label widths */
  .review-pools {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-width: 0;
  }
  .review-pools > div {
    padding: 8px 10px !important;
    min-width: 0;
  }
  .review-pools strong { font-size: 18px !important; }
  .review-pools strong small { font-size: 13px !important; }
  .review-pools span {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25;
  }

  /* Board grid stat cards — tighten label widths */
  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .board-grid > div { min-width: 0; }
  .board-grid span {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25;
  }

  /* Engine strip on mobile — keep logos tight, no overflow */
  .engine-strip { padding-bottom: 8px; }
  .engine-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .engine-row li { min-width: 0; justify-content: center; }
  .engine-name {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
  }

  /* Buttons — full width feels more deliberate at this size */
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .hero-actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  /* Section heading display sizes — slightly smaller for narrow viewports */
  .section-heading h2 { letter-spacing: -0.022em; }

  /* Filter row — wrap with cleaner gaps */
  .filter-row { gap: 8px; }
  .filter-button { padding: 6px 12px; }

  /* Source heatmap horizontal scroll feels intentional */
  .heatmap-panel { -webkit-overflow-scrolling: touch; }

  /* Path-flow steps stack on mobile */
  .path-flow {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Tier cards — better mobile rhythm */
  .tier-grid { gap: 12px; }

  /* Snippet mock arrow — already rotates, but tighten gap */
  .snippet-mock { gap: 12px; margin: 8px 0 24px; }
  .snippet-card { padding: 18px 16px 14px; }

  /* Clarity row YOU highlight stays clean on narrow widths */
  .clarity-row--you { margin: 0; padding: 12px; }

  /* Mobile-only — hide the pulse aurora on the live-pill dot to save battery (already done in reduced-motion) */
}

/* =========================================================
   POLISH — touch device hover suppression (no sticky :hover lift)
   ========================================================= */
@media (hover: none) {
  .panel:hover,
  .fix-card:hover,
  .retest-card:hover,
  .draft-card:hover,
  .snippet-card:hover,
  .surface-card:hover,
  .week-card:hover,
  .receipt:hover,
  .failure-card.receipt:hover,
  .tier-card:hover {
    transform: none;
  }
  .hero-section:hover .hero-brand-icon { transform: none; }
}

/* =========================================================
   POLISH PASS 2 — editorial depth, scroll progress,
   sliding nav indicator color, hero CTAs, grain texture,
   card inner highlights, balanced headings.
   ========================================================= */

/* Text-wrap: balance for headings (better natural line breaks) */
@supports (text-wrap: balance) {
  .hero-copy h2,
  .section-heading h2,
  .panel-title h3,
  .michelle-callout h3,
  .gap-callout strong,
  .tier-card h3,
  .canonical-card .canonical-grid b,
  .identity-graphic h3 {
    text-wrap: balance;
  }
  .hero-copy p,
  .section-heading p,
  .gap-callout p,
  .receipt__risk,
  .reddit-callout p {
    text-wrap: pretty;
  }
}

/* Scroll-progress strip — lives at top of viewport, driven by --scroll-progress */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, var(--primary) 0%, #cc8066 70%, #e7a184 100%);
  box-shadow: 0 0 8px rgba(204, 128, 102, 0.45);
  z-index: 200;
  pointer-events: none;
  transition: width 60ms linear;
}
@media (prefers-reduced-motion: reduce) {
  body::before { transition: none; }
}

/* Sidebar nav-indicator — switch to primary orange, refine */
.nav-indicator {
  background: var(--primary) !important;
  width: 3px !important;
  border-radius: 0 3px 3px 0 !important;
  left: 0 !important;
  box-shadow: 0 0 12px rgba(204, 128, 102, 0.35);
}

/* Subtle SVG grain on hero — premium "real surface" feel */
.hero-section {
  position: relative;
}
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  opacity: 0.035;
  mix-blend-mode: multiply;
}

/* Hero CTA — primary gets an arrow that walks on hover */
.hero-actions .button.primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-actions .button.primary::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
  display: inline-block;
  transition: transform 240ms var(--ease-out-expo);
  will-change: transform;
}
.hero-actions .button.primary:hover::after {
  transform: translateX(4px);
}

/* Hero CTA — secondary gets a quieter arrow */
.hero-actions .button.secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-actions .button.secondary::after {
  content: "→";
  opacity: 0.55;
  font-family: var(--font-mono);
  transition: transform 240ms var(--ease-out-expo), opacity 240ms ease;
}
.hero-actions .button.secondary:hover::after {
  opacity: 1;
  transform: translateX(3px);
}

/* Editorial section rhythm — major narrative moments breathe more */
@media (min-width: 1024px) {
  /* Bookend hero with deliberate space */
  .hero-section {
    padding-top: clamp(48px, 4.5vw, 88px);
    padding-bottom: clamp(72px, 7.5vw, 128px);
  }
  /* Major narrative bands */
  #identity, #scorecard, #visibility, #buyer-proof, #competitors, #playbook {
    padding-top: clamp(80px, 7vw, 132px) !important;
    padding-bottom: clamp(80px, 7vw, 132px) !important;
  }
  /* Connector bands tighter */
  #ai-errors, #control-matrix, #wshfc-path, #source-heatmap, #sources, #drafts {
    padding-top: clamp(56px, 5vw, 96px) !important;
    padding-bottom: clamp(56px, 5vw, 96px) !important;
  }
}

/* Hairline gradient divider between bands (replace plain 1px line) */
.section-band {
  border-bottom: none;
  position: relative;
}
.section-band + .section-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 1180px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 18%, var(--line) 82%, transparent 100%);
  pointer-events: none;
}
.hero-section { border-bottom: none; }
.hero-section + .section-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 1180px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 18%, var(--line) 82%, transparent 100%);
  pointer-events: none;
}

/* Panel inner top-edge highlight on hover (soft lift detail) */
.panel { position: relative; isolation: isolate; }
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0),
    inset 0 0 0 1px rgba(204, 128, 102, 0);
  transition:
    box-shadow 360ms var(--ease-out-expo);
}
.panel:hover::after {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 0 0 1px rgba(204, 128, 102, 0.1);
}

/* Reddit callout — accent border-glow on hover */
.reddit-callout {
  transition: border-color 280ms var(--ease-out-expo), box-shadow 280ms var(--ease-out-expo), transform 280ms var(--ease-out-expo);
}
.reddit-callout:hover {
  border-color: rgba(204, 128, 102, 0.35);
  box-shadow: var(--shadow-card-hover), 0 0 0 4px rgba(204, 128, 102, 0.06);
  transform: translateY(-2px);
}

/* Engine bars — gradient fill */
.engine-bars .track > span,
.intent-board .intent-track > span {
  background: linear-gradient(90deg, var(--primary) 0%, #cc8066 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

/* Score grid scores — tighten letter-spacing for wider numerals */
.score-card .score {
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Filter button — selected state gets a subtle gradient instead of flat ink */
.filter-button.is-selected {
  background: linear-gradient(180deg, #1f2937 0%, var(--ink) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 4px 12px rgba(17, 24, 39, 0.18);
}

/* Brand logo — subtle interactive cue */
.brand-logo {
  transition: transform 480ms var(--ease-out-expo);
}
.brand:hover .brand-logo {
  transform: rotate(-8deg);
}

/* Topbar h1 — slightly tighter with display weight */
.topbar h1 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* Canonical card — refine the green verified header */
.canonical-card .utility {
  color: var(--green);
  letter-spacing: 0.16em;
}

/* WSHFC path-flow steps — stronger active step glow */
.path-step.strong {
  box-shadow:
    var(--shadow-cta),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Source-list link bottom underline color when active */
.source-list a:hover {
  color: var(--primary-700);
}

/* Receipt card — accent left-edge highlight */
.failure-card.receipt {
  position: relative;
}
.failure-card.receipt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 0;
  background: var(--red);
  border-radius: 0 4px 4px 0;
  transition: width 360ms var(--ease-out-expo);
  pointer-events: none;
  opacity: 0.85;
}
.failure-card.receipt:hover::before {
  width: 3px;
}

/* Snippet card — same edge accent (red for before, primary for after) */
.snippet-card { position: relative; }
.snippet-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 0;
  border-radius: 0 4px 4px 0;
  transition: width 360ms var(--ease-out-expo);
  pointer-events: none;
  opacity: 0.85;
}
.snippet-card--before::before { background: var(--red); }
.snippet-card--after::before  { background: var(--primary); }
.snippet-card:hover::before { width: 3px; }

/* Mobile — make the scroll-progress slightly more visible (thicker) */
@media (max-width: 720px) {
  body::before { height: 2.5px; }
  .hero-section::after { opacity: 0.025; }

  /* Prevent grain over the bottom of mobile hero from muddying the board */
  .hero-board { isolation: isolate; }
}

/* Reduced motion — kill the panel hover gradients, keep static */
@media (prefers-reduced-motion: reduce) {
  .panel,
  .fix-card,
  .draft-card,
  .retest-card,
  .week-card,
  .surface-card,
  .snippet-card,
  .receipt,
  .failure-card.receipt,
  .tier-card,
  .reddit-callout,
  .hero-brand-icon,
  .brand-logo {
    transition: none !important;
  }
  body::before { transition: none; }
  .nav-indicator { transition: none !important; }
}

/* =========================================================
   POLISH-6 — accessibility, atomic utilities, hover affordances, print
   Loaded last; intentionally additive.
   ========================================================= */

/* A11y: skip-link reveals only on keyboard focus */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper, #fff);
  background: var(--ink, #111827);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-card, 0 8px 24px rgba(17, 24, 39, 0.18));
  transform: translateY(-150%);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: none;
  box-shadow: 0 0 0 2px var(--paper, #fff), 0 0 0 4px rgba(204, 128, 102, 0.55);
}

/* Atomic: prevent ugly word-break inside short tokens like "Ste B-2" */
.nowrap { white-space: nowrap; }
/* Reset inheritance when used inside the canonical-grid (which styles raw <span> as labels) */
.canonical-card .canonical-grid b .nowrap {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

/* Engine-strip li — micro-hover lift, the row already conveys "tested across" */
.engine-row li {
  transition: transform 220ms var(--ease-out-expo), color 160ms ease;
}
.engine-row li:hover {
  transform: translateY(-1px);
  color: var(--ink);
}
.engine-row li:hover .engine-mark {
  filter: saturate(1.1);
}

/* Subtle page-margin hint: orange glow under the body when scrolled, tiny but premium */
@media (hover: hover) {
  .button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(204, 128, 102, 0.32), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  }
  .button.secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.08);
  }
}
.button.primary,
.button.secondary {
  transition: transform 200ms var(--ease-out-expo),
    box-shadow 220ms var(--ease-out-expo),
    background 160ms ease,
    color 160ms ease;
}

/* Reduced-motion respect for the new hover translates */
@media (prefers-reduced-motion: reduce) {
  .engine-row li,
  .button.primary,
  .button.secondary,
  .skip-link {
    transition: none !important;
  }
  .engine-row li:hover,
  .button.primary:hover,
  .button.secondary:hover {
    transform: none !important;
  }
}

/* =========================================================
   Print stylesheet — clients still print these for read-aloud reviews
   ========================================================= */
@media print {
  :root { color-scheme: light; }
  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt;
  }
  /* Strip chrome */
  .sidebar,
  .topbar .topbar-right,
  .topbar .top-nav,
  .mobile-nav-toggle,
  .skip-link,
  .hero-canvas,
  .hero-aurora,
  body::before,         /* scroll-progress strip */
  .filter-row,
  details summary,
  .button {
    display: none !important;
  }
  .app-shell {
    grid-template-columns: 1fr !important;
    display: block !important;
  }
  main { padding: 0 !important; }
  /* Open every collapsed section so nothing hides on paper */
  details[open],
  details {
    display: block !important;
  }
  details > *:not(summary) { display: block !important; }
  /* No motion on paper */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
  /* Don't break key blocks across pages */
  .canonical-card,
  .panel,
  .tier-card,
  .surface-card,
  .fix-card,
  .week-card,
  .draft-card,
  .snippet-card,
  .reddit-callout,
  .michelle-callout {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #ccc !important;
    background: #fff !important;
  }
  /* New page before the playbook so the plan starts cleanly */
  #playbook {
    page-break-before: always;
    break-before: page;
  }
  /* Make linked URLs visible after their text */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
}

/* =========================================================
   POLISH-8 — visual primitives replacing text-heavy blocks
   - .scorebar-list  (Scorecard, replaces .score-card grid)
   - .severity-meter (AI Errors, in receipt header)
   - .step-flow      (Identity tier, replaces .tier-grid prose cards)
   ========================================================= */

/* === Scorebar — horizontal mini-bars under the radar === */
/* Parent grid owns the column layout; each .scorebar row uses subgrid so all
   four columns line up perfectly across rows regardless of name/badge length. */
.score-grid:has(.scorebar) {
  display: grid !important;
  grid-template-columns: minmax(170px, 1.5fr) minmax(120px, 3fr) auto minmax(120px, auto);
  gap: 6px 18px;
  overflow-x: visible;
  padding-bottom: 0;
}
.scorebar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: help;
  transition: border-color 200ms var(--ease-out-expo),
    background 200ms var(--ease-out-expo),
    transform 200ms var(--ease-out-expo);
}
/* Right-align the evidence badge so short ("FACT") and long ("FACT + INFERENCE")
   labels share the same right edge instead of pushing track widths around. */
.scorebar .evidence-badge {
  justify-self: end;
}
.scorebar:hover,
.scorebar:focus-visible {
  border-color: var(--line-strong);
  background: var(--bg-soft);
  transform: translateX(1px);
  outline: none;
}
.scorebar__name {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.9375rem;
}
.scorebar__track {
  position: relative;
  height: 8px;
  background: var(--line);
  border-radius: 9999px;
  overflow: hidden;
  min-width: 80px;
}
.scorebar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  background: var(--bar-color, var(--primary));
  border-radius: 9999px;
  transform-origin: left;
  animation: scorebar-grow 900ms var(--ease-out-expo) both;
}
@keyframes scorebar-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.scorebar__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.scorebar__num small {
  font-size: 0.6875rem;
  opacity: 0.55;
  font-weight: 500;
  margin-left: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .scorebar__fill { animation: none; }
}
@media (max-width: 640px) {
  /* On mobile, drop subgrid: parent becomes a flex column and each row owns
     its own 2-column grid with stacked name/track/evidence rows. */
  .score-grid:has(.scorebar) {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
    gap: 6px;
  }
  .scorebar {
    grid-column: auto;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "name num"
      "track track"
      "evidence evidence";
    gap: 4px 12px;
    padding: 12px;
  }
  .scorebar__name { grid-area: name; }
  .scorebar__track { grid-area: track; min-width: 0; }
  .scorebar__num { grid-area: num; }
  .scorebar .evidence-badge { grid-area: evidence; justify-self: start; margin-top: 4px; }
}

/* === Severity meter — small 3-bar readability gauge for AI Errors === */
.severity-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.severity-meter__bars {
  display: inline-flex;
  gap: 2px;
}
.severity-meter__bars span {
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: var(--line);
  transition: background 200ms ease;
}
.severity-low .severity-meter__bars span:nth-child(1) {
  background: #d4a017;
}
.severity-med .severity-meter__bars span:nth-child(1),
.severity-med .severity-meter__bars span:nth-child(2) {
  background: #e07b29;
}
.severity-high .severity-meter__bars span {
  background: #d9442a;
}
.severity-low  .severity-meter__label { color: #b78400; }
.severity-med  .severity-meter__label { color: #c1561a; }
.severity-high .severity-meter__label { color: #d9442a; }

/* Receipt restructure (polish-10) — mark + headline inline on top row,
   tinted body box below with left vertical accent. Full-width text for less wrap. */
.receipt__chrome {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20, 21, 18, 0.06);
}
.receipt__engine {
  flex: 1;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Hide legacy chrome meta sub-line and the FALSE stamp, no longer rendered */
.receipt__id,
.receipt__meta,
.receipt__stamp { display: none !important; }

.receipt__claim {
  margin-top: 14px;
}
.receipt__claim:first-of-type { margin-top: 4px; }
.receipt__claim-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.receipt__claim .receipt__headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}
.receipt__claim .receipt__truth-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.receipt__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.receipt__mark--false {
  background: rgba(217, 68, 42, 0.1);
  color: #d9442a;
  border: 1px solid rgba(217, 68, 42, 0.28);
}
.receipt__mark--true {
  background: rgba(47, 125, 98, 0.1);
  color: var(--success);
  border: 1px solid rgba(47, 125, 98, 0.32);
}
/* Tinted body box, full-width, left vertical accent matches mark color */
.receipt__claim .receipt__bubble,
.receipt__claim .receipt__truth-body {
  margin: 0;
  padding: 9px 10px 9px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
  border-left: 3px solid;
  color: var(--ink);
  text-wrap: pretty;
}
.receipt__claim--false .receipt__bubble {
  background: rgba(217, 68, 42, 0.06);
  border-left-color: #d9442a;
  font-style: italic;
  /* Remove any decorative quotes from earlier base styles */
}
.receipt__claim--false .receipt__bubble::before,
.receipt__claim--false .receipt__bubble::after { content: none !important; }
.receipt__claim--true .receipt__truth-body {
  background: rgba(47, 125, 98, 0.06);
  border-left-color: var(--success);
}
.receipt__more {
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}

.receipt__more--static {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.receipt__more-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.receipt__more-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink);
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px 2px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid;
  background: var(--paper);
  white-space: nowrap;
}

.severity-pill--low {
  color: #b78400;
  border-color: rgba(212, 160, 23, 0.45);
  background: rgba(212, 160, 23, 0.08);
}

.severity-pill--med {
  color: #c1561a;
  border-color: rgba(224, 123, 41, 0.4);
  background: rgba(224, 123, 41, 0.08);
}

.severity-pill--high {
  color: #d9442a;
  border-color: rgba(217, 68, 42, 0.42);
  background: rgba(217, 68, 42, 0.08);
}
.receipt__more > summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.receipt__more > summary::-webkit-details-marker { display: none; }
.receipt__more > summary::after {
  content: "›";
  display: inline-block;
  transition: transform 200ms var(--ease-out-expo);
  font-size: 1rem;
  line-height: 1;
}
.receipt__more[open] > summary::after { transform: rotate(90deg); }
.receipt__more > summary:hover { color: var(--ink); }
.receipt__more p,
.receipt__more .receipt__fix {
  margin-top: 8px;
  font-size: 0.8125rem;
}

/* === Step-flow — horizontal numbered steps with arrow connectors === */
.step-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step-flow__step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 18px;
  transition: transform 280ms var(--ease-out-expo),
    box-shadow 280ms var(--ease-out-expo),
    border-color 280ms var(--ease-out-expo);
}
.step-flow__step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}
/* Arrow line + arrowhead between steps */
.step-flow__step:not(:last-child)::before {
  content: "";
  position: absolute;
  right: -22px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--primary);
  opacity: 0.65;
  transform: translateY(-50%);
}
.step-flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid var(--primary);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translate(0, -50%);
  opacity: 0.65;
}
.step-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--primary-100);
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(204, 128, 102, 0.2);
}
.step-flow__title {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step-flow__cadence {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.step-flow__detail {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text);
}

/* Mobile: stack vertically with downward arrows */
@media (max-width: 720px) {
  .step-flow {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .step-flow__step:not(:last-child)::before {
    right: 50%;
    top: auto;
    bottom: -14px;
    width: 2px;
    height: 8px;
    transform: translateX(50%);
  }
  .step-flow__step:not(:last-child)::after {
    right: 50%;
    top: auto;
    bottom: -20px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--primary);
    border-bottom: 0;
    transform: translateX(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-flow__step,
  .scorebar,
  .receipt__more > summary::after {
    transition: none !important;
  }
  .step-flow__step:hover {
    transform: none !important;
  }
}

/* =========================================================
   CARD-MORE — inline expand for dashboard panels
   ========================================================= */
.card-more {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.card-more summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 160ms ease;
}
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 240ms var(--ease-out-expo), color 160ms ease;
}
.card-more[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--primary);
}
.card-more summary:hover,
.card-more summary:hover::after {
  color: var(--primary);
}
.card-more > p,
.card-more > .card-discipline {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
}
.card-more > p:not(:first-of-type) {
  margin-top: 8px;
}
.card-more.inline-more {
  margin-top: 6px;
  border-top: 0;
  padding-top: 0;
}
.card-more.card-more-dark {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.card-more.card-more-dark > summary {
  color: var(--on-surface-2);
}
.card-more.card-more-dark > summary::after {
  color: var(--on-surface-2);
}
.card-more.card-more-dark > summary:hover,
.card-more.card-more-dark > summary:hover::after {
  color: var(--accent);
}
.card-more.card-more-dark[open] > summary::after {
  color: var(--accent);
}
.card-more.card-more-dark > p,
.card-more.card-more-dark > .card-discipline {
  color: var(--on-surface-2);
}
.card-more.card-more-dark > p b,
.card-more.card-more-dark > .card-discipline b {
  color: var(--accent);
}

/* =========================================================
   TOP SOURCES SUMMARY — quick-scan ranked list above the heatmap toggle
   ========================================================= */
.top-sources-summary {
  margin: 0 0 18px;
}
.top-sources-summary .top-sources-label {
  margin-bottom: 12px;
}
.top-sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.top-sources-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.top-sources-list .rank {
  flex: 0 0 28px;
  height: 28px;
  width: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.top-sources-list .top-sources-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.top-sources-list .top-sources-copy b {
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.top-sources-list .top-sources-copy span {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 720px) {
  .top-sources-list li {
    padding: 10px 12px;
    gap: 10px;
  }
  .top-sources-list .top-sources-copy span {
    font-size: 0.85rem;
  }
}

/* =========================================================
   Playbook — progress bar + per-card status pills
   ========================================================= */
.fix-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 20px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.fix-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fix-progress__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.fix-progress__count strong {
  font-family: inherit;
  color: var(--ink);
  font-weight: 600;
}
.fix-progress__scope {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fix-progress__bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 9999px;
  overflow: hidden;
}
.fix-progress__fill {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: inherit;
  transition: width 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.fix-progress[data-complete="true"] .fix-progress__fill {
  background: var(--green);
}

.fix-status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.fix-status__btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.fix-status__btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.fix-status__btn.is-selected {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}
.fix-status__btn[data-status="completed"].is-selected {
  background: var(--green);
  border-color: var(--green);
}
.fix-status__btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.fix-card[data-status="completed"] {
  border-color: var(--line-strong);
}
.fix-card[data-status="completed"] h3 {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
}
.fix-card[data-status="completed"] .fix-body,
.fix-card[data-status="completed"] .fix-meta {
  opacity: 0.7;
}
.fix-card[data-status="in_progress"] {
  border-color: var(--ink);
}

/* =========================================================
   Playbook — week-plan block (intro heading + grid)
   Restores breathing room between Escalation desk and weeks.
   ========================================================= */
.week-plan {
  margin-top: 56px;
}
.week-plan .section-heading.compact-heading {
  margin-bottom: 24px;
}

/* =========================================================
   Overview hero — symmetrize vertical padding at desktop
   Was 64.8px top / 108px bottom (inconsistent with the rest
   of the section rhythm). Lock to a matched value.
   ========================================================= */
@media (min-width: 1024px) {
  #overview.hero-section {
    padding-top: clamp(48px, 5vw, 88px);
    padding-bottom: clamp(48px, 5vw, 88px);
  }
}

/* =========================================================
   CLIENT REVIEW POLISH — summary hierarchy, action-first playbook,
   and mobile containment.
   ========================================================= */
html,
body,
main {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  max-width: 100%;
}

main,
.topbar,
.exec-summary,
.how-to-read,
.section-band,
.hero-section,
.panel,
.fix-card {
  min-width: 0;
}

.exec-summary {
  width: min(100% - clamp(32px, 6vw, 80px), 1180px);
  max-width: 1180px;
  margin: clamp(24px, 3vw, 44px) auto 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(204, 128, 102, 0.05), transparent 42%),
    linear-gradient(180deg, #ffffff, #fbfbfa);
  box-shadow: var(--shadow-card);
}

.exec-summary__head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.exec-summary__head h2 {
  max-width: 15ch;
  font-size: clamp(2rem, 2.8vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.exec-summary__refresh {
  display: grid;
  gap: 3px;
  justify-items: end;
  padding: 10px 14px;
  border: 1px solid rgba(204, 128, 102, 0.24);
  border-radius: 999px;
  background: rgba(204, 128, 102, 0.07);
  white-space: nowrap;
}

.exec-summary__refresh span,
.readout-tile span,
.signal-row span,
.fix-owner-strip span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.exec-summary__refresh b {
  font-size: 0.9rem;
  color: var(--primary-700);
}

.client-readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.readout-tile {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.readout-tile strong {
  font-size: clamp(1.6rem, 2.2vw, 2.25rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}

.readout-tile small {
  font-size: 0.55em;
  color: var(--muted);
  letter-spacing: -0.015em;
}

.readout-tile em {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  font-style: normal;
}

.readout-tile--score { border-top: 3px solid var(--primary); }
.readout-tile--risk { border-top: 3px solid var(--red); }
.readout-tile--gap { border-top: 3px solid var(--gold); }
.readout-tile--next { border-top: 3px solid var(--blue); }

.exec-summary__grid {
  gap: 14px;
}

.exec-card {
  min-width: 0;
  padding: 18px;
  border-radius: 12px;
  gap: 14px;
}

.exec-card__header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.exec-card__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.signal-stack {
  display: grid;
  gap: 14px;
}

.signal-row {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(250, 250, 250, 0.78);
}

.signal-row strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.signal-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.signal-row--risk {
  background: rgba(220, 38, 38, 0.035);
}

.exec-summary__cadence {
  max-width: 68ch;
  margin-inline: auto;
}

.filter-row {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  width: fit-content;
  max-width: 100%;
}

.filter-button {
  border-radius: 9px;
  min-height: 36px;
}

.badge.action-focus {
  background: rgba(204, 128, 102, 0.12);
  color: var(--primary-700);
}

.fix-card[data-focus="this-week"] {
  border-color: rgba(204, 128, 102, 0.28);
  box-shadow: var(--shadow-card), inset 0 3px 0 rgba(204, 128, 102, 0.95);
}

.fix-owner-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
}

.fix-owner-strip b {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.3;
}

.fix-card__details {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.fix-card__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  color: var(--primary-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.fix-card__details summary::-webkit-details-marker {
  display: none;
}

.fix-card__details summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(204, 128, 102, 0.1);
  color: var(--primary-700);
  transition: transform 160ms ease;
}

.fix-card__details[open] summary::after {
  transform: rotate(45deg);
}

.fix-card__details .fix-meta {
  margin-top: 10px;
  padding-top: 10px;
}

.fix-card__details .fix-meta > div {
  grid-template-columns: 88px minmax(0, 1fr);
}

.section-collapsed > summary,
.source-drawer summary,
.card-more summary {
  min-width: 0;
}

.section-collapsed > summary span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .exec-summary {
    width: min(100% - 32px, 760px);
  }

  .exec-summary__head,
  .client-readout {
    grid-template-columns: 1fr 1fr;
  }

  .exec-summary__refresh {
    justify-self: end;
  }
}

@media (max-width: 720px) {
  .topbar,
  .exec-summary,
  .how-to-read,
  .section-band,
  .hero-section {
    max-width: 100vw;
  }

  .exec-summary {
    width: 100%;
    margin: 16px 0 0;
    padding: 24px 20px 22px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .exec-summary__head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .exec-summary__head h2 {
    max-width: 100%;
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    line-height: 1.08;
    overflow-wrap: break-word;
  }

  .exec-summary__refresh {
    justify-self: start;
  }

  .client-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readout-tile {
    padding: 12px;
  }

  .readout-tile strong {
    font-size: 1.55rem;
  }

  .exec-summary__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .exec-card {
    width: 100%;
    min-width: 0;
  }

  .exec-card__header {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .exec-card ol,
  .exec-card ul,
  .exec-card li,
  .signal-row,
  .signal-row p,
  .signal-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .filter-row {
    width: 100%;
  }

  .filter-button {
    flex: 1 1 auto;
  }

  .fix-owner-strip {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .fix-card__details .fix-meta > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 430px) {
  .client-readout {
    gap: 8px;
  }

  .readout-tile em {
    font-size: 0.72rem;
  }

  .exec-card {
    padding: 16px;
  }
}
