:root {
  color-scheme: dark;
  /* Executive Dark Tech - YouTube Studio Overhaul */
  --bg-deep: #0a0a0c;
  --bg-surface: #121216;
  --bg-elevated: #1a1a20;

  --accent: #00f2ff; /* Electric Cyan */
  --accent-glow: rgba(0, 242, 255, 0.4);
  --accent-soft: rgba(0, 242, 255, 0.1);

  --red: #ff3e3e;
  --red-soft: rgba(255, 62, 62, 0.12);
  --green: #00ffa3;
  --green-soft: rgba(0, 255, 163, 0.12);

  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);

  --ink: #ffffff;
  --muted: #80808a;
  --muted-strong: #b0b0ba;

  --radius-lg: 16px; /* Industrial Sharpness */
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell-max-width: 1380px;
  --shell-gutter: clamp(28px, 6vw, 96px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 242, 255, 0.08), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(126, 87, 255, 0.05), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--bg-deep);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 14px rgba(0, 242, 255, 0.12); }
  50% { box-shadow: 0 0 26px rgba(0, 242, 255, 0.26); }
  100% { box-shadow: 0 0 14px rgba(0, 242, 255, 0.12); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes countUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.module-shell {
  width: min(var(--shell-max-width), calc(100% - (var(--shell-gutter) * 2)));
  margin: 0 auto 42px;
  padding-top: 110px;
  min-height: 100vh;
  display: grid;
  gap: 28px;
  animation: none;
}

.header-backdrop-blur {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 124px;
  z-index: 50;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(12, 14, 18, 0.78) 0%,
      rgba(12, 14, 18, 0.62) 56%,
      rgba(12, 14, 18, 0.28) 82%,
      transparent 100%
    );
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
}

.workspace-header {
  position: fixed;
  top: 12px;
  left: 50%;
  width: min(var(--shell-max-width), calc(100vw - (var(--shell-gutter) * 2)));
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: 24px;
  background: rgba(14, 16, 20, 0.78);
  backdrop-filter: blur(30px) saturate(126%);
  -webkit-backdrop-filter: blur(30px) saturate(126%);
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  isolation: isolate;
  transform: translateX(-50%) translateZ(0);
  will-change: transform;
}

.workspace-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.62), rgba(12, 14, 18, 0.42)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 42%);
  z-index: -2;
}

.workspace-header::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -22px;
  height: 40px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, rgba(16, 18, 22, 0.38), rgba(16, 18, 22, 0.14), transparent);
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

.workspace-brand {
  justify-self: start;
  min-width: 0;
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.workspace-brand-mark {
  width: 132px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.04));
}

.workspace-header-nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.workspace-header-tools {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.workspace-nav-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.workspace-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.workspace-nav-link.active {
  color: #081018;
  background: linear-gradient(135deg, #ffffff, #d7faff);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08);
}

.workspace-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.workspace-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #00ffa3;
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.5);
}

.module-hero {
  background: rgba(10, 10, 12, 0.84);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  border-radius: 28px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.module-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
}

.module-hero-copy {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.module-hero-copy h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 62px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-family: var(--font-ui);
}

.module-hero-actions {
  display: grid;
  gap: 14px;
  justify-items: end;
  min-width: min(420px, 100%);
}

.module-hero-note {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--muted-strong);
}

.module-hero-note strong {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
}

.module-hero-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.topbar {
  background: rgba(14, 16, 20, 0.78);
  backdrop-filter: blur(30px) saturate(126%);
  -webkit-backdrop-filter: blur(30px) saturate(126%);
  border-radius: var(--radius-lg);
  padding: 28px 34px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s ease;
}

.topbar:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 72px rgba(0, 0, 0, 0.42), 0 0 24px rgba(0, 242, 255, 0.08);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent), transparent);
  opacity: 0.8;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-mark {
  width: min(296px, 30vw);
  max-width: 100%;
  height: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.brand-mark:hover {
  filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.22));
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.brand-copy h1,
.headline-card h2,
.section-head h3 {
  margin: 0;
  letter-spacing: -0.04em;
  font-family: var(--font-ui);
}

.brand-copy h1 {
  font-size: clamp(36px, 4vw, 62px);
  line-height: 0.92;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.subcopy,
.headline-copy,
.metric-sub,
.entry-meta,
.section-note,
.file-meta,
.system-card span {
  color: var(--muted-strong);
}

.subcopy {
  margin: 0;
  max-width: 780px;
  font-size: 16px;
  line-height: 1.6;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, color 0.28s ease,
    box-shadow 0.28s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.theme-toggle::before {
  display: none;
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffe38a, #ffb703);
  box-shadow: 0 0 18px rgba(255, 200, 87, 0.32);
  position: relative;
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.24);
}

.mobile-module-dock {
  display: none;
}

.action {
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 242, 255, 0.3);
  background: linear-gradient(135deg, #00d1ff, #0080ff);
  color: #000814;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 128, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.action::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-20deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 128, 255, 0.3), 0 0 15px rgba(0, 242, 255, 0.2);
  border-color: var(--accent);
}

.action:hover::before {
  opacity: 1;
  animation: shimmer 1.5s infinite;
}

.action.ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.action.ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

.module-grid {
  display: grid;
  gap: 24px;
}

.module-grid > * {
  animation: fadeUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) backwards;
}

.module-grid > .module-hero {
  animation: none;
}

.module-grid > *:nth-child(1) { animation-delay: 0.08s; }
.module-grid > *:nth-child(2) { animation-delay: 0.18s; }
.module-grid > *:nth-child(3) { animation-delay: 0.3s; }
.module-grid > *:nth-child(4) { animation-delay: 0.42s; }

.headline-card,
.metric-card,
.canvas-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
}

.headline-card {
  padding: 28px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.headline-card:hover,
.canvas-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.74), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}

.headline-card h2 {
  font-size: clamp(28px, 3vw, 46px);
  font-family: 'Cinzel', serif;
}

.headline-copy {
  margin: 14px 0 0;
  max-width: 880px;
  font-size: 17px;
  line-height: 1.65;
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.pill {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.pill.success {
  border-color: rgba(0, 255, 163, 0.28);
  background: var(--green-soft);
  color: #00ffa3;
  animation: pulseGlow 3s infinite;
}

.pill.warn {
  border-color: rgba(255, 62, 62, 0.3);
  background: var(--red-soft);
  color: #ff3e3e;
}

.metric-grid,
.visual-grid {
  display: grid;
  gap: 22px;
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 178px;
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.metric-card:hover::before {
  transform: translateX(100%);
}

.metric-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.metric-value {
  display: block;
  max-width: 100%;
  min-width: 0;
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  animation: countUp 0.6s ease-out backwards;
}

.metric-sub {
  font-size: 14px;
  line-height: 1.5;
}

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

.visual-grid-wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.canvas-card {
  min-height: 420px;
  padding: 26px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.section-head h3 {
  font-size: clamp(24px, 2vw, 36px);
}

.section-note {
  font-size: 14px;
}

.tab-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.18), rgba(126, 87, 255, 0.18));
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.tab-panel {
  display: none;
  gap: 24px;
}

.tab-panel.active {
  display: grid;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
}

.executive-card {
  min-height: 360px;
}

.executive-summary {
  display: grid;
  gap: 18px;
}

.executive-highlight {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at top right, rgba(255, 77, 95, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.executive-highlight strong {
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.executive-highlight span {
  color: var(--muted-strong);
  line-height: 1.6;
}

.executive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.executive-mini {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.executive-mini strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.executive-mini span {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.5;
}

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

.signal-card {
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.signal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 95, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.signal-card strong {
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.signal-card span {
  color: var(--muted-strong);
  line-height: 1.55;
}

.chart-shell {
  min-height: 320px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.015);
  padding: 16px;
  display: grid;
  align-items: stretch;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-area {
  fill: url(#chartAreaFill);
}

.chart-line {
  fill: none;
  stroke: #ff5669;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 86, 105, 0.24));
}

.chart-point {
  fill: #ffd28a;
  stroke: rgba(5, 7, 10, 0.9);
  stroke-width: 2;
}

.chart-axis-label {
  fill: #91a0b4;
  font-size: 12px;
  font-weight: 500;
}

.chart-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chart-stat-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 6px;
}

.chart-stat-card strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.chart-stat-card span {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.entry-list,
.system-list,
.file-list {
  display: grid;
  gap: 14px;
}

.bucket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bucket-card,
.opportunity-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 10px;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.bucket-card:hover,
.opportunity-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 95, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.28);
}

.bucket-card strong,
.opportunity-card strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.bucket-card span,
.bucket-card p,
.opportunity-card span,
.opportunity-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.opportunity-grid {
  display: grid;
  gap: 14px;
}

.tag {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 95, 0.22);
  background: rgba(255, 77, 95, 0.1);
  color: #ffc5cc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-card {
  gap: 18px;
}

.table-frame {
  display: grid;
  gap: 10px;
}

.performance-table {
  display: grid;
  gap: 10px;
}

.performance-row {
  display: grid;
  grid-template-columns: minmax(240px, 2.2fr) repeat(5, minmax(90px, 1fr));
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.performance-row.head {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.performance-row:not(.head):hover {
  border-color: rgba(255, 77, 95, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.performance-row:not(.head):nth-child(even) {
  background: rgba(255, 255, 255, 0.026);
}

.performance-title {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.performance-title strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.performance-title span {
  color: var(--muted-strong);
  font-size: 13px;
}

.score-pill {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(226, 179, 109, 0.12);
  border: 1px solid rgba(226, 179, 109, 0.24);
  color: var(--accent-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
}

.entry-item,
.system-card,
.file-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.entry-item {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.entry-item:hover,
.system-card:hover,
.file-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 95, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.28);
}

.entry-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.entry-label-wrap {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.entry-label {
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.entry-meta {
  font-size: 13px;
  line-height: 1.4;
}

.entry-value {
  text-align: right;
  display: grid;
  gap: 4px;
  justify-items: end;
  flex-shrink: 0;
}

.entry-strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.entry-soft {
  font-size: 13px;
  color: var(--muted-strong);
}

.entry-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.entry-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5468, #e2b36d);
  box-shadow: 0 0 12px rgba(255, 84, 104, 0.32);
  transition: width 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.system-card,
.file-item {
  padding: 18px;
}

.system-card {
  display: grid;
  gap: 8px;
}

.system-card strong,
.file-name {
  font-size: 18px;
  font-weight: 700;
}

.mini-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.file-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.file-name,
.file-meta {
  overflow-wrap: anywhere;
}

.file-meta {
  font-size: 13px;
  line-height: 1.45;
}

.file-tag {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-glow);
  border: 1px solid rgba(226, 179, 109, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  min-height: 160px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted-strong);
  line-height: 1.65;
}

.empty-state.small {
  min-height: 90px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-deep: #eef3f8;
  --bg-surface: rgba(255, 255, 255, 0.78);
  --bg-elevated: #ffffff;
  --accent: #0ea5e9;
  --accent-glow: rgba(14, 165, 233, 0.2);
  --accent-soft: rgba(14, 165, 233, 0.08);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.08);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.08);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --ink: #142033;
  --muted: #7b8798;
  --muted-strong: #556377;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 165, 233, 0.1), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.08), transparent 20%),
    linear-gradient(180deg, #f8fbfd 0%, #edf3f7 100%);
  color: var(--ink);
}

html[data-theme="light"] .header-backdrop-blur {
  background:
    linear-gradient(
      180deg,
      rgba(244, 248, 252, 0.88) 0%,
      rgba(244, 248, 252, 0.74) 54%,
      rgba(244, 248, 252, 0.3) 82%,
      transparent 100%
    );
  backdrop-filter: blur(20px) saturate(118%);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
}

html[data-theme="light"] .workspace-header {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(26px) saturate(118%);
  -webkit-backdrop-filter: blur(26px) saturate(118%);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .workspace-header::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.54)),
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%);
}

html[data-theme="light"] .workspace-header::after {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.22), rgba(148, 163, 184, 0.08), transparent);
}

html[data-theme="light"] .workspace-brand-mark {
  filter: brightness(0) saturate(100%) opacity(0.92);
}

html[data-theme="light"] .workspace-nav-link,
html[data-theme="light"] .workspace-header-meta {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
}

html[data-theme="light"] .workspace-nav-link:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: rgba(14, 165, 233, 0.18);
}

html[data-theme="light"] .workspace-nav-link.active {
  color: #0b2238;
  background: linear-gradient(135deg, #f3fbff, #d9f3ff);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12);
}

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(26px) saturate(118%);
  -webkit-backdrop-filter: blur(26px) saturate(118%);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .topbar:hover {
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .brand-mark {
  filter: brightness(0) saturate(100%) opacity(0.92);
}

html[data-theme="light"] .action.ghost,
html[data-theme="light"] .pill,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .tab-shell,
html[data-theme="light"] .tab-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
}

html[data-theme="light"] .action.ghost:hover,
html[data-theme="light"] .pill:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .tab-btn:hover {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-color: rgba(14, 165, 233, 0.18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .tab-btn.active {
  background: linear-gradient(135deg, #e8f8ff, #d7f0ff);
  border-color: rgba(14, 165, 233, 0.22);
  color: #0b2238;
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.12);
}

html[data-theme="light"] .theme-toggle-icon {
  background: linear-gradient(135deg, #0f172a, #475569);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .theme-toggle-icon::after {
  inset: 4px 2px 4px 6px;
  background: rgba(255, 255, 255, 0.74);
}

html[data-theme="light"] .module-hero {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .module-hero-note strong {
  color: var(--ink);
}

html[data-theme="light"] .headline-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .canvas-card,
html[data-theme="light"] .signal-card,
html[data-theme="light"] .bucket-card,
html[data-theme="light"] .opportunity-card,
html[data-theme="light"] .entry-item,
html[data-theme="light"] .system-card,
html[data-theme="light"] .file-item,
html[data-theme="light"] .chart-shell,
html[data-theme="light"] .chart-stat-card,
html[data-theme="light"] .performance-row,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .executive-highlight,
html[data-theme="light"] .executive-mini {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .headline-card:hover,
html[data-theme="light"] .canvas-card:hover,
html[data-theme="light"] .metric-card:hover,
html[data-theme="light"] .signal-card:hover,
html[data-theme="light"] .bucket-card:hover,
html[data-theme="light"] .opportunity-card:hover,
html[data-theme="light"] .entry-item:hover,
html[data-theme="light"] .system-card:hover,
html[data-theme="light"] .file-item:hover {
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.12);
  border-color: rgba(14, 165, 233, 0.18);
}

html[data-theme="light"] .performance-row:not(.head):nth-child(even) {
  background: rgba(241, 245, 249, 0.94);
}

html[data-theme="light"] .headline-copy,
html[data-theme="light"] .subcopy,
html[data-theme="light"] .metric-sub,
html[data-theme="light"] .entry-meta,
html[data-theme="light"] .section-note,
html[data-theme="light"] .file-meta,
html[data-theme="light"] .system-card span,
html[data-theme="light"] .bucket-card span,
html[data-theme="light"] .bucket-card p,
html[data-theme="light"] .opportunity-card span,
html[data-theme="light"] .opportunity-card p,
html[data-theme="light"] .signal-card span,
html[data-theme="light"] .chart-axis-label,
html[data-theme="light"] .executive-highlight span,
html[data-theme="light"] .executive-mini span,
html[data-theme="light"] .entry-soft,
html[data-theme="light"] .performance-title span,
html[data-theme="light"] .empty-state {
  color: var(--muted-strong);
}

html[data-theme="light"] .chart-grid-line {
  stroke: rgba(148, 163, 184, 0.24);
}

html[data-theme="light"] .chart-line {
  stroke: #0ea5e9;
  filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.18));
}

html[data-theme="light"] .chart-point {
  fill: #f59e0b;
  stroke: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .matrix-point {
  stroke: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .matrix-label {
  fill: #334155;
}

html[data-theme="light"] .entry-track {
  background: rgba(148, 163, 184, 0.18);
}

html[data-theme="light"] .entry-fill {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.18);
}

html[data-theme="light"] .tag {
  border-color: rgba(14, 165, 233, 0.18);
  background: rgba(14, 165, 233, 0.08);
  color: #0369a1;
}

html[data-theme="light"] .score-pill,
html[data-theme="light"] .file-tag {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.16);
  color: #0369a1;
}

.metric-grid > .metric-card:nth-child(1) { animation: fadeUp 0.7s 0.1s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
.metric-grid > .metric-card:nth-child(2) { animation: fadeUp 0.7s 0.18s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
.metric-grid > .metric-card:nth-child(3) { animation: fadeUp 0.7s 0.26s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
.metric-grid > .metric-card:nth-child(4) { animation: fadeUp 0.7s 0.34s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
.metric-grid > .metric-card:nth-child(5) { animation: fadeUp 0.7s 0.42s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
.metric-grid > .metric-card:nth-child(6) { animation: fadeUp 0.7s 0.5s cubic-bezier(0.19, 1, 0.22, 1) backwards; }

@media (max-width: 1320px) {
  .metric-grid,
  .metric-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-grid,
  .visual-grid-wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .workspace-header,
  .module-hero,
  .topbar,
  .headline-card {
    flex-direction: column;
  }

  .workspace-header {
    display: flex;
    align-items: flex-start;
  }

  .workspace-header-nav,
  .workspace-header-tools,
  .module-hero-actions,
  .topbar-actions,
  .pill-wrap {
    justify-content: flex-start;
  }

  .module-hero-actions {
    justify-items: start;
  }

  .visual-grid {
    grid-template-columns: 1fr;
  }

  .executive-grid,
  .chart-stat-strip,
  .bucket-grid {
    grid-template-columns: 1fr;
  }

  .performance-row {
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(90px, 1fr));
  }

.performance-row .hide-md {
  display: none;
}
}

.matrix-shell {
  min-height: 360px;
}

.matrix-svg {
  overflow: visible;
}

.matrix-median {
  stroke: rgba(226, 179, 109, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 8 8;
}

.matrix-point {
  fill-opacity: 0.88;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.matrix-point.good {
  fill: rgba(34, 197, 94, 0.78);
}

.matrix-point.mid {
  fill: rgba(226, 179, 109, 0.84);
}

.matrix-point.low {
  fill: rgba(255, 77, 95, 0.78);
}

.matrix-label {
  fill: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dna-item {
  border-color: rgba(255, 255, 255, 0.08);
}

.entry-kicker {
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .module-shell {
    width: calc(100% - 24px);
    margin: 0 auto 28px;
    padding-top: 96px;
    padding-bottom: calc(112px + var(--safe-bottom));
    gap: 18px;
  }

  .header-backdrop-blur {
    height: 104px;
  }

  .workspace-header {
    top: 8px;
    width: calc(100vw - 24px);
    padding: 12px 14px;
    gap: 10px;
    border-radius: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .module-hero,
  .topbar,
  .headline-card,
  .metric-card,
  .canvas-card {
    padding: 20px;
  }

  .workspace-brand-mark {
    width: 116px;
  }

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

  .entry-main,
  .file-item {
    flex-direction: column;
  }

  .entry-value {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  .action,
  .action.ghost {
    width: 100%;
    min-height: 48px;
  }

  .workspace-header-tools,
  .module-hero-action-row,
  .topbar-actions {
    width: 100%;
  }

  .workspace-header-nav {
    display: none;
  }

  .workspace-header-tools {
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
  }

  .workspace-nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
  }

  #themeToggleLabel {
    display: none;
  }

  .theme-toggle {
    padding: 0 12px;
    min-width: 44px;
    margin-left: auto;
  }

  .mobile-module-dock {
    position: fixed;
    left: 50%;
    bottom: calc(12px + var(--safe-bottom));
    z-index: 70;
    width: calc(100vw - 24px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 16, 20, 0.84);
    backdrop-filter: blur(28px) saturate(132%);
    -webkit-backdrop-filter: blur(28px) saturate(132%);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
    transform: translateX(-50%);
  }

  .mobile-dock-link {
    min-width: 0;
    min-height: 60px;
    padding: 8px 6px;
    border-radius: 16px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    color: var(--muted-strong);
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.24s ease, border-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
  }

  .mobile-dock-link.active {
    color: #071823;
    background: linear-gradient(135deg, #dff7ff 0%, #b9eeff 48%, #8be6ff 100%);
    border-color: rgba(64, 220, 255, 0.38);
    box-shadow: 0 10px 24px rgba(0, 209, 255, 0.18);
  }

  .mobile-dock-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-dock-link.active .mobile-dock-icon {
    background: rgba(7, 24, 35, 0.12);
  }

  .mobile-dock-link span:last-child {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .module-hero-actions {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .topbar-actions {
    width: 100%;
    justify-items: start;
  }

  .module-hero-note {
    justify-items: start;
  }

  .module-hero-action-row {
    justify-content: stretch;
  }

  .module-hero-action-row > *,
  .topbar-actions > * {
    flex: 1 1 100%;
  }

  /* Tab shell: horizontal scroll instead of vertical stack */
  .tab-shell {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .tab-shell::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .performance-row,
  .performance-row.head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .performance-row.head {
    display: none;
  }

  .performance-row .hide-sm {
    display: none;
  }

  /* Disable hover transform on mobile (causes janky scroll) */
  .headline-card:hover,
  .canvas-card:hover,
  .metric-card:hover,
  .topbar:hover {
    transform: none;
  }

  /* Canvas cards — reduce min-height on small screens */
  .canvas-card {
    min-height: 280px;
  }

  .chart-shell {
    min-height: 240px;
  }

  /* Overview grid single column */
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .visual-grid-wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .module-shell {
    width: calc(100% - 16px);
    margin-bottom: 22px;
    padding-top: 88px;
    padding-bottom: calc(108px + var(--safe-bottom));
    gap: 16px;
  }

  .header-backdrop-blur {
    height: 96px;
  }

  .workspace-header {
    top: 8px;
    width: calc(100vw - 16px);
    padding: 12px calc(14px + var(--safe-right)) 12px calc(14px + var(--safe-left));
    gap: 12px;
    border-radius: 18px;
  }

  .workspace-brand-mark {
    width: 100px;
  }

  .module-hero,
  .topbar,
  .headline-card,
  .metric-card,
  .canvas-card,
  .entry-item,
  .system-card,
  .file-item,
  .bucket-card,
  .opportunity-card {
    padding: 16px;
    border-radius: 16px;
  }

  .module-hero-copy h2,
  .headline-card h2,
  .brand-copy h1 {
    font-size: clamp(26px, 8vw, 36px);
  }

  .module-hero-copy .subcopy,
  .headline-copy,
  .subcopy {
    font-size: 14px;
    line-height: 1.55;
  }

  .metric-card {
    min-height: 0;
  }

  .metric-grid,
  .metric-grid-wide {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: clamp(20px, 8vw, 28px);
  }

  .pill-wrap {
    width: 100%;
    justify-content: flex-start;
  }

  .pill {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-note {
    font-size: 13px;
  }

  .chart-stat-strip,
  .bucket-grid,
  .opportunity-grid,
  .overview-grid,
  .visual-grid,
  .visual-grid-wide,
  .detail-grid,
  .signal-grid,
  .executive-grid {
    grid-template-columns: 1fr;
  }

  /* Touch-friendly interactive targets (min 44px per Apple HIG) */
  .action,
  .action.ghost,
  .tab-btn,
  .pill,
  .workspace-nav-link,
  .theme-toggle {
    min-height: 44px;
  }

  .mobile-module-dock {
    width: calc(100vw - 16px);
    gap: 6px;
    padding: 8px;
    border-radius: 20px;
  }

  .mobile-dock-link {
    min-height: 56px;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .mobile-dock-icon {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .mobile-dock-link span:last-child {
    font-size: 10px;
  }

  /* Prevent text overflow on small screens */
  .metric-label {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
  }

  /* Signal & executive cards */
  .signal-card {
    min-height: 0;
    padding: 18px;
  }

  .executive-highlight {
    padding: 18px;
  }

  .executive-mini {
    padding: 14px;
  }

  .executive-mini strong {
    font-size: 20px;
  }

  .canvas-card {
    min-height: 0;
  }

  .chart-shell {
    min-height: 200px;
    padding: 12px;
  }
}
