/* =====================================================================
   /wells/ : Model 3, the proton wells computed
   Series colours: NiH = amber, PdD = crimson-ink, measured = neutral ink,
   film in-plane = orange-ink, film across-layer = purple-ink.
   Every class is prefixed wells-.
   ===================================================================== */
.page-wells { --ni: var(--amber); --pd: var(--crimson-ink); --in: var(--orange-ink); --out: var(--purple-ink); }

/* ---------- section heads ---------- */
.wells-head { margin-bottom: clamp(36px, 5vw, 64px); }
.wells-head .display-2 { text-wrap: balance; }
.wells-head--split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px clamp(32px, 5vw, 96px); align-items: end; }
.wells-head--split .lead { margin-top: 0; max-width: 52ch; }
@media (max-width: 900px) { .wells-head--split { grid-template-columns: 1fr; align-items: start; } }
.wells-chips { margin-top: 22px; }
.wells-u { font: 400 11px/1.3 var(--font-mono); color: var(--ink-3); letter-spacing: 0.02em; text-transform: none; }
.wells-h4 { font: 700 var(--fs-h4)/1.25 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.wells-h4 .wells-u { font-weight: 400; margin-left: 6px; }

/* ---------- hero ---------- */
.wells-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bg-deep); min-height: min(calc(100svh - var(--header-h)), 940px); display: flex; }
.wells-hero--noimg { background: radial-gradient(60% 70% at 70% 70%, rgba(100, 13, 95, 0.55), transparent 70%), radial-gradient(30% 30% at 60% 80%, rgba(235, 91, 0, 0.35), transparent 70%), var(--bg-deep); }
.wells-hero__media { position: absolute; inset: 0; z-index: -2; }
.wells-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.wells-hero__media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 18, 18, 0.86) 0%, rgba(18, 18, 18, 0.55) 30%, rgba(18, 18, 18, 0) 58%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.2) 0%, rgba(18, 18, 18, 0) 40%, rgba(18, 18, 18, 0) 70%, var(--bg-deep) 100%); }
.wells-hero__media .illus-tag { left: auto; right: var(--gutter); bottom: 20px; }
.wells-hero__inner { position: relative; display: flex; flex-direction: column; padding-top: 28px; padding-bottom: clamp(36px, 4vw, 56px); }
.wells-hero .crumbs { margin-bottom: 0; }
.wells-hero__copy { margin-top: clamp(24px, 7vh, 104px); max-width: 1000px; }
.wells-hero__title { font: 400 clamp(58px, 10vw, 172px)/0.86 var(--font-display); letter-spacing: var(--track-display); margin-left: -0.04em; max-width: 9ch; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4); }
.wells-hero__lead { font: 400 var(--fs-lead)/1.38 var(--font-text); color: var(--ink-2); max-width: 34ch; margin-top: clamp(24px, 3vw, 40px); letter-spacing: -0.012em; text-wrap: pretty; }
.wells-hero__lead strong { color: var(--ink); font-weight: 400; }
.wells-onpage { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: auto; padding-top: clamp(40px, 8vh, 96px); max-width: 760px; }
.wells-onpage a { font: 400 12.5px/1 var(--font-mono); color: var(--ink-2); text-decoration: none; padding: 9px 0; }
.wells-onpage a:hover { color: var(--amber); }
@media (max-width: 760px) {
  .wells-hero { flex-direction: column; min-height: 0; background: var(--bg); }
  .wells-hero__media { position: relative; order: 2; inset: auto; z-index: 0; aspect-ratio: 16 / 10; margin-top: 8px; }
  .wells-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(25, 25, 25, 0) 30%, rgba(25, 25, 25, 0) 75%, var(--bg) 100%); pointer-events: none; }
  .wells-hero__media img { object-position: 58% 70%; }
  .wells-hero__media .illus-tag { left: var(--gutter); right: auto; bottom: 14px; }
  .wells-hero__inner { order: 1; padding-bottom: 0; }
  .wells-hero__copy { margin-top: 28px; }
  .wells-onpage { order: 3; padding-top: 28px; gap: 0 16px; }
  .wells-onpage a { padding: 8px 0; }
}

/* ---------- in short ---------- */
.wells-short__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.wells-short__p { font: 400 clamp(18px, 1.45vw, 21px)/1.5 var(--font-text); color: var(--ink-2); max-width: 46ch; letter-spacing: -0.008em; }
.wells-short__p + .wells-short__p { margin-top: 0.75em; }
.wells-short__p strong { color: var(--ink); font-weight: 400; }
.wells-short .statbar__label { font-size: clamp(16px, 1.55vw, 24px); }
@media (max-width: 980px) { .wells-short__grid { grid-template-columns: 1fr; } }

/* ---------- 04.1 the pocket ---------- */
.wells-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.wells-three__i { border-top: 3px solid var(--c); padding-top: 18px; }
.wells-three__k { font: 500 12px/1.3 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; }
.wells-three__h { font: 400 clamp(24px, 2.2vw, 34px)/1.05 var(--font-display); letter-spacing: -0.03em; margin-top: 12px; }
.wells-three__i p:last-child { font: 400 16.5px/1.6 var(--font-text); color: var(--ink-2); margin-top: 14px; max-width: 40ch; }
.wells-method { margin-top: clamp(36px, 4vw, 56px); padding-top: 22px; border-top: 1px solid var(--line); font: 400 14px/1.7 var(--font-mono); color: var(--ink-2); max-width: 92ch; }
.wells-method strong { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) { .wells-three { grid-template-columns: 1fr; } }

/* ---------- figure frame ---------- */
.wells-fig { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-deep); overflow: hidden; min-width: 0; }
.wells-fig__bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.03em; color: var(--ink-2); text-transform: uppercase; }
.wells-fig__tag { color: var(--amber); white-space: nowrap; }
.wells-fig__cap { padding: 13px 16px 15px; border-top: 1px solid var(--line); font: 400 12.5px/1.65 var(--font-mono); color: var(--ink-3); }
.wells-fig__cap b { color: var(--ink-2); font-weight: 500; }
.wells-fig__cap .chip { margin: 2px 4px 0 0; }
.wells-fig__cap i { font-family: var(--font-text); }
.wells-noscript { margin-top: 12px; color: var(--ink-3); }

/* ---------- 04.2 two calculations ---------- */
.wells-two__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.wells-cells__panels { display: grid; grid-template-columns: 1fr; }
.wells-cells__panel { padding: 16px 16px 14px; }
.wells-cells__panel + .wells-cells__panel { border-top: 1px solid var(--line); }
.wells-cells__k { font: 400 12.5px/1.4 var(--font-mono); color: var(--ink-3); }
.wells-cells__k b { color: var(--ink); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }
.wells-cells__svg { width: 100%; height: auto; margin-top: 4px; overflow: visible; }
.wells-cells__out { font: 400 15px/1.5 var(--font-text); color: var(--ink-2); }
.wells-cells__out b { color: var(--ink); font-weight: 700; }
.wells-cells__bowl { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.wells-cells__cell { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }
.wells-cells__spring { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linejoin: round; }
.wells-cells__ball { fill: var(--bg-raise-2); stroke: var(--ink-3); stroke-width: 1.5; }
.wells-cells__ball.is-moved { fill: var(--amber); stroke: var(--bg-deep); stroke-width: 2; }
.wells-cells__ghost { fill: none; stroke: var(--amber); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.6; }
.wells-cells__arrow { stroke: var(--amber); stroke-width: 2; }
.wells-cells__ahead { fill: var(--amber); }
.wells-cells__pull { stroke: var(--crimson-ink); stroke-width: 2; }
.wells-cells__ahead--pull { fill: var(--crimson-ink); }
.wells-cells__t { font: 400 12px var(--font-mono); fill: var(--ink-3); }
.wells-cells__t--pull { fill: var(--ink-2); font-size: 12px; }
@media (max-width: 600px) {
  .wells-cells__t { display: none; }
  .wells-cells__t--pull { display: inline; font-size: 18px; }
}

.wells-sum { padding-top: 4px; }
.wells-sum__k { font: 500 12px/1.3 var(--font-mono); color: var(--crimson-ink); letter-spacing: 0.03em; }
.wells-sum__eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 14px; font: 400 clamp(26px, 2.6vw, 40px)/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.wells-sum__op { color: var(--crimson-ink); }
.wells-sum__p { font: 400 16px/1.6 var(--font-text); color: var(--ink-2); margin-top: 18px; max-width: 48ch; }
.wells-decomp { display: grid; gap: 10px; margin-top: 18px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wells-decomp__row { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 4.4em; align-items: center; gap: 12px; }
.wells-decomp__row.is-check { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.wells-decomp__l { font: 400 12.5px/1.3 var(--font-mono); color: var(--ink-2); }
.wells-decomp__track { position: relative; height: 16px; }
.wells-decomp__bar { display: block; height: 100%; background: var(--pd); border-radius: 0 4px 4px 0; }
.wells-decomp__bar--minus { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--pd) 70%, transparent) 0 2px, transparent 2px 6px); border-radius: 4px; }
.wells-decomp__bar--check { background: color-mix(in srgb, var(--pd) 55%, var(--bg-deep)); }
.wells-decomp__v { font: 500 14px/1 var(--font-mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .wells-two__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .wells-decomp__row { grid-template-columns: minmax(0, 1fr) 4.4em; }
  .wells-decomp__l { grid-column: 1 / -1; }
}

/* ---------- controls ---------- */
.wells-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wells-ctl__g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wells-ctl__k { font: 500 11px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-right: 6px; }
.wells-seg { font: 400 12.5px/1 var(--font-mono); color: var(--ink-2); padding: 9px 11px; min-height: 34px; border: 1px solid var(--line-2); border-radius: 3px; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.wells-seg:hover { color: var(--ink); border-color: var(--ink-3); }
.wells-seg[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.wells-ctl__slider { flex: 1 1 280px; gap: 12px; }
.wells-ctl__slider input { flex: 1 1 160px; min-width: 140px; accent-color: var(--amber); height: 28px; cursor: pointer; }
.wells-ctl__out { font: 500 15px/1 var(--font-mono); color: var(--ink); min-width: 4.6em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- plots (drawn by wells.js) ---------- */
.wells-plot { position: relative; min-height: 300px; touch-action: pan-y; }
.wells-plot:focus-visible { outline-offset: -3px; }
.wells-plot--sm { min-height: 260px; }
.no-js .wells-plot, .no-js .wells-ctl, .no-js [data-wells-well] .wells-readout, .no-js [data-wells-kstrain] .wells-readout { display: none; }
.wells-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.wells-grid { stroke: var(--line); stroke-width: 1; }
.wells-zero { stroke: var(--line-2); stroke-width: 1; }
.wells-axis { stroke: var(--line-2); stroke-width: 1; }
.wells-tick { font: 400 11px var(--font-mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.wells-axl { font: 500 11px var(--font-mono); fill: var(--ink-2); letter-spacing: 0.03em; }
.wells-lab { font: 500 12px var(--font-mono); fill: var(--ink); }
.wells-lab--sub { font-weight: 400; fill: var(--ink-3); font-size: 11px; }
.wells-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wells-line--ni { stroke: var(--ni); }
.wells-line--pd { stroke: var(--pd); }
.wells-line--in { stroke: var(--in); }
.wells-line--out { stroke: var(--out); }
.wells-line--dash { stroke-width: 1.4; stroke-dasharray: 5 5; opacity: 0.75; }
.wells-pt { stroke: var(--bg-deep); stroke-width: 2; pointer-events: none; }
.wells-pt--ni { fill: var(--ni); }
.wells-pt--pd { fill: var(--pd); }
.wells-pt--in { fill: var(--in); }
.wells-pt--out { fill: var(--out); }
.wells-pt--ring { fill: var(--bg-deep); stroke: var(--pd); stroke-width: 2; }
.wells-pt:focus { outline: none; }
.wells-pt:focus-visible, .wells-hit:focus-visible + .wells-pt { stroke: var(--ink); }
.wells-hit { fill: transparent; cursor: default; }
.wells-hit:focus { outline: none; }
.wells-hit:focus-visible { stroke: var(--amber); stroke-width: 2; }
.wells-neg { fill: color-mix(in srgb, var(--purple) 22%, transparent); }
.wells-cross { stroke: var(--ink-3); stroke-width: 1; }
.wells-crossdot { stroke: var(--bg-deep); stroke-width: 2; pointer-events: none; }
.wells-cross, .wells-lab, .wells-zeromark { pointer-events: none; }
.wells-zeromark { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.wells-band { fill: color-mix(in srgb, var(--ink) 7%, transparent); }

.wells-tip { position: fixed; z-index: 300; max-width: 280px; padding: 9px 11px; background: var(--paper-2); color: var(--paper-ink); font: 400 12.5px/1.45 var(--font-mono); border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; }
.wells-tip.is-on { opacity: 1; transform: none; }
.wells-tip b { font-weight: 600; }

/* ---------- readouts and keys ---------- */
.wells-readout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 12px 16px; border-top: 1px solid var(--line); }
.wells-readout__i { font: 400 13px/1.4 var(--font-mono); color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wells-readout__i b { color: var(--ink); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 3.6em; display: inline-block; }
.wells-readout__state { font-size: 11.5px; color: var(--ink); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 3px; }
.wells-readout__state:empty { display: none; }
.wells-readout__legend { font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; margin-left: auto; }
.wells-readout__legend { gap: 6px 18px; }
.wells-li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wells-key { display: inline-block; flex: none; width: 18px; height: 2px; vertical-align: middle; background: var(--ink-2); border-radius: 1px; }
.wells-key--ni { background: var(--ni); height: 3px; }
.wells-key--pd { background: var(--pd); height: 3px; }
.wells-key--in { background: var(--in); height: 3px; }
.wells-key--out { background: var(--out); height: 3px; }
.wells-key--dash { background: repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 7px); }
.wells-key--dot, .wells-key--ring { width: 9px; height: 9px; border-radius: 50%; }
.wells-key--ring { background: transparent; border: 2px solid var(--pd); }
@media (max-width: 640px) { .wells-readout__legend { margin-left: 0; } }

/* ---------- 04.3 shape ---------- */
.wells-dirs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 48px); margin-top: clamp(28px, 3vw, 44px); }
.wells-dirs__i { border-top: 1px solid var(--line-2); padding-top: 16px; }
.wells-dirs__k { font: 500 12px/1.3 var(--font-mono); color: var(--amber); letter-spacing: 0.03em; }
.wells-dirs__i p:last-child { font: 400 16.5px/1.6 var(--font-text); color: var(--ink-2); margin-top: 10px; max-width: 52ch; }
@media (max-width: 720px) { .wells-dirs { grid-template-columns: 1fr; } }

/* ---------- 04.4 vibration ---------- */
.wells-vib__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: center; }
.wells-vib__lead { margin-top: clamp(20px, 2.4vw, 32px); }
.wells-vib__prose { margin-top: 22px; }
.wells-hbars { padding: 10px 16px 18px; }
.wells-hbars__g { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono); color: var(--ink); letter-spacing: 0.04em; margin: 16px 0 8px; }
.wells-hbars__row { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); align-items: center; gap: 12px; padding: 5px 0; }
.wells-hbars__l { font: 400 12.5px/1.3 var(--font-mono); color: var(--ink-2); }
.wells-hbars__track { position: relative; height: 18px; margin-right: 44px; }
.wells-hbars__bar { position: absolute; left: 0; top: 1px; height: 16px; border-radius: 0 4px 4px 0; }
.wells-hbars__bar--ni { background: var(--ni); }
.wells-hbars__bar--pd { background: var(--pd); }
.wells-hbars__bar--pd2 { background: color-mix(in srgb, var(--pd) 55%, var(--bg-deep)); }
.wells-hbars__bar--meas { background: var(--ink-3); }
.wells-hbars__v { position: absolute; top: 50%; transform: translate(8px, -50%); font: 500 13px/1 var(--font-mono); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wells-hbars__axis { position: relative; height: 22px; margin: 10px 44px 0 calc(13em + 12px); border-top: 1px solid var(--line-2); }
.wells-hbars__axis span { position: absolute; top: 6px; transform: translateX(-50%); font: 400 11px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; }
@media (max-width: 1180px) { .wells-vib__grid { grid-template-columns: 1fr; } .wells-vibchart { max-width: 760px; } }
@media (max-width: 560px) {
  .wells-hbars__row { grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
  .wells-hbars__axis { margin-left: 0; }
}

/* ---------- 04.5 stretch ---------- */
.wells-stretch__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.wells-deriv__k { font: 500 11.5px/1.45 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; }
.wells-deriv__t { width: 100%; border-collapse: collapse; margin-top: 14px; }
.wells-deriv__t th, .wells-deriv__t td { text-align: right; padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line); }
.wells-deriv__t thead th { font: 500 11px/1.3 var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; vertical-align: bottom; }
.wells-deriv__t tbody th { text-align: left; padding-left: 0; font: 500 13px/1 var(--font-mono); color: var(--ink); white-space: nowrap; }
.wells-deriv__t tbody th .wells-key { margin-right: 8px; }
.wells-deriv__t td { font: 400 clamp(24px, 2.4vw, 34px)/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.wells-stretch__prose { margin-top: 28px; font-size: 16.5px; }
.wells-uncert { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr) minmax(0, 0.9fr); gap: 20px clamp(24px, 3.5vw, 56px); margin-top: clamp(48px, 6vw, 88px); padding: clamp(22px, 2.6vw, 36px); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0; background: var(--bg-raise); }
.wells-uncert .kicker { margin-bottom: 12px; }
.wells-uncert__body p { font: 400 16px/1.65 var(--font-text); color: var(--ink-2); }
.wells-uncert__body a { color: var(--ink); text-decoration-color: var(--amber); }
.wells-uncert__pair { display: grid; gap: 18px; align-content: start; }
.wells-uncert__pair div { display: flex; flex-direction: column-reverse; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.wells-uncert__pair dt { font: 400 11.5px/1.35 var(--font-mono); color: var(--ink-3); }
.wells-uncert__pair dd { margin: 0; font: 400 clamp(40px, 4vw, 60px)/0.9 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); }
.wells-uncert__pair div:last-child dd { color: var(--amber); }
@media (max-width: 1100px) { .wells-uncert { grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr); } .wells-uncert__head { grid-column: 1 / -1; } }
@media (max-width: 980px) { .wells-stretch__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .wells-uncert { grid-template-columns: 1fr; } }

/* ---------- 04.6 shear and films ---------- */
.wells-films__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .wells-films__grid { grid-template-columns: 1fr; } }

/* ---------- 04.7 loading ---------- */
/* loading series: x = 1 crimson-ink (the PdD colour elsewhere), 0.875 purple-ink, 0.75 amber; bunched = hollow */
.page-wells { --ld1: var(--crimson-ink); --ld2: var(--purple-ink); --ld3: var(--amber); }
.wells-loading__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.wells-loading__side { display: grid; gap: 24px; }
.wells-ldf { border-top: 1px solid var(--line-2); padding-top: 14px; }
.wells-ldf__k { font: 500 12px/1.3 var(--font-mono); color: var(--amber); letter-spacing: 0.03em; }
.wells-ldf__p { font: 400 16px/1.6 var(--font-text); color: var(--ink-2); margin-top: 8px; max-width: 58ch; }
.wells-ldf__p i { color: var(--ink); }
.wells-eq--sm { margin-top: 12px; padding: 12px 14px; }
.wells-eq--sm .wells-eq__f { font-size: clamp(16px, 1.3vw, 19px); white-space: normal; }
.wells-loading__table { margin: clamp(36px, 4vw, 56px) 0 0; }
.wells-line--ld1 { stroke: var(--ld1); }
.wells-line--ld2 { stroke: var(--ld2); }
.wells-line--ld3 { stroke: var(--ld3); }
.wells-pt--ld1 { fill: var(--ld1); --c: var(--ld1); }
.wells-pt--ld2 { fill: var(--ld2); --c: var(--ld2); }
.wells-pt--ld3 { fill: var(--ld3); --c: var(--ld3); }
.wells-pt--hollow { fill: var(--bg-deep); stroke: var(--c); stroke-width: 2.5; }
.wells-key--ld1 { background: var(--ld1); height: 3px; }
.wells-key--ld2 { background: var(--ld2); height: 3px; }
.wells-key--ld3 { background: var(--ld3); height: 3px; }
.wells-key--hollow { width: 9px; height: 9px; border-radius: 50%; background: transparent; border: 2px solid var(--ink-2); }
.wells-lab--ld { font-weight: 400; fill: var(--ink-2); }
@media (max-width: 980px) { .wells-loading__grid { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.wells-table td { font-variant-numeric: tabular-nums; min-width: 0; }
.wells-table td:first-child { min-width: 0; }
.wells-table th { white-space: normal; }
.wells-m, .wells-table th .wells-u { text-transform: none; letter-spacing: 0; }
.wells-table th .wells-m { font-family: var(--font-text); font-size: 13px; font-weight: 400; }
.wells-table th .wells-u { color: var(--ink-3); }
.wells-table tr.is-accepted td { color: var(--ink); }
.wells-table tr.is-old td { color: var(--ink-3); }
.wells-table tr.is-total td { color: var(--ink); border-top: 1px solid var(--line-2); }
.wells-tag { display: inline-block; font: 500 10px/1 var(--font-mono); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent); border-radius: 3px; padding: 3px 4px 2px; margin-left: 4px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 0.1em; }
.is-old .wells-tag { color: var(--ink-3); border-color: var(--line-2); }

/* ---------- 04.8 detail ---------- */
.wells-detail__cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.wells-detail__eqs .wells-h4 { margin-top: 34px; }
.wells-detail__eqs .wells-h4:first-child { margin-top: 0; }
.wells-eq { display: flex; align-items: baseline; gap: 18px; margin-top: 14px; padding: 16px 18px; background: var(--bg-raise); border-left: 2px solid var(--crimson); border-radius: 0 6px 6px 0; overflow-x: auto; }
.wells-eq__n { font: 500 12px/1 var(--font-mono); color: var(--crimson-ink); flex: none; }
.wells-eq__f { font: 400 clamp(19px, 1.8vw, 26px)/1.4 var(--font-text); color: var(--ink); letter-spacing: 0.005em; white-space: nowrap; }
.wells-eq__f sub, .wells-eq__f sup { font-size: 0.62em; }
.wells-def { font: 400 15.5px/1.65 var(--font-text); color: var(--ink-2); margin-top: 12px; max-width: 72ch; }
.wells-def i, .wells-note i { color: var(--ink); }
.wells-spec { display: grid; margin-top: 14px; border-top: 1px solid var(--line); }
.wells-spec div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.wells-spec dt { font: 500 11.5px/1.5 var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.wells-spec dd { margin: 0; font: 400 13.5px/1.55 var(--font-mono); color: var(--ink-2); }
.wells-tables { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3vw, 48px) clamp(24px, 3vw, 48px); margin-top: clamp(56px, 6vw, 96px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.wells-tables__i { min-width: 0; }
.wells-tables__i .table-wrap { margin: 14px 0 0; }
.wells-note { font: 400 12.5px/1.6 var(--font-mono); color: var(--ink-3); margin-top: 10px; max-width: 70ch; }
@media (max-width: 980px) {
  .wells-detail__cols, .wells-tables { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wells-spec div { grid-template-columns: 1fr; gap: 4px; }
  .wells-eq { padding: 14px 12px; gap: 10px; }
}

/* ---------- next ---------- */
.wells-next__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.wells-next__lead { margin-top: 24px; }
@media (max-width: 900px) { .wells-next__grid { grid-template-columns: 1fr; } }

/* grid children may shrink below their content (tables and equations scroll or wrap inside) */
:is(.wells-short__grid, .wells-two__grid, .wells-vib__grid, .wells-stretch__grid, .wells-films__grid, .wells-loading__grid, .wells-detail__cols, .wells-next__grid, .wells-head--split) > * { min-width: 0; }
@media (max-width: 600px) { .wells-eq__f { white-space: normal; } }
