/* ---------------------------------------------------------------
   dominik-kasten.de
   Idee: ein Zeichnungsblatt. Millimeterpapier als Grund, Rahmen mit
   Feldeinteilung, Werdegang als Maßkette, Projekte als Stückliste,
   Kontakt im Schriftfeld.
   --------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #f7f9f9;
  --sheet: #fdfefe;
  --grid: rgb(31 79 191 / 0.045);
  --grid-major: rgb(31 79 191 / 0.08);
  --ink: #1a1f24;
  --graphite: #4f5a64;
  --hair: #c8d1d8;
  --tusche: #1f4fbf;
  --tusche-soft: #e7edfa;

  --display: 'Archivo', 'Arial Narrow', 'Segoe UI', sans-serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    url('/img/schaltplan-papier.svg'),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size:
    3900px 2700px,
    50px 50px,
    50px 50px,
    10px 10px,
    10px 10px;
  /* Zeichentisch: Raster und Zeichnungen bleiben stehen, das Blatt scrollt darüber */
  background-position: center top, 0 0, 0 0, 0 0, 0 0;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-block: clamp(16px, 4vw, 48px);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tusche);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* ---------- Blatt mit Rahmen und Feldeinteilung ---------- */

.sheet {
  position: relative;
  max-width: 74rem;
  margin-inline: auto;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  box-shadow: 0 1px 0 var(--hair), 0 24px 48px -32px rgb(26 31 36 / 0.25);
}

.sheet::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 0.75px solid var(--ink);
  pointer-events: none;
}

.zones {
  display: none;
}

@media (min-width: 900px) {
  .sheet {
    padding: 28px;
  }

  .zones {
    display: flex;
    position: absolute;
    font-family: var(--mono);
    font-size: 0.625rem;
    color: var(--graphite);
    pointer-events: none;
  }

  .zones span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .zones-top,
  .zones-bottom {
    left: 6px;
    right: 6px;
    height: 22px;
  }

  .zones-top {
    top: 6px;
  }

  .zones-bottom {
    bottom: 6px;
  }

  .zones-left,
  .zones-right {
    flex-direction: column;
    top: 6px;
    bottom: 6px;
    width: 22px;
  }

  .zones-left {
    left: 6px;
  }

  .zones-right {
    right: 6px;
  }

  .zones-top span + span,
  .zones-bottom span + span {
    border-left: 0.75px solid var(--hair);
  }

  .zones-left span + span,
  .zones-right span + span {
    border-top: 0.75px solid var(--hair);
  }

  .inner {
    border: 0.75px solid var(--ink);
  }
}

.inner {
  padding: clamp(20px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(64px, 9vw, 120px);
}

.inner > *,
.inner main > * {
  min-width: 0;
}

/* ---------- Kopf ---------- */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 85%;
  letter-spacing: 0.02em;
}

.pos {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1.25px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.top nav a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--graphite);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--tusche);
}

/* ---------- Einstieg ---------- */

.intro {
  display: grid;
  gap: 40px;
  align-items: end;
}

@media (min-width: 860px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 64px;
  }
}

/* Zwischengröße (z. B. Handy quer, kleines Tablet): Porträt neben dem Namen */
@media (min-width: 641px) and (max-width: 859px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 12rem;
    gap: 32px;
  }

  .detail {
    width: 100%;
  }

  /* Bildtafeln neben dem Text statt über die volle Breite */
  .piece {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 28px;
  }

  .piece:nth-child(even) .plate {
    order: 2;
  }

  .piece .piece-text h3 {
    font-size: 1.375rem;
  }

  .piece .piece-text p {
    font-size: 0.9375rem;
  }

  .piece .titlepage {
    padding: 16px;
  }

  .piece .titlepage .t-main {
    font-size: 1.125rem;
  }

  .piece .titlepage .t-sub {
    font-size: 0.8125rem;
  }
}

.intro h1 {
  margin-top: 18px;
  font-size: clamp(3.25rem, 1.6rem + 7.5vw, 8.5rem);
  line-height: 0.88;
  font-weight: 750;
  font-stretch: 68%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.intro h1 span {
  display: block;
}

.intro h1 span + span {
  color: var(--tusche);
}

.lead {
  margin-top: 32px;
  max-width: 36em;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.6;
}

.lead em {
  font-style: italic;
}

/* Porträt als Detailansicht */
.detail {
  position: relative;
  justify-self: start;
  width: min(17rem, 100%);
}

.detail .ring {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.25px dashed var(--ink);
  padding: 10px;
}

.detail img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.detail figcaption {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail figcaption .pos {
  color: var(--tusche);
}

/* ---------- Abschnittskopf ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-bottom: 14px;
  border-bottom: 1.25px solid var(--ink);
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 650;
  font-stretch: 75%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.section-head .label {
  margin-left: auto;
}

/* ---------- Maßkette (Werdegang) ---------- */

.chain {
  display: grid;
  gap: 6px;
}

.track {
  display: grid;
  gap: 4px;
}

.track > .label {
  font-size: 0.6875rem;
}

.dim {
  display: grid;
  gap: 2px;
  padding-block: 10px;
  border-bottom: 0.75px solid var(--hair);
}

.dim b {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 85%;
  font-size: 1rem;
  line-height: 1.25;
}

.dim .where {
  font-size: 0.9375rem;
  color: var(--graphite);
}

.dim .years {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}

.axis,
.today {
  display: none;
}

/* Maßkette gilt für alle Breiten; schmale Bildschirme siehe unten */
@media all {
  .chain {
    gap: 22px;
    position: relative;
    padding-top: 8px;
  }

  .track {
    grid-template-columns: 7.5rem 1fr;
    align-items: end;
    gap: 16px;
  }

  .track > .label {
    padding-bottom: 6px;
  }

  .lane {
    position: relative;
    height: 3.6rem;
  }

  .dim {
    position: absolute;
    bottom: 0;
    left: calc(var(--a) * 1%);
    width: calc((var(--b) - var(--a)) * 1%);
    padding: 0 0 12px;
    border: 0;
    text-align: center;
    justify-items: center;
    align-content: end;
  }

  /* Maßlinie */
  .dim::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    height: 1px;
    background: var(--ink);
    transform-origin: left center;
  }

  /* Maßhilfslinien mit Schrägstrich an beiden Enden */
  .dim::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 11px;
    background:
      linear-gradient(var(--ink), var(--ink)) left bottom / 1px 11px no-repeat,
      linear-gradient(var(--ink), var(--ink)) right bottom / 1px 11px no-repeat,
      linear-gradient(135deg, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%) -4px 1px / 9px 9px no-repeat,
      linear-gradient(135deg, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%) calc(100% + 4px) 1px / 9px 9px no-repeat;
  }

  /* offenes Ende: läuft noch */
  .dim.open::before {
    background:
      linear-gradient(var(--ink), var(--ink)) left bottom / 1px 11px no-repeat,
      linear-gradient(135deg, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%) -4px 1px / 9px 9px no-repeat;
  }

  .dim.open::after {
    background: linear-gradient(90deg, var(--ink) 70%, transparent);
  }

  .dim.accent b {
    color: var(--tusche);
  }

  .dim .where {
    display: none;
  }

  .dim b,
  .dim .years {
    white-space: nowrap;
  }

  .dim.narrow b {
    font-size: 0.875rem;
  }

  .axis {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 16px;
  }

  .ticks {
    position: relative;
    height: 22px;
    border-top: 1px solid var(--ink);
  }

  .ticks span {
    position: absolute;
    top: 0;
    left: calc(var(--y) * 1%);
    transform: translateX(-50%);
    padding-top: 8px;
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--graphite);
    font-variant-numeric: tabular-nums;
  }

  .ticks span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 5px;
    background: var(--ink);
  }

  /* Maßstabswechsel 2023: Bruchzeichen auf der Achse */
  .ticks .brk {
    position: absolute;
    top: -7px;
    left: calc(var(--y) * 1%);
    width: 14px;
    height: 14px;
    transform: translateX(-50%);
    background:
      linear-gradient(115deg, transparent 38%, var(--ink) 38%, var(--ink) 48%, transparent 48%),
      linear-gradient(115deg, transparent 58%, var(--ink) 58%, var(--ink) 68%, transparent 68%);
    background-color: var(--sheet);
  }

  /* Stand 11/2026 = 40 + 3,87 × 15 */
  .today {
    display: block;
    position: absolute;
    top: 0;
    bottom: 22px;
    left: calc(7.5rem + 16px + (100% - 7.5rem - 16px) * 0.9805);
    border-left: 1px dashed var(--tusche);
  }

  .today span {
    position: absolute;
    top: -6px;
    right: 6px;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--tusche);
  }

  @media (prefers-reduced-motion: no-preference) {
    .dim::after {
      animation: draw 900ms var(--ease) both;
      animation-delay: calc(var(--a) * 10ms);
    }
  }
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.notes {
  margin-top: 44px;
  display: grid;
  gap: 28px 48px;
}

@media (min-width: 820px) {
  .notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notes h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  font-stretch: 85%;
  margin-bottom: 6px;
}

.notes p {
  font-size: 0.96875rem;
  color: var(--graphite);
}

/* ---------- Stückliste (Arbeiten) ---------- */

.parts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

/* schmal: Spalte „Art“ ausblenden, damit die Tabelle ohne Scrollen passt */
@media (max-width: 640px) {
  .parts th:nth-child(3),
  .parts td:nth-child(3) {
    display: none;
  }
}

.parts th,
.parts td {
  text-align: left;
  padding: 10px 14px 10px 0;
  border-bottom: 0.75px solid var(--hair);
  vertical-align: baseline;
}

.parts th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  border-bottom: 1px solid var(--ink);
}

.parts td:first-child {
  width: 3.5rem;
}

.parts td.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--graphite);
}

.parts a {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 85%;
  color: var(--ink);
  text-decoration: none;
}

.parts a:hover {
  color: var(--tusche);
}

.pieces {
  margin-top: 64px;
  display: grid;
  gap: 72px;
}

.piece {
  display: grid;
  gap: 24px 48px;
  align-items: start;
}

@media (min-width: 860px) {
  .piece {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .piece:nth-child(even) .plate {
    order: 2;
  }
}

.plate {
  position: relative;
  border: 1px solid var(--ink);
  padding: 8px;
  background: var(--sheet);
}

.plate img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 0.75px solid var(--hair);
}

.plate .pos {
  position: absolute;
  top: -1rem;
  left: -1rem;
  z-index: 2;
  background: var(--sheet);
  color: var(--tusche);
}

/* Titelblatt der Bachelorarbeit */
.titlepage {
  aspect-ratio: 16 / 10;
  border: 0.75px solid var(--hair);
  background: var(--tusche-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 4vw, 40px);
}

.titlepage .t {
  display: grid;
  gap: 10px;
  max-width: 30em;
}

.titlepage .t-main {
  font-family: var(--text);
  font-size: clamp(1.3125rem, 1rem + 1.2vw, 1.875rem);
  line-height: 1.15;
  font-weight: 600;
}

.titlepage .t-sub {
  font-family: var(--text);
  font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.0625rem);
  line-height: 1.45;
  color: var(--graphite);
}

.piece-text {
  display: grid;
  gap: 14px;
}

.piece-text h3 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 650;
  font-stretch: 78%;
  text-transform: uppercase;
  line-height: 1.05;
}

.piece-text p {
  color: var(--graphite);
}

.spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.875rem;
  padding-top: 14px;
  border-top: 0.75px solid var(--hair);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  padding-top: 2px;
}

/* ---------- Werkzeug ---------- */

.tools {
  display: grid;
  gap: 0;
}

.tools div:first-child,
.rev li:first-child {
  padding-top: 0;
}

.tools div {
  display: grid;
  gap: 4px 24px;
  padding-block: 14px;
  border-bottom: 0.75px solid var(--hair);
}

@media (min-width: 640px) {
  .tools div {
    grid-template-columns: 10rem 1fr;
  }
}

.tools dd {
  font-family: var(--mono);
  font-size: 0.875rem;
}

/* ---------- Änderungsindex (Ausblick) ---------- */

.rev li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 0.75px solid var(--hair);
}

.rev .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  translate: 0 0.15rem;
}

.rev b {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 85%;
  font-size: 1.0625rem;
}

.rev p {
  margin-top: 2px;
  font-size: 0.96875rem;
  color: var(--graphite);
  max-width: 44em;
}

.rev .state {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 3px 8px;
  border: 1px solid var(--hair);
  color: var(--graphite);
}

.rev .state.next {
  border-color: var(--ink);
  color: var(--ink);
}

.rev .state.now {
  border-color: var(--tusche);
  background: var(--tusche-soft);
  color: var(--tusche);
}

/* ---------- Schriftfeld ---------- */

.titleblock {
  display: grid;
  gap: 40px;
  align-items: end;
}

@media (min-width: 900px) {
  .titleblock {
    grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
  }
}

.titleblock .say {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  max-width: 28em;
}

.field {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75px;
  background: var(--ink);
  border: 1.5px solid var(--ink);
}

.field > div {
  padding: 8px 10px 10px;
  background: var(--sheet);
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}

.field .label {
  font-size: 0.625rem;
}

.field .v {
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.field .v a {
  color: var(--ink);
}

.field .v a:hover {
  color: var(--tusche);
}

.field .big {
  grid-column: span 3;
}

.field .big .v {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 700;
  font-stretch: 75%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.field .w2 {
  grid-column: span 2;
}

.field .w4 {
  grid-column: span 4;
}

@media (max-width: 520px) {
  .field {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field .big,
  .field .w2,
  .field .w4,
  .field .big + div {
    grid-column: span 2;
  }
}

/* ---------- Rechtstexte ---------- */

.legal {
  max-width: 44rem;
  display: grid;
  gap: 14px;
}

.legal h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  font-weight: 750;
  font-stretch: 70%;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 12px;
}

.legal h2 {
  font-size: 1.125rem;
  font-weight: 650;
  font-stretch: 85%;
  margin-top: 26px;
}

.legal p,
.legal li {
  font-size: 1rem;
  color: var(--graphite);
}

.legal ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.legal address {
  font-style: normal;
  color: var(--graphite);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.foot a {
  color: var(--graphite);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

/* ---------- Schmale Bildschirme: kompakt, nah am Desktop-Format ---------- */

@media (max-width: 640px) {
  .inner {
    gap: 56px;
  }

  .section-head {
    margin-bottom: 22px;
    padding-bottom: 10px;
  }

  /* Kopf: Navigation über die ganze Breite in einer Zeile;
     der Name steht direkt darunter groß, das Kürzel entfällt */
  .mark {
    display: none;
  }

  .top nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
  }

  .top nav a {
    font-size: 0.6875rem;
    white-space: nowrap;
  }

  /* Einstieg: Name links, Porträt rechts, Text darunter */
  .intro {
    grid-template-columns: minmax(0, 1fr) 7.25rem;
    grid-template-areas:
      'label photo'
      'name photo'
      'lead lead';
    gap: 0 14px;
    align-items: start;
  }

  .intro > div {
    display: contents;
  }

  .intro > div > .label {
    grid-area: label;
  }

  .intro h1 {
    grid-area: name;
    margin-top: 10px;
    font-size: 2.75rem;
  }

  .lead {
    grid-area: lead;
    margin-top: 22px;
    font-size: 1.0625rem;
  }

  .detail {
    grid-area: photo;
    width: 100%;
  }

  .detail .ring {
    padding: 5px;
  }

  .detail figcaption {
    margin-top: 8px;
    gap: 6px;
  }

  .detail figcaption .pos {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.5625rem;
  }

  .detail figcaption .label {
    font-size: 0.5625rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  /* Maßkette kompakt: kurze Namen, wenige Jahre */
  .chain {
    gap: 8px;
  }

  .track {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Zeilennamen (Handwerk, Studium …) entfallen mobil */
  .track > .label {
    display: none;
  }

  .lane {
    height: 2.3rem;
  }

  .dim {
    padding-bottom: 10px;
  }

  .dim b {
    font-size: 0.75rem;
  }

  .dim b[data-short] {
    font-size: 0;
  }

  .dim b[data-short]::after {
    content: attr(data-short);
    font-size: 0.75rem;
  }

  .dim .years {
    display: none;
  }

  .axis {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .axis > span:first-child,
  .ticks span:nth-of-type(2),
  .ticks span:nth-of-type(3),
  .ticks span:nth-of-type(5),
  .ticks span:nth-of-type(7),
  .ticks span:nth-of-type(9) {
    display: none;
  }

  .ticks span,
  .today span {
    font-size: 0.625rem;
  }

  /* erste und letzte Jahreszahl nach innen setzen, damit sie nicht überstehen */
  .ticks span:first-of-type {
    transform: none;
  }

  .ticks span:first-of-type::before {
    left: 0;
  }

  .ticks span:last-of-type {
    transform: translateX(-100%);
  }

  .ticks span:last-of-type::before {
    left: auto;
    right: 0;
  }

  .today {
    left: calc(100% * 0.9805);
  }

  .notes {
    margin-top: 28px;
    gap: 18px;
  }

  .notes h3 {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .notes p {
    font-size: 0.9375rem;
  }

  /* Arbeiten */
  .pieces {
    margin-top: 40px;
    gap: 48px;
  }

  .piece {
    gap: 18px;
  }

  .piece-text p {
    font-size: 0.9375rem;
  }

  /* Werkzeug zweispaltig wie auf dem Desktop */
  .tools div {
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 12px;
    padding-block: 10px;
  }

  .tools dt {
    font-size: 0.625rem;
    padding-top: 3px;
  }

  .tools dd {
    font-size: 0.8125rem;
  }

  /* Ausblick: Status rechts neben dem Titel, Text darunter */
  .rev li {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    grid-template-areas:
      'idx title state'
      '. text text';
    gap: 2px 12px;
    padding-block: 12px;
  }

  .rev li > div {
    display: contents;
  }

  .rev .idx {
    grid-area: idx;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.6875rem;
  }

  .rev b {
    grid-area: title;
    font-size: 1rem;
  }

  .rev p {
    grid-area: text;
    font-size: 0.9375rem;
  }

  .rev .state {
    grid-area: state;
    align-self: start;
    font-size: 0.5625rem;
    padding: 2px 6px;
  }
}
