/* de Zwart — Softwarehaus Graz
   Vanilla CSS. No framework, no build step, no utility classes. */

/* ============================================================ base */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.6;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 50%; top: 8px;
  transform: translate(-50%, -140%);
  z-index: 200;
  background: var(--fg); color: var(--bg);
  padding: .6em 1.1em; border-radius: 999px;
  font-size: var(--micro); letter-spacing: var(--track); text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s var(--ease);
}
.skip:focus { transform: translate(-50%, 0); }

/* ============================================================ type */

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.018em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--micro);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { font-weight: 400; color: var(--accent); }

.lede {
  font-size: clamp(1.06rem, 1.6vw, 1.24rem);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 34ch;
}

.note {
  font-family: var(--mono);
  font-size: var(--micro);
  line-height: 1.6;
  color: var(--muted);
}

/* ============================================================ layout */

.wrap {
  width: min(var(--w), 100% - var(--gut) * 2);
  margin-inline: auto;
}

main { display: block; }

/* the hairline column rules that run the height of the page */
.grid-rules {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  display: flex; justify-content: center;
}
.grid-rules div {
  width: min(var(--w), 100% - var(--gut) * 2);
  height: 100%;
  border-left: 1px solid var(--line-3);
  border-right: 1px solid var(--line-3);
}

/* ============================================================ nav */

.nav {
  position: fixed;
  top: var(--nav-top); left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: center;
  pointer-events: none;
}

.nav__bar {
  pointer-events: auto;
  width: min(var(--w), 100% - var(--gut) * 2);
  height: var(--nav-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 6px 0 18px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: box-shadow .4s var(--ease), background .4s var(--ease);
}
.nav.is-stuck .nav__bar { box-shadow: var(--shadow-card); }

.brand {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  display: flex; align-items: center; gap: .5em;
  color: var(--accent);           /* the DZ mark inherits this via currentColor */
}
.brand span { color: var(--fg); }
.brand img {
  width: 26px; height: 26px;
  flex: none;
}
.brand sup {
  align-self: flex-start;
  margin-top: .35em;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  top: -.15em;
}

.nav__spacer { flex: 1; }

.nav__crumb {
  font-family: var(--mono);
  font-size: var(--micro);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 22ch;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.nav.is-stuck .nav__crumb { opacity: 1; }

.lang {
  display: flex; align-items: center;
  font-family: var(--mono);
  font-size: var(--micro);
  letter-spacing: .08em;
}
.lang a { text-decoration: none; color: var(--muted-2); padding: 0 .35em; }
.lang a[aria-current='true'] { color: var(--fg); }
.lang span { color: var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .72em 1.15em;
  font-size: var(--micro);
  letter-spacing: var(--track);
  text-transform: uppercase;
  font-family: var(--mono);
  text-decoration: none;
  cursor: pointer;
  background: var(--accent); color: #fff;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--fg);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--bg-3); border-color: var(--line); }
.btn--lg { padding: .95em 1.5em; font-size: .82rem; }

.nav__cta { flex: none; }

/* menu toggle */
.menu-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: .6em;
  background: none; border: 1px solid var(--line);
  border-radius: 999px; padding: .6em 1em;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: var(--track); text-transform: uppercase;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.menu-btn:hover { background: var(--bg-3); }
.menu-btn i {
  display: block; width: 12px; height: 8px;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transition: transform .3s var(--ease);
}
.menu-btn[aria-expanded='true'] i { transform: rotate(90deg); }

.menu {
  pointer-events: auto;
  position: absolute; top: calc(var(--nav-h) + 8px); left: 50%;
  transform: translateX(-50%);
  width: min(var(--w), 100% - var(--gut) * 2);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-pop);
  padding: 10px;
  display: grid; gap: 2px;
  opacity: 0; visibility: hidden;
  translate: 0 -8px;
  transition: opacity .3s var(--ease), translate .3s var(--ease), visibility .3s;
}
.menu[data-open='true'] { opacity: 1; visibility: visible; translate: 0 0; }

.menu a {
  display: flex; align-items: baseline; gap: 1em;
  padding: .8em 1em;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: background .2s var(--ease);
}
.menu a:hover { background: var(--bg-3); }
.menu a u {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--accent); text-decoration: none;
  min-width: 2.4em;
}
.menu a b { font-weight: 500; }
.menu a i { font-style: normal; color: var(--muted); font-size: .92rem; margin-left: auto; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 10px; }

@media (max-width: 860px) {
  .nav__crumb { display: none; }
  .nav__cta { display: none; }
}
@media (max-width: 520px) {
  .brand sup { display: none; }
  .menu-btn span { display: none; }
  .menu-btn { padding: .6em .8em; }
}

/* ============================================================ lang hint */

.langbar {
  position: fixed;
  top: calc(var(--nav-top) + var(--nav-h) + 8px);
  left: 50%; translate: -50% -8px;
  z-index: 95;
  width: min(var(--w), 100% - var(--gut) * 2);
  display: none; align-items: center; gap: 14px;
  padding: .7em 1em .7em 1.15em;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-card);
  font-size: .92rem;
  opacity: 0;
  transition: opacity .4s var(--ease), translate .4s var(--ease);
}
.langbar.is-on { display: flex; }
.langbar.is-shown { opacity: 1; translate: -50% 0; }
.langbar a { color: var(--accent); text-underline-offset: 3px; }
.langbar button {
  margin-left: auto;
  background: none; border: 0; cursor: pointer;
  color: var(--muted-2); font-size: 1.1rem; line-height: 1;
  padding: .2em .4em; border-radius: 6px;
}
.langbar button:hover { color: var(--fg); background: var(--bg-3); }
@media (max-width: 560px) { .langbar { font-size: .86rem; gap: 8px; } }

/* ============================================================ hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
}
@media (max-width: 720px) {
  .hero { min-height: 82svh; padding: calc(var(--nav-h) + 40px) 0 56px; }
}

.hero__inner {
  position: relative; z-index: 1;
  display: grid;
  gap: clamp(44px, 6vw, 72px);
  align-items: start;
}
@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.32fr) minmax(280px, .68fr);
    align-items: center;
  }
}

.hero__eyebrow {
  display: flex; align-items: center; gap: .9em;
  margin-bottom: clamp(20px, 4vh, 34px);
}
.hero__eyebrow s {
  flex: 1; max-width: 120px; height: 1px;
  background: var(--line); text-decoration: none;
  transform-origin: left;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.55rem, 5.7vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero h1 .dim { color: var(--muted-2); }
.hero h1 .acc { color: var(--accent); }

.hero__sub {
  margin-top: clamp(22px, 4vh, 34px);
  max-width: 46ch;
}
.hero__sub .lede { max-width: none; }

.hero__meta {
  margin-top: clamp(28px, 5vh, 44px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}

/* right column — the four pillars, as navigation rather than decoration */
.pillars {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--line-2);
}
.pillars li { border-bottom: 1px solid var(--line-2); }
.pillars a {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr) 1.4em;
  align-items: baseline;
  gap: .2em;
  padding: 1.05em .2em 1.05em 0;
  text-decoration: none;
  transition: padding-left .35s var(--ease), background .35s var(--ease);
}
.pillars a:hover { padding-left: .55em; background: var(--accent-wash); }
.pillars u {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .1em; color: var(--accent);
  text-decoration: none;
}
.pillars b { font-weight: 500; font-size: 1.02rem; letter-spacing: -.005em; }
.pillars i {
  font-style: normal; color: var(--muted-2);
  justify-self: end;
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.pillars a:hover i { transform: translateX(3px); color: var(--accent); }
.pillars small {
  grid-column: 2 / -1;
  display: block;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.45;
  margin-top: .15em;
}

.scrollcue {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: center;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: var(--track); text-transform: uppercase;
  color: var(--muted-2);
  pointer-events: none;
}
.scrollcue span { display: flex; align-items: center; gap: .7em; }
.scrollcue i {
  display: block; width: 1px; height: 22px;
  background: linear-gradient(var(--line), transparent);
}
@media (max-width: 720px) { .scrollcue { display: none; } }

/* ============================================================ acts */

.act {
  position: relative;
  padding: clamp(80px, 13vh, 150px) 0;
  border-top: 1px solid var(--line-2);
}

.act__head {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(38px, 6vh, 66px);
}
@media (min-width: 900px) {
  .act__head {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: end;
  }
}

.act__num {
  font-family: var(--mono);
  font-size: var(--micro);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: .8em;
  margin-bottom: 18px;
}
.act__num s {
  flex: 1; height: 1px; background: var(--accent-line);
  text-decoration: none;
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.is-in .act__num s { transform: scaleX(1); }

.act h2 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  max-width: 16ch;
}

/* ============================================================ panel */

.panel {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
}
.panel__bar b { font-weight: 400; color: var(--fg-dim); }
.panel__body { padding: clamp(18px, 3vw, 30px); }

.live {
  display: inline-flex; align-items: center; gap: .5em;
  color: var(--accent);
  margin-left: auto;
}
.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s var(--ease-io) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }

.pbar__hint {
  margin-left: auto;
  color: var(--muted-2);
}

.act__cue {
  max-width: 46ch;
  margin-bottom: clamp(20px, 3vh, 30px);
  color: var(--fg-dim);
}
.act__fine {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--muted-2);
}

.linkbtn {
  background: none; border: 0; padding: 0;
  font-family: var(--mono); font-size: inherit;
  color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--accent-soft); }

/* ================================================= 01 · perf metrics */

.metrics {
  display: grid;
  gap: clamp(20px, 3vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

.metric__k {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
  display: flex; align-items: baseline; gap: .5em;
  margin-bottom: .5em;
}
.metric__k abbr {
  text-decoration: none;
  color: var(--muted-2);
  border-bottom: 1px dotted var(--line);
  cursor: help;
}

.metric__v {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: .22em;
  font-variant-numeric: tabular-nums;
}
.metric__v small {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted-2); letter-spacing: .04em;
}

.metric__bar {
  position: relative;
  height: 4px; border-radius: 2px;
  background: var(--bg-3);
  margin: 14px 0 9px;
  overflow: hidden;
}
.metric__bar i {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1.1s var(--ease), background .4s var(--ease);
}
/* the threshold tick */
.metric__bar s {
  position: absolute; top: -3px; bottom: -3px;
  width: 1px; background: var(--fg);
  opacity: .32;
  left: var(--tick, 70%);
}
.metric[data-state='warn'] .metric__bar i { background: var(--ochre); }
.metric[data-state='bad'] .metric__bar i  { background: #a33517; }

.metric__n {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted-2); letter-spacing: .03em;
}

.metrics__foot {
  margin-top: clamp(22px, 3vh, 30px);
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline;
}
.metrics__foot #metrics-verdict { color: var(--fg-dim); }
.metrics__foot #metrics-verdict b { font-weight: 400; color: var(--accent); }

/* ================================================= 02 · architecture */

.stack {
  position: relative;
  display: grid;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  overflow: hidden;
}

/* the spine that makes this read as a stack of layers rather than a table */
.stack::before {
  content: '';
  position: absolute;
  left: calc(clamp(14px, 2vw, 20px) + 1.05em);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
  z-index: 0;
}

.layer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.1em minmax(0, 7.6em) minmax(0, 1fr) auto 1.6em;
  align-items: center;
  gap: 1.1em;
  text-align: left;
  padding: clamp(15px, 2vw, 20px) clamp(14px, 2vw, 20px);
  background: var(--panel);
  border: 0; border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .3s var(--ease);
}
.layer:last-of-type { border-bottom: 0; }
.layer:hover { background: var(--panel-2); }
.layer[aria-expanded='true'] { background: var(--accent-wash); }

/* the node on the spine */
.layer__i {
  position: relative;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .06em; color: var(--muted-2);
  display: grid; place-items: center;
  width: 2.1em; height: 2.1em;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.layer:hover .layer__i { border-color: var(--accent-line); color: var(--accent); }
.layer[aria-expanded='true'] .layer__i {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.layer__k {
  font-family: var(--display);
  font-size: 1.32rem; letter-spacing: -.01em;
}
.layer__d { color: var(--muted); font-size: .95rem; }
.layer__t {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted-2); letter-spacing: .03em;
  white-space: nowrap;
}

.layer__c {
  justify-self: end;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  rotate: 45deg;
  transition: rotate .35s var(--ease), border-color .3s var(--ease);
}
.layer:hover .layer__c { border-color: var(--accent); }
.layer[aria-expanded='true'] .layer__c { rotate: -135deg; border-color: var(--accent); }

.layer__body {
  position: relative; z-index: 1;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-2);
  padding: 4px clamp(14px, 2vw, 20px) 22px;
}
.layer__body p {
  max-width: 62ch; color: var(--fg-dim);
  font-size: .97rem; line-height: 1.6;
  padding-left: calc(2.1em + 1.1em);
}

/* the request travelling down the layers and back */
.stack__pulse {
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 22%;
  background: linear-gradient(transparent, var(--accent), transparent);
  opacity: .0;
}
.stack.is-in .stack__pulse { animation: travel 5.2s var(--ease-io) infinite; }
@keyframes travel {
  0%        { top: -22%; opacity: 0; }
  12%       { opacity: .95; }
  46%       { top: 100%;  opacity: .95; }
  54%       { top: 100%;  opacity: .95; }
  88%       { top: -22%;  opacity: .95; }
  100%      { top: -22%;  opacity: 0; }
}

@media (max-width: 820px) {
  .layer {
    grid-template-columns: 2.1em minmax(0, 1fr) 1.6em;
    gap: .3em 1em;
    align-items: start;
  }
  .layer__i { grid-row: 1 / span 2; }
  .layer__k { grid-column: 2; }
  .layer__c { grid-column: 3; grid-row: 1; align-self: center; }
  .layer__d { grid-column: 2 / 3; }
  .layer__t { grid-column: 2 / -1; white-space: normal; margin-top: .3em; }
  .layer__body p { padding-left: calc(2.1em + 1em); }
}
@media (max-width: 520px) {
  .layer__body p { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stack.is-in .stack__pulse { animation: none; opacity: 0; }
  .metric__bar i { transition: none; }
}

/* ================================================= 03 · inbox router */

.rt .panel__body {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}
@media (min-width: 900px) {
  .rt .panel__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: 'io out' 'correct out';
    align-items: start;
  }
  .rt__io { grid-area: io; }
  .rt__out { grid-area: out; }
  .rt__correct { grid-area: correct; }
}

.rt__label {
  display: block;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
  margin-bottom: .7em;
}

.rt__in {
  width: 100%;
  resize: vertical;
  min-height: 5.2em;
  padding: .85em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: .95rem; line-height: 1.55;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.rt__in:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.rt__in::placeholder { color: var(--muted-2); }

.rt__examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rt__chip {
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  border-radius: 999px;
  padding: .4em .85em;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.rt__chip:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-wash); }

.rt__bars { display: flex; flex-direction: column; gap: 9px; }

.rt__bar {
  display: grid;
  grid-template-columns: 7.4em minmax(0, 1fr) 3.1em;
  align-items: center;
  gap: .8em;
  transition: opacity .3s var(--ease);
  opacity: .58;
}
.rt__bar.is-top { opacity: 1; }

.rt__bar-k {
  font-size: .92rem;
  color: var(--fg-dim);
  white-space: nowrap;
}
.rt__bar.is-top .rt__bar-k { color: var(--fg); font-weight: 500; }

.rt__bar-t {
  position: relative;
  height: 8px; border-radius: 4px;
  background: var(--bg-3);
  overflow: hidden;
}
.rt__bar-t i {
  position: absolute; inset: 0 auto 0 0;
  width: 0; border-radius: 4px;
  background: var(--muted-2);
  transition: width .42s var(--ease), background .42s var(--ease);
}
.rt__bar.is-top .rt__bar-t i { background: var(--accent); }

.rt__bar-v {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums;
}
.rt__bar.is-top .rt__bar-v { color: var(--accent); }

.rt__why {
  margin-top: 16px;
  font-size: .92rem;
  color: var(--muted);
  min-height: 1.6em;
}
.rt__why mark {
  background: var(--accent-wash);
  color: var(--accent);
  border-radius: 4px;
  padding: .1em .4em;
  font-family: var(--mono); font-size: .86em;
}
.rt__unsure { color: var(--muted-2); font-style: italic; }

.rt__stat { margin-top: 10px; }
.rt__stat b { font-weight: 400; color: var(--fg-dim); }
.rt__stat em {
  font-style: normal; color: var(--accent);
  opacity: 0;
  animation: flash 1s var(--ease);
}
@keyframes flash { 0% { opacity: 0 } 15% { opacity: 1 } 70% { opacity: 1 } 100% { opacity: 0 } }

.rt__ask { margin-bottom: 9px; }
.rt__fix { display: flex; flex-wrap: wrap; gap: 6px; }
.rt__fixbtn {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: .45em .95em;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.rt__fixbtn:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

.rt--learned .rt__bars { animation: taught .9s var(--ease); }
@keyframes taught {
  0%   { transform: none; }
  22%  { transform: translateX(3px); }
  100% { transform: none; }
}

.rt:not([data-ready]) .rt__out { opacity: .45; }

@media (prefers-reduced-motion: reduce) {
  .rt__bar-t i { transition: none; }
  .rt--learned .rt__bars, .rt__stat em { animation: none; }
  .rt__stat em { opacity: 1; }
}

/* ================================================= 04 · chain panel */

.chain__grid {
  display: grid;
  gap: clamp(20px, 3vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.chain__k {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
  margin-bottom: .45em;
}
.chain__v {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: .3em;
  transition: color .5s var(--ease);
}
.chain__v small {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted-2); letter-spacing: .04em;
}
.chain__v.is-fresh { color: var(--accent); transition: none; }

.chain__foot {
  margin-top: clamp(22px, 3vh, 30px);
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  max-width: 68ch;
}
.chain__foot code {
  font-family: var(--mono); font-size: .95em;
  background: var(--bg-3); border-radius: 4px; padding: .12em .4em;
}

#chain[data-state='down'] .chain__v { color: var(--muted-2); }
#chain[data-state='down'] .live { color: var(--muted-2); }
#chain[data-state='down'] .live::before { animation: none; }

/* ============================================================ cards */

.cards {
  display: grid;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  margin-top: clamp(28px, 5vh, 48px);
}
.cards > * {
  background: var(--bg);
  padding: clamp(20px, 2.4vw, 28px);
  display: grid; gap: .5em; align-content: start;
  transition: background .3s var(--ease);
}
.cards > *:hover { background: var(--panel); }
.cards b { font-weight: 500; font-size: 1.02rem; }
.cards p { color: var(--muted); font-size: .95rem; line-height: 1.55; }
.cards u {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--accent); text-decoration: none;
  letter-spacing: var(--track);
}

/* ============================================================ arbeiten */

.works {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}
.work { display: flex; flex-direction: column; }
.work .panel__body { display: grid; align-content: start; gap: 14px; }
.work__tag {
  margin-left: auto;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: var(--track); text-transform: uppercase;
  color: var(--accent);
}
.work__h {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.72rem);
  line-height: 1.12; letter-spacing: -.015em;
  hyphens: auto;
}
.work__p { color: var(--fg-dim); font-size: .97rem; line-height: 1.62; }
.work__p em { font-style: italic; color: var(--fg); }
.work__t {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; margin: 4px 0 0; padding: 0;
  margin-top: auto;
}
.work__t li {
  font-family: var(--mono); font-size: var(--micro);
  color: var(--muted); letter-spacing: .03em;
  border: 1px solid var(--line-2);
  border-radius: 999px; padding: .32em .75em;
  background: var(--panel-2);
}
.works__note { margin-top: clamp(20px, 3vh, 28px); }

/* ============================================================ ablauf */

.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-2);
  border-block: 1px solid var(--line-2);
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.steps li {
  background: var(--bg);
  padding: clamp(24px, 3vw, 34px) clamp(20px, 2.4vw, 28px);
  display: grid; gap: .55em; align-content: start;
}
.steps__n {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: var(--track); color: var(--accent);
}
.steps h3 {
  font-family: var(--display);
  font-size: clamp(1.24rem, 1.9vw, 1.5rem);
  line-height: 1.18; letter-spacing: -.012em;
}
.steps p:last-child { color: var(--muted); font-size: .95rem; line-height: 1.6; }

/* ============================================================ faq */

/* <details> rather than a JS accordion: the answers stay in the DOM when
   collapsed, so crawlers and answer engines read them, and it works with no
   script at all. */
.faq {
  border-top: 1px solid var(--line-2);
  margin-top: clamp(10px, 2vh, 20px);
}
.faq details {
  border-bottom: 1px solid var(--line-2);
}
.faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.6em;
  align-items: center; gap: 1em;
  padding: 1.15em .2em;
  cursor: pointer;
  list-style: none;
  font-size: 1.06rem;
  transition: color .25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: '';
  justify-self: end;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  rotate: 45deg;
  transition: rotate .3s var(--ease), border-color .25s var(--ease);
}
.faq details[open] summary::after { rotate: -135deg; border-color: var(--accent); }
.faq summary:hover::after { border-color: var(--accent); }
.faq .faq__a {
  padding: 0 3em 1.5em .2em;
  max-width: 74ch;
  color: var(--fg-dim);
  font-size: .98rem; line-height: 1.65;
}
.faq .faq__a p + p { margin-top: .8em; }
.faq .faq__a a { color: var(--accent); text-underline-offset: 3px; }

/* ============================================================ kontakt */

.act--end { padding-bottom: clamp(70px, 10vh, 110px); }

.cf__to { margin-left: auto; color: var(--muted-2); }

.cf__grid {
  display: grid; gap: 0 clamp(16px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.cf__row { display: grid; gap: .5em; margin-bottom: 20px; }
.cf__row label {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
}
.cf__row input, .cf__row textarea {
  width: 100%;
  padding: .8em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel-2);
  font-size: 1rem;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.cf__row textarea { resize: vertical; min-height: 7em; line-height: 1.6; }
.cf__row input:focus, .cf__row textarea:focus {
  outline: none; border-color: var(--accent); background: var(--panel);
}
.cf__row input[aria-invalid='true'], .cf__row textarea[aria-invalid='true'] {
  border-color: #a33517;
}
.cf__row ::placeholder { color: var(--muted-2); }

/* honeypot: off-screen rather than display:none, which some bots skip */
.cf__honey {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.cf__foot {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px 18px;
  margin-top: 4px;
}
.cf__msg { margin: 0; }
.cf__msg[data-tone='ok'] { color: var(--accent); }
.cf__msg[data-tone='bad'] { color: #a33517; }

.cf__fine {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-2);
  max-width: 64ch;
}
.cf__fine a { color: var(--accent); }

.cf__alt { margin-top: 18px; }
.cf__alt a { color: var(--accent); text-underline-offset: 3px; }

.cf.is-sending button[type='submit'] { opacity: .55; pointer-events: none; }

/* ============================================================ dock */

/* Phone-only sticky CTA — the nav CTA is hidden at that width, and a visitor
   deep in the page should never have to scroll to find the way to contact. */
.dock {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  display: none;
  align-items: center; justify-content: center; gap: .6em;
  padding: .95em 1.2em;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: var(--track); text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-pop);
  translate: 0 130%;
  transition: translate .45s var(--ease);
}
@media (max-width: 860px) {
  .dock { display: flex; }
  .dock.is-on { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }

/* ============================================================ reveal */

/* Scoped to .js so that if the module fails to load — old browser, blocked
   script, CDN hiccup — every word is still on the page rather than at opacity 0. */

.js [data-rise] {
  opacity: 0;
  translate: 0 18px;
  transition: opacity .85s var(--ease), translate .85s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-rise].is-in { opacity: 1; translate: 0 0; }

.js [data-clip] {
  clip-path: inset(0 0 105% 0);
  transition: clip-path 1.05s var(--ease);
  transition-delay: var(--d, 0ms);
}
/* Headroom at the top matters in German: with line-height near 1 the umlaut
   dots on Ü/Ä/Ö sit above the em box and a `inset(0 …)` would shear them off. */
.js [data-clip].is-in { clip-path: inset(-18% 0 -20% 0); }

@media (prefers-reduced-motion: reduce) {
  .js [data-rise], .js [data-clip] {
    opacity: 1; translate: none; clip-path: none; transition: none;
  }
  .js .act__num s { transform: scaleX(1); transition: none; }
}

/* ============================================================ documents */

.doc {
  padding: calc(var(--nav-h) + clamp(70px, 12vh, 130px)) 0 clamp(60px, 9vh, 100px);
}
.doc__head { margin-bottom: clamp(34px, 5vh, 54px); }
.doc h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.06; letter-spacing: -.02em;
  margin-top: 14px;
}
.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.2; letter-spacing: -.012em;
  margin: 2.2em 0 .6em;
}
.doc__body h3 {
  font-size: 1.02rem; font-weight: 500;
  margin: 1.6em 0 .4em;
}
.doc__body p, .doc__body li { color: var(--fg-dim); }
.doc__body p { margin-bottom: 1em; }
.doc__body ul { margin: 0 0 1em; padding-left: 1.3em; }
.doc__body li { margin-bottom: .4em; }
.doc__body a { color: var(--accent); text-underline-offset: 3px; }
.doc__body dl {
  display: grid; gap: .55em 1.6em;
  grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  margin: 0 0 1.4em;
}
.doc__body dt {
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
  padding-top: .25em;
}
.doc__body dd { margin: 0; color: var(--fg-dim); }
@media (max-width: 620px) {
  .doc__body dl { grid-template-columns: minmax(0, 1fr); gap: .15em; }
  .doc__body dd { margin-bottom: .9em; }
}

/* Placeholders that must be replaced before this is a compliant Impressum.
   Deliberately loud: plausible-looking filler in a legal notice is worse than
   an obvious gap. */
.todo {
  display: inline-block;
  font-family: var(--mono); font-size: .86em;
  background: #fdf1d6; color: #7a5200;
  border: 1px dashed #c49a2e;
  border-radius: 5px; padding: .1em .5em;
}
.todo-box {
  border: 1px dashed #c49a2e;
  background: #fdf7ea;
  border-radius: var(--radius-s);
  padding: 18px 20px;
  margin: 0 0 2em;
}
.todo-box p { color: #6b4a05; margin-bottom: .6em; }
.todo-box p:last-child { margin-bottom: 0; }
.todo-box b { font-weight: 500; }

/* ============================================================ 404 */

.oops {
  min-height: 74svh;
  display: grid; place-content: center; text-align: center;
  padding: calc(var(--nav-h) + 60px) 0 70px;
}
.oops h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.04; letter-spacing: -.02em;
  margin: 16px 0 18px;
}
.oops p { color: var(--muted); margin-bottom: 30px; }
.oops .btn { justify-self: center; }

/* ============================================================ footer */

.foot {
  border-top: 1px solid var(--line-2);
  padding: 44px 0 40px;
  margin-top: 0;
}
.foot__in {
  display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center;
  font-family: var(--mono); font-size: var(--micro);
  letter-spacing: .04em; color: var(--muted);
}
.foot__in nav { margin-left: auto; display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 620px) { .foot__in nav { margin-left: 0; width: 100%; } }
