/* ═══════════════════════════════════════════════════════
   The Filter — Interactive horizontal exploration
   Scoped under #filterRoot. All classes use .tf- prefix.
   ═══════════════════════════════════════════════════════ */

/* ── Root container ──────────────────────────────────── */
#filterRoot {
  --tf-amber:        var(--ds-amber, #d97706);
  --tf-amber-deep:   #b45309;
  --tf-amber-soft:   rgba(217, 119, 6, 0.08);
  --tf-violet:       #7c3aed;
  --tf-violet-deep:  #6d28d9;
  --tf-violet-soft:  rgba(124, 58, 237, 0.06);
  --tf-pro:          #059669;
  --tf-pro-soft:     rgba(5, 150, 105, 0.10);
  --tf-ink:          #0f172a;
  --tf-text:         #1e293b;
  --tf-faded:        #475569;
  --tf-faded-soft:   #64748b;
  --tf-border:       rgba(15, 23, 42, 0.10);
  --tf-border-strong: rgba(15, 23, 42, 0.18);
  --tf-panel-radius: 22px;
  --tf-station-pad:  clamp(1.25rem, 2.4vw, 1.75rem);

  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100vw;
  color: var(--tf-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  /* Subtle grain that survives the site gradient backdrop */
  background-image: radial-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 4px 4px;
}

#filterRoot * { box-sizing: border-box; }

/* ── Screen-reader only utility (matches site convention) ── */
.tf-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Masthead ────────────────────────────────────────── */
.tf-masthead {
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 0.75rem;
}
.tf-masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.tf-masthead-rule {
  border-top: 2px solid var(--tf-ink);
  padding-top: 0.85rem;
}
.tf-masthead-title {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--tf-ink);
  margin: 0;
}
.tf-masthead-sub {
  font-style: italic;
  color: var(--tf-faded);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

/* ── Mono / micro labels ─────────────────────────────── */
.tf-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tf-micro {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.3;
  color: var(--tf-faded);
}
.tf-micro--ink {
  color: var(--tf-ink);
}
.tf-chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding: 0.28rem 0.5rem;
  display: inline-flex;
  align-items: center;
  background: var(--tf-ink);
  color: #fff;
  border-radius: 4px;
}
.tf-chip--outline {
  background: transparent;
  color: var(--tf-faded);
  border: 1px solid var(--tf-border-strong);
}
.tf-chip--phase-a {
  background: transparent;
  color: var(--tf-amber-deep);
  border: 1px solid var(--tf-amber);
}
.tf-chip--phase-b {
  background: transparent;
  color: var(--tf-violet-deep);
  border: 1px solid var(--tf-violet);
}

/* ── Progress strip ──────────────────────────────────── */
.tf-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem clamp(0.75rem, 2vw, 1.5rem);
  border-top: 1px solid var(--tf-border);
  border-bottom: 1px solid var(--tf-border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(var(--glass-blur-sm, 12px));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm, 12px));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 5;
}
.tf-strip::-webkit-scrollbar { display: none; }
.tf-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid transparent;
  color: var(--tf-text);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  min-height: 32px;
  transition: background-color 160ms, border-color 160ms;
}
.tf-strip-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}
.tf-strip-btn--active {
  background: var(--tf-ink);
  color: #fff;
  border-color: var(--tf-ink);
}
.tf-strip-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tf-faded-soft);
}
.tf-strip-dot--a { background: var(--tf-amber); }
.tf-strip-dot--b { background: var(--tf-violet); }
.tf-strip-num {
  font-weight: 600;
  font-size: 10px;
}
.tf-strip-name {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
@media (max-width: 767px) {
  .tf-strip-name { display: none; }
}

/* ── Scroller ────────────────────────────────────────── */
.tf-scroller-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 640px;
}
.tf-scroller {
  min-width: 0;
  max-width: 100%;
}
.tf-scroller {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.45) rgba(15, 23, 42, 0.06);
}
/* WebKit / Chromium */
.tf-scroller::-webkit-scrollbar {
  height: 10px;
  background: rgba(15, 23, 42, 0.04);
}
.tf-scroller::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  margin: 0 4px;
}
.tf-scroller::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.tf-scroller::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.55);
  background-clip: padding-box;
  border: 2px solid transparent;
}
.tf-spacer {
  flex: none;
  width: 4vw;
  min-width: 4vw;
}

/* ── Station shell ───────────────────────────────────── */
.tf-station {
  flex: none;
  width: 92vw;
  min-width: 92vw;
  max-width: 1100px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  padding: 1rem clamp(0.5rem, 1.5vw, 1.2rem);
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .tf-station { width: 85vw; min-width: 85vw; }
}
@media (min-width: 1100px) {
  .tf-station { width: 80vw; min-width: 80vw; }
}
.tf-station--wide { max-width: 1400px; }
@media (min-width: 1100px) {
  .tf-station--wide { width: 92vw; min-width: 92vw; }
}
.tf-station-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--glass-tint, rgba(255, 255, 255, 0.60));
  backdrop-filter: blur(var(--glass-blur, 20px)) saturate(var(--glass-saturate, 180%));
  -webkit-backdrop-filter: blur(var(--glass-blur, 20px)) saturate(var(--glass-saturate, 180%));
  border: 1px solid var(--glass-border, rgba(200, 210, 230, 0.30));
  border-radius: var(--tf-panel-radius);
  box-shadow: var(--glass-shadow,
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 2px 16px -4px rgba(15, 23, 42, 0.05));
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  overflow: hidden;
}
.tf-station-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.tf-station-head-time {
  margin-left: auto;
}
.tf-station-title {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--tf-ink);
  margin: 0 0 0.35rem;
}
.tf-station-sub {
  font-style: italic;
  color: var(--tf-faded);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.45;
  margin: 0 0 1.1rem;
  max-width: 720px;
}
.tf-station-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* ── Layout primitives (.tf- utility set) ────────────── */
.tf-grid { display: grid; }
.tf-grid-1 { grid-template-columns: 1fr; }
.tf-grid-2 { grid-template-columns: 1fr; }
.tf-grid-3 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .tf-grid-2 { grid-template-columns: 1fr 1fr; }
  .tf-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .tf-grid-2-3 { grid-template-columns: 1fr auto 1fr; }
}
.tf-flex   { display: flex; }
.tf-flex-col { flex-direction: column; }
.tf-items-center { align-items: center; }
.tf-items-baseline { align-items: baseline; }
.tf-justify-between { justify-content: space-between; }
.tf-justify-center  { justify-content: center; }
.tf-flex-wrap       { flex-wrap: wrap; }
.tf-gap-1 { gap: 0.25rem; }
.tf-gap-2 { gap: 0.5rem; }
.tf-gap-3 { gap: 0.75rem; }
.tf-gap-4 { gap: 1rem; }
.tf-gap-5 { gap: 1.25rem; }
.tf-gap-6 { gap: 1.5rem; }
.tf-mt-1 { margin-top: 0.25rem; }
.tf-mt-2 { margin-top: 0.5rem; }
.tf-mt-3 { margin-top: 0.75rem; }
.tf-mt-4 { margin-top: 1rem; }
.tf-mt-5 { margin-top: 1.25rem; }
.tf-mt-6 { margin-top: 1.5rem; }
.tf-mb-1 { margin-bottom: 0.25rem; }
.tf-mb-2 { margin-bottom: 0.5rem; }
.tf-mb-3 { margin-bottom: 0.75rem; }
.tf-mb-4 { margin-bottom: 1rem; }
.tf-mb-5 { margin-bottom: 1.25rem; }
.tf-text-center { text-align: center; }
.tf-w-full { width: 100%; }
.tf-max-w-2xl { max-width: 42rem; margin-left: auto; margin-right: auto; }

/* ── Inline cards (sub-panels inside a station) ──────── */
.tf-card {
  border: 1px solid var(--tf-border-strong);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.55);
}
.tf-card--phase-a {
  border-color: rgba(217, 119, 6, 0.45);
  background: var(--tf-amber-soft);
}
.tf-card--phase-b {
  border-color: rgba(124, 58, 237, 0.40);
  background: var(--tf-violet-soft);
}
.tf-card--pro {
  border-color: rgba(5, 150, 105, 0.45);
  background: var(--tf-pro-soft);
}
.tf-card--ink {
  background: var(--tf-ink);
  color: #fff;
  border-color: var(--tf-ink);
}
.tf-card--dashed {
  border: 1.5px dashed var(--tf-faded);
  background: transparent;
}

/* ── Annotation block (italic callout with left bar) ── */
.tf-callout {
  border-left: 3px solid var(--tf-amber-deep);
  background: var(--tf-amber-soft);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  border-radius: 0 8px 8px 0;
}
.tf-callout--pro {
  border-left-color: var(--tf-pro);
  background: var(--tf-pro-soft);
}
.tf-callout p {
  margin: 0;
  font-style: italic;
  line-height: 1.5;
  color: var(--tf-text);
  font-size: clamp(0.92rem, 1.05vw, 1rem);
}

.tf-body { line-height: 1.5; }
.tf-italic { font-style: italic; }
.tf-strong { font-weight: 600; }

/* ── Pill terminator (S2 policy, S7 output) ─────────── */
.tf-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1.4rem;
  background: var(--tf-ink);
  color: #fff;
  border-radius: 999px;
  text-align: center;
  max-width: 460px;
}
.tf-pill .tf-micro { color: rgba(255, 255, 255, 0.7); }

/* ── Pro/contra columns (S2) ─────────────────────────── */
.tf-arg-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tf-arg-item {
  font-style: italic;
  padding: 0.45rem 0.75rem;
  border-left: 2px solid var(--tf-ink);
  background: rgba(15, 23, 42, 0.04);
  width: 100%;
  line-height: 1.4;
  font-size: 0.95rem;
}
.tf-arg-item + .tf-arg-item { margin-top: 0.4rem; }

/* ── Weight bar (S4) ─────────────────────────────────── */
.tf-weight-row {
  display: grid;
  grid-template-columns: 7fr 5fr 1fr;
  gap: 0.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .tf-weight-row { grid-template-columns: 5fr 7fr 1fr; }
}
.tf-weight-label {
  font-size: 0.92rem;
  line-height: 1.3;
}
.tf-weight-track {
  height: 12px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.tf-weight-fill {
  height: 100%;
  transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 220ms;
  border-radius: 4px;
}
.tf-weight-fill--cue { background: var(--tf-amber-deep); opacity: 0.9; }
.tf-weight-fill--arg { background: var(--tf-ink); }
.tf-weight-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-align: right;
  color: var(--tf-faded);
}
.tf-weight-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tf-weight-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ── S5 cognitive-load toggle ─────────────────────────── */
.tf-loadgroup {
  display: inline-flex;
  border: 1px solid var(--tf-border-strong);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
}
.tf-loadgroup-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: none;
  color: var(--tf-faded);
  cursor: pointer;
  border-radius: 999px;
  min-height: 32px;
  transition: background-color 200ms, color 200ms;
}
.tf-loadgroup-btn[aria-checked="true"] {
  background: var(--tf-ink);
  color: #fff;
}

/* System rows (S5) */
.tf-systemrow {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
.tf-systemrow:last-of-type { border-bottom: none; }
@media (min-width: 768px) {
  .tf-systemrow { grid-template-columns: 4fr 8fr; gap: 0.75rem; }
}
.tf-systemrow-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  gap: 0.5rem;
}
.tf-dotmeter { display: inline-flex; gap: 2px; }
.tf-dotmeter-cell {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--tf-ink);
  background: transparent;
  transition: background-color 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tf-dotmeter-cell--filled { background: var(--tf-ink); }
.tf-systemrow--off {
  position: relative;
}
.tf-systemrow--off > * { opacity: 0.35; transition: opacity 220ms; }
.tf-systemrow-off-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1 !important;
}
.tf-systemrow-off-overlay span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--tf-faded);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--tf-border-strong);
  border-radius: 4px;
}

/* ── S3 campaign-intensity slider ────────────────────── */
.tf-slider-wrap {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--tf-amber-deep);
  border-radius: 12px;
  background: rgba(217, 119, 6, 0.04);
}
.tf-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.tf-slider-row > input[type="range"] {
  flex: 1 1 auto;
}
input[type="range"].tf-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(15, 23, 42, 0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"].tf-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tf-amber);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}
input[type="range"].tf-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tf-amber);
  border: 2px solid #fff;
  cursor: pointer;
}
.tf-slider-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--tf-amber-deep);
  min-width: 56px;
  text-align: right;
}

/* ── S6 voter dots SVG ───────────────────────────────── */
.tf-svg { width: 100%; height: auto; display: block; }

/* ── S8 memory-curve ─────────────────────────────────── */
.tf-curve {
  position: relative;
  width: 100%;
  height: 130px;
  border-bottom: 1px solid var(--tf-faded);
  margin-bottom: 1.25rem;
}
.tf-curve-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tf-curve-tick-bar { width: 1px; height: 8px; background: var(--tf-faded); }
.tf-curve-tick-label {
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--tf-faded);
}
.tf-curve-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tf-curve-caption {
  position: absolute;
  top: 4px;
  left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--tf-violet-deep);
}
.tf-time-card {
  border: 1px solid var(--tf-violet-deep);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  transition: box-shadow 280ms;
}
.tf-time-card--lit {
  box-shadow: 0 0 0 2px var(--tf-amber);
}

/* ── S9 evaluation-cue card ──────────────────────────── */
.tf-evcard {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border: 1px solid var(--tf-violet-deep);
  background: var(--tf-violet-soft);
  border-radius: 12px;
}
.tf-evcard-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.tf-evcard-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--tf-violet-deep);
}
.tf-evcard-full {
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--tf-faded);
  margin-bottom: 0.45rem;
}
.tf-evcard-body {
  font-size: 0.95rem;
  line-height: 1.45;
  flex: 1 1 auto;
}
.tf-citation-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tf-violet-deep);
  background: transparent;
  border: none;
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  padding: 0.55rem 0 0.25rem;
  margin-top: 0.55rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 32px;
}
.tf-citation-toggle:hover { color: var(--tf-ink); }
.tf-citation-toggle::before {
  content: '+';
  display: inline-block;
  font-size: 14px;
  width: 12px;
  text-align: center;
  transition: transform 200ms;
}
.tf-citation-toggle[aria-expanded="true"]::before {
  content: '−';
  transform: rotate(0deg);
}
.tf-citation-panel {
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}
.tf-citation-panel-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  color: var(--tf-text);
}
.tf-doi-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tf-violet-deep);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  min-height: 32px;
  align-self: flex-start;
}
.tf-doi-link .material-icons { font-size: 14px; }

/* ── S11 inverted loop panel ─────────────────────────── */
.tf-loop-panel {
  background: var(--tf-ink);
  color: #e2e8f0;
  border-radius: 18px;
  padding: 1.5rem clamp(1rem, 2.5vw, 1.75rem);
  margin-bottom: 1.25rem;
}
.tf-loop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 768px) {
  .tf-loop-grid { grid-template-columns: repeat(4, 1fr); }
}
.tf-loop-step {
  position: relative;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(226, 232, 240, 0.4);
  background: rgba(226, 232, 240, 0.05);
  border-radius: 10px;
}
.tf-loop-step .tf-micro { color: rgba(226, 232, 240, 0.6); }
.tf-loop-arrow {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: none;
  pointer-events: none;
  z-index: 1;
}
@media (min-width: 768px) {
  .tf-loop-grid > .tf-loop-step:not(:last-child) > .tf-loop-arrow { display: block; }
}
.tf-loop-arrow-path {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tf-loop-arrow-path--draw {
  stroke-dasharray: var(--tf-len, 40);
  stroke-dashoffset: var(--tf-len, 40);
  transition: stroke-dashoffset 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tf-loop-arrow-path--drawn {
  stroke-dashoffset: 0;
}
.tf-loop-back {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(226, 232, 240, 0.7);
}
.tf-loop-bottom {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.2);
}
.tf-loop-bottom p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
  color: #e2e8f0;
}

/* ── δ comparison (S7) ───────────────────────────────── */
.tf-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  color: var(--tf-amber);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

/* ── Bullet list with left rule ──────────────────────── */
.tf-list { display: flex; flex-direction: column; gap: 0.35rem; }
.tf-list-item {
  font-size: 0.95rem;
  line-height: 1.4;
  padding-left: 0.6rem;
  border-left: 1px solid var(--tf-border-strong);
}
.tf-list-item--dashed {
  border-left: 1px dashed var(--tf-faded);
  color: var(--tf-faded);
}
.tf-list-item--phase-a { border-left-color: var(--tf-amber-deep); }
.tf-list-item--phase-b { border-left-color: var(--tf-violet-deep); }

/* ── Goodhart annotation strip (S3) ──────────────────── */
.tf-goodhart {
  border-top: 1px dashed var(--tf-amber-deep);
  border-bottom: 1px dashed var(--tf-amber-deep);
  background: rgba(217, 119, 6, 0.06);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
}

/* ── Chevron buttons ─────────────────────────────────── */
.tf-chev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--tf-border-strong);
  color: var(--tf-ink);
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
  transition: background-color 160ms, transform 160ms;
}
@media (min-width: 768px) {
  .tf-chev { display: inline-flex; }
}
.tf-chev:hover { background: rgba(255, 255, 255, 0.95); }
.tf-chev:active { transform: translateY(-50%) scale(0.96); }
.tf-chev[disabled] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.65);
  color: var(--tf-faded);
}
.tf-chev--prev { left: 12px; }
.tf-chev--next { right: 12px; }
.tf-chev svg { width: 20px; height: 20px; }

/* ── CTA chip (S12 close) ────────────────────────────── */
.tf-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--tf-ink);
  border: 1px solid var(--tf-ink);
  text-decoration: none;
  border-radius: 999px;
  min-height: 44px;
  transition: background-color 160ms;
}
.tf-cta:hover { background: var(--tf-amber-deep); border-color: var(--tf-amber-deep); }
.tf-cta .material-icons { font-size: 16px; }

/* ── Footer of the figure ────────────────────────────── */
.tf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--tf-border);
  flex-wrap: wrap;
}

/* ── Focus visible ───────────────────────────────────── */
#filterRoot button:focus-visible,
#filterRoot a:focus-visible,
#filterRoot [role="radio"]:focus-visible,
#filterRoot input[type="range"]:focus-visible {
  outline: 2px solid var(--tf-amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Stagger reveal animation ────────────────────────── */
@keyframes tfFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tf-stagger > * {
  animation: tfFadeIn 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.tf-stagger > *:nth-child(1) { animation-delay: 0ms; }
.tf-stagger > *:nth-child(2) { animation-delay: 60ms; }
.tf-stagger > *:nth-child(3) { animation-delay: 120ms; }
.tf-stagger > *:nth-child(4) { animation-delay: 180ms; }
.tf-stagger > *:nth-child(5) { animation-delay: 240ms; }
.tf-stagger > *:nth-child(6) { animation-delay: 300ms; }

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #filterRoot * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tf-scroller { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════
   v7 · Calibration asides (chess, embedded inside stations)
   ═══════════════════════════════════════════════════════ */

.tf-aside {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(168, 152, 118, 0.55);
  border-left-width: 3px;
  border-left-color: #A89876;
  background: rgba(168, 152, 118, 0.08);
  border-radius: 0 10px 10px 0;
}
.tf-aside-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8a7a52;
  margin-bottom: 0.45rem;
}
.tf-aside-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tf-text);
}
.tf-aside-body em { font-style: italic; }
.tf-aside-body + .tf-aside-body { margin-top: 0.55rem; }
.tf-aside-cite {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8a7a52;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(168, 152, 118, 0.3);
  line-height: 1.4;
}
.tf-aside-note {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
  color: var(--tf-faded);
}
.tf-aside-note em { font-style: italic; }
