/* ==========================================================
   theme-page.css — research theme pages
   Each theme reads as a small drawing set:
   Sheet 1 Context · Sheet 2 Method · Sheet 3 Outcomes ·
   Sheet 4 Open questions · Papers
   Loaded after style.css; uses its tokens (--accent-r, --border …)
   ========================================================== */

:root {
  /* Chart series — validated on the dark plate (#16191c):
     all-pairs CVD ΔE ≥ 11, normal-vision ΔE ≥ 16, contrast ≥ 3:1.
     Meaning is fixed across all four pages:
       base     = as-built / bare frame / reference
       corroded = 50-year frame / open ground storey / no retrofit
       improved = BRB-retrofitted / fully infilled                    */
  --viz-base:      #3a87cc;
  --viz-corroded:  #e8633a;
  --viz-improved:  #1fa483;

  --plate:         #16191c;
  --plate-grid:    #262b30;
  --plate-axis:    #3a4046;

  /* Drawing inks */
  --ink:           #7da7c4;            /* structural linework (steel) */
  --ink-soft:      rgba(125,167,196,.45);
  --ink-faint:     #3a4046;
  --rust:          #e8633a;
  --rust-deep:     #9c4426;
  --salt:          #d9d4c7;
  --brick:         #a5694c;
  --concrete:      #1d2226;

  /* Damage states as an ordered ramp (validated as ordinal on the plate):
     Slight → Complete gets brighter, so the worst state is the most salient */
  --ds-1:          #a34f31;
  --ds-2:          #c95a33;
  --ds-3:          #e8794f;
  --ds-4:          #f3a682;

  --sheet-nav-h:   46px;
}

.tp-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Legend swatches for drawings */
.sw {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.sw-steel    { background: #61798b; border-color: #a9bccb; border-radius: 50%; }
.sw-rust     { background: var(--rust); border-color: var(--rust); }
.sw-rustdeep { background: var(--rust-deep); border-color: var(--rust-deep); }
.sw-salt     { background: radial-gradient(circle, var(--salt) 0 1.2px, transparent 1.6px) 0 0 / 4px 4px, #1d2226; }
.sw-crack    { width: 14px; height: 2px; border: 0; background: #e9e4da; }
.sw-concrete { background: var(--concrete); }
.sw-brick    { background: repeating-linear-gradient(0deg, rgba(165,105,76,.55) 0 1px, transparent 1px 4px), #1d2226; }
.sw-hatch    { background: repeating-linear-gradient(45deg, rgba(232,99,58,.6) 0 1.2px, transparent 1.2px 4px); border-color: rgba(232,99,58,.5); }
.sw-remain   { background: rgba(125,167,196,.55); border-color: rgba(125,167,196,.7); }
.sw-brb      { background: var(--viz-improved); border-color: var(--viz-improved); }

/* ── Back link ─────────────────────────────────────────────── */
.tp-back { padding: 2.25rem 0 0; }
.tp-back-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  transition: color .2s;
}
.tp-back-link:hover { color: var(--accent-r); }
.tp-back-link svg { transition: transform .2s; }
.tp-back-link:hover svg { transform: translateX(-3px); }

/* ── Hero ───────────────────────────────────────────────────── */
.tp-hero { padding: 2.5rem 0 3.5rem; }
.tp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: center;
}
.tp-hero--wide .tp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.tp-hero--wide .tp-hero-text { max-width: 760px; }

.tp-hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-r);
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.1rem;
}
.tp-hero-label::before { content: ''; width: 24px; height: 1px; background: var(--accent-r); }
.tp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.tp-hero h1 em { font-style: italic; color: var(--accent-r); }
.tp-hero-sub {
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 34em;
}
.tp-hero-source {
  margin-top: 1.4rem;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 34em;
}
.tp-hero-source a { color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.tp-hero-source a:hover { color: var(--accent-r); border-color: var(--accent-r); }

/* ── Sheet index (sticky) ───────────────────────────────────── */
.tp-sheets {
  position: sticky;
  top: var(--nav-h);
  z-index: 150;
  background: rgba(16,19,21,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tp-sheets-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--sheet-nav-h);
  display: flex;
  align-items: center;
  gap: .25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tp-sheets-inner::-webkit-scrollbar { display: none; }
.tp-sheets a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.tp-sheets a .n { color: var(--accent-r); margin-right: .45rem; }
.tp-sheets a:hover { color: var(--text-primary); }
.tp-sheets a.is-active { color: var(--text-primary); border-color: var(--border-light); }
.tp-sheets-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent-r);
}

/* ── Sheets (sections) ──────────────────────────────────────── */
.tp-sheet {
  padding: 4.5rem 0 1.5rem;
  scroll-margin-top: calc(var(--nav-h) + var(--sheet-nav-h) + 8px);
}
.tp-sheet + .tp-sheet { border-top: 1px solid var(--border); }
.tp-sheet-head { margin-bottom: 2.25rem; max-width: 800px; }
#papers .tp-sheet-head { margin-bottom: 1.25rem; }
#papers.tp-sheet { padding-bottom: 0; }
.tp-sheet-head .title-block { margin-bottom: 1.1rem; }
.tp-sheet-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.tp-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 64ch;
}
.tp-lead + .tp-lead { margin-top: .9rem; }
.tp-lead strong { color: var(--text-primary); font-weight: 500; }
.tp-lead a { color: var(--text-primary); border-bottom: 1px solid var(--border-light); }
.tp-lead a:hover { color: var(--accent-r); border-color: var(--accent-r); }

.tp-subhead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 3rem 0 1.25rem;
}
.tp-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 70ch;
}
.tp-note a { color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.tp-note a:hover { color: var(--accent-r); border-color: var(--accent-r); }

/* ── Drawing plates (figures) ───────────────────────────────── */
.tp-plate {
  position: relative;
  margin: 0;
  background: var(--plate);
  border: 1px solid var(--border);
  padding: 1.5rem 1.5rem 1.15rem;
}
.tp-plate::before,
.tp-plate::after {
  content: '+';
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--text-muted);
  pointer-events: none;
}
.tp-plate::before { top: -6px; left: -4px; }
.tp-plate::after  { bottom: -6px; right: -4px; }
.tp-plate > svg,
.tp-plate .tp-svg { display: block; width: 100%; height: auto; overflow: visible; }

.tp-cap {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .03em;
  line-height: 1.65;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 80ch;
}
.tp-cap b { font-weight: 400; color: var(--text-secondary); margin-right: .35rem; }

.tp-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.tp-mt { margin-top: 1.25rem; }
.tp-mt-lg { margin-top: 2.5rem; }

/* ── Figure slots: your own thesis figures ──────────────────────
   <figure class="tp-slot tp-slot--paper" data-slot="images/research/….png" hidden>
   stays hidden until the image exists (see theme-page.js and ADDING-FIGURES.md) */
figure[hidden],
.page [hidden] { display: none !important; }
.tp-slot { margin: 1.25rem 0 0; position: relative; }
.tp-slot img { display: block; width: 100%; height: auto; }
.tp-slot--paper {                       /* white-background plots (MATLAB, Excel, Origin) */
  background: #f3f1ec;
  padding: 1rem 1rem .9rem;
  border: 1px solid var(--border-light);
}
.tp-slot--paper .tp-cap { color: #5d5951; }
.tp-slot--paper .tp-cap b { color: #2b2925; }
.tp-slot--dark {                        /* dark or transparent plots, photos */
  background: var(--plate);
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--border);
}
.tp-slot--dark img { border: 1px solid var(--border); }
.tp-slot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tp-slot-pair > .tp-slot { margin-top: 1.25rem; }

/* legacy image figure (kept for older snippets) */
.tp-figure { margin: 0; }
.tp-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.tp-figure--paper { background: #f3f1ec; padding: 1rem; border: 1px solid var(--border-light); }
.tp-figure--paper img { border: 0; }
.tp-figure--paper .tp-cap { color: #5d5951; }

/* ── SVG drawing vocabulary ─────────────────────────────────── */
.s-lbl     { font-family: var(--font-body); font-size: 13px; fill: var(--text-secondary); }
.s-lbl-b   { font-family: var(--font-body); font-size: 13px; fill: var(--text-primary); font-weight: 500; }
.s-lbl-sm  { font-family: var(--font-body); font-size: 11.5px; fill: var(--text-muted); }
.s-mono    { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); letter-spacing: .04em; }
.s-mono-r  { font-family: var(--font-mono); font-size: 10px; fill: var(--accent-r); letter-spacing: .04em; }
.s-title   { font-family: var(--font-display); font-size: 17px; fill: var(--text-primary); }
.s-note    { font-family: var(--font-display); font-style: italic; font-size: 15px; fill: var(--accent-r); }
.s-tick    { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.s-op      { font-family: var(--font-display); font-size: 40px; font-weight: 300; fill: var(--text-muted); }
.s-sym     { font-family: var(--font-display); font-style: italic; font-size: 21px; fill: var(--text-primary); }
.s-sym-sm  { font-family: var(--font-display); font-style: italic; font-size: 15px; fill: var(--text-secondary); }
.s-halo    { paint-order: stroke; stroke: var(--plate); stroke-width: 6px; stroke-linejoin: round; }

.s-ink     { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-ink-2   { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.s-ink-soft{ fill: none; stroke: var(--ink-soft); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.s-faint   { fill: none; stroke: var(--ink-faint); stroke-width: 1; }
.s-red     { fill: none; stroke: var(--accent-r); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.s-grid    { fill: none; stroke: var(--plate-grid); stroke-width: 1; shape-rendering: crispEdges; }
.s-axis    { fill: none; stroke: var(--plate-axis); stroke-width: 1; shape-rendering: crispEdges; }
.s-concrete{ fill: var(--concrete); }
.s-steel   { fill: #61798b; stroke: #a9bccb; stroke-width: 1; }

/* hidden on narrow screens where in-figure text would get too small */
@media (max-width: 640px) { .s-hide-sm { display: none; } }

/* Static figures scale down on phones; enlarge their text so it stays legible */
@media (max-width: 560px) {
  .tp-svg:not(.no-bump) .s-lbl,
  .tp-svg:not(.no-bump) .s-lbl-b  { font-size: 19px; }
  .tp-svg:not(.no-bump) .s-lbl-sm { font-size: 17px; }
  .tp-svg:not(.no-bump) .s-mono,
  .tp-svg:not(.no-bump) .s-mono-r,
  .tp-svg:not(.no-bump) .s-tick   { font-size: 15px; }
  .tp-svg:not(.no-bump) .s-note   { font-size: 21px; }
  .tp-svg:not(.no-bump) .s-title  { font-size: 22px; }
}

/* Wide illustrations scroll sideways on phones instead of shrinking */
.tp-only-sm { display: none; }
.tp-scroll-hint { display: none; }
@media (max-width: 640px) {
  .tp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.85rem; padding: 0 .85rem .35rem; }
  .tp-scroll > svg { min-width: 760px; }
  .tp-scroll .tp-svg .s-lbl, .tp-scroll .tp-svg .s-lbl-b { font-size: 13px; }
  .tp-scroll .tp-svg .s-lbl-sm { font-size: 11.5px; }
  .tp-scroll .tp-svg .s-mono, .tp-scroll .tp-svg .s-mono-r, .tp-scroll .tp-svg .s-tick { font-size: 10px; }
  .tp-scroll .tp-svg .s-note { font-size: 15px; }
  .tp-scroll .tp-svg .s-title { font-size: 17px; }
  .tp-only-sm { display: inline; }
  .tp-scroll-hint {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: .5rem 0 0;
  }
}

/* Multi-panel figures: panels sit side by side, stack on narrow screens */
.tp-tri {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .25rem 1rem;
}
.tp-op {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--text-muted);
  text-align: center;
}
.tp-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: center;
}
.tp-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-split--pits { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); align-items: end; }
.tp-split--doe  { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.tp-keylist { list-style: none; display: grid; gap: .8rem; margin: 0 0 1.5rem; }
.tp-keylist li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tp-keylist svg { width: 52px; height: 22px; overflow: visible; }
.tp-keylist b { font-weight: 500; color: var(--text-primary); }

/* HTML bar figure (remaining vs lost) */
.tp-bars { display: block; }
.tp-bars-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: .2rem 0 .3rem;
}
.tp-bars-h:not(:first-child) { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tp-bar {
  display: grid;
  grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr) 6.5em;
  gap: .4rem 1rem;
  align-items: center;
  padding: .5rem 0;
}
.tp-bar-l { font-size: 13.5px; color: var(--text-secondary); }
.tp-bar-t {
  position: relative;
  height: 14px;
  background: repeating-linear-gradient(45deg, rgba(232,99,58,.6) 0 1.2px, transparent 1.2px 5px);
  box-shadow: inset 0 0 0 1px rgba(232,99,58,.45);
}
.tp-bar-t i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--v, 50%);
  background: #4f6779;
  box-shadow: 2px 0 0 var(--plate);
}
.tp-bar-v {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.tp-bars--gain .tp-bar-t { background: var(--plate-grid); box-shadow: none; }
.tp-bars--gain .tp-bar-t i { background: var(--viz-improved); box-shadow: none; border-radius: 0 4px 4px 0; }

/* Two- or three-bar comparison beside a finding (value at the bar tip) */
.tp-mini { margin-top: 1.6rem; max-width: 30rem; }
.tp-mini-h { font-size: 12.5px; color: var(--text-muted); margin-bottom: .55rem; }
.tp-mini-row {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  padding: .32rem 0;
}
.tp-mini-l { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--text-secondary); }
.tp-mini-t { position: relative; display: flex; align-items: center; gap: .6rem; height: 10px; }
.tp-mini-t i {
  display: block;
  height: 10px;
  width: var(--v, 50%);
  background: var(--c, var(--viz-base));
  border-radius: 0 4px 4px 0;
  flex-shrink: 0;
}
.tp-mini-t b {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: var(--accent-r);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .tp-tri { grid-template-columns: minmax(0, 1fr); }
  .tp-op { font-size: 2rem; }
  .tp-split,
  .tp-split--even,
  .tp-split--pits,
  .tp-split--doe { grid-template-columns: minmax(0, 1fr); }
  .tp-tri > svg { max-width: 440px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .tp-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .tp-bar-t { grid-column: 1 / -1; grid-row: 2; }
  .tp-mini-row { grid-template-columns: 7.2rem minmax(0, 1fr); }
}

/* Stroke-draw (used by hero drawings) */
.tp-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: tpDraw 1.2s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes tpDraw { to { stroke-dashoffset: 0; } }
.tp-pop { opacity: 0; animation: tpPop .45s ease forwards; animation-delay: var(--d, 0s); }
@keyframes tpPop { to { opacity: 1; } }

/* ── Method flow ────────────────────────────────────────────── */
.tp-flow {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  border: 1px solid var(--border);
  background: var(--plate);
}
.tp-flow-step {
  position: relative;
  padding: 1.3rem 1.15rem 1.4rem;
  border-right: 1px solid var(--border);
}
.tp-flow-step:last-child { border-right: 0; }
.tp-flow-step::after {               /* connector chevron on the divider */
  content: '';
  position: absolute;
  right: -6px;
  top: 58px;
  width: 10px;
  height: 10px;
  background: var(--plate);
  border-top: 1px solid var(--accent-r);
  border-right: 1px solid var(--accent-r);
  transform: rotate(45deg);
  z-index: 1;
}
.tp-flow-step:last-child::after { display: none; }
.tp-flow-n {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--accent-r);
}
.tp-flow-ico { display: block; width: 100%; height: 68px; margin: .55rem 0 .85rem; overflow: visible; }
.tp-flow-step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.25;
  margin-bottom: .4rem;
}
.tp-flow-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.62; }

/* ── Gap / issue grid ───────────────────────────────────────── */
.tp-gaps {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.tp-gap { background: var(--bg-primary); padding: 1.35rem 1.25rem 1.45rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tp-gap svg { display: block; width: 72px; height: 56px; margin-bottom: 1rem; overflow: visible; }
.tp-gap h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.3;
  margin-bottom: .4rem;
}
.tp-gap p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }

/* ── From shaking to decisions (PBSD chain) ─────────────────── */
.tp-chain {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-top: 2.1rem;
}
.tp-chain-step {
  position: relative;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}
.tp-chain-step + .tp-chain-step { border-left: 0; }
.tp-chain-step::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50px;
  width: 10px;
  height: 10px;
  background: var(--bg-primary);
  border-top: 1px solid var(--text-muted);
  border-right: 1px solid var(--text-muted);
  transform: rotate(45deg);
  z-index: 1;
}
.tp-chain-step:last-child::after { display: none; }
.tp-chain-step.is-key { background: rgba(232,99,58,.06); box-shadow: inset 0 0 0 1px rgba(232,99,58,.55); }
.tp-chain-step.is-key::after { background: #1b1716; }
.tp-chain-step svg { display: block; width: 100%; height: 64px; margin-bottom: .8rem; overflow: visible; }
.tp-chain-q { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--text-muted); }
.tp-chain-step h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: .25rem 0 .35rem;
}
.tp-chain-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.tp-chain-bracket {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 1.6rem;
  border: 1px solid var(--accent-r);
  border-bottom: 0;
  pointer-events: none;
}
.tp-chain-bracket span {
  position: absolute;
  top: -.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 .6rem;
  background: var(--plate);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--accent-r);
  white-space: nowrap;
}

/* ── Outcomes ───────────────────────────────────────────────── */
.tp-finding {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.tp-finding:first-of-type { border-top: 0; padding-top: .5rem; }
.tp-finding--stack { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.tp-finding--stack .tp-finding-text { max-width: 760px; }
.tp-finding-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: .7rem;
}
.tp-finding-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.tp-finding-text p + p { margin-top: .75rem; }
.tp-kpis { display: flex; flex-wrap: wrap; gap: 1.75rem 2.25rem; margin-top: 1.5rem; }
.tp-kpi-val {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--text-primary);
}
.tp-kpi-lbl {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .45rem;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 17em;
  line-height: 1.45;
}
.tp-key {                       /* small series key beside text */
  display: inline-block;
  width: 14px;
  height: 2px;
  flex-shrink: 0;
  background: currentColor;
}
.tp-key.base     { color: var(--viz-base); }
.tp-key.corroded { color: var(--viz-corroded); }
.tp-key.improved { color: var(--viz-improved); }
.tp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tp-dot.base     { background: var(--viz-base); }
.tp-dot.corroded { background: var(--viz-corroded); }
.tp-dot.improved { background: var(--viz-improved); }

/* ── Interactive chart ──────────────────────────────────────── */
.tp-chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  margin-bottom: 1rem;
}
.tp-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: 12.5px; color: var(--text-secondary); }
.tp-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.tp-chart-wrap { position: relative; }
.tp-chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.tp-chart:focus { outline: none; }
.tp-chart:focus-visible { outline: 1px solid var(--border-light); outline-offset: 4px; }
.tp-tip {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: .55rem .75rem;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 150px;
  opacity: 0;
  transition: opacity .12s;
  z-index: 4;
}
.tp-tip.on { opacity: 1; }
.tp-tip-h { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-bottom: .3rem; }
.tp-tip-row { display: flex; align-items: center; gap: .5rem; line-height: 1.7; }
.tp-tip-row b { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.6em; }

.tp-seg { display: inline-flex; border: 1px solid var(--border-light); }
.tp-seg button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  padding: 7px 12px;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  border-right: 1px solid var(--border-light);
  cursor: pointer;
  transition: color .15s, background .15s;
}
.tp-seg button:last-child { border-right: 0; }
.tp-seg button:hover { color: var(--text-primary); }
.tp-seg button[aria-pressed="true"] { background: var(--dim-r); color: var(--accent-r); }

.tp-table { margin-top: 1rem; }
.tp-table summary {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--text-muted);
  cursor: pointer;
  width: max-content;
}
.tp-table summary:hover { color: var(--text-secondary); }
.tp-table table { border-collapse: collapse; margin-top: .75rem; font-size: 12.5px; }
.tp-table th, .tp-table td {
  text-align: right;
  padding: .35rem .9rem .35rem 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.tp-table th { font-weight: 500; color: var(--text-muted); font-size: 11.5px; }
.tp-table th:first-child, .tp-table td:first-child { text-align: left; }
.tp-table-scroll { overflow-x: auto; }

/* ── Damage-state picker drawn as a dumbbell chart ──────────── */
.tp-fragrow {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}
.tp-dumb { display: grid; gap: .25rem; }
.tp-dumb-h { font-size: 12.5px; color: var(--text-muted); margin-bottom: .35rem; line-height: 1.5; }
.tp-dumb button {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .55rem .6rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.tp-dumb button:hover { background: rgba(255,255,255,.025); }
.tp-dumb button[aria-pressed="true"] { border-color: var(--border-light); background: rgba(255,255,255,.035); color: var(--text-primary); }
.tp-dumb button svg { display: block; width: 100%; height: auto; overflow: visible; }
.tp-dumb-v { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--accent-r); text-align: right; }
.tp-dumb-axis { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 3.2rem; gap: .5rem; padding: 0 .6rem; }
.tp-dumb-axis svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ── Controls: range sliders & small buttons ────────────────── */
.tp-controls { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.tp-range-wrap { flex: 1; min-width: 0; }
.tp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
  --p: 0%;
}
.tp-range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--accent-r) var(--p), var(--border-light) var(--p));
}
.tp-range::-moz-range-track { height: 2px; background: var(--border-light); }
.tp-range::-moz-range-progress { height: 2px; background: var(--accent-r); }
.tp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-r);
}
.tp-range::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-r);
}
.tp-range:focus { outline: none; }
.tp-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(232,99,58,.3); }
.tp-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(232,99,58,.3); }
.tp-range-ticks {
  position: relative;
  height: 30px;
  margin: 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.tp-range-ticks span {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  line-height: 1.35;
}
.tp-range-ticks span::before {
  content: '';
  display: block;
  width: 1px;
  height: 5px;
  margin: 0 auto 3px;
  background: var(--border-light);
}
.tp-range-ticks span.hot { color: var(--text-secondary); }
.tp-range-ticks span.al { transform: translateX(-100%); }
.tp-range-ticks span.al::before { margin: 0 0 3px auto; }
.tp-range-ticks span.ar { transform: none; }
.tp-range-ticks span.ar::before { margin: 0 auto 3px 0; }
.tp-range-ticks span.hot::before { background: var(--accent-r); }

.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-r);
  background: var(--dim-r);
  border: 1px solid rgba(232,99,58,.45);
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.tp-btn:hover { background: var(--accent-r); color: #fff; }
.tp-btn svg { flex-shrink: 0; }
.tp-btn--quiet { color: var(--text-secondary); background: transparent; border-color: var(--border-light); }
.tp-btn--quiet:hover { color: var(--text-primary); background: rgba(255,255,255,.04); }

.tp-field { display: grid; gap: .15rem; }
.tp-field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tp-field label { font-size: 13px; color: var(--text-secondary); }
.tp-field output { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

/* ── Readout panel (deterioration hero) ─────────────────────── */
.tp-readout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .2rem 1.25rem;
  align-items: baseline;
  margin-top: 1rem;
  min-height: 4.6em;
}
.tp-readout-year {
  grid-row: span 2;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--text-primary);
  min-width: 3.4ch;
}
.tp-readout-year small { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: .3rem; }
.tp-readout-stage { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-primary); line-height: 1.2; }
.tp-readout-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* ── Pitting along a bar (deterioration method) ─────────────── */
.tp-pits-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  margin-bottom: .75rem;
}
.tp-pits-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.tp-pits-count b { font-weight: 400; color: var(--text-primary); }

/* ── Collaboration ──────────────────────────────────────────── */
.tp-collab {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.tp-collab-card { background: var(--bg-primary); padding: 1.6rem 1.6rem 1.5rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tp-collab-card svg { display: block; width: 44px; height: 44px; margin-bottom: 1rem; overflow: visible; }
.tp-collab-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: .5rem;
}
.tp-collab-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: .9rem; }
.tp-who { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.tp-who strong { font-weight: 500; color: var(--text-secondary); }

.tp-cta {
  margin-top: 1.5rem;
  padding: 1.5rem 1.6rem;
  border: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}
.tp-cta p { font-family: var(--font-display); font-size: 1.3rem; font-weight: 300; line-height: 1.35; max-width: 30em; }
.tp-cta-btns { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ── Papers ─────────────────────────────────────────────────── */
.tp-pubs { border-top: 1px solid var(--border); }
.tp-pub {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: .4rem 1.5rem;
  padding: 1.2rem .25rem;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.tp-pub-kind {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tp-pub-kind.is-pub    { color: var(--accent-r); }
.tp-pub-kind.is-review { color: #fbbf24; }
.tp-pub-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.tp-pub-venue { font-size: 12.5px; color: var(--text-muted); font-style: italic; margin-top: .15rem; }
.tp-pub .pub-doi { white-space: nowrap; }

/* ── Related themes ─────────────────────────────────────────── */
.tp-related-wrap { padding: 3.5rem 0 5rem; margin-top: 3rem; }
.tp-related-wrap .title-block { margin-bottom: 1.5rem; }
.tp-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.tp-related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  display: block;
  transition: border-color .25s, background .25s, transform .35s var(--ease);
}
.tp-related-card:hover {
  border-color: rgba(232,99,58,.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.tp-related-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--accent-r);
  margin-bottom: .45rem;
}
.tp-related-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.3;
}
.tp-related-arrow {
  font-size: 12px;
  color: var(--accent-r);
  margin-top: .6rem;
  display: block;
  transition: transform .2s;
}
.tp-related-card:hover .tp-related-arrow { transform: translateX(4px); }

/* ── Seismic hero: three frames under the same shaking ──────── */
.tp-shake-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
}
.tp-shake-grid > div { display: flex; flex-direction: column; }
.tp-shake-grid > div > svg { margin-top: auto; }
.tp-shake-h {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: .2rem;
}
.tp-shake-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: .4rem; }
.tp-drift { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; align-items: center; margin-top: .25rem; }
.tp-drift-l { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }
.tp-drift-bar { height: 8px; position: relative; background: var(--plate-grid); }
.tp-drift-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 50%); border-radius: 0 4px 4px 0; }
.tp-drift-v { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--accent-r); min-width: 2.4em; text-align: right; }
.tp-gm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.tp-gm > svg { display: block; width: 100%; height: 46px; overflow: visible; }
.tp-gm-l { font-size: 12px; color: var(--text-muted); grid-column: 2; margin-top: -.6rem; }
.tp-gm > button[hidden] ~ svg,
.tp-gm > button[hidden] ~ .tp-gm-l { grid-column: 1 / -1; }
.tp-gm > button[hidden] ~ .tp-gm-l { margin-top: 0; }

/* ── Earthquake timeline ───────────────────────────────────── */
.tp-quakes { position: relative; height: 178px; margin: .5rem 12px 0; }
.tp-quakes::before {
  content: '';
  position: absolute;
  left: -12px; right: -12px;
  top: 88px;
  height: 1px;
  background: var(--border-light);
}
.tp-quake {
  position: absolute;
  top: 0;
  width: 120px;
  margin-left: -60px;
  height: 178px;
  text-align: center;
}
.tp-quake::before {                      /* marker on the time line */
  content: '';
  position: absolute;
  left: 50%;
  top: 83px;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--accent-r);
  box-shadow: 0 0 0 3px var(--plate);
}
.tp-quake::after {                       /* stem to the label */
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--border-light);
}
.tp-quake.up::after   { top: 52px; height: 30px; }
.tp-quake.down::after { top: 95px; height: 30px; }
.tp-quake .q {
  position: absolute;
  left: 0; right: 0;
  line-height: 1.3;
}
.tp-quake.up .q   { top: 0; }
.tp-quake.down .q { top: 128px; }
.tp-quake .y { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--accent-r); }
.tp-quake .p { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--text-primary); }
.tp-quake .m { display: block; font-size: 12px; color: var(--text-muted); }
.tp-quakes-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin: .35rem 0 0; }

/* ── Damage-state ladder ───────────────────────────────────── */
.tp-ds { border: 1px solid var(--border); background: var(--plate); }
.tp-ds-row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--border);
}
.tp-ds-row:first-child { border-top: 0; }
.tp-ds-row > * { padding: .95rem 1.2rem; }
.tp-ds-row > * + * { border-left: 1px solid var(--border); }
.tp-ds-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.tp-ds-head > * { padding-top: .7rem; padding-bottom: .7rem; }
.tp-ds-name { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--text-primary); }
.tp-ds-name i { width: 12px; height: 12px; flex-shrink: 0; }
.tp-ds-cell { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; align-items: center; }
.tp-ds-cell svg { width: 56px; height: 56px; overflow: visible; }
.tp-ds-cell p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.tp-ds-cell p b { font-weight: 500; color: var(--text-primary); }
.tp-ds-span { grid-column: 2 / -1; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; }
.tp-ds-rule { padding: .95rem 1.2rem; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Small frame thumbnails in a row ───────────────────────── */
.tp-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; }
.tp-thumbs > div { display: flex; flex-direction: column; }
.tp-thumbs > div > svg { margin-top: auto; }
.tp-thumb-h { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: 1.1rem; color: var(--text-primary); }
.tp-thumb-s { font-size: 12.5px; color: var(--text-muted); margin: .15rem 0 .6rem; }
.tp-frame-thumb { display: block; width: 100%; height: auto; }

/* ── Retrofit design map (ψ × α) ───────────────────────────── */
.tp-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.75rem 2.5rem;
  align-items: start;
}
.tp-exp-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .5rem; }
.tp-exp-h strong { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--text-primary); }
.tp-exp-h span { font-size: 12.5px; color: var(--text-muted); }
.tp-map-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; cursor: crosshair; }
.tp-map-svg:focus { outline: none; }
.tp-map-svg:focus-visible { outline: 1px solid var(--border-light); outline-offset: 4px; }
.tp-exp-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; margin-top: .75rem; }
.tp-exp-rows { display: grid; gap: .15rem; }
.tp-exp-rows button {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  width: 100%;
  padding: .3rem .45rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.tp-exp-rows button:hover { background: rgba(255,255,255,.025); }
.tp-exp-rows button[aria-pressed="true"] { border-color: var(--border-light); background: rgba(255,255,255,.035); color: var(--text-primary); }
.tp-exp-rows svg { display: block; width: 100%; height: 34px; overflow: visible; }
.tp-exp-axis { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .5rem; padding: 0 .45rem; }
.tp-exp-axis svg { display: block; width: 100%; height: 30px; overflow: visible; }
.tp-gauge { border-top: 1px solid var(--border); padding-top: 1.1rem; margin-top: 1.25rem; }
.tp-gauge-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 13px; color: var(--text-secondary); margin-bottom: .55rem; }
.tp-gauge-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}
.tp-gauge-tag.is-crit { color: #ec835a; }
.tp-gauge-tag svg { width: 12px; height: 12px; display: none; }
.tp-gauge-tag.is-crit svg { display: block; }
.tp-gauge-bar { position: relative; height: 8px; background: var(--plate-grid); }
.tp-gauge-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 33%; background: #7da7c4; border-radius: 0 4px 4px 0; transition: width .25s var(--ease), background .25s; }
.tp-gauge-bar i.is-crit { background: #ec835a; }
.tp-gauge-bar b { position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--text-muted); }
.tp-gauge-lim { position: relative; height: 16px; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.tp-gauge-lim span { position: absolute; top: 3px; transform: translateX(-50%); white-space: nowrap; }
.tp-gauge-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-top: .4rem; min-height: 4.8em; }
.tp-eq {
  margin-top: 1.1rem;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.tp-eq i { font-family: var(--font-display); font-size: 16px; color: var(--text-primary); }

/* ── ML hero: inputs → networks → fragility ────────────────── */
.tp-pipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 30px minmax(0, 1fr);
  gap: 0 .75rem;
  align-items: stretch;
}
.tp-pipe-cell { display: flex; flex-direction: column; min-width: 0; }
.tp-pipe-cell > svg { margin-top: auto; }
.tp-pipe-h { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; color: var(--text-primary); }
.tp-pipe-s { font-size: 12.5px; color: var(--text-muted); margin: .15rem 0 .6rem; }
.tp-pipe-arrow { display: flex; align-items: center; justify-content: center; color: var(--accent-r); }
.tp-pipe-arrow svg { width: 22px; height: 22px; display: block; }

/* ── ML context: two routes to a fragility curve ───────────── */
.tp-lanes { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.tp-lane {
  background: var(--bg-primary);
  padding: 1.25rem 1.4rem 1.3rem;
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: center;
}
.tp-lane.is-ml { background: #14181a; }
.tp-lane-h { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; color: var(--text-primary); }
.tp-lane-h small { display: block; font-family: var(--font-body); font-size: 12.5px; color: var(--text-muted); margin-top: .3rem; line-height: 1.5; }
.tp-lane-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1.35fr) 22px minmax(0, 1fr);
  gap: 0 .6rem;
  align-items: center;
}
.tp-lane-cell { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; min-width: 0; }
.tp-lane-cell svg { display: block; width: 100%; max-width: 180px; height: auto; overflow: visible; }
.tp-lane-cell span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.tp-lane-arrow { display: flex; justify-content: center; color: var(--text-muted); }
.tp-lane-arrow svg { width: 20px; height: 20px; display: block; }
.tp-lane-cost { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding-top: .9rem; border-top: 1px dashed var(--border); }
.tp-lane-cost i { display: block; height: 6px; background: var(--plate-grid); position: relative; }
.tp-lane-cost i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 100%); background: var(--c, var(--text-muted)); border-radius: 0 3px 3px 0; }
.tp-lane-cost span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── ML method: seven inputs as tiles ──────────────────────── */
.tp-params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.tp-param { background: var(--bg-primary); padding: .95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .3rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tp-param svg { display: block; width: 100%; height: 46px; margin-bottom: .45rem; overflow: visible; }
.tp-param .sym { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1; color: var(--text-primary); }
.tp-param .sym sub { font-size: .62em; }
.tp-param .nm { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.tp-param .rg { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary); margin-top: auto; padding-top: .25rem; }

/* ── ML method: the two networks ───────────────────────────── */
.tp-nets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tp-net { background: var(--plate); border: 1px solid var(--border); padding: 1.3rem 1.35rem 1.2rem; display: flex; flex-direction: column; }
.tp-net-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-r); }
.tp-net-h { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; color: var(--text-primary); margin: .35rem 0 1.1rem; }
.tp-net-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 9.5rem); gap: .75rem; align-items: center; }
.tp-net-in { display: flex; flex-direction: column; gap: .12rem; }
.tp-sym { font-family: var(--font-display); font-style: italic; font-size: 15px; line-height: 1.25; color: var(--text-secondary); white-space: nowrap; }
.tp-sym sub { font-size: .7em; }
.tp-sym.is-im { color: var(--text-primary); display: inline-flex; align-items: center; gap: .3rem; }
.tp-sym.is-im::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-r); }
.tp-net-row > svg { display: block; width: 100%; height: auto; max-height: 130px; overflow: visible; }
.tp-net-out { list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; }
.tp-net-out b { font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; color: var(--text-primary); margin-right: .4rem; }
.tp-net-out .is-one { color: var(--text-primary); }
.tp-net-note { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-top: 1.1rem; }

/* ── ML method: component → global damage states ───────────── */
.tp-map { display: grid; }
.tp-map-row {
  display: grid;
  grid-template-columns: 9rem 4.5rem minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  padding: .75rem 0;
  border-top: 1px solid var(--border);
}
.tp-map-row:first-child { border-top: 0; padding-top: .2rem; }
.tp-map-ds { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--text-primary); }
.tp-map-ds i { width: 12px; height: 12px; flex-shrink: 0; }
.tp-map-op { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; }
.tp-map-op::before { content: '←'; color: var(--accent-r); font-family: var(--font-body); font-size: 14px; }
.tp-map-in { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ── DS consolidation & accuracy chips (ML page) ───────────── */
.tp-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tp-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: 12.5px; color: var(--text-secondary);
  padding: 6px 12px; border: 1px solid var(--border-light); background: var(--plate);
}
.tp-chip b { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-primary); }
.tp-chip.is-hi { border-color: rgba(31,164,131,.55); }
.tp-chip.is-lo { border-color: rgba(232,99,58,.55); }
.tp-acc { margin-top: 1.4rem; display: grid; gap: .55rem; }
.tp-acc-h { font-size: 12.5px; color: var(--text-muted); }
.tp-acc-h + .tp-chips { margin-bottom: .45rem; }

/* ── Tool cards (ML page) ──────────────────────────────────── */
.tp-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tp-tool { background: var(--plate); border: 1px solid var(--border); padding: 1.5rem 1.5rem 1.4rem; display: flex; flex-direction: column; }
.tp-tool > svg { display: block; width: 100%; height: auto; margin-bottom: 1.25rem; }
.tp-tool .tp-slot { margin: 0 0 1.25rem; padding: 0; border: 0; background: none; }
.tp-tool .tp-slot img { border: 1px solid var(--border-light); }
.tp-tool h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.25; margin-bottom: .45rem; }
.tp-tool p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.2rem; }
.tp-tool .btn { margin-top: auto; align-self: flex-start; }
.tp-tool-status { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-top: .85rem; }

/* ── On hold: work not yet published ──────────────────────────
   A revision cloud (drawn by theme-page.js around [data-cloud]),
   a HOLD stamp, ghost figure frames and a blurred placeholder.
   Placeholders carry no real content, so nothing can be read
   from the page source either.                                  */
[data-cloud] { position: relative; }
.tp-cloud { position: absolute; top: -16px; left: -16px; overflow: visible; pointer-events: none; }
.tp-cloud path { fill: none; stroke: var(--rust); stroke-width: 1.5; stroke-linejoin: round; }
.cloud-wait .tp-cloud path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cloud-in .tp-cloud path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease); }

.tp-stamp {
  position: absolute;
  top: -1.4rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .45rem 1rem .5rem;
  background: var(--plate);
  border: 2px solid var(--rust);
  box-shadow: 0 0 0 3px var(--plate), 0 0 0 4px var(--rust);   /* double rule, like a rubber stamp */
  color: var(--rust);
  font-family: var(--font-mono);
  line-height: 1.2;
  white-space: nowrap;
  width: max-content;
  transform: rotate(-4deg);
}
.tp-stamp b { font-size: 1.2rem; font-weight: 700; letter-spacing: .32em; margin-right: -.32em; text-transform: uppercase; }
.tp-stamp span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.tp-stamp--center { top: 50%; right: auto; left: 50%; transform: translate(-50%, -50%) rotate(-4deg); }

/* Ghost frames where the outcome figures will go (seismic page) */
.tp-hold-area { padding: 2.6rem 1.5rem 1.4rem; margin: 1.4rem .75rem .5rem; }
.tp-hold-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.4rem; }
.tp-hold-item svg { display: block; width: 100%; height: auto; margin-bottom: .9rem; overflow: visible; }
.tp-hold-item h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.25; margin-bottom: .3rem; }
.tp-hold-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.tp-hold-item .g-axis { fill: none; stroke: var(--plate-axis); stroke-width: 1.2; }
.tp-hold-item .g-grid { fill: none; stroke: var(--plate-grid); stroke-width: 1; stroke-dasharray: 3 4; }
.tp-hold-item .g-dash { fill: none; stroke: #4b5359; stroke-width: 1.4; stroke-dasharray: 5 4; }
.tp-hold-item .g-txt { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); }

/* Blurred placeholder (ML page) */
.tp-blurbox { margin: 1rem .75rem 0; padding: 1.25rem; }
.tp-blurbox-in { filter: blur(4px); opacity: .8; user-select: none; pointer-events: none; }
.tp-ghost-line { display: block; height: 9px; width: var(--w, 8rem); max-width: 100%; margin: .45rem 0; background: var(--text-muted); }
.tp-ghost-line.is-tag { height: 7px; margin-top: 0; background: var(--rust); }
.tp-ghost-line.is-h { height: 15px; margin: .65rem 0 1.15rem; background: var(--text-secondary); }
.tp-ghost-line.is-note { height: 7px; opacity: .7; }
.tp-ghost-col { display: flex; flex-direction: column; gap: .55rem; min-width: 1.5rem; }
.tp-ghost-col i { display: block; height: 8px; width: var(--w, 1.4rem); background: var(--text-secondary); opacity: .8; }

/* ── Focus & motion ─────────────────────────────────────────── */
.page a:focus-visible,
.page button:focus-visible,
.page summary:focus-visible {
  outline: 2px solid var(--accent-r);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .page .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tp-draw { animation: none !important; stroke-dashoffset: 0 !important; }
  .tp-pop  { animation: none !important; opacity: 1 !important; }
  .tp-cloud path { stroke-dasharray: none !important; transition: none !important; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .tp-gaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-gaps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-fragrow { grid-template-columns: minmax(0, 1fr); }
  .tp-dumb { max-width: 460px; }
}
@media (max-width: 980px) {
  .tp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .tp-finding { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .tp-finding .tp-finding-text { order: -1; }
  .tp-flow { grid-template-columns: minmax(0, 1fr); }
  .tp-flow-step {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 1.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .tp-flow-step:last-child { border-bottom: 0; }
  .tp-flow-step::after { top: auto; bottom: -6px; right: auto; left: 54px; transform: rotate(135deg); }
  .tp-flow-n { grid-column: 1 / -1; }
  .tp-flow-ico { grid-row: span 2; height: 64px; margin: .5rem 0 0; }
  .tp-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
  .tp-chain-step + .tp-chain-step { border-left: 1px solid var(--border); }
  .tp-chain-step:nth-child(n+3) { border-top: 0; }
  .tp-chain-step:nth-child(odd) { border-right: 0; }
  .tp-chain-step::after { display: none; }
  .tp-chain-bracket { display: none; }
  .tp-explorer { grid-template-columns: minmax(0, 1fr); }
  .tp-lane { grid-template-columns: minmax(0, 1fr); }
  .tp-lane-cost { grid-column: 1; }
  .tp-hold-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }
}
@media (max-width: 760px) {
  .tp-gaps--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tp-row-2,
  .tp-figure-pair,
  .tp-slot-pair { grid-template-columns: minmax(0, 1fr); }
  .tp-collab { grid-template-columns: minmax(0, 1fr); }
  .tp-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-pub { grid-template-columns: minmax(0, 1fr); }
  .tp-pub .pub-doi { justify-self: start; margin-top: .4rem; }
  .tp-shake-grid { gap: .75rem 1rem; }
  .tp-shake-h { font-size: 1rem; }
  .tp-shake-sub { display: none; }
  .tp-quakes { height: auto; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
  .tp-quakes::before { display: none; }
  .tp-quake { position: static; width: auto; margin: 0; height: auto; text-align: left; padding-left: 1.2rem; }
  .tp-quake::before { top: .3rem; left: 0; margin-left: 0; }
  .tp-quake::after { display: none; }
  .tp-quake .q { position: static; }
  .tp-quakes-axis { display: none; }
  .tp-ds-row { grid-template-columns: minmax(0, 1fr); }
  .tp-ds-row > * + * { border-left: 0; border-top: 1px dashed var(--border); }
  .tp-ds-head { display: none; }
  .tp-ds-span { grid-column: auto; }
  .tp-tools { grid-template-columns: minmax(0, 1fr); }
  .tp-nets { grid-template-columns: minmax(0, 1fr); }
  .tp-thumbs { gap: .75rem 1rem; }
  .tp-thumb-h { font-size: .95rem; }
  .tp-thumb-s { display: none; }
  .tp-pipe { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .tp-pipe-arrow svg { transform: rotate(90deg); }
  .tp-pipe-cell > svg { max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) {
  .tp-sheets-inner { padding: 0 1rem; }
  .tp-gaps { grid-template-columns: minmax(0, 1fr); }
  .tp-related { grid-template-columns: minmax(0, 1fr); }
  .tp-plate { padding: 1rem .85rem .85rem; }
  .tp-sheet { padding-top: 3.5rem; }
  .tp-kpi-val { font-size: 2.1rem; }
  .tp-cta { padding: 1.25rem; }
  .tp-flow-step { grid-template-columns: 72px minmax(0, 1fr); }
  .tp-flow-step::after { left: 42px; }
  .tp-shake-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem .6rem; }
  .tp-shake-h { font-size: .9rem; gap: .35rem; }
  .tp-drift-v { font-size: 13px; }
  .tp-gm { grid-template-columns: minmax(0, 1fr); }
  .tp-gm-l { grid-column: 1; margin-top: 0; }
  .tp-chain { grid-template-columns: minmax(0, 1fr); }
  .tp-chain-step:nth-child(odd) { border-right: 1px solid var(--border); }
  .tp-chain-step:nth-child(n+2) { border-top: 0; }
  .tp-lane-row { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .tp-lane-arrow svg { transform: rotate(90deg); }
  .tp-lane-cell svg { max-width: 150px; }
  .tp-net-row { grid-template-columns: auto minmax(0, 1fr); }
  .tp-net-out { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: .3rem 1rem; }
  .tp-map-row { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .tp-exp-sliders { grid-template-columns: minmax(0, 1fr); }
  .tp-map-svg .s-tick   { font-size: 16px; }
  .tp-map-svg .s-lbl-sm { font-size: 17px; }
  .tp-map-svg .s-lbl-b  { font-size: 18px; }
  .tp-map-svg .s-note   { font-size: 20px; }
  .tp-exp-rows button { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .tp-exp-axis { grid-template-columns: minmax(0, 1fr); }
  .tp-exp-axis > span { display: none; }
  .tp-slot-pair { grid-template-columns: minmax(0, 1fr); }
  .tp-hold-area { padding: 2.4rem 1rem 1.2rem; margin: 1.4rem .45rem .35rem; }
  .tp-hold-grid { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .tp-hold-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 1rem; align-items: start; }
  .tp-hold-item svg { grid-row: span 2; margin: .2rem 0 0; }
  .tp-hold-item .g-txt { display: none; }
  .tp-hold-item h3 { font-size: 1.05rem; }
  .tp-stamp { right: .75rem; padding: .35rem .75rem .4rem; }
  .tp-stamp b { font-size: 1rem; }
  .tp-blurbox { margin: 1rem .45rem 0; padding: 1rem .75rem; }
  .tp-ghost-col.is-wide { grid-column: 1 / -1; }
}
