.phase-three {
  --regime-accent: #72f0bd;
  --regime-accent-rgb: 114, 240, 189;
  background:
    radial-gradient(circle at 82% 4%, rgba(168, 101, 255, .14), transparent 33rem),
    radial-gradient(circle at 8% 28%, rgba(54, 229, 189, .1), transparent 28rem),
    linear-gradient(180deg, #050b13 0%, #051311 48%, #040c0c 100%);
}

.phase-three .article-shell { width: min(1000px, 100%); }

.regime-hero {
  --phase-accent: var(--regime-accent);
  --phase-accent-rgb: var(--regime-accent-rgb);
  background:
    radial-gradient(circle at 78% 22%, rgba(var(--regime-accent-rgb), .13), transparent 18rem),
    linear-gradient(142deg, rgba(17, 27, 43, .98), rgba(5, 24, 24, .94));
  border-color: rgba(var(--regime-accent-rgb), .3);
}

.regime-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image:
    linear-gradient(120deg, transparent 44%, rgba(var(--regime-accent-rgb), .16) 45%, transparent 46%),
    linear-gradient(rgba(var(--regime-accent-rgb), .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--regime-accent-rgb), .055) 1px, transparent 1px);
  background-size: 170px 170px, 42px 42px, 42px 42px;
  mask-image: linear-gradient(110deg, #000 20%, transparent 78%);
}

.regime-hero .eyebrow { color: var(--regime-accent); }
.regime-hero .hero-proof { border-color: rgba(var(--regime-accent-rgb), .3); }
.regime-hero .proof-number { text-shadow: 0 0 50px rgba(var(--regime-accent-rgb), .25); }
.regime-teal { --regime-accent: #72f0bd; --regime-accent-rgb: 114, 240, 189; }
.regime-lime { --regime-accent: #c4f266; --regime-accent-rgb: 196, 242, 102; }
.regime-purple { --regime-accent: #b89bff; --regime-accent-rgb: 184, 155, 255; }
.regime-orange { --regime-accent: #ffb368; --regime-accent-rgb: 255, 179, 104; }
.regime-pink { --regime-accent: #ff83b7; --regime-accent-rgb: 255, 131, 183; }

.regime-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.regime-low { color: #6bd8ff; background: rgba(66, 184, 231, .09); }
.regime-normal { color: #75e8b9; background: rgba(77, 218, 163, .09); }
.regime-high { color: #ff9a8d; background: rgba(255, 111, 93, .09); }

.regime-source-card {
  border-color: rgba(var(--regime-accent-rgb), .18);
  background: linear-gradient(150deg, rgba(var(--regime-accent-rgb), .045), rgba(0, 0, 0, .16));
}
.regime-source-card .source-card-top span { color: var(--regime-accent); }
.regime-source-card code { color: #bfeadd; }

.regime-comparison-bars { border-color: rgba(var(--regime-accent-rgb), .18); }
.regime-comparison-bars .series-a { background: linear-gradient(90deg, var(--regime-accent), #d2c5ff); }
.regime-comparison-bars .series-b { background: linear-gradient(90deg, #2a9fd6, #6fe9dc); }
.regime-comparison-bars .key-a { background: var(--regime-accent); }
.unavailable-row { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, .018) 8px 16px); }
.unavailable-row .series-track { background: rgba(255, 255, 255, .025); }
.unavailable-note { color: var(--dim); font-size: .7rem; font-style: italic; }

.regime-panel {
  margin: 30px 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(var(--regime-accent-rgb), .2);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(var(--regime-accent-rgb), .075), rgba(8, 24, 31, .74));
}
.regime-panel h3 { margin-top: 0; }
.regime-scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 20px 0 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, .16);
}
.regime-scale > * { padding: 13px 10px; border-radius: 10px; text-align: center; }
.regime-word { display: block; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; }
.regime-scale small { display: block; margin-top: 3px; color: var(--muted); }
.dual-regime-grid, .daytype-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.dual-regime-grid > *, .daytype-grid > * {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5, 20, 24, .58);
}
.dual-regime-grid strong, .daytype-grid strong { display: block; font-size: 1.35rem; }
.dual-regime-grid span, .daytype-grid span { color: var(--muted); font-size: .78rem; }

/* Interactive regime explorer */
.regime-explorer-page .page-shell { width: min(1320px, calc(100% - 36px)); }
.explorer-hero { --regime-accent: #7df0cf; --regime-accent-rgb: 125, 240, 207; }
.explorer-hero h1 { max-width: 11ch; }
.regime-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 30px;
}
.regime-market-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(16, 36, 43, .86), rgba(5, 21, 24, .88));
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.regime-market-card:hover { transform: translateY(-2px); border-color: rgba(125, 240, 207, .38); }
.regime-market-card[aria-current="true"] { border-color: rgba(125, 240, 207, .62); background: linear-gradient(145deg, rgba(50, 150, 127, .17), rgba(7, 27, 30, .94)); box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
.regime-market-card > span:first-child { align-self: center; color: #d8e9e4; font-size: .72rem; font-weight: 950; letter-spacing: .08em; }
.regime-market-card strong { grid-column: 1 / -1; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1; letter-spacing: -.045em; }
.regime-market-card small { grid-column: 1 / -1; color: var(--dim); font-size: .66rem; }

.explorer-detail {
  display: grid;
  grid-template-columns: minmax(280px, .65fr) minmax(600px, 1.35fr);
  gap: 28px;
  align-items: center;
  margin: 22px 0 8px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(184, 155, 255, .1), transparent 25rem),
    linear-gradient(140deg, rgba(12, 34, 38, .92), rgba(5, 17, 25, .92));
  box-shadow: 0 26px 80px rgba(0, 0, 0, .2);
}
.explorer-copy h2 { margin: 0 0 11px; font-size: clamp(1.55rem, 4vw, 2.4rem); }
.explorer-copy p { margin: 0; font-size: .86rem; }
.threshold-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.threshold-pills span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(0, 0, 0, .13); font-size: .67rem; font-weight: 850; }
.threshold-pills span:first-child { color: #75d8ff; }
.threshold-pills span:last-child { color: #ff9d91; }
.timeline-wrap { min-width: 0; overflow: hidden; }
.timeline {
  display: grid;
  grid-template-columns: repeat(24, minmax(20px, 1fr));
  gap: 5px;
  align-items: end;
  min-width: 600px;
  height: 225px;
  padding: 14px 12px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    rgba(1, 11, 16, .42);
  background-size: 100% 25%;
}
.timeline-column { display: grid; grid-template-rows: 175px auto; gap: 6px; height: 100%; align-items: end; }
.timeline-column i { display: block; width: 100%; height: var(--height); min-height: 4px; border-radius: 6px 6px 2px 2px; background: #69d9b0; box-shadow: 0 0 16px rgba(105, 217, 176, .12); }
.timeline-column[data-regime="low"] i { background: linear-gradient(#78ddff, #287ea8); }
.timeline-column[data-regime="normal"] i { background: linear-gradient(#7ce5ba, #268867); }
.timeline-column[data-regime="high"] i { background: linear-gradient(#ffb285, #c54d68); }
.timeline-column span { overflow: hidden; color: var(--dim); font-size: .49rem; text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.timeline-wrap > p { margin: 9px 0 0; color: var(--dim); font-size: .7rem; }
.explorer-status { min-height: 1.7em; margin: 9px 4px 48px; color: var(--muted); font-size: .76rem; }

.regime-year-matrix { min-width: 920px; width: 100%; border-collapse: collapse; }
.regime-year-matrix caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.regime-year-matrix th, .regime-year-matrix td { padding: 14px 13px; border-bottom: 1px solid var(--line); text-align: center; }
.regime-year-matrix thead th { color: var(--dim); font-size: .65rem; letter-spacing: .07em; text-transform: uppercase; }
.regime-year-matrix th:first-child { position: sticky; left: 0; z-index: 3; min-width: 132px; padding: 0; background: #071a1c; box-shadow: 10px 0 20px rgba(0, 0, 0, .15); }
.regime-year-matrix thead th:first-child { padding: 14px 13px; z-index: 4; text-align: left; }
.regime-year-matrix td { min-width: 115px; background: linear-gradient(135deg, rgba(125, 240, 207, .035), transparent); }
.regime-year-matrix td strong, .regime-year-matrix td small { display: block; }
.regime-year-matrix td strong { color: #e5f5f0; font-size: .82rem; }
.regime-year-matrix td small { margin-top: 2px; color: var(--dim); font-size: .6rem; }
.regime-year-matrix .matrix-pair[aria-current="true"] { color: #7df0cf; background: rgba(125, 240, 207, .08); }
.regime-manifest { min-width: 1120px; }
.regime-manifest td { vertical-align: top; }
.regime-manifest code { display: block; max-width: 300px; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .regime-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explorer-detail { grid-template-columns: 1fr; }
  .timeline-wrap { overflow-x: auto; padding-bottom: 6px; }
}

@media (max-width: 700px) {
  .regime-explorer-page .page-shell { width: calc(100% - 24px); }
  .dual-regime-grid, .daytype-grid { grid-template-columns: 1fr; }
  .regime-scale { grid-template-columns: 1fr; }
  .regime-card-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .regime-market-card { padding: 14px; }
  .explorer-detail { padding: 20px 14px; }
}

@media (max-width: 430px) {
  .regime-card-grid { grid-template-columns: 1fr; }
  .regime-market-card { grid-template-columns: 1fr auto; }
  .timeline { min-width: 570px; }
}

@media (prefers-reduced-motion: reduce) {
  .regime-market-card { transition: none; }
}
