@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/onest-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/onest-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/onest-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/onest-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Unbounded Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/unbounded-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Unbounded Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/unbounded-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Unbounded Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/unbounded-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/unbounded-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Cutwisp: Leitidee Schneidematte. Grünes Raster, cuttergelbe Griffe, Tinte auf kühlem Papier. */

:root {
  --papier: #f3f6f4;
  --tinte: #14211b;
  --tinte-leise: #4a5d54;
  --matte: #1f5c46;
  --matte-tief: #123a2c;
  --linie: 94 156 130; /* #5E9C82 als RGB-Werte für Transparenz */
  --gelb: #f2c230;
  --gelb-tief: #d9a91a;
  --rot: #d9442e;
  --rund: 10px;
  --breite: 1120px;
  --text: 'Onest Variable', 'Segoe UI', system-ui, sans-serif;
  --titel: 'Unbounded Variable', 'Onest Variable', 'Segoe UI', system-ui, sans-serif;
}

/* Hindi: Onest und Unbounded haben keine Devanagari-Zeichen. Passende Systemschriften davor,
   normaler Buchstabenabstand (enger Abstand lässt Devanagari-Zeichen überlappen), etwas mehr Zeilenhöhe. */
:root:lang(hi) {
  --text: 'Nirmala UI', 'Noto Sans Devanagari', 'Mukta', 'Onest Variable', system-ui, sans-serif;
  --titel: 'Nirmala UI', 'Noto Sans Devanagari', 'Mukta', 'Onest Variable', system-ui, sans-serif;
}
:lang(hi) body { line-height: 1.75; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(hi) .ablage-titel, :lang(hi) .startliste strong { letter-spacing: 0; font-weight: 700; line-height: 1.35; }

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font: 400 1.0625rem/1.6 var(--text);
}

img, video, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; border-radius: 4px; }
.matte :focus-visible { outline-color: var(--gelb); }

[hidden] { display: none !important; }

.nur-leser {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.springen {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--gelb); color: var(--tinte); padding: .5rem .9rem; border-radius: 6px;
}
.springen:focus { top: 1rem; }

.innen { width: min(100% - 2.5rem, var(--breite)); margin-inline: auto; }

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

.seitenkopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem;
  padding-block: 1.1rem;
}
.marke {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 700 1.2rem/1 var(--titel); letter-spacing: -.01em; text-decoration: none;
}
.marke svg { width: 30px; height: 30px; }
.werkzeuge { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-right: auto; }
.werkzeuge a { text-decoration: none; color: var(--tinte-leise); padding-block: .25rem; }
.werkzeuge a:hover { color: var(--tinte); }
.werkzeuge a[aria-current="page"] { color: var(--tinte); box-shadow: inset 0 -2px 0 var(--gelb-tief); }
.werkzeuge .alle-link { color: var(--matte); font-weight: 600; }

/* Sprachauswahl als kleines Ausklappmenü */
.sprachwahl { position: relative; }
.sprachwahl summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .9rem; font-weight: 600; color: var(--tinte-leise);
  padding: .35rem .6rem; border-radius: 8px; border: 1.5px solid rgb(20 33 27 / .15);
}
.sprachwahl summary::-webkit-details-marker { display: none; }
.sprachwahl summary:hover, .sprachwahl[open] summary { color: var(--tinte); border-color: rgb(20 33 27 / .35); }
.sprachwahl ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 11rem;
  margin: 0; padding: .35rem; list-style: none; background: #fff;
  border: 1px solid rgb(20 33 27 / .12); border-radius: 10px; box-shadow: 0 10px 30px rgb(20 33 27 / .14);
}
.sprachwahl a { display: block; padding: .45rem .7rem; border-radius: 6px; text-decoration: none; }
.sprachwahl a:hover { background: rgb(31 92 70 / .08); }
.sprachwahl a[aria-current="true"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--gelb-tief); }

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

.einstieg { padding-block: 1.5rem 1.75rem; }
h1, h2, h3 { font-family: var(--titel); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
h1 { font-size: clamp(1.85rem, 1.2rem + 3vw, 3.1rem); margin: 0 0 .9rem; max-width: 20ch; }
.einstieg p { margin: 0; max-width: 58ch; font-size: 1.15rem; color: var(--tinte-leise); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 0 0 1rem; }

/* ---------------------------------------------------------------- Schneidematte */

.matte {
  position: relative;
  background-color: var(--matte);
  background-image:
    linear-gradient(to right, rgb(var(--linie) / .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(var(--linie) / .5) 1px, transparent 1px),
    linear-gradient(to right, rgb(var(--linie) / .2) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(var(--linie) / .2) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  color: var(--papier);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 2rem);
}
.matte.ziehen { box-shadow: inset 0 0 0 4px var(--gelb); }

/* Ablage: gestrichelte Schnittlinie */
.ablage-feld {
  display: grid; justify-items: center; gap: .6rem; text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  border: 2px dashed rgb(243 246 244 / .7); border-radius: 12px;
  background: rgb(18 58 44 / .55);
  cursor: pointer;
}
.ablage-titel { font: 600 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1.2 var(--titel); }
.ablage-oder { color: rgb(243 246 244 / .75); }
.ablage-hinweis { margin-top: .4rem; font-size: .95rem; color: rgb(243 246 244 / .8); }
.ablage input:focus-visible + .ablage-feld { outline: 3px solid var(--gelb); outline-offset: 4px; }
.ablage.liest .ablage-feld { opacity: .6; cursor: progress; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem/1.2 var(--text); padding: .7rem 1.15rem; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
}
.knopf:disabled { opacity: .55; cursor: not-allowed; }
.knopf-gelb { background: var(--gelb); color: var(--tinte); border-color: var(--gelb); }
.knopf-gelb:hover:not(:disabled) { background: #ffd34a; }
.knopf-rand { background: transparent; color: var(--papier); border-color: rgb(243 246 244 / .55); }
.knopf-rand:hover:not(:disabled) { border-color: var(--papier); }
.knopf-gross { font-size: 1.1rem; padding: .85rem 1.5rem; }

/* Bühne: Video links, beim Hochformat das Ergebnis rechts */
.buehne { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.vorschau {
  --ar: 1.7778;
  position: relative; overflow: hidden; border-radius: 10px; background: #000;
  aspect-ratio: var(--ar);
  width: min(100%, calc(44vh * var(--ar)));
  flex: 0 1 auto;
}
.vorschau.nur-ton { aspect-ratio: auto; background: transparent; width: 100%; }
.vorschau video { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.vorschau.nur-ton video { height: 54px; }
.rahmen {
  position: absolute; border: 3px solid var(--gelb); border-radius: 4px;
  box-shadow: 0 0 0 100vmax rgb(6 18 13 / .58);
  cursor: grab; touch-action: none;
}
.rahmen:active { cursor: grabbing; }
.ergebnis { margin: 0; display: grid; gap: .4rem; justify-items: start; }
.ergebnis canvas {
  width: 162px; height: 288px; border-radius: 10px; background: #000;
  border: 2px solid rgb(243 246 244 / .35);
}
.ergebnis figcaption { font-size: .85rem; color: rgb(243 246 244 / .8); }
.hinweis { margin: .75rem 0 0; font-size: .95rem; color: rgb(243 246 244 / .85); }

/* Zeitleiste mit Filmstreifen, gelben Griffen und Lineal */
.leiste {
  position: relative; height: 68px; margin-top: 1.5rem;
  background: var(--matte-tief); border-radius: 8px; cursor: pointer; touch-action: none;
}
.streifen { position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 8px; }
.streifen canvas { flex: 1 1 0; min-width: 0; height: 100%; width: 100%; object-fit: cover; opacity: .9; }
.streifen canvas.welle { object-fit: fill; opacity: 1; }
.dim { position: absolute; top: 0; bottom: 0; background: rgb(6 18 13 / .68); pointer-events: none; }
.dim-l { left: 0; border-radius: 8px 0 0 8px; }
.dim-r { right: 0; border-radius: 0 8px 8px 0; }
.auswahl {
  position: absolute; top: 0; bottom: 0; pointer-events: none;
  border-block: 3px solid var(--gelb);
}
.kopf { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--papier); pointer-events: none; }
.griff {
  position: absolute; top: -8px; bottom: -8px; width: 18px; margin-left: -9px;
  background: var(--gelb); border-radius: 5px; cursor: ew-resize; touch-action: none;
  box-shadow: 0 1px 0 var(--gelb-tief), 0 2px 8px rgb(0 0 0 / .35);
}
.griff::after {
  content: ''; position: absolute; inset: 22px 6px;
  background: repeating-linear-gradient(to right, var(--tinte) 0 1.5px, transparent 1.5px 4px);
  opacity: .55;
}
.griff.aktiv, .griff:hover { background: #ffd34a; }
.griff:focus-visible { outline: 3px solid var(--papier); outline-offset: 2px; }

.lineal { position: relative; height: 26px; margin-top: 10px; font-size: .78rem; color: rgb(243 246 244 / .75); font-variant-numeric: tabular-nums; }
.lineal span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
.lineal span::before { content: ''; position: absolute; left: 50%; top: -7px; width: 1px; height: 5px; background: rgb(243 246 244 / .6); }
.lineal span:first-child { transform: none; }
.lineal span:first-child::before { left: 0; }
.lineal span.letzte { transform: translateX(-100%); }
.lineal span.letzte::before { left: auto; right: 0; }

/* Zeiten */
.zeiten { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin-top: 1rem; }
.feld { display: grid; gap: .3rem; font-size: .9rem; color: rgb(243 246 244 / .85); }
.feld input[type="text"] {
  width: 9ch; font: 600 1.05rem/1.2 var(--text); font-variant-numeric: tabular-nums;
  color: var(--papier); background: rgb(6 18 13 / .45);
  border: 1.5px solid rgb(var(--linie) / .9); border-radius: 7px; padding: .5rem .6rem;
}
.laenge { font-size: .95rem; color: rgb(243 246 244 / .85); padding-bottom: .55rem; }
.laenge output { font-weight: 600; color: var(--papier); font-variant-numeric: tabular-nums; }
.zeiten .knopf { padding: .5rem .8rem; font-size: .92rem; }

/* Optionen */
.optionen { border: 0; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.optionen legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.wahl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: start; cursor: pointer; max-width: 62ch; }
.wahl input { margin-top: .3rem; accent-color: var(--gelb); width: 1.1rem; height: 1.1rem; }
.wahl small { grid-column: 2; color: rgb(243 246 244 / .75); font-size: .9rem; }
.feld input[type="range"] { width: min(100%, 22rem); accent-color: var(--gelb); }
.groesse { margin: 0; font-size: .9rem; color: rgb(243 246 244 / .75); }

/* Aktion, Fortschritt, Meldung */
.aktion { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.fortschritt { margin-top: 1.25rem; height: 10px; background: rgb(6 18 13 / .55); border-radius: 99px; overflow: hidden; max-width: 36rem; }
.fortschritt span { display: block; height: 100%; width: 0; background: var(--gelb); transition: width .2s linear; }
.status { margin: .6rem 0 0; min-height: 1.6em; }
.ergebnis-link { margin-top: .4rem; }
.meldung {
  margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 8px;
  background: var(--rot); color: #fff; max-width: 60ch;
}

/* ---------------------------------------------------------------- Inhalt unter dem Werkzeug */

.abschnitt { padding-block: 3rem 0; max-width: 70ch; }
.schritte { margin: 0; padding: 0; list-style: none; counter-reset: schritt; display: grid; gap: 1.1rem; }
.schritte li { counter-increment: schritt; display: grid; grid-template-columns: 2.6rem 1fr; gap: .9rem; align-items: baseline; }
.schritte li::before {
  content: counter(schritt); font: 700 1.5rem/1 var(--titel); color: var(--matte);
  border-bottom: 3px solid var(--gelb); padding-bottom: .2rem; text-align: center;
}
.fragen details { border-top: 1px solid rgb(20 33 27 / .15); padding-block: .9rem; }
.fragen details:last-child { border-bottom: 1px solid rgb(20 33 27 / .15); }
.fragen summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.fragen details p { margin: .6rem 0 0; color: var(--tinte-leise); }
.liste { margin: 0; padding: 0; list-style: none; display: grid; gap: .9rem; }
.liste a { font-weight: 600; }
.liste p { margin: .15rem 0 0; color: var(--tinte-leise); }

/* Werkzeug-Raster wie auf der Schneidematte: Zellen mit feinen Linien, ohne Außenrand */
.startliste {
  margin: 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  background: var(--matte); border-radius: 16px; overflow: hidden;
}
.startliste li {
  color: var(--papier); margin: 0 -1px -1px 0;
  border-right: 1px solid rgb(var(--linie) / .55); border-bottom: 1px solid rgb(var(--linie) / .55);
}
.startliste a {
  display: grid; align-content: start; gap: .35rem; height: 100%; padding: 1.3rem 1.4rem; text-decoration: none;
}
.startliste a:hover { background: var(--matte-tief); }
.startliste strong { font: 600 1.25rem/1.2 var(--titel); }
.startliste span { color: rgb(243 246 244 / .82); }

.startgruppe { margin-top: 2.25rem; }
.startgruppe:first-child { margin-top: 0; }
.startgruppe h2 { margin-bottom: .85rem; }

.wahl.haken { margin-top: .4rem; }
.wahl small input[type="number"] {
  width: 7ch; font: 600 1rem/1.2 var(--text); color: var(--papier); background: rgb(6 18 13 / .45);
  border: 1.5px solid rgb(var(--linie) / .9); border-radius: 7px; padding: .35rem .5rem; margin-top: .3rem;
}
.wahl small input[type="number"]:disabled { opacity: .5; }

.seitenfuss { margin-top: 4.5rem; padding-block: 2.5rem 2rem; border-top: 1px solid rgb(20 33 27 / .12); color: var(--tinte-leise); font-size: .95rem; }
.fuss-werkzeuge { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2rem; }
.fuss-werkzeuge h2 { font: 600 .95rem/1.3 var(--titel); color: var(--tinte); margin: 0 0 .7rem; letter-spacing: 0; }
.fuss-werkzeuge ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.fuss-werkzeuge a { text-decoration: none; }
.fuss-werkzeuge a:hover { text-decoration: underline; }
.fuss-werkzeuge a[aria-current="page"] { color: var(--tinte); font-weight: 600; }
.fuss-text { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgb(20 33 27 / .08); }
.fuss-text p { margin: 0 0 .4rem; max-width: 60ch; }
.fuss-recht { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.fuss-recht a { text-decoration: none; }
.fuss-recht a:hover { text-decoration: underline; }

.rechtstext { max-width: 70ch; padding-block: 1.5rem 0; }
.rechtstext h1 { margin-bottom: 1.5rem; }
.rechtstext h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.rechtstext p { margin: 0 0 .8rem; }

@media (max-width: 640px) {
  .seitenkopf { gap: .5rem 1rem; }
  .werkzeuge { order: 3; width: 100%; }
  .ergebnis canvas { width: 135px; height: 240px; }
  .vorschau { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fortschritt span, .vorschau video { transition: none; }
}
