/* =========================================================================
   Probability-cone hero (index.html) — see DESIGN.md
   Uses the site tokens from styles.css: --primary (clay), --primary-ink, --ink, --muted, --hairline, --canvas.
   ========================================================================= */

.cone-hero { padding: 120px 0 56px; }
.cone-hero-inner {
  width: var(--page); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  gap: clamp(8px, 2vw, 32px);
}
.cone-hero-text { position: relative; z-index: 2; max-width: 520px; }
.cone-hero h1 {
  font-weight: 350; font-size: clamp(2.8rem, 6.2vw, 5.4rem); line-height: 0.98; letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}
.cone-hero h1 .em { display: block; }
.cone-hero .hero-sub { margin-top: 26px; max-width: 44ch; font-size: 1.06rem; }
.cone-hero .hero-actions { margin-top: 34px; }

/* stage */
.cone { position: relative; z-index: 1; margin: 0; }
.cone .stage { position: relative; aspect-ratio: 7 / 5.6; width: 100%; }
#cone {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y;
  /* soft paper edge instead of a hard crop */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}
#cone:active { cursor: grabbing; }
#cone.fallback { cursor: default; }

/* label on the highlighted path's end */
.probe { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity 160ms var(--ease-out); will-change: transform; }
.probe.on { opacity: 1; }
.probe i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.probe span {
  position: absolute; left: 12px; top: -10px; white-space: nowrap;
  font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ink);
  background: color-mix(in srgb, var(--canvas) 88%, transparent); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--hairline);
}
.probe.flip span { left: auto; right: 12px; }
.cone .hint {
  position: absolute; left: 50%; bottom: 1%; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em;
  transition: opacity 400ms var(--ease-out);
}
.cone .hint.gone { opacity: 0; }

/* cross-section card, docked top-left of the stage */
.instruments { position: absolute; inset: 0; pointer-events: none; }
.inst {
  position: absolute; pointer-events: auto; width: 188px;
  background: color-mix(in srgb, var(--canvas) 94%, transparent);   /* near-opaque: dense ink sits behind it */
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px 11px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent), 0 12px 30px -18px color-mix(in srgb, var(--ink) 30%, transparent);
}
.inst header { display: flex; align-items: center; gap: 7px; color: var(--ink); letter-spacing: 0.02em; }
.inst header output { margin-left: auto; color: var(--primary-ink); }
.led { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.joint { left: -20px; top: 0; }   /* nudged into the gutter, clear of the headline column */
.joint canvas { display: block; width: 100%; aspect-ratio: 1; margin-top: 8px; }
.joint footer { display: flex; justify-content: space-between; margin-top: 4px; }

.cone figcaption { padding: 4px 0 0 18%; }
.cone .cap { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--body); }

@media (max-width: 900px) {
  .cone-hero { min-height: 0; padding-top: 104px; }
  .cone-hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .cone { margin: 0 calc((var(--page) - 100vw) / 2); }
  /* canvas keeps a 4:3 frame; the card flows underneath it */
  .cone .stage { aspect-ratio: auto; padding-top: 75%; }
  #cone { height: auto; bottom: auto; aspect-ratio: 4 / 3; }
  .cone .hint { bottom: auto; top: calc(100vw * 0.75 - 20px); }
  .instruments { position: static; display: grid; gap: 10px; padding: 8px calc((100vw - var(--page)) / 2) 4px; }
  .inst { position: relative; inset: auto; width: auto; }
  .joint canvas { max-width: 260px; margin-inline: auto; }
  .cone figcaption { padding: 0 calc((100vw - var(--page)) / 2); }
}
