/* Krypton – Website. Alles in Krypton gesetzt, ein Akzent: Krypton-Violett. */
@font-face {
  font-family: "Krypton";
  src: url("fonts/Krypton-VF.woff2?v=0.2.0") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Krypton";
  src: url("fonts/Krypton-Italic-VF.woff2?v=0.2.0") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --fg: #111214;
  --muted: #595c63;
  --line: #d9d9d3;
  --line-strong: #111214;
  --accent: #5a3fd4;
  --accent-ink: #ffffff;
  --sel: #e2dcfb;
  --logo-filter: none;
  /* Editor (hell) */
  --ed-bg: #ffffff; --ed-fg: #1b1c20; --ed-ln: #6f7279; --ed-bar: #f0f0ec;
  --t-k: #5a3fd4; --t-s: #1f7a4d; --t-c: #686b72; --t-n: #b04a17; --t-f: #1d5fa8;
  /* Terminal immer dunkel */
  --term-bg: #0d0d12; --term-fg: #d9dae0; --term-dim: #6f7180;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0e;
    --surface: #131318;
    --fg: #e9e9ee;
    --muted: #9b9ca8;
    --line: #26262e;
    --line-strong: #e9e9ee;
    --accent: #b3a1ff;
    --accent-ink: #0b0b0e;
    --sel: #33295e;
    --logo-filter: invert(1) brightness(2);
    --ed-bg: #101015; --ed-fg: #e3e3ea; --ed-ln: #8a8c99; --ed-bar: #16161c;
    --t-k: #b3a1ff; --t-s: #8fd19e; --t-c: #8c8e9c; --t-n: #f2a36b; --t-f: #79b8ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Krypton", ui-monospace, monospace; font-size: 15px; line-height: 1.6;
}
::selection { background: var(--sel); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
pre, kbd, samp { font-family: inherit; }
code { font-family: inherit; font-size: .95em; background: var(--surface); border: 1px solid var(--line); padding: 0 .3em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--fg); color: var(--bg); padding: 8px 12px; }

.w200 { font-weight: 200; } .w300 { font-weight: 300; } .w400 { font-weight: 400; } .w500 { font-weight: 500; }
.w600 { font-weight: 600; } .w700 { font-weight: 700; } .w800 { font-weight: 800; } .w900 { font-weight: 900; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand__logo { height: 16px; width: auto; filter: var(--logo-filter); }
.brand__name { font-weight: 700; font-size: 18px; }
.nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; padding: 6px 0; }
.nav a:hover { color: var(--fg); }
.ver { font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; flex: none; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.hero__title { font-size: clamp(48px, 12.5vw, 172px); font-weight: 800; line-height: 1; margin-left: -.03em;
  letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero__cursor { color: var(--accent); font-weight: 400; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { max-width: 720px; font-size: clamp(16px, 1.9vw, 20px); line-height: 1.55; margin: 28px 0 0; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 20px; border: 1px solid var(--line-strong);
  text-decoration: none; font-weight: 600; font-size: 15px; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn__meta { font-weight: 400; font-size: 13px; opacity: .75; }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 56px 0 0; border-top: 1px solid var(--line-strong); }
.facts div { padding: 14px 16px 0 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; }

/* Abschnitte */
.sec { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--line); }
.sec__head { display: grid; grid-template-columns: 120px 1fr; column-gap: 24px; margin-bottom: 40px; align-items: baseline; }
.sec__num { font-size: 14px; color: var(--accent); font-weight: 600; }
.sec__num::before { content: "// "; opacity: .6; }
.sec__head h2 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 750; letter-spacing: -.02em; }
.lead { grid-column: 2; margin: 12px 0 0; color: var(--muted); max-width: 680px; }

/* Bedienelemente */
.ctl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.ctl__l { display: flex; justify-content: space-between; gap: 8px; }
.ctl output { color: var(--fg); }
.ctl--inline { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; height: 24px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
select { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  padding: 7px 8px; border-radius: 0; }

/* Tester */
.tester { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; }
.tester__controls { display: flex; flex-direction: column; gap: 18px; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; border: 1px solid var(--line); padding: 3px 8px; font-size: 13px; background: var(--surface); }
.chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tester__stage { background: var(--surface); border: 1px solid var(--line); min-height: 420px; padding: clamp(16px, 3vw, 36px);
  overflow: auto; }
.tester__text { font-size: 32px; line-height: 1.4; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.2em; }

/* Code */
.codegrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.ed { background: var(--ed-bg); color: var(--ed-fg); border: 1px solid var(--line); min-width: 0; }
.ed__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ed-bar);
  border-bottom: 1px solid var(--line); padding-right: 12px; flex-wrap: wrap; }
.tabs { display: flex; }
.tab { font: inherit; font-size: 13px; background: transparent; color: var(--muted); border: 0; border-right: 1px solid var(--line);
  padding: 10px 14px; cursor: pointer; }
.tab.is-on { background: var(--ed-bg); color: var(--ed-fg); box-shadow: inset 0 2px 0 var(--accent); }
.ed__w { min-width: 170px; font-size: 13px; }
.ed__pane { margin: 0; padding: 16px 0; overflow-x: auto; font-size: 14px; line-height: 1.6; counter-reset: ln; }
.ed__pane[hidden] { display: none; }
.ed__pane code { background: none; border: 0; padding: 0; font-size: inherit; font-weight: var(--edw, 400); display: block; }
.ln { display: block; padding: 0 16px 0 0; white-space: pre; }
.ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.5ch; margin-right: 2ch;
  text-align: right; color: var(--ed-ln); }
.t-k { color: var(--t-k); font-weight: calc(var(--edw, 400) + 200); }
.t-s { color: var(--t-s); }
.t-c { color: var(--t-c); font-style: italic; }
.t-n { color: var(--t-n); }
.t-f { color: var(--t-f); }
.term { background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--line); min-width: 0; }
.term__bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #23232c; }
.term__bar span { width: 10px; height: 10px; background: #2e2e38; }
/* Schriftgröße so, dass die Zelle (0,6 em) ganze Pixel breit ist: Blockzeichen ohne Fugen */
.term pre { margin: 0; padding: 16px; font-size: 15px; line-height: 1.4; overflow-x: auto; }

/* Gewichte */
.wf-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.wf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.wf.is-italic .wf__text { font-style: italic; }
.wf__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 14px 0;
  border-bottom: 1px solid var(--line); }
.wf__meta { font-size: 12px; color: var(--muted); font-weight: 400; }
.wf__meta b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.wf__text { font-size: clamp(18px, 3.4vw, 40px); line-height: 1.2; outline: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.legib { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.legib__col h3 { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.legib__col p { margin: 0; font-size: 14px; line-height: 1.6; }

/* Prinzip */
.prin { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.prin__show { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); }
.prin__show span { font-size: clamp(36px, 5.4vw, 64px); line-height: 1; text-align: center; padding: 28px 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.prin__show span:nth-child(2n) { border-right: 0; }
.prin__show span:nth-last-child(-n+2) { border-bottom: 0; }
.prin__show span:nth-child(2) { color: var(--accent); }
.prin__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.prin__list h3 { font-size: 16px; margin-bottom: 6px; }
.prin__list p { margin: 0; color: var(--muted); font-size: 14px; }

/* Zeichen */
.gtools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.gtools .ctl--inline { min-width: 220px; }
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--line); }
.seg__b { font: inherit; font-size: 13px; background: var(--surface); color: var(--fg); border: 0; border-right: 1px solid var(--line);
  padding: 7px 12px; cursor: pointer; }
.seg__b:last-child { border-right: 0; }
.seg__b.is-on { background: var(--fg); color: var(--bg); }
.gwrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.ginfo { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); padding: 16px; }
.ginfo__ch { font-size: 120px; line-height: 1.2; text-align: center; min-height: 1.2em; border-bottom: 1px solid var(--line);
  padding-bottom: 8px; overflow: hidden; }
.ginfo__cp { margin: 12px 0 2px; font-weight: 600; }
.ginfo__n { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; min-height: 2.6em; }
.gblock { margin-bottom: 32px; }
.gblock[hidden] { display: none; }
.gblock h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.gblock .count { color: var(--muted); font-weight: 400; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); border-top: 1px solid var(--line);
  border-left: 1px solid var(--line); }
.g { font: inherit; font-size: 26px; line-height: 1; height: 56px; background: var(--surface); color: var(--fg);
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; padding: 0;
  font-weight: var(--gw, 400); overflow: hidden; }
.g:hover, .g.is-sel { background: var(--fg); color: var(--bg); }
.g.is-copied { background: var(--accent); color: var(--accent-ink); }

/* Features */
.tablewrap { overflow-x: auto; }
.ftable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ftable th, .ftable td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.ftable thead th { font-size: 12px; color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--line-strong); }
.ftable td.fx { font-size: 22px; white-space: nowrap; }
.ftable td:nth-child(2) { color: var(--muted); }
.ff-ss08 { font-feature-settings: "ss08"; } .ff-ss01 { font-feature-settings: "ss01"; } .ff-ss02 { font-feature-settings: "ss02"; }
.ff-ss03 { font-feature-settings: "ss03"; } .ff-ss04 { font-feature-settings: "ss04"; } .ff-ss05 { font-feature-settings: "ss05"; }
.ff-ss06 { font-feature-settings: "ss06"; } .ff-ss07 { font-feature-settings: "ss07"; } .ff-onum { font-feature-settings: "onum"; }
.ff-frac { font-feature-settings: "frac"; } .ff-sups { font-feature-settings: "sups"; } .ff-case { font-feature-settings: "case"; }

/* Download */
.dl { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
.dl__main { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 200px; padding: 24px;
  background: var(--fg); color: var(--bg); text-decoration: none; }
.dl__main:hover { background: var(--accent); color: var(--accent-ink); }
.dl__title { font-size: 28px; font-weight: 750; }
.dl__sub { opacity: .8; font-size: 14px; }
.dl__size { font-size: 13px; }
.dl__files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.dl__files a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; }
.dl__n { font-weight: 600; overflow-wrap: anywhere; }
.dl__d { grid-column: 1; color: var(--muted); font-size: 13px; }
.dl__s { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 13px; }
.snips { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 40px; align-items: start; }
.code { border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); gap: 8px; }
.code__copy { font: inherit; font-size: 12px; background: transparent; color: var(--fg); border: 1px solid var(--line); padding: 4px 10px; cursor: pointer; }
.code__copy:hover { border-color: var(--fg); }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.license { margin-top: 40px; max-width: 780px; }
.license h3 { font-size: 16px; margin-bottom: 8px; }
.license p { margin: 0; color: var(--muted); font-size: 14px; }

/* Änderungen */
.log { max-width: 820px; font-size: 14px; }
.log h3 { font-size: 22px; margin: 0 0 12px; }
.log h4 { font-size: 13px; font-weight: 600; color: var(--accent); margin: 28px 0 8px; }
.log p, .log li { color: var(--muted); }
.log ul { margin: 0; padding-left: 1.4em; }
.log li { margin: 6px 0; }
.log strong { color: var(--fg); font-weight: 600; }

/* Fuß */
.foot { padding: 32px 0 48px; font-size: 13px; color: var(--muted); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot__copy { margin: 0; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }

.hero--404 { border-bottom: 0; min-height: 50vh; }

/* Schmal */
@media (max-width: 1060px) {
  .codegrid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .tester, .prin, .dl, .gwrap, .snips { grid-template-columns: 1fr; }
  .tester__stage { order: -1; }
  .ginfo { position: static; display: grid; grid-template-columns: 96px 1fr; gap: 0 16px; align-items: center; padding: 12px; }
  .ginfo__ch { font-size: 64px; grid-row: span 2; border-bottom: 0; padding: 0; }
  .ginfo__cp { margin: 0; }
  .ginfo__n { min-height: 0; }
  .legib { grid-template-columns: 1fr; gap: 24px; }
  .prin__list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:last-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .ver { display: none; }
  .top__inner { gap: 14px; }
  .brand { gap: 8px; }
  .brand__logo { height: 12px; }
  .brand__name { font-size: 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
  .sec__head { grid-template-columns: 1fr; }
  .sec__num { margin-bottom: 6px; }
  .lead { grid-column: 1; }
  .wf__row { grid-template-columns: 1fr; gap: 2px; }
  .tester__stage { min-height: 260px; }
  .tester__text { font-size: 18px; }
  .g { height: 48px; font-size: 22px; }
  .ggrid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
  .ed__pane { font-size: 12px; }
  .term pre { font-size: 10px; }
  .prin__show span { font-size: 34px; padding: 20px 4px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero__cursor { animation: none; } }
