:root {
  color-scheme: light dark;
  --paper: #e8ecf1;
  --ink: #101828;
  --muted: #566074;
  --line: #b9c2d0;
  --letter: #101828;
  --digit: #08716a;
  --symbol: #2447f5;
  --mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111826;
    --ink: #e7ebf3;
    --muted: #93a0b8;
    --line: #34405a;
    --letter: #e7ebf3;
    --digit: #3fcfc0;
    --symbol: #8aa0ff;
  }
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 10; padding: 0.6rem 1rem; border-radius: 6px;
  background: var(--ink); color: var(--paper);
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.page { max-width: 64rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4rem; }
.top-end { justify-content: flex-end; margin-bottom: 0; padding-top: 2rem; }
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: inherit; text-decoration: none; }
.back { color: var(--muted); text-underline-offset: 0.2em; }
.back:hover { color: var(--ink); }

h1, .sec-title {
  margin: 0 0 2.5rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}

/* Zeichenfarben (Wortmarke und Passwort) */
.c-l { color: var(--letter); }
.c-d { color: var(--digit); }
.c-s { color: var(--symbol); font-weight: 800; }

/* Startseite: erster Bildschirm */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero-in { flex: 1; display: flex; flex-direction: column; }
.hero-main { margin: auto 0; padding: 3rem 0 4rem; }

.wordmark {
  margin: 0 0 2rem;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(2.6rem, 12.5vw, 9.5rem); line-height: 1.05;
  letter-spacing: 0;
}
.word { display: flex; gap: 0.12em; cursor: default; user-select: none; }
.word span {
  min-width: 0.95em; text-align: center;
  border-bottom: 0.06em solid var(--line);
}
.lead { margin: 0 0 2rem; max-width: 32rem; color: var(--muted); font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.4; }
.cta {
  display: inline-block; padding: 0.8rem 1.6rem; border-radius: 6px;
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none;
}
.cta:hover { opacity: 0.88; }

/* Lineal am unteren Rand des ersten Bildschirms */
.hero-ruler {
  height: 3.25rem;
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 100px) bottom / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 10px) bottom / 100% 45% no-repeat,
    linear-gradient(var(--line), var(--line)) bottom / 100% 2px no-repeat;
}

/* Hero blendet beim Scrollen aus (nur Browser mit Scroll-Timelines) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-main { animation: hero-out linear both; animation-timeline: scroll(root); animation-range: 0 70svh; }
  }
}
@keyframes hero-out { to { opacity: 0; transform: translateY(-2.5rem); } }

/* Abschnitte */
.band { padding: 5rem 0; }
.band-last { padding-bottom: 6rem; }
.inverse {
  --paper: #101828; --ink: #e8ecf1; --muted: #93a0b8; --line: #3b4763;
  --symbol: #8aa0ff; --digit: #3fcfc0; --letter: #e8ecf1;
  background: var(--paper); color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .inverse {
    --paper: #e8ecf1; --ink: #101828; --muted: #566074; --line: #b9c2d0;
    --symbol: #2447f5; --digit: #08716a; --letter: #101828;
  }
}

/* Einblenden beim Scrollen (nur wenn JavaScript läuft) */
@media (scripting: enabled) {
  .reveal {
    opacity: 0; transform: translateY(1.25rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* Tool-Kacheln */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1rem;
  list-style: none; margin: 0; padding: 0;
}
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  height: 100%; min-height: 14rem; padding: 1.25rem;
  border: 2px solid var(--ink); border-radius: 6px;
  color: inherit; text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.glyph { font-family: var(--mono); font-size: 2.75rem; font-weight: 700; line-height: 1; color: var(--symbol); }
.tile h3 { margin: 0 0 0.3rem; font-size: 1.25rem; letter-spacing: -0.01em; }
.tile p { margin: 0; font-size: 0.95rem; color: var(--muted); }
a.tile:hover, a.tile:focus-visible { background: var(--ink); color: var(--paper); }
a.tile:hover .glyph, a.tile:focus-visible .glyph,
a.tile:hover p, a.tile:focus-visible p { color: inherit; }
.tile.soon { border-style: dashed; border-color: var(--line); }
.tile.soon .glyph { color: var(--line); }
.tile .state { margin-top: 0.6rem; font-weight: 600; }

/* Warum Utilio */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; }
.fact { border-top: 2px solid var(--ink); padding-top: 1rem; }
.fact h3 { margin: 0 0 0.4rem; font-size: 1.2rem; letter-spacing: -0.01em; }
.fact p { margin: 0; color: var(--muted); max-width: 28rem; }

/* Fragen */
.faq { max-width: 44rem; border-top: 2px solid var(--line); }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 1rem; cursor: pointer;
  list-style: none; padding: 1.1rem 0; font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--symbol); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 1.2rem; color: var(--muted); max-width: 38rem; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--ink); }

/* Fusszeile */
.foot { padding: 2rem 0 3rem; color: var(--muted); font-size: 0.9rem; border-top: 2px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot nav { display: flex; gap: 1.25rem; }
.foot a { color: inherit; text-underline-offset: 0.2em; }
.foot a:hover { color: var(--ink); }

/* Textseiten (Impressum, Datenschutz) */
.prose { max-width: 40rem; }
.prose h2 { margin: 2.5rem 0 0.6rem; font-size: 1.35rem; letter-spacing: -0.02em; }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
.prose address { margin: 0 0 1rem; font-style: normal; line-height: 1.6; }
.prose a { text-underline-offset: 0.2em; }
.stand { margin-top: 2.5rem; color: var(--muted); font-size: 0.9rem; }

/* Passwort-Generator: Zeichen als Schreibfeld */
.comb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 4.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.comb span {
  display: inline-block;
  min-width: 1.15em;
  text-align: center;
  border-bottom: 2px solid var(--line);
  animation: reveal 0.35s ease-out both;
  animation-delay: calc(min(var(--i), 40) * 14ms);
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(0.3em); }
  to   { opacity: 1; transform: none; }
}

.legend {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem;
  list-style: none; margin: 1.25rem 0 3rem; padding: 0;
  font-size: 0.9rem;
}
.legend li::before {
  content: ""; display: inline-block; width: 0.7em; height: 0.7em;
  margin-right: 0.45em; border-radius: 50%; background: currentColor;
}

.ruler label { display: block; margin-bottom: 0.9rem; font-size: 1.05rem; }
.ruler strong { font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2.25rem; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 1.1rem;
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 10px) bottom / 100% 55% no-repeat,
    linear-gradient(var(--line), var(--line)) bottom / 100% 2px no-repeat;
}
input[type="range"]::-moz-range-track {
  height: 1.1rem; background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 10px) bottom / 100% 55% no-repeat,
    linear-gradient(var(--line), var(--line)) bottom / 100% 2px no-repeat;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 6px; height: 2.25rem; margin-top: -0.6rem;
  border-radius: 3px; background: var(--symbol); border: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 6px; height: 2.25rem; border-radius: 3px; background: var(--symbol); border: 0;
}
.ruler-ends { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 2.5rem; }
button {
  font: inherit; font-weight: 600; padding: 0.7rem 1.4rem; border-radius: 6px;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
button.primary { background: var(--ink); color: var(--paper); }
button:hover { opacity: 0.88; }
.status { color: var(--digit); font-weight: 600; min-height: 1.5em; }

.note { margin: 3rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* Formulare und Ergebnisse der Tools */
.tool-form { display: grid; gap: 1.25rem; max-width: 40rem; margin-bottom: 1.25rem; }
.field { display: grid; gap: 0.4rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; width: 100%;
  padding: 0.7rem 0.85rem; border: 2px solid var(--ink); border-radius: 6px;
  background: transparent; color: var(--ink);
}
.field textarea { resize: vertical; font-family: var(--mono); font-size: 0.95rem; }
.field input[type="file"] { padding: 0.55rem; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 0.9rem; padding: 0.35rem 0.8rem;
  border: 2px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer;
}
.mono { font-family: var(--mono); }
.tool-form button { justify-self: start; }
.note.tight { margin: 0 0 2rem; max-width: 40rem; }

.msg {
  margin: 1.5rem 0; padding: 1rem 1.15rem; max-width: 40rem;
  border-left: 6px solid var(--symbol);
  background: color-mix(in srgb, var(--symbol) 10%, transparent);
}

.result { margin-top: 2.5rem; }
.result h2 { margin: 0 0 1rem; font-size: 1.4rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.values { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line); }
.values li { padding: 0.8rem 0; border-bottom: 2px solid var(--line); overflow-wrap: anywhere; }
.data { width: 100%; border-collapse: collapse; border-top: 2px solid var(--line); }
.data th, .data td { text-align: left; padding: 0.8rem 0; border-bottom: 2px solid var(--line); vertical-align: top; }
.data th { width: 13rem; padding-right: 1rem; font-weight: 600; }
.data td { overflow-wrap: anywhere; }
.match { margin-left: 0.6rem; color: var(--digit); font-weight: 700; }

@media (max-width: 36rem) {
  .data th, .data td { display: block; width: auto; }
  .data th { padding-bottom: 0; border-bottom: 0; }
  .data td { padding-top: 0.15rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  .comb span { animation: none; }
  .tile { transition: none; }
  .reveal { transition: none; }
}

/* v7 */
[hidden] { display: none !important; }
@media (scripting: none) { .js-only { display: none !important; } }
@media (scripting: enabled) { .nojs-only { display: none !important; } }

:root { --lvl1: #c62828; --lvl2: #c4600a; --lvl3: #5a7d12; --lvl4: #076a63; }
@media (prefers-color-scheme: dark) {
  :root { --lvl1: #ff6b6b; --lvl2: #ffa14a; --lvl3: #c7e04a; --lvl4: #3fcfc0; }
}

/* Passwort-Generator: Optionen */
.opts { margin: 0 0 2.5rem; padding: 0; border: 0; min-width: 0; }
.opts legend { padding: 0; margin-bottom: 0.8rem; font-size: 1.05rem; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: inline-block; padding: 0.55rem 1rem; border: 2px solid var(--line);
  border-radius: 6px; font-weight: 600; transition: background-color 0.15s, color 0.15s;
}
.opt input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opt input:focus-visible + span { outline: 3px solid var(--symbol); outline-offset: 3px; }
.opt-extra { margin-top: 0.9rem; }
.opt-extra .opt span { font-weight: 500; }
.sep-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: 1rem; }
.sel {
  font: inherit; padding: 0.5rem 0.8rem; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--paper); color: var(--ink);
}
.opts-phrase { margin-top: 2rem; margin-bottom: 1rem; }
.comb .w { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; min-width: 0; border-bottom: 0; animation: none; text-align: left; }

.comb .w.flat { display: contents; }

/* Stärkeanzeige: Farbe und Füllung folgen der Stärke */
.strength { margin: 0 0 2.5rem; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 20rem; margin-bottom: 0.5rem; }
.strength-bar i { height: 8px; background: var(--line); transition: background-color 0.3s; }
.strength[data-level="1"] i.on { background: var(--lvl1); }
.strength[data-level="2"] i.on { background: var(--lvl2); }
.strength[data-level="3"] i.on { background: var(--lvl3); }
.strength[data-level="4"] i.on { background: var(--lvl4); }
.strength p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.strength strong { color: var(--ink); }

/* Wortmarke: feste Zellen, Zeichen erscheinen nacheinander */
.word span { display: grid; place-items: center; width: 0.95em; height: 1.15em; line-height: 1; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .word span { animation: cell-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--n, 0) * 80ms); }
}
@keyframes cell-in { from { opacity: 0; transform: translateY(0.3em); } to { opacity: 1; transform: none; } }

/* Hero: Tipp, Lineal-Marke */
.hero { overflow-x: clip; }
.tip { margin: 2.25rem 0 0; max-width: 34rem; min-height: 3.4em; font-family: var(--mono); font-size: 0.9rem; line-height: 1.65; color: var(--muted); }
.tip .prompt { margin-right: 0.8em; color: var(--symbol); font-weight: 700; }
.tip .caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 3px; vertical-align: -0.18em; background: var(--symbol); }
@media (prefers-reduced-motion: no-preference) {
  .tip .caret { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

.hero-ruler { position: relative; }
.rcur { position: absolute; left: var(--x, 0); bottom: 0; height: 100%; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.rcur.on { opacity: 1; }
.rcur::before { content: ""; position: absolute; bottom: 0; width: 2px; height: 100%; background: var(--symbol); transform: translateX(-50%); }
.rcur span {
  position: absolute; bottom: calc(100% + 0.3rem); left: 0; transform: translateX(calc(-50% + var(--dx, 0px)));
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--symbol); white-space: nowrap;
}

/* Kacheln: Symbol hat feste Höhe, damit nichts springt */
.glyph { display: block; height: 1.1em; line-height: 1.1; }

/* Fusszeile */
.foot { padding: 3.5rem 0 2rem; }
.foot .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.foot nav { display: block; }
.foot .foot-mark { display: inline-block; margin-bottom: 0.6rem; font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.foot-brand p { margin: 0 0 0.8rem; max-width: 24rem; }
.foot .foot-h { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.4rem; }
.foot .foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px solid var(--line); }
.srv { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; }
.srv .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--muted); }
.srv[data-state="ok"] .dot { background: var(--lvl4); }
.srv[data-state="down"] .dot { background: var(--lvl1); }
@media (prefers-reduced-motion: no-preference) {
  .srv[data-state="ok"] .dot { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lvl4) 25%, transparent); } }
@media (max-width: 42rem) {
  .foot .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* Spielerei: Hacker-Modus (Konami-Code) */
html.hacker {
  --paper: #03110a; --ink: #8dffb0; --muted: #4fbf76; --line: #145a31;
  --letter: #8dffb0; --digit: #e6ff8a; --symbol: #ffd75e; color-scheme: dark;
}
html.hacker .inverse { --paper: #06180e; --ink: #8dffb0; --muted: #4fbf76; --line: #1a6b3a; --symbol: #ffd75e; --digit: #e6ff8a; --letter: #8dffb0; }
html.hacker body { font-family: var(--mono); }
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 20; transform: translateX(-50%);
  max-width: calc(100vw - 2rem); padding: 0.7rem 1.1rem; border-radius: 6px;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 0.9rem; text-align: center;
}

/* v8 */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 1.5rem 0 0; }
.copy {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.9rem 1.6rem; border: 0; border-radius: 8px;
  background: var(--symbol); color: var(--paper);
  font-size: 1.1rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 30%, transparent);
  transition: background-color 0.2s, transform 0.1s;
}
.copy:hover { opacity: 1; filter: brightness(1.08); }
.copy:active { transform: translateY(2px); box-shadow: none; }
.copy[data-done] { background: var(--lvl4); }
.copy:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.copy-row + .legend { margin-top: 1.5rem; }

/* v9 */
.seo-text { margin-top: 4.5rem; padding-top: 2.5rem; border-top: 2px solid var(--line); }
.seo-text h2 { margin-top: 2rem; }
.seo-text h2:first-child { margin-top: 0; }

/* v10 */
.intro { max-width: 42rem; margin: 0 0 3rem; font-size: 1.15rem; line-height: 1.65; color: var(--muted); }
.intro a, .seo-text a { color: var(--ink); text-underline-offset: 0.2em; }
.intro a:hover, .seo-text a:hover { color: var(--symbol); }

/* v11 */
.more { max-width: 42rem; margin: 0 0 3rem; }
.more h3 { margin: 0 0 1rem; }
.more p { font-size: 1.05rem; line-height: 1.7; color: var(--muted); margin: 0 0 1rem; }
.more a, .share a { color: var(--ink); text-underline-offset: 0.2em; }
.more a:hover, .share a:hover { color: var(--symbol); }
.share { max-width: 42rem; margin: 0 0 2.5rem; line-height: 1.65; color: var(--muted); }

/* v13 */
/* Platz fürs Passwort reservieren, damit beim Laden nichts springt */
.comb { min-height: 1.36em; }
@media (max-width: 40rem) { .comb { min-height: 3.05em; } }
/* Footer-Links: mindestens 24 px hoch (WCAG 2.2, Zielgrösse) */
.foot li { margin-bottom: 0; }
.foot ul a, .foot .foot-base a { display: inline-block; padding: 0.4rem 0; }
