/* ─────────────────────────────────────────────────────────────────────────
   Dependency graph + the temperature / precision ladders.
   ───────────────────────────────────────────────────────────────────────── */

.graph-shell {
  border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--paper);
  overflow: hidden; position: relative;
}
.graph-canvas { width: 100%; height: min(74vh, 760px); display: block; cursor: grab; touch-action: none; }
.graph-canvas:active { cursor: grabbing; }
.graph-toolbar {
  position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap; pointer-events: none; z-index: 2;
}
.graph-toolbar > * { pointer-events: auto; }
.graph-legend {
  position: absolute; bottom: 12px; left: 12px; background: color-mix(in srgb, var(--paper) 92%, transparent);
  border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 13px;
  display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; backdrop-filter: blur(8px); z-index: 2;
}
.leg-row { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.leg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.gnode { cursor: pointer; }
.gnode circle { transition: r .15s, stroke-width .15s; }
.gnode:hover circle { stroke-width: 3; }
.gnode text { font-family: var(--sans); font-size: 9.5px; font-weight: 600; fill: var(--ink); pointer-events: none; }
.gedge { stroke: var(--hairline); stroke-width: 1.1; fill: none; }
.gedge.hot { stroke: var(--ember); stroke-width: 2; }
.gnode.dim { opacity: .18; }
.gedge.dim { opacity: .07; }

.graph-tip {
  position: absolute; pointer-events: none; z-index: 5; max-width: 260px;
  background: var(--ink); color: var(--bg); padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s;
}
.graph-tip.on { opacity: 1; }
.graph-tip b { display: block; font-size: 13px; margin-bottom: 2px; }

/* ── Temperature ladder ───────────────────────────────────────────────── */
.temp-ladder { display: flex; flex-direction: column; gap: 3px; margin-bottom: 24px; }
.temp-rung {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--divider);
}
.temp-c { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; }
.temp-body { display: flex; flex-direction: column; gap: 4px; }
.temp-heat {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #8A5A22, #C2611F, #E8892C, #F5C542, #FFF3C4);
}
.temp-what { font-size: 13.5px; color: var(--body); }
.temp-what b { color: var(--ink); }
.temp-how { font-size: 12.5px; color: var(--muted); }

/* ── Precision ladder ─────────────────────────────────────────────────── */
.prec-ladder { display: flex; flex-direction: column; gap: 10px; }
.prec-rung {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start;
  padding: 13px 15px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-md);
}
.prec-v { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ember); }
.prec-t { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.prec-d { font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }

/* ── Timeline / futures ───────────────────────────────────────────────── */
.tl { position: relative; padding-left: 34px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--hairline); }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ember);
}
.tl-when { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ember); letter-spacing: .05em; }
.tl-t { font-family: var(--serif); font-size: 18px; font-weight: 800; color: var(--ink); margin: 3px 0 6px; letter-spacing: -.02em; }

/* ── Scenario cards ───────────────────────────────────────────────────── */
.scen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 14px; }
.scen { border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 20px; background: var(--paper); }
.scen-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.scen-n { font-family: var(--serif); font-size: 17.5px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.scen-p { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ember); }
.scen p { font-size: 13.5px; color: var(--muted); line-height: 1.58; margin-bottom: 10px; }
.scen-k { font-size: 12.5px; color: var(--body); }
.scen-k b { color: var(--ink); }

@media (max-width: 640px) {
  .temp-rung { grid-template-columns: 74px 1fr; gap: 10px; }
  .prec-rung { grid-template-columns: 1fr; gap: 4px; }
  .graph-canvas { height: 62vh; }
  .graph-legend { display: none; }
}
