/* Arbeitsprobe Ismail Cirganis · Kanton Aargau · Stand 30.11.2026 */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/source-sans-3-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --ink: #1f2429;
  --muted: #5d646c;
  --line: #d8d0c3;
  --line-soft: #e8e2d7;
  --petrol: #0f6b74;
  --petrol-dark: #0a4d54;
  --petrol-soft: #e3eeee;
  --bus: #0f6b74;
  --rail: #1f2429;
  --walk: #8a6d3b;
  --flash: #fff3c4;
  --serif: "Source Serif 4", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, system-ui, sans-serif;
  --measure: 72ch;
  --gutter: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--petrol-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--petrol); }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.95rem); margin-block: 0 0.6em; }
h3 { font-size: 1.2rem; margin-block: 1.4em 0.4em; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; }
small, .small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.wrap { padding-inline: var(--gutter); max-width: 1180px; margin-inline: auto; }
@media (min-width: 1200px) { body { font-size: 1.125rem; } :root { --measure: 74ch; } }
section { padding-block: 2.6rem 1.2rem; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }
.eyebrow {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--petrol-dark); margin-bottom: 0.6rem;
}

/* Kopf */
header.hero { padding-block: 2.2rem 1.6rem; }
.hero .meta { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 1.4rem; }
.hero .meta span + span::before { content: " · "; }
.lead { font-size: 1.15rem; max-width: var(--measure); }

.rec {
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--petrol);
  padding: 1rem 1.2rem; margin: 1.4rem 0; max-width: 56rem;
}
.rec p { margin-bottom: 0.6em; }
.rec p:last-child { margin-bottom: 0; }
.rec .eyebrow { margin-bottom: 0.4rem; }

/* Inhaltsübersicht */
nav.toc { margin-top: 0.5rem; }
nav.toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; max-width: none; }
nav.toc a {
  display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); text-decoration: none; color: var(--ink); font-size: 0.95rem;
}
nav.toc a:hover { border-color: var(--petrol); color: var(--petrol-dark); }

.note {
  margin-top: 1.4rem; padding: 1rem 1.2rem; background: var(--petrol-soft);
  border-radius: 6px; max-width: 56rem;
}
.note h2 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; margin-bottom: 0.4rem; }
.note p { margin: 0; }

/* Kasten */
.box { background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.box h3 { margin-top: 0; }
.box p:last-child { margin-bottom: 0; }
.two { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 60rem; }
.profile-note {
  border-left: 3px solid var(--walk); padding: 0.2rem 0 0.2rem 0.9rem; margin: 1rem 0; color: var(--muted);
  font-size: 0.98rem; max-width: 56rem;
}
.profile-note strong { color: var(--ink); }

/* Liniengrafik */
figure { margin: 1.4rem 0; }
figure svg { width: 100%; height: auto; display: block; max-width: 1000px; }
.svg-mobile { display: none; max-width: 420px; }
@media (max-width: 640px) { .svg-desktop { display: none; } .svg-mobile { display: block; } }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; max-width: var(--measure); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.legend span::before { content: ""; display: inline-block; width: 1.6em; height: 0; border-top: 3px solid currentColor; vertical-align: middle; margin-right: 0.4em; }
.legend .l-bus { color: var(--bus); }
.legend .l-rail { color: var(--rail); }
.legend .l-walk { color: var(--walk); }
.legend .l-walk::before { border-top-style: dashed; }
.legend .l-planned { color: var(--petrol-dark); }
.legend .l-planned::before { border-top-style: dotted; }

/* Schaltflächen */
.btnrow { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0.5rem 1rem;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px;
}
.btn[aria-pressed="true"] { background: var(--petrol-dark); border-color: var(--petrol-dark); color: #fff; }
.btn[aria-pressed="true"]::before { content: "✓ "; }
.btn:hover { border-color: var(--petrol); }

/* Anschlusskette */
.chain { list-style: none; padding: 0; margin: 0.8rem 0 0; max-width: 56rem; border: 1px solid var(--line); background: var(--paper); }
.chain li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.6rem; align-items: baseline; padding: 0.65rem 0.9rem; border-top: 1px solid var(--line-soft); }
.chain li:first-child { border-top: 0; }
.chain .t { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chain .gap { background: var(--petrol-soft); }
.chain .gap .t { color: var(--petrol-dark); }
.chain .what strong { display: block; }
.chain .what > span { color: var(--muted); font-size: 0.95rem; }
.flash { animation: flash 0.9s ease-out 1; }
@keyframes flash { 0% { background-color: var(--flash); } 100% { background-color: transparent; } }

/* Regler */
.slider { max-width: 56rem; background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.2rem; margin-top: 1rem; }
.slider label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.slider input[type="range"] { width: 100%; accent-color: var(--petrol-dark); height: 44px; margin: 0; }
.slider .scale { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wait { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1rem; }
.wait div { border-top: 3px solid var(--petrol); padding-top: 0.5rem; }
.wait .big { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; display: block; }
.wait .deps { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Varianten */
.variants { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-top: 1rem; }
.variant { background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.variant h3 { margin-top: 0; font-size: 1.15rem; }
.variant dl { margin: 0.4rem 0 0; }
.variant dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--petrol-dark); margin-top: 0.7rem; }
.variant dd { margin: 0.15rem 0 0; }
.variant dd.q { font-style: italic; }

/* Prüfkriterien */
.criteria { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 60rem; }
.criteria li { background: var(--paper); border: 1px solid var(--line); padding: 0.9rem 1rem; margin: 0; }
.criteria strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.3rem; }

/* Zuständigkeiten */
details { margin: 1rem 0; max-width: 60rem; border: 1px solid var(--line); background: var(--paper); }
details > summary {
  cursor: pointer; list-style: none; padding: 0.8rem 1.1rem; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 0.6rem;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; font-family: var(--serif); font-size: 1.4rem; line-height: 1; color: var(--petrol-dark); width: 1em; }
details[open] > summary::before { content: "−"; }
details .inner { padding: 0 1.1rem 1rem; border-top: 1px solid var(--line-soft); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; margin-top: 0.8rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem 0.55rem 0; border-top: 1px solid var(--line-soft); }
th { font-weight: 600; width: 11rem; }
thead th { border-top: 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--petrol-dark); }
.scroll { overflow-x: auto; }

/* Profil */
.profile { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 60rem; }
.profile .facts { background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.2rem; font-size: 0.98rem; }
.profile .facts p { margin-bottom: 0.5em; }
@media (min-width: 760px) { .profile { grid-template-columns: 1.4fr 1fr; align-items: start; } }

/* Quellen */
.sources { font-size: 0.93rem; }
.sources ol { padding-left: 2.2em; max-width: 60rem; }
.sources li { margin-bottom: 0.55em; }
.sources li::marker { color: var(--petrol-dark); font-weight: 600; }
.sources a { word-break: break-word; }
sup.ref { font-size: 0.72em; line-height: 0; }
sup.ref a { text-decoration: none; color: var(--petrol-dark); font-weight: 600; }

footer { padding-block: 2rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
footer p { margin-bottom: 0.4em; }

@media (max-width: 640px) {
  table, tbody, tr, th, td { display: block; width: auto; }
  thead { display: none; }
  tr { border-top: 1px solid var(--line-soft); padding: 0.6rem 0; }
  th, td { border-top: 0; padding: 0; }
  th { color: var(--petrol-dark); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.2rem; }
}
@media (max-width: 480px) {
  .chain li { grid-template-columns: 4.4rem 1fr; }
  .chain .t { font-size: 1.2rem; }
}

.rec p, .note p, .box p, .profile-note, .chain, .slider p { max-width: none; }
