/* FXAbsolute Phase 6 — XAUUSD strategy backtest page.
   Layered on research-evidence.css; only the Phase 6 additions live here. */

.phase-six .strategy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

/* The base h1 is tuned for short evidence titles. This page's headline is a
   full sentence, so it needs a smaller size and a wider measure or it becomes
   a column of single words a whole screen tall. */
.phase-six .strategy-hero h1 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 3.1vw, 2.9rem);
  letter-spacing: -.03em;
}
.phase-six .strategy-hero .hero-lead { font-size: 1rem; }

/* Four headline numbers read better as a balanced 2x2 than as 3 + 1. */
.phase-six .strategy-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.phase-six .hero-proof {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(85, 230, 193, .09), rgba(3, 16, 14, .55));
  box-shadow: var(--shadow);
}

.phase-six .proof-kicker {
  color: var(--mint);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.phase-six .proof-number {
  margin: 10px 0 2px;
  font-size: clamp(2.5rem, 6vw, 3.6rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.055em;
  color: var(--gold);
}

.phase-six .proof-unit { color: var(--muted); font-size: .9rem; }
.phase-six .proof-mini { margin: 16px 0 0; color: var(--dim); font-size: .78rem; line-height: 1.6; }

/* Twenty bars, one per strategy, in ranking order and drawn FROM A ZERO LINE
   so that below-zero reads as below zero. Bars growing downward is the point:
   eighteen of the twenty sit under the line. */
.phase-six .hero-bars {
  position: relative;
  display: flex;
  gap: 3px;
  height: 84px;
  margin: 20px 0 6px;
}
.phase-six .hero-bars::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--line-strong);
}
.phase-six .hero-bars i { position: relative; flex: 1; }
.phase-six .hero-bars i::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: var(--h);
  border-radius: 2px;
}
.phase-six .hero-bars i.up::after { bottom: 50%; background: var(--mint); }
.phase-six .hero-bars i.down::after { top: 50%; background: rgba(255, 116, 108, .62); }
.phase-six .hero-bars-caption { margin: 0 0 4px; color: var(--dim); font-size: .7rem; }

/* Stat cards on this page use metric-label + strong + span. */
.phase-six .stat-card .metric-label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.phase-six .stat-card strong {
  display: block;
  margin: 11px 0 5px;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.05em;
}
.phase-six .stat-card > span:last-child { color: var(--dim); font-size: .79rem; }

/* ------------------------------------------------------- ranking table --- */
.phase-six .ranking-table { font-variant-numeric: tabular-nums; }
.phase-six .ranking-table th[scope='row'] {
  min-width: 218px;
  text-align: left;      /* names read left-to-right, not right-aligned */
  text-transform: none;  /* the base table uppercases row headers */
  white-space: normal;
}
.phase-six .ranking-table td { white-space: nowrap; }
.phase-six .ranking-table th, .phase-six .ranking-table td { padding-left: 10px; padding-right: 10px; }
.phase-six .rank-cell { color: var(--dim); font-weight: 900; }

.phase-six .strategy-name { display: block; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.phase-six .strategy-meta { display: block; color: var(--dim); font-size: .72rem; font-weight: 500; letter-spacing: .02em; }

.phase-six .pos { color: var(--mint); }
.phase-six .neg { color: var(--coral); }

/* A row that lost to a coin flip with the same risk management. */
.phase-six .row-worse { background: rgba(255, 116, 108, .075); }
.phase-six .row-worse th[scope='row'] { box-shadow: inset 3px 0 0 rgba(255, 116, 108, .45); }

/* --------------------------------------------------------- family grid --- */
.phase-six .family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 24px 0 8px;
}
.phase-six .family-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .018);
}
.phase-six .family-card h3 { margin: 0 0 4px; font-size: .98rem; }
.phase-six .family-count { margin: 0 0 8px; color: var(--mint); font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.phase-six .family-card p { margin: 0; color: #b9cbc5; font-size: .85rem; line-height: 1.6; }

/* ------------------------------------------------------- control grid ---- */
.phase-six .control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 22px 0 26px;
}
.phase-six .control-grid article {
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(85, 230, 193, .045);
}
.phase-six .control-grid .metric-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.phase-six .control-grid strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ink);
}
.phase-six .control-grid span:last-child { color: var(--dim); font-size: .79rem; line-height: 1.55; }

/* ------------------------------------------------------ strategy cards --- */
.phase-six .strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  margin: 26px 0 10px;
}

.phase-six .strategy-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(7, 26, 23, .6);
  scroll-margin-top: 90px;
}

.phase-six .strategy-card header { margin-bottom: 12px; }
.phase-six .card-rank {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 9px;
  border-radius: 7px;
  background: rgba(246, 197, 92, .13);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 900;
}
.phase-six .strategy-card h3 { margin: 0 0 4px; font-size: 1.04rem; line-height: 1.35; }
.phase-six .card-family { display: block; color: var(--dim); font-size: .76rem; }

.phase-six .card-trend {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(85, 230, 193, .35);
  color: var(--muted);
  font-size: .84rem;
  font-style: italic;
  line-height: 1.6;
}
.phase-six .card-rule { margin: 0 0 16px; color: #b9cbc5; font-size: .85rem; line-height: 1.65; }
.phase-six .card-rule strong { color: var(--ink); }

.phase-six .card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.phase-six .card-stats > div { padding: 9px 12px; background: var(--surface-solid); }
.phase-six .card-stats dt { color: var(--dim); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.phase-six .card-stats dd { margin: 2px 0 0; font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.phase-six .card-note { margin: auto 0 0; color: var(--dim); font-size: .77rem; line-height: 1.6; }

/* ------------------------------------------------------------ CTA panel -- */
.phase-six .cta-panel {
  margin: 42px 0 10px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(85, 230, 193, .1), rgba(246, 197, 92, .05));
  text-align: center;
}
.phase-six .cta-panel h2 { margin-top: 0; }
.phase-six .cta-panel p { color: #b9cbc5; }
.phase-six .button-ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.phase-six .button-ghost:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 900px) {
  .phase-six .strategy-hero { grid-template-columns: 1fr; }
  .phase-six .strategy-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .phase-six .hero-bars { height: 56px; }
  .phase-six .card-stats { grid-template-columns: 1fr; }
  .phase-six .cta-panel { padding: 22px; }
  .phase-six .cta-panel .button { display: block; width: 100%; margin: 8px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------- extractable verdicts --- */
/* A question and a self-contained answer, sitting together so a reader - or a
   language model lifting a quote - gets the claim, the number and the sample
   in one block without needing the surrounding prose. */
.phase-six .card-verdict {
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid rgba(85, 230, 193, .22);
  border-radius: 12px;
  background: rgba(85, 230, 193, .05);
}
.phase-six .card-question {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: .87rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.phase-six .card-answer {
  margin: 0;
  color: #b9cbc5;
  font-size: .82rem;
  line-height: 1.62;
}

/* ------------------------------------------------------------ citation --- */
.phase-six .cite-panel {
  margin: 42px 0 10px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(7, 26, 23, .6);
}
.phase-six .cite-panel h2 { margin-top: 6px; }

.phase-six .cite-quote {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(246, 197, 92, .06);
  color: var(--ink);
  font-size: .93rem;
  line-height: 1.68;
}

.phase-six .cite-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.phase-six .cite-meta > div { padding: 11px 14px; background: var(--surface-solid); }
.phase-six .cite-meta dt {
  color: var(--dim);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.phase-six .cite-meta dd {
  margin: 3px 0 0;
  color: #b9cbc5;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.phase-six .cite-meta code { font-size: .72rem; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .phase-six .cite-panel { padding: 20px; }
  .phase-six .cite-quote { padding: 14px 15px; font-size: .88rem; }
}
