/* ==========================================================================
   TAKTFABRIK — Sections & Infographics
   Depends on system.css
   --------------------------------------------------------------------------
   1. Hero
   2. Takt bars (signature motif)
   3. Orchestra diagram (agent orchestration)
   4. Flow pipeline
   5. Before / after comparison
   6. Process timeline
   7. Use-case grid (scattered)
   8. Compliance / governance
   9. Assessment quiz
   10. Contact & map
   11. Page hero (subpages)
   12. Misc: marquee strip, TOC, prose
   ========================================================================== */

/* ==========================================================================
   1. HERO
   ========================================================================== */

.tf-hero {
  position: relative;
  min-height: min(104svh, 1000px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--tf-header-h) + var(--sp-10));
  padding-bottom: var(--sp-8);
  overflow: hidden;
  background: var(--tf-void);
  isolation: isolate;
}

/* Backdrop — deliberately quiet. A fine dot raster carries the "Fabrik"
   grid idea, three slow pastel bubbles keep it from looking flat. Nothing
   here competes with the headline or the diagram. */
.tf-hero__raster {
  position: absolute; inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: radial-gradient(rgba(var(--tf-accent-rgb), .22) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 15%, transparent 78%);
}

.tf-hero__bubble {
  position: absolute;
  border-radius: 50%;
  z-index: -4;
  pointer-events: none;
  filter: blur(60px);
  will-change: transform;
}
.tf-hero__bubble--a {
  width: 46vw; max-width: 620px; aspect-ratio: 1;
  top: -14vw; left: -8vw;
  background: radial-gradient(circle, rgba(169, 203, 236, .62), transparent 68%);
  animation: tf-bubble-drift 26s var(--ease-inout) infinite;
}
.tf-hero__bubble--b {
  width: 38vw; max-width: 520px; aspect-ratio: 1;
  bottom: -12vw; right: 4vw;
  background: radial-gradient(circle, rgba(224, 176, 168, .40), transparent 66%);
  animation: tf-bubble-drift 34s var(--ease-inout) infinite reverse;
}
.tf-hero__bubble--c {
  width: 30vw; max-width: 400px; aspect-ratio: 1;
  top: 26%; right: -6vw;
  background: radial-gradient(circle, rgba(126, 174, 224, .34), transparent 70%);
  animation: tf-bubble-drift 44s var(--ease-inout) infinite;
  animation-delay: -12s;
}
@keyframes tf-bubble-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4%, -5%) scale(1.08); }
  66%      { transform: translate(-3%, 4%) scale(.95); }
}

.tf-hero__inner {
  position: relative;
  width: 100%; max-width: 1600px; margin-inline: auto;
  padding-inline: var(--tf-gutter);
}

/* Text left, diagram right — stacked below 992px. This lives here rather than
   as an inline style so the breakpoint can actually reach it. */
.tf-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 992px) {
  .tf-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
}

.tf-hero__headline {
  font-size: var(--fs-display);
  line-height: 0.96;
  letter-spacing: var(--ls-display);
  font-weight: 600;
  max-width: 17ch;
  margin: 0 0 var(--sp-6);
}

.tf-hero__foot {
  margin-top: clamp(2.25rem, 5vw, 4rem);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--tf-line);
}

.tf-hero__metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.tf-hero__metric .tf-stat__label { max-width: 22ch; }
.tf-hero__metric .tf-stat__value { font-size: clamp(1.75rem, 2.8vw, 2.5rem); }

.tf-hero__scroll {
  position: absolute;
  right: var(--tf-gutter); bottom: var(--sp-8);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--tf-muted);
  writing-mode: vertical-rl;
}
.tf-hero__scroll::after {
  content: ""; width: 1px; height: 54px;
  background: linear-gradient(180deg, var(--tf-accent), transparent);
  animation: tf-scroll-hint 2.2s var(--ease-inout) infinite;
}
@keyframes tf-scroll-hint {
  0%, 100% { transform: scaleY(.35); opacity: .4; transform-origin: top; }
  50%      { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

@media (max-width: 992px) {
  .tf-hero {
    min-height: auto;
    /* 148px of dead space above the badge on a phone — the desktop breathing
       room does not translate. Header clearance plus a little is enough. */
    padding-top: calc(var(--tf-header-h) + var(--sp-7));
    padding-bottom: var(--sp-9);
  }
  .tf-hero__foot { grid-template-columns: minmax(0,1fr); }
  .tf-hero__scroll { display: none; }
}
@media (max-width: 560px) {
  .tf-hero__metrics { grid-template-columns: minmax(0,1fr); gap: var(--sp-6); }
  /* Ragged button widths read as sloppy once they stack — make them match. */
  .tf-hero .tf-row > .tf-btn { flex: 1 1 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   1b. NODE GRAPH — the orchestrator canvas
   The <svg> has NO viewBox and sits `inset: 0`, so 1 SVG unit = 1 CSS px.
   Nodes are absolutely positioned in the same px space → connectors land
   exactly on the ports. The whole board scales via a CSS transform.
   -------------------------------------------------------------------------- */

.tf-graph {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 520;   /* fallback until JS sets an explicit height */
  border: 1px solid var(--tf-line);
  border-radius: var(--r-lg);
  background: linear-gradient(168deg, var(--tf-surface-2), var(--tf-canvas));
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
/* Narrow screens: the board holds its minimum readable scale and the box
   scrolls sideways instead. The right-edge fade signals there is more. */
.tf-graph.is-scrollable {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tf-graph.is-scrollable::after {
  content: "";
  position: sticky;
  float: right;
  top: 0; right: 0;
  width: 44px; height: 100%;
  background: linear-gradient(270deg, var(--tf-canvas), transparent);
  pointer-events: none;
}
.tf-graph__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--tf-line) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .55;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 82%);
}
/* Fixed 720×520 design space, scaled to fit whatever width it gets */
.tf-graph__board {
  position: absolute;
  top: 0; left: 0;
  width: 720px; height: 520px;
  transform-origin: 0 0;
}
.tf-graph__wires { position: absolute; inset: 0; width: 720px; height: 520px; overflow: visible; }
.tf-graph__wires path { fill: none; stroke: rgba(var(--tf-accent-rgb), .3); stroke-width: 1.25; }
.tf-graph__wires circle { fill: rgba(var(--tf-accent-rgb), .45); }
.tf-graph__wires circle.is-src { fill: var(--tf-accent); }

/* The travelling data pulse: a short lit segment inside a long period */
.tf-wire-pulse {
  stroke: var(--tf-accent) !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round;
  stroke-dasharray: 34 460;
  filter: drop-shadow(0 1px 3px rgba(var(--tf-accent-rgb), .55));
  animation: tf-wire-run 3.6s linear infinite;
}
@keyframes tf-wire-run { from { stroke-dashoffset: 494; } to { stroke-dashoffset: 0; } }

.tf-gnode {
  position: absolute;
  width: 214px;
  padding: 13px 14px 14px;
  background: #FFFFFF;
  border: 1px solid var(--tf-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px -6px rgba(var(--tf-ink-rgb), .18);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.tf-gnode:hover {
  border-color: rgba(var(--tf-accent-rgb), .55);
  box-shadow: 0 8px 26px -8px rgba(var(--tf-accent-rgb), .35);
}
/* Fieldset-legend style label punched into the top border */
.tf-gnode__tag {
  position: absolute; top: -8px; left: 13px;
  padding: 0 6px;
  background: #FFFFFF;
  font-family: var(--tf-font-mono); font-size: 9.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--tf-muted);
  line-height: 1;
}
.tf-gnode__title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.tf-gnode__meta  { margin-top: 5px; font-size: 11px; color: var(--tf-muted); line-height: 1.4; }
.tf-gnode__foot  {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px dashed var(--tf-line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--tf-font-mono); font-size: 9.5px;
  letter-spacing: .06em; color: var(--tf-text-2);
}
.tf-gnode__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--tf-accent); flex: none;
  animation: tf-ping 2.2s var(--ease-out) infinite;
}
/* The orchestrator reads as the one filled node — solid marine, white type. */
.tf-gnode--lead {
  border-color: var(--tf-accent);
  background: var(--tf-accent);
  box-shadow: 0 14px 34px -12px rgba(var(--tf-accent-rgb), .55);
}
.tf-gnode--lead .tf-gnode__tag  { color: var(--tf-on-accent); background: var(--tf-accent); }
.tf-gnode--lead .tf-gnode__title,
.tf-gnode--lead .tf-gnode__foot { color: var(--tf-on-accent); }
.tf-gnode--lead .tf-gnode__meta { color: rgba(255,255,255,.78); }
.tf-gnode--lead .tf-gnode__foot { border-top-color: rgba(255,255,255,.28); }
.tf-gnode--lead .tf-gnode__dot  { background: #FFFFFF; }
.tf-gnode--human { border-style: dashed; border-color: rgba(var(--tf-ink-rgb), .28); background: transparent; }
.tf-gnode--human .tf-gnode__dot { background: var(--tf-text-2); animation: none; }

.tf-graph__chrome {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 38px; padding-inline: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  border-top: 1px solid var(--tf-line);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  font-family: var(--tf-font-mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--tf-muted);
}
.tf-graph__chrome b { color: var(--tf-accent); font-weight: 500; }

/* --------------------------------------------------------------------------
   1c. BEAM BUTTON — rotating conic border (@property, progressive)
   -------------------------------------------------------------------------- */

@property --tf-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.tf-beam { position: relative; isolation: isolate; }
@supports (background: conic-gradient(from var(--tf-angle), red, blue)) {
  .tf-beam::after {
    content: "";
    position: absolute; inset: -1px; z-index: -1;
    border-radius: inherit;
    background: conic-gradient(from var(--tf-angle), transparent 55%, var(--tf-accent) 78%, transparent 92%);
    animation: tf-beam-spin 4.5s linear infinite;
    opacity: .85;
  }
}
@keyframes tf-beam-spin { to { --tf-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .tf-beam::after { animation: none; } }

/* --------------------------------------------------------------------------
   1d. Native scroll-driven section lift (progressive enhancement)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tf-lift {
      animation: tf-lift-in both cubic-bezier(.16, 1, .3, 1);
      animation-timeline: view();
      animation-range: entry 4% cover 30%;
    }
    @keyframes tf-lift-in {
      from { opacity: .25; transform: translateY(30px) scale(.99); filter: blur(6px); }
      to   { opacity: 1;   transform: none;                        filter: blur(0); }
    }
  }
}

/* ==========================================================================
   2. TAKT BARS — the signature motif
   ========================================================================== */

.tf-takt {
  display: inline-flex; align-items: flex-end; gap: 3px;
  height: 18px;
}
.tf-takt i {
  display: block; width: 3px; border-radius: 2px;
  background: var(--tf-accent);
  animation: tf-takt-beat 1.5s var(--ease-inout) infinite;
}
.tf-takt i:nth-child(1) { height: 45%; animation-delay: 0ms; }
.tf-takt i:nth-child(2) { height: 100%; animation-delay: 130ms; }
.tf-takt i:nth-child(3) { height: 68%; animation-delay: 260ms; }
.tf-takt i:nth-child(4) { height: 32%; animation-delay: 390ms; }
@keyframes tf-takt-beat {
  0%, 100% { transform: scaleY(.55); opacity: .55; }
  50%      { transform: scaleY(1); opacity: 1; }
}
.tf-takt i { transform-origin: 50% 100%; }

/* ==========================================================================
   3. ORCHESTRA DIAGRAM — how agents are orchestrated
   ========================================================================== */

.tf-orchestra {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  padding: clamp(1.5rem, 3vw, 3rem);
  border: 1px solid var(--tf-line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(900px circle at 50% -10%, var(--tf-accent-veil), transparent 60%),
    var(--tf-surface);
  overflow: hidden;
}
.tf-orchestra::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--tf-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--tf-line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

.tf-orchestra__row {
  position: relative; z-index: 1;
  display: grid; gap: var(--sp-4);
  justify-items: center;
}
.tf-orchestra__row--agents { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tf-orchestra__row--io     { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Nodes */
.tf-node {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-4);
  background: var(--tf-obsidian);
  border: 1px solid var(--tf-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.tf-node:hover { border-color: rgba(var(--tf-accent-rgb), .4); transform: translateY(-2px); }
.tf-node__kind {
  font-family: var(--tf-font-mono); font-size: 0.6875rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--tf-muted);
}
.tf-node__name { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.015em; }
.tf-node__task { font-size: var(--fs-xs); color: var(--tf-muted); line-height: 1.5; }

/* The one filled block in the diagram — everything else is outlined, so the
   orchestrator reads as the centre without needing a label to say so. */
.tf-node--orchestrator {
  max-width: 460px; margin-inline: auto;
  border-color: var(--tf-accent);
  background: var(--tf-accent);
  box-shadow: 0 18px 44px -16px rgba(var(--tf-accent-rgb), .5);
  align-items: flex-start;
}
.tf-node--orchestrator .tf-node__kind { color: rgba(255,255,255,.72); }
.tf-node--orchestrator .tf-node__name { font-size: var(--fs-h4); color: var(--tf-on-accent); }
.tf-node--orchestrator .tf-node__task { color: rgba(255,255,255,.78); }
.tf-node--orchestrator .tf-node__badge { background: #FFFFFF; color: var(--tf-accent); }

.tf-node--human {
  border-style: dashed;
  border-color: rgba(var(--tf-ink-rgb), .28);
  background: transparent;
}
.tf-node--human .tf-node__kind { color: var(--tf-text-2); }

.tf-node__badge {
  position: absolute; top: -9px; right: var(--sp-4);
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--tf-accent); color: var(--tf-on-accent);
  font-family: var(--tf-font-mono); font-size: 0.625rem;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}

/* Connector rails between rows */
.tf-orchestra__rail {
  position: relative; z-index: 1;
  height: 46px;
  display: flex; align-items: center; justify-content: center;
}
.tf-orchestra__rail svg { width: 100%; height: 100%; overflow: visible; }
.tf-orchestra__rail path {
  fill: none;
  stroke: rgba(var(--tf-accent-rgb), .28);
  stroke-width: 1.25;
}
.tf-orchestra__rail .tf-rail-pulse {
  stroke: var(--tf-accent);
  stroke-width: 2;
  stroke-dasharray: 5 190;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 3px rgba(var(--tf-accent-rgb), .5));
  animation: tf-rail-run 3.4s linear infinite;
}
/* Stagger comes from JS (initRails), not :nth-of-type — the pulses share the
   <svg> with the static rails, so type-counting would target the wrong paths. */
@keyframes tf-rail-run { to { stroke-dashoffset: -195; } }

.tf-orchestra__legend {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--tf-line);
  font-size: var(--fs-xs); color: var(--tf-muted);
  position: relative; z-index: 1;
}
.tf-orchestra__legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.tf-orchestra__legend i {
  width: 14px; height: 0; border-top: 1.5px solid var(--tf-line); flex: none;
}
.tf-orchestra__legend i.is-accent { border-color: var(--tf-accent); }
.tf-orchestra__legend i.is-dashed { border-style: dashed; border-color: rgba(var(--tf-ink-rgb), .5); }

@media (max-width: 860px) {
  .tf-orchestra__row--agents { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tf-orchestra__row--io { grid-template-columns: minmax(0,1fr); }
  .tf-orchestra__rail { height: 30px; }
}

/* ==========================================================================
   4. FLOW PIPELINE — step-by-step process visual
   ========================================================================== */

.tf-flow {
  position: relative;
  display: grid;
  gap: 1px;
  background: var(--tf-line);
  border: 1px solid var(--tf-line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tf-flow--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tf-flow--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tf-flow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tf-flow__step {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: clamp(1.25rem, 2.2vw, 2rem);
  background: var(--tf-obsidian);
  transition: background-color var(--dur-slow) var(--ease-out);
  min-height: 100%;
}
.tf-flow__step::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--tf-accent);
  box-shadow: none;
  transition: width var(--dur-slow) var(--ease-out);
}
.tf-flow__step.is-active { background: var(--tf-surface-2); }
.tf-flow__step.is-active::after { width: 100%; }
.tf-flow__step.is-done::after { width: 100%; opacity: .3; box-shadow: none; }

.tf-flow__idx {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .14em; color: var(--tf-muted);
}
.tf-flow__step.is-active .tf-flow__idx { color: var(--tf-accent); }
.tf-flow__agent {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: var(--r-xs);
  background: var(--tf-accent-veil);
  border: 1px solid rgba(var(--tf-accent-rgb), .22);
  font-family: var(--tf-font-mono); font-size: 0.625rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--tf-accent);
  align-self: flex-start;
}
.tf-flow__title { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.015em; }
.tf-flow__desc  { font-size: var(--fs-xs); color: var(--tf-muted); line-height: 1.55; }
.tf-flow__out {
  margin-top: auto; padding-top: var(--sp-3);
  border-top: 1px dashed var(--tf-line);
  font-family: var(--tf-font-mono); font-size: 0.6875rem;
  color: var(--tf-text-2); line-height: 1.5;
}
.tf-flow__out b { color: var(--tf-accent); font-weight: 500; }

@media (max-width: 1100px) { .tf-flow--5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px)  { .tf-flow--4, .tf-flow--3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px)  { .tf-flow--5, .tf-flow--4, .tf-flow--3 { grid-template-columns: minmax(0,1fr); } }

/* Vertical flow variant (subpages) */
.tf-vflow { display: flex; flex-direction: column; }
.tf-vflow__item {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--tf-line);
}
.tf-vflow__item:last-child { border-bottom: 1px solid var(--tf-line); }
.tf-vflow__item::before {
  content: "";
  position: absolute; left: 1.72rem; top: 0; bottom: 0;
  width: 1px; background: var(--tf-line);
}
.tf-vflow__item:first-child::before { top: 50%; }
.tf-vflow__item:last-child::before { bottom: 50%; }
.tf-vflow__dot {
  position: relative; z-index: 1;
  width: 3.5rem; height: 3.5rem;
  display: grid; place-items: center;
  border: 1px solid var(--tf-line);
  border-radius: 50%;
  background: var(--tf-obsidian);
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .06em; color: var(--tf-muted);
  transition: all var(--dur-base) var(--ease-out);
}
.tf-vflow__item:hover .tf-vflow__dot {
  border-color: var(--tf-accent); color: var(--tf-accent);
  box-shadow: 0 0 0 6px var(--tf-accent-veil);
}
.tf-vflow__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.tf-vflow__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-2);
}

@media (max-width: 640px) {
  .tf-vflow__item { grid-template-columns: minmax(0,1fr); gap: var(--sp-4); }
  .tf-vflow__item::before { display: none; }
  .tf-vflow__dot { width: 2.75rem; height: 2.75rem; }
}

/* ==========================================================================
   5. BEFORE / AFTER COMPARISON
   ========================================================================== */

.tf-compare {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px; background: var(--tf-line);
  border: 1px solid var(--tf-line); border-radius: var(--r-lg);
  overflow: hidden;
}
.tf-compare__col { background: var(--tf-obsidian); padding: clamp(1.5rem, 3vw, 2.5rem); }
.tf-compare__col--after { background: linear-gradient(180deg, var(--tf-accent-veil), var(--tf-obsidian) 55%); }
.tf-compare__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--tf-line); margin-bottom: var(--sp-5);
}
.tf-compare__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.tf-compare__list li {
  display: grid; grid-template-columns: 18px minmax(0,1fr); gap: var(--sp-3);
  font-size: var(--fs-sm); color: var(--tf-text-2); line-height: 1.55;
}
.tf-compare__list li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--tf-line); margin-top: 3px;
  background: no-repeat center / 9px 9px;
}
.tf-compare__col--before li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' stroke='%238A8F94' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M2 2 8 8M8 2 2 8'/%3E%3C/svg%3E");
}
.tf-compare__col--after li::before {
  border-color: rgba(var(--tf-accent-rgb), .4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' stroke='%23D6FF3E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M1.5 5.4 4 7.8 8.6 2.4'/%3E%3C/svg%3E");
}
.tf-compare__time {
  font-family: var(--tf-font-mono); font-size: var(--fs-xs);
  color: var(--tf-muted);
}
@media (min-width: 900px) { .tf-compare__time { white-space: nowrap; } }
@media (max-width: 560px) {
  .tf-compare__head { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
}
.tf-compare__col--after .tf-compare__time { color: var(--tf-accent); }
@media (max-width: 760px) { .tf-compare { grid-template-columns: minmax(0,1fr); } }

/* ==========================================================================
   6. PROCESS TIMELINE (Beratungsprozess)
   ========================================================================== */

.tf-process { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.tf-process__sticky { position: sticky; top: calc(var(--tf-header-h) + var(--sp-8)); }

.tf-steps { display: flex; flex-direction: column; }
.tf-step {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--sp-6);
  padding: var(--sp-7) 0;
  border-top: 1px solid var(--tf-line);
  transition: padding-inline var(--dur-base) var(--ease-out);
}
.tf-step:last-child { border-bottom: 1px solid var(--tf-line); }
.tf-step__num {
  font-family: var(--tf-font-display);
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
  font-weight: 600; line-height: .9;
  letter-spacing: -0.05em;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px var(--tf-line);
  transition: transform 650ms cubic-bezier(.23,1,.32,1),
              -webkit-text-stroke-color var(--dur-base) var(--ease-out);
  flex: none;
}
.tf-step:hover .tf-step__num {
  transform: translateX(10px) scale(1.06);
  -webkit-text-stroke-color: var(--tf-accent);
}
.tf-step__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.tf-step__title { font-size: var(--fs-h3); font-weight: 600; }
.tf-step__tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.tf-step__dur {
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; text-transform: uppercase; color: var(--tf-accent);
}
@media (max-width: 992px) {
  .tf-process { grid-template-columns: minmax(0,1fr); }
  .tf-process__sticky { position: static; }
}
@media (max-width: 560px) {
  .tf-step { grid-template-columns: minmax(0,1fr); gap: var(--sp-3); }
}

/* ==========================================================================
   7. USE-CASE GRID (scattered, asymmetric)
   ========================================================================== */

.tf-cases { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5); }
.tf-cases > * { grid-column: span 4; }
.tf-cases > .is-wide  { grid-column: span 8; }
.tf-cases > .is-half  { grid-column: span 6; }
.tf-cases > .is-push  { margin-top: clamp(0rem, 4vw, 4rem); }

.tf-case {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
  min-height: 340px;
  background: var(--tf-surface);
  border: 1px solid var(--tf-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.tf-case::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px circle at var(--mx,50%) var(--my,0%), var(--tf-accent-veil), transparent 70%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-soft);
}
.tf-case:hover { border-color: rgba(var(--tf-accent-rgb), .35); transform: translateY(-4px); }
.tf-case:hover::before { opacity: 1; }
.tf-case__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.tf-case__title { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.028em; max-width: 16ch; }
.tf-case__desc { color: var(--tf-text-2); font-size: var(--fs-sm); max-width: 46ch; }
.tf-case__foot {
  margin-top: auto; padding-top: var(--sp-5);
  border-top: 1px solid var(--tf-line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.tf-case__agents { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-case__arrow {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--tf-line); border-radius: 50%;
  transition: all var(--dur-base) var(--ease-out);
}
.tf-case:hover .tf-case__arrow {
  background: var(--tf-accent); border-color: var(--tf-accent); color: var(--tf-on-accent);
  transform: rotate(-45deg);
}
.tf-case__stat {
  font-family: var(--tf-font-display); font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1;
  letter-spacing: -0.04em; color: var(--tf-accent);
}

@media (max-width: 1100px) {
  .tf-cases > *, .tf-cases > .is-wide, .tf-cases > .is-half { grid-column: span 6; }
  .tf-cases > .is-push { margin-top: 0; }
}
@media (max-width: 760px) {
  .tf-cases > *, .tf-cases > .is-wide, .tf-cases > .is-half { grid-column: span 12; }
  .tf-case { min-height: 0; }
}

/* ==========================================================================
   8. GOVERNANCE / COMPLIANCE
   ========================================================================== */

.tf-shield {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; background: var(--tf-line);
  border: 1px solid var(--tf-line); border-radius: var(--r-lg); overflow: hidden;
}
.tf-shield__item {
  background: var(--tf-obsidian);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  display: flex; flex-direction: column; gap: var(--sp-3);
  transition: background-color var(--dur-base) var(--ease-soft);
}
.tf-shield__item:hover { background: var(--tf-surface-2); }
.tf-shield__label {
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; text-transform: uppercase; color: var(--tf-accent);
}
.tf-shield__title { font-size: var(--fs-sm); font-weight: 600; }
.tf-shield__desc { font-size: var(--fs-xs); color: var(--tf-muted); line-height: 1.55; }

/* Data-boundary diagram */
.tf-boundary {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px dashed rgba(var(--tf-accent-rgb), .4);
  border-radius: var(--r-lg);
  background: var(--tf-accent-veil);
}
.tf-boundary__tag {
  position: absolute; top: -11px; left: var(--sp-6);
  padding: 2px 10px; background: var(--tf-obsidian);
  font-family: var(--tf-font-mono); font-size: 0.6875rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--tf-accent);
}
.tf-boundary__inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
}

/* ==========================================================================
   9. ASSESSMENT QUIZ
   ========================================================================== */

.tf-quiz {
  border: 1px solid var(--tf-line);
  border-radius: var(--r-xl);
  background: var(--tf-surface);
  overflow: hidden;
}
.tf-quiz__bar { height: 3px; background: var(--tf-line); }
.tf-quiz__bar-fill {
  height: 100%; width: 0;
  background: var(--tf-accent);
  box-shadow: none;
  transition: width var(--dur-slow) var(--ease-out);
}
.tf-quiz__body { padding: clamp(1.75rem, 4vw, 3.5rem); }
.tf-quiz__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-7);
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .14em; text-transform: uppercase; color: var(--tf-muted);
}
.tf-quiz__step { display: none; }
.tf-quiz__step.is-active { display: block; animation: tf-quiz-in var(--dur-slow) var(--ease-out); }
@keyframes tf-quiz-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tf-quiz__q { font-size: var(--fs-h3); font-weight: 600; margin-bottom: var(--sp-6); max-width: 24ch; }

.tf-opt { display: block; cursor: pointer; }
.tf-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.tf-opt__box {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--tf-line);
  border-radius: var(--r-md);
  background: var(--tf-obsidian);
  transition: all var(--dur-base) var(--ease-out);
}
.tf-opt:hover .tf-opt__box { border-color: rgba(var(--tf-accent-rgb), .4); transform: translateX(4px); }
.tf-opt input:checked + .tf-opt__box {
  border-color: var(--tf-accent);
  background: var(--tf-accent-veil);
  box-shadow: 0 0 0 3px var(--tf-accent-veil);
}
.tf-opt input:focus-visible + .tf-opt__box { outline: 2px solid var(--tf-accent); outline-offset: 2px; }
.tf-opt__key {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--tf-line); border-radius: var(--r-sm);
  font-family: var(--tf-font-mono); font-size: var(--fs-xs); color: var(--tf-muted);
  transition: all var(--dur-base) var(--ease-out);
}
.tf-opt input:checked + .tf-opt__box .tf-opt__key {
  background: var(--tf-accent); border-color: var(--tf-accent); color: var(--tf-on-accent); font-weight: 600;
}
.tf-opt__text { font-size: var(--fs-sm); font-weight: 500; }
.tf-opt__hint { display: block; font-size: var(--fs-xs); color: var(--tf-muted); font-weight: 400; margin-top: 2px; }

.tf-quiz__nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-top: var(--sp-7);
  padding-top: var(--sp-5); border-top: 1px solid var(--tf-line);
}
.tf-quiz__nav button[disabled] { opacity: .35; pointer-events: none; }
/* .tf-btn sets display:inline-flex, which would beat the UA [hidden] rule —
   the JS hides the "Weiter" button on the result step via .hidden. */
.tf-quiz__nav button[hidden] { display: none; }

.tf-quiz__result {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1px; background: var(--tf-line);
  border: 1px solid var(--tf-line); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: var(--sp-7);
}
.tf-quiz__result > div { background: var(--tf-obsidian); padding: var(--sp-5); }
@media (max-width: 640px) { .tf-quiz__result { grid-template-columns: minmax(0,1fr); } }

/* Score gauge */
.tf-gauge { position: relative; width: 100%; max-width: 190px; aspect-ratio: 2 / 1.15; margin-inline: auto; }
.tf-gauge svg { width: 100%; height: 100%; overflow: visible; }
.tf-gauge__track { fill: none; stroke: var(--tf-line); stroke-width: 8; stroke-linecap: round; }
.tf-gauge__fill  { fill: none; stroke: var(--tf-accent); stroke-width: 8; stroke-linecap: round;
                   filter: drop-shadow(0 2px 5px rgba(var(--tf-accent-rgb), .35)); }

/* ==========================================================================
   10. CONTACT & MAP
   ========================================================================== */

.tf-contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 992px) { .tf-contact { grid-template-columns: minmax(0,1fr); } }

.tf-detail {
  display: grid; grid-template-columns: 1.5rem minmax(0,1fr);
  gap: var(--sp-4); align-items: start;
  padding: var(--sp-5) 0; border-top: 1px solid var(--tf-line);
}
.tf-detail:last-of-type { border-bottom: 1px solid var(--tf-line); }
.tf-detail__icon { color: var(--tf-accent); margin-top: 3px; }
.tf-detail__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tf-detail__label {
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .14em; text-transform: uppercase; color: var(--tf-muted);
  margin-bottom: 4px;
}
.tf-detail__value { font-size: var(--fs-body); font-weight: 500; line-height: 1.5; }

.tf-map {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--tf-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(600px circle at 60% 40%, var(--tf-accent-veil), transparent 60%),
    var(--tf-surface);
  display: grid; place-items: center;
}
.tf-map__frame { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.86); }
.tf-map.is-loaded { display: block; }
.tf-map__placeholder {
  text-align: center; padding: var(--sp-7);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  max-width: 44ch;
}
.tf-map__pin {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(var(--tf-accent-rgb), .4);
  background: var(--tf-accent-veil); color: var(--tf-accent);
  animation: tf-ping 2.6s var(--ease-out) infinite;
}
@media (max-width: 560px) { .tf-map { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   11. PAGE HERO (subpages)
   ========================================================================== */

.tf-pagehero {
  position: relative;
  padding-top: calc(var(--tf-header-h) + clamp(4rem, 9vw, 8rem));
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
  overflow: hidden;
  background: var(--tf-void);
  border-bottom: 1px solid var(--tf-line);
  isolation: isolate;
}
.tf-pagehero__crumbs {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap;
  font-family: var(--tf-font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; text-transform: uppercase; color: var(--tf-muted);
  margin-bottom: var(--sp-6);
}
.tf-pagehero__crumbs a:hover { color: var(--tf-accent); }
.tf-pagehero__title { font-size: var(--fs-h1); max-width: 20ch; margin-bottom: var(--sp-5); }
.tf-pagehero__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid var(--tf-line);
}
.tf-pagehero__meta > div { min-width: 140px; }

/* ==========================================================================
   12. MISC
   ========================================================================== */

/* Marquee strip of capability keywords */
.tf-strip {
  padding: var(--sp-5) 0;
  border-block: 1px solid var(--tf-line);
  background: var(--tf-obsidian);
  overflow: hidden;
}
.tf-strip__item {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  font-family: var(--tf-font-mono); font-size: var(--fs-sm);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--tf-muted); white-space: nowrap;
}
.tf-strip__item::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tf-accent); flex: none;
}

/* Sticky table of contents (subpages) */
.tf-toc { position: sticky; top: calc(var(--tf-header-h) + var(--sp-7)); }
.tf-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tf-toc__list a {
  display: block; padding: var(--sp-3) 0 var(--sp-3) var(--sp-4);
  border-left: 1px solid var(--tf-line);
  font-size: var(--fs-sm); color: var(--tf-muted);
  transition: all var(--dur-base) var(--ease-out);
}
.tf-toc__list a:hover, .tf-toc__list a.is-active {
  color: var(--tf-text); border-left-color: var(--tf-accent);
  padding-left: calc(var(--sp-4) + 4px);
}
@media (max-width: 992px) { .tf-toc { display: none; } }

/* Long-form prose (legal pages, use-case detail) */
.tf-prose { max-width: 74ch; color: var(--tf-text-2); }
.tf-prose h2 {
  font-size: var(--fs-h3); color: var(--tf-text);
  margin: var(--sp-9) 0 var(--sp-4); scroll-margin-top: 110px;
}
.tf-prose h2:first-child { margin-top: 0; }
.tf-prose h3 {
  font-size: var(--fs-h4); color: var(--tf-text);
  margin: var(--sp-7) 0 var(--sp-3);
}
.tf-prose p { margin-bottom: var(--sp-5); }
.tf-prose ul, .tf-prose ol { margin: 0 0 var(--sp-5); padding-left: 1.35rem; display: flex; flex-direction: column; gap: var(--sp-3); }
.tf-prose li::marker { color: var(--tf-accent); }
.tf-prose a { color: var(--tf-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--tf-line); }
.tf-prose a:hover { color: var(--tf-accent); text-decoration-color: currentColor; }
.tf-prose strong { color: var(--tf-text); font-weight: 600; }
/* JS wraps every .tf-prose table in this, so wide tables scroll inside their
   own box instead of widening the page. */
.tf-scroll-x {
  overflow-x: auto;
  margin-bottom: var(--sp-6);
  border-radius: var(--r-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tf-scroll-x > table { margin-bottom: 0; min-width: 34rem; }
.tf-scroll-x:focus-visible { outline: 2px solid var(--tf-accent); outline-offset: 2px; }
/* Without JS there is no wrapper — let the table itself scroll. */
html:not(.tf-js) .tf-prose table { display: block; overflow-x: auto; }
.tf-prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-6); font-size: var(--fs-sm); }
.tf-prose th, .tf-prose td { text-align: left; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--tf-line); }
.tf-prose th { color: var(--tf-text); font-weight: 600; background: var(--tf-surface); }
.tf-prose hr { border: 0; border-top: 1px solid var(--tf-line); margin: var(--sp-8) 0; }

/* Callout */
.tf-callout {
  display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--tf-line); border-left: 2px solid var(--tf-accent);
  border-radius: var(--r-md);
  background: var(--tf-surface);
  font-size: var(--fs-sm); color: var(--tf-text-2);
}

/* Big CTA band — the one deep block per page. Everything else is paper, so
   this reads as the closing chord rather than as another panel. */
.tf-cta-band {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--tf-ink);
  background:
    radial-gradient(900px circle at 18% -10%, rgba(169, 203, 236, .22), transparent 60%),
    radial-gradient(700px circle at 88% 110%, rgba(224, 176, 168, .16), transparent 62%),
    var(--tf-ink);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  box-shadow: var(--sh-lg);
}
.tf-cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; margin-top: var(--sp-7); }

/* Next-page pager */
.tf-pager {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px; background: var(--tf-line);
  border-block: 1px solid var(--tf-line);
}
.tf-pager__item {
  background: var(--tf-obsidian);
  padding: var(--sp-7) var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-2);
  transition: background-color var(--dur-base) var(--ease-soft);
}
.tf-pager__item:hover { background: var(--tf-surface); }
.tf-pager__item--next { text-align: right; align-items: flex-end; }
@media (max-width: 640px) { .tf-pager { grid-template-columns: minmax(0,1fr); } }
