/* Macro Nowcast — Clean, high-contrast editorial design with proper pill formatting */

.nowcast-page {
  font-family: 'Newsreader', 'Georgia', serif;
  color: #1c1915;
  background-color: #fbf9f6;
  line-height: 1.6;
}

.nowcast-main {
  box-sizing: border-box;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 2rem var(--m);
}

/* === HEADER === */
.nowcast-header {
  margin-bottom: 3rem;
  text-align: center;
}

.nowcast-header h1 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1c1915;
}

.nowcast-date {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: #5c5348;
  margin-bottom: 0;
}

/* === SECTION STRUCTURE === */
.layer-pillars,
.layer-quadrant,
.layer-history,
.layer-correlation,
.layer-playbook {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(28, 25, 21, 0.12);
}

/* V8: Remove bottom border from last section (no footer) */
.layer-playbook {
  border-bottom: none;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}

.layer-heading {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1c1915;
}

.section-explainer {
  font-size: 1.05rem;
  color: #5c5348;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

/* === NC-PILL (universal pill component) === */
.nc-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  margin-right: 8px;
  white-space: nowrap;
}

/* === FRAMEWORK NARRATIVE === */
.framework-narrative {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(92, 83, 72, 0.04);
  border-left: 4px solid rgba(28, 25, 21, 0.22);
  border-radius: 6px;
}

.framework-narrative p {
  font-size: 1rem;
  line-height: 1.7;
  color: #1c1915;
  margin-bottom: 0.75rem;
}

.framework-narrative p:last-child {
  margin-bottom: 0;
}

.framework-narrative p a {
  color: #8b3a2b;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.framework-narrative p a:hover {
  color: #6a2a1f;
  text-decoration-color: #6a2a1f;
}

/* === THE 7 MACRO PILLARS GRID === */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pillar-card {
  display: block;
  text-align: left;
  transition: box-shadow 0.2s, transform 0.1s;
  cursor: default;
}

.pillar-card:hover {
  box-shadow: 0 4px 12px rgba(28, 25, 21, 0.12);
  transform: translateY(-2px);
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pillar-pill {
  /* Inherits .nc-pill styling */
}

.pillar-name {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.pillar-desc {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.pillar-metrics {
  display: flex;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.pillar-driver {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.5rem;
}

/* === POSTURE PILLS === */
.posture-pill {
  /* Inherits .nc-pill base */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.posture-lead,
.posture-leading {
  background: rgba(22, 101, 52, 0.16);
  color: #14532d;
  border: 1px solid rgba(22, 101, 52, 0.35);
}

.posture-accel,
.posture-accelerating {
  background: rgba(15, 118, 110, 0.15);
  color: #134e4a;
  border: 1px solid rgba(15, 118, 110, 0.32);
}

.posture-broadening {
  background: rgba(37, 99, 155, 0.14);
  color: #1e3a5f;
  border: 1px solid rgba(37, 99, 155, 0.30);
}

.posture-inflect,
.posture-inflecting-up {
  background: rgba(180, 83, 9, 0.15);
  color: #78350f;
  border: 1px solid rgba(180, 83, 9, 0.32);
}

.posture-cool,
.posture-cooling,
.posture-neutral {
  background: rgba(120, 113, 108, 0.14);
  color: #44403c;
  border: 1px solid rgba(120, 113, 108, 0.28);
}

.posture-lag,
.posture-lagging {
  background: rgba(154, 52, 18, 0.14);
  color: #7c2d12;
  border: 1px solid rgba(154, 52, 18, 0.30);
}

.posture-unwind,
.posture-unwinding {
  background: rgba(153, 27, 27, 0.16);
  color: #7f1d1d;
  border: 1px solid rgba(153, 27, 27, 0.34);
}

.pill-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin: 0.75rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.pill-legend li {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.45;
  color: #3f3a34;
}

/* === MACRO LANDSCAPE BRIEFING (below 7 pillars) === */
.briefing-section {
  margin-top: 2rem;
}

.briefing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.briefing-card {
  background: #f1ece2;
  border: 1px solid rgba(28, 25, 21, 0.15);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(28, 25, 21, 0.05);
  transition: box-shadow 0.2s;
}

.briefing-card:hover {
  box-shadow: 0 4px 12px rgba(28, 25, 21, 0.1);
}

.briefing-card h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1c1915;
}

.briefing-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: #1c1915;
}

/* === MACRO QUADRANT MAP === */

/* Plain-English Guide */
.quadrant-guide-intro {
  margin-bottom: 1.5rem;
}

.quadrant-guide-intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: #1c1915;
}

.quadrant-guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.quadrant-guide-card {
  background: #f1ece2;
  border: 1px solid rgba(28, 25, 21, 0.15);
  border-radius: 8px;
  padding: 1rem;
  border-left-width: 4px;
}

.quadrant-guide-card.quadrant-accelerating {
  border-left-color: rgba(15, 118, 110, 0.6);
}

.quadrant-guide-card.quadrant-inflecting {
  border-left-color: rgba(180, 83, 9, 0.6);
}

.quadrant-guide-card.quadrant-crowded {
  border-left-color: rgba(217, 119, 6, 0.6);
}

.quadrant-guide-card.quadrant-unwinding {
  border-left-color: rgba(153, 27, 27, 0.6);
}

.quadrant-guide-card h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1c1915;
}

.quadrant-guide-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #1c1915;
  margin: 0;
}

.quadrant-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.quadrant-view-btn {
  /* Inherits .nc-pill */
  background: #f1ece2;
  border: 1px solid rgba(28, 25, 21, 0.20);
  cursor: pointer;
  transition: all 0.2s;
  color: #1c1915;
}

.quadrant-view-btn:hover {
  background: #ebe4d6;
  border-color: rgba(28, 25, 21, 0.35);
}

.quadrant-view-btn.active {
  background: #1c1915;
  color: #f1ece2;
  border-color: #1c1915;
}

.quadrant-map-wrapper {
  margin: 1.5rem auto;
  max-width: 900px;
}

.quadrant-x-axis-label,
.quadrant-y-axis-label {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: #5c5348;
  margin-top: 0.75rem;
  text-align: center;
}

.quadrant-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(92, 83, 72, 0.04);
  border-radius: 6px;
  align-items: center;
}

.legend-label {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: #5c5348;
  font-weight: 500;
  margin-right: 0.5rem;
}

/* Interactive pillar pills - scope to avoid terminal.css button conflicts */
.nowcast-page button.quadrant-pillar-pill,
.nowcast-page button.quadrant-pillar-reset {
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(28, 25, 21, 0.20);
}

.nowcast-page button.quadrant-pillar-pill:hover,
.nowcast-page button.quadrant-pillar-reset:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.nowcast-page button.quadrant-pillar-pill.is-hidden {
  opacity: 0.35;
  text-decoration: line-through;
}

.nowcast-page button.quadrant-pillar-reset {
  background: #1c1915;
  color: #f1ece2;
}

.nowcast-page button.quadrant-pillar-reset:not(.active) {
  background: #f1ece2;
  color: #1c1915;
  opacity: 0.5;
}

.quadrant-bubble {
  cursor: pointer;
  transition: opacity 0.2s;
}

.quadrant-bubble:hover circle {
  opacity: 1 !important;
  stroke-width: 3;
}

/* === 52-WEEK SUB-PILLAR ROTATION HISTORY === */
.historical-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(28, 25, 21, 0.15);
  border-radius: 8px;
  background: #f1ece2;
}

.historical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.historical-table thead {
  background: #ebe4d6;
  border-bottom: 2px solid rgba(28, 25, 21, 0.20);
  position: sticky;
  top: 0;
  z-index: 1;
}

.historical-table th {
  padding: 5px 6px;
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  color: #1c1915;
  white-space: nowrap;
  display: table-cell;
  vertical-align: middle;
}

.historical-table th:first-child {
  padding-left: 10px;
}

.historical-table th:last-child {
  padding-right: 10px;
}

.historical-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(28, 25, 21, 0.08);
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
}

.historical-table td:first-child {
  padding-left: 10px;
}

.historical-table td:last-child {
  padding-right: 10px;
}

.historical-table tbody tr:hover {
  background: #ebe4d6;
}

.historical-table tbody tr:hover td {
  background: transparent;
}

.layer-history button.rotation-guide {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.layer-history button.rotation-guide:hover,
.layer-history button.rotation-guide.is-active {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(28, 25, 21, 0.08);
}

.rotation-count {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(28, 25, 21, 0.06);
  color: #5c5348;
}

.historical-table.rotation-filtered tbody tr.rotation-dim {
  opacity: 0.3;
}

.historical-table.rotation-filtered tbody tr.rotation-match {
  opacity: 1;
}

.historical-table.rotation-filtered[data-rotation-pattern="persistence"] tbody tr.rotation-match td {
  background-color: rgba(15, 118, 110, 0.18);
}

.historical-table.rotation-filtered[data-rotation-pattern="fresh_transition"] tbody tr.rotation-match td {
  background-color: rgba(180, 83, 9, 0.18);
}

.historical-table.rotation-filtered[data-rotation-pattern="exhaustion"] tbody tr.rotation-match td {
  background-color: rgba(120, 113, 108, 0.20);
}

.historical-table.rotation-filtered[data-rotation-pattern="persistence"] tbody tr.rotation-match td:first-child {
  box-shadow: inset 3px 0 0 rgba(15, 118, 110, 0.9);
}

.historical-table.rotation-filtered[data-rotation-pattern="fresh_transition"] tbody tr.rotation-match td:first-child {
  box-shadow: inset 3px 0 0 rgba(180, 83, 9, 0.9);
}

.historical-table.rotation-filtered[data-rotation-pattern="exhaustion"] tbody tr.rotation-match td:first-child {
  box-shadow: inset 3px 0 0 rgba(87, 83, 78, 0.9);
}

/* Row AND Column hover highlighting */
.historical-table th.col-hover,
.historical-table td.col-hover {
  background: rgba(180, 83, 9, 0.12);
}

.historical-table td.cell-hover {
  background: rgba(180, 83, 9, 0.20);
  outline: 2px solid rgba(180, 83, 9, 0.5);
  outline-offset: -2px;
}

/* CRITICAL: Never use display: flex on <td> or <th>! It destroys table layout! */
.subpillar-cell {
  /* Contents are inline - nc-pill is inline-flex */
  font-size: 11.5px;
}

.posture-cell {
  /* Contents are inline */
}

/* Compact pills for dense table */
.historical-table .nc-pill {
  padding: 1px 5px;
  font-size: 10px;
  line-height: 1.3;
  width: auto;
  display: inline-flex;
  margin-right: 4px;
}

.ret-sm {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.historical-table .ret-sm {
  font-size: 11px;
  font-family: var(--mono);
}

.ret-sm.positive {
  color: #166534;
}

.ret-sm.negative {
  color: #991b1b;
}

/* === 52-WEEK INTER-PILLAR CORRELATION MATRIX === */
.correlation-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.callout {
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid;
  font-size: 0.9rem;
  line-height: 1.6;
}

.callout-risk {
  background: rgba(153, 27, 27, 0.10);
  border-left-color: #991b1b;
  color: #7f1d1d;
}

.callout-hedge {
  background: rgba(22, 101, 52, 0.10);
  border-left-color: #166534;
  color: #14532d;
}

.callout strong {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.correlation-matrix-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(28, 25, 21, 0.15);
  border-radius: 8px;
  background: #f1ece2;
}

.correlation-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.correlation-table th {
  padding: 0.75rem;
  background: #ebe4d6;
  border: 1px solid rgba(28, 25, 21, 0.12);
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
}

.correlation-table td {
  padding: 0.75rem;
  border: 1px solid rgba(28, 25, 21, 0.12);
  text-align: center;
  vertical-align: middle;
}

/* Row & Column hover for correlation matrix */
.correlation-table th.col-hover,
.correlation-table td.col-hover {
  background: rgba(180, 83, 9, 0.12);
}

.correlation-table td.cell-hover {
  background: rgba(180, 83, 9, 0.20);
  outline: 2px solid rgba(180, 83, 9, 0.5);
  outline-offset: -2px;
}

.corr-cell {
  font-weight: 600;
}

/* Diverging correlation heatmap (signed correlation) */
.corr-diag {
  background: rgba(28, 25, 21, 0.08);
  color: #5c5348;
}

.corr-pos-strong {
  background: rgba(180, 40, 36, 0.55);
  color: #4a100e;
  font-weight: 600;
}

.corr-pos-mild {
  background: rgba(180, 40, 36, 0.22);
  color: #6b1d16;
}

.corr-neutral {
  background: rgba(28, 25, 21, 0.02);
  color: #5c5348;
}

.corr-neg-mild {
  background: rgba(22, 120, 72, 0.22);
  color: #14532d;
}

.corr-neg-strong {
  background: rgba(22, 120, 72, 0.48);
  color: #052e16;
  font-weight: 600;
}

/* === BOOK-BUILDER PLAYBOOK === */
.playbook-jump-links {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.playbook-jump-links a {
  /* Inherits .nc-pill */
  background: #f1ece2;
  border: 1px solid rgba(28, 25, 21, 0.20);
  color: #1c1915;
  text-decoration: none;
  transition: all 0.2s;
}

.playbook-jump-links a:hover {
  background: #ebe4d6;
  border-color: rgba(28, 25, 21, 0.35);
}

.playbook-controls {
  margin-bottom: 1.5rem;
}

.toggle-quant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: #5c5348;
  cursor: pointer;
}

.toggle-quant input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.playbook-bucket {
  margin-bottom: 3rem;
}

.bucket-header {
  margin-bottom: 1.5rem;
}

.bucket-header h3 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1c1915;
}

.bucket-header p {
  font-size: 1rem;
  color: #5c5348;
}

.playbook-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.playbook-card {
  transition: box-shadow 0.2s;
}

.playbook-card:hover {
  box-shadow: 0 4px 12px rgba(28, 25, 21, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title strong {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: #1c1915;
}

.card-title span {
  font-family: var(--sans);
  font-size: 1rem;
  color: #1c1915;
}

.card-why,
.card-forward {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1c1915;
}

.card-why strong,
.card-forward strong {
  font-weight: 600;
}

.card-checklists {
  margin-bottom: 1rem;
}

.checklist {
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.checklist-stay {
  background: rgba(22, 101, 52, 0.10);
  border-left: 3px solid #166534;
  color: #14532d;
}

.checklist-exit {
  background: rgba(153, 27, 27, 0.10);
  border-left: 3px solid #991b1b;
  color: #7f1d1d;
}

.checklist strong {
  font-weight: 600;
}

.card-quant-metrics {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(28, 25, 21, 0.15);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: #5c5348;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: #1c1915;
}

.card-themes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(28, 25, 21, 0.15);
}

.card-themes strong {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: #1c1915;
  display: block;
  margin-bottom: 0.75rem;
}

.theme-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.theme-table thead {
  background: #ebe4d6;
  border-bottom: 2px solid rgba(28, 25, 21, 0.20);
}

.theme-table th {
  padding: 0.75rem;
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  color: #1c1915;
}

.theme-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(28, 25, 21, 0.08);
}

.theme-table tbody tr:hover {
  background: #ebe4d6;
}

.theme-table a {
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}

.theme-table a:hover {
  text-decoration: underline;
}

.theme-mechanism {
  font-size: 0.85rem;
  color: #5c5348;
  margin-top: 0.25rem;
  font-style: italic;
}

.theme-table .positive {
  color: #166534;
  font-family: var(--mono);
  font-weight: 600;
}

.theme-table .negative {
  color: #991b1b;
  font-family: var(--mono);
  font-weight: 600;
}

.core-badge {
  /* Inherits .nc-pill */
  background: rgba(37, 99, 155, 0.14);
  color: #1e3a5f;
  border: 1px solid rgba(37, 99, 155, 0.30);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticker-pill {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: rgba(28, 25, 21, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  color: #1c1915;
  font-weight: 600;
}

.ticker-pill:hover {
  background: rgba(28, 25, 21, 0.15);
  text-decoration: underline;
}

/* Footer removed in V8 */

/* === REGIME FLIPS SECTION (V9) === */
.regime-flips-section {
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(92, 83, 72, 0.04);
  border: 1px solid rgba(28, 25, 21, 0.12);
  border-radius: 8px;
}

.flips-heading {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #1c1915;
  margin: 0 0 0.5rem 0;
}

.flips-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #5c5348;
  margin: 0 0 1.5rem 0;
}

.flips-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.flips-column {
  padding: 1.25rem;
  border-radius: 6px;
  background: #fff;
}

.flips-bullish {
  border-left: 4px solid #3d7e63;
}

.flips-bearish {
  border-left: 4px solid #b84a39;
}

.flips-column h4 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #1c1915;
}

.flip-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(28, 25, 21, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
}

.flip-row:last-child {
  border-bottom: none;
}

.flip-row:hover {
  background: rgba(28, 25, 21, 0.04);
  border-radius: 4px;
}

.flip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pillar-pill-mini {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.flip-subpillar-name {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c1915;
}

.flip-transition,
.flip-velocity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.nc-pill-sm {
  font-size: 10px;
  padding: 2px 6px;
}

.flip-arrow {
  font-size: 1rem;
  color: #5c5348;
  font-weight: 500;
}

.flip-timeframe {
  font-family: var(--mono);
  font-size: 10px;
  color: #5c5348;
  font-weight: 500;
}

.flip-metrics {
  font-family: var(--mono);
  font-size: 11px;
  color: #5c5348;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.metric-sep {
  color: rgba(28, 25, 21, 0.3);
}

.metric-delta {
  font-weight: 600;
}

.metric-delta.positive {
  color: #3d7e63;
}

.metric-delta.negative {
  color: #b84a39;
}

/* === TRAIL CONTROLS (V9) === */
.quadrant-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.trail-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding-left: 1rem;
  border-left: 1px solid rgba(28, 25, 21, 0.15);
}

.trail-label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: #5c5348;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nowcast-page button.trail-btn {
  /* Match quadrant-view-btn styling */
  background: #f1ece2;
  border: 1px solid rgba(28, 25, 21, 0.20);
  color: #1c1915;
  cursor: pointer;
  transition: all 0.2s;
}

.nowcast-page button.trail-btn:hover:not(.active) {
  background: #ebe4d6;
  border-color: rgba(28, 25, 21, 0.35);
}

.nowcast-page button.trail-btn.active {
  background: #1c1915;
  color: #f1ece2;
  border-color: #1c1915;
}

/* SVG Trail Styling */
.trail-path {
  fill: none;
  stroke-width: 2;
  opacity: 0.4;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
  pointer-events: none;
}

.trail-path.highlighted {
  stroke-width: 3;
  opacity: 0.9;
}

.trail-waypoint {
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.trail-waypoint.highlighted {
  opacity: 1;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nowcast-header h1 {
    font-size: 2rem;
  }
  
  .layer-heading {
    font-size: 1.75rem;
  }
  
  .briefing-cards {
    grid-template-columns: 1fr;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  
  .playbook-jump-links {
    flex-direction: column;
  }
  
  .flips-columns {
    grid-template-columns: 1fr;
  }
  
  .trail-controls {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
}

/* === UTILITY === */
.hidden {
  display: none !important;
}

.filtered-out {
  display: none !important;
}
