:root {
  --dark: #12261f;
  --dark2: #0d1d17;
  --light: #fbfbf8;
  --card: #ffffff;
  --border: #e3e6e4;
  --teal: #0f6e56;
  --teal-light: #9fe1cb;
  --amber: #f2a623;
  --text-dark: #1a1a1a;
  --text-mid: #3d3d3a;
  --text-mute: #6a7179;
  --text-light: #f5f3ec;
  --text-light-mute: #9fcdbb;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--dark2);
  overflow: hidden;
}

#gate {
  position: fixed;
  inset: 0;
  background: var(--dark2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
#gate.hidden { display: none; }
#gate-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}
#gate-box h1 {
  color: var(--text-light);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 4px;
}
#gate-box p { color: var(--text-light-mute); font-size: 14px; margin: 0 0 8px; }
#gate-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #2a4137;
  background: #17322a;
  color: var(--text-light);
  font-size: 16px;
  outline: none;
}
#gate-input:focus { border-color: var(--teal-light); }
#gate-submit {
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
#gate-submit:active { transform: scale(0.98); }
#gate-error {
  color: #f0997b;
  font-size: 13px;
  min-height: 18px;
}

#stage-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark2);
}
#stage {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex-shrink: 0;
  transform-origin: center center;
}
.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 128px 128px 160px;
  box-sizing: border-box;
}
.slide.active { display: flex; }
.slide.dark { background: var(--dark); color: var(--text-light); }
.slide.light { background: var(--light); color: var(--text-dark); }
.kicker { font-size: 26px; color: var(--teal); letter-spacing: 2px; margin: 0 0 8px; }
.slide.dark .kicker { color: var(--text-light-mute); }
h1.title { font-family: var(--font-serif); font-size: 88px; font-weight: 400; line-height: 1.15; margin: 0; max-width: 1500px; }
h2.title { font-size: 66px; font-weight: 400; line-height: 1.15; margin: 0 0 36px; max-width: 1500px; font-family: var(--font-serif); }
.subtitle { font-size: 30px; color: var(--text-light-mute); max-width: 1300px; margin: 20px 0 0; }
.speaker { font-size: 26px; color: var(--text-light); margin: 0; line-height: 1.5; }
.speaker-event { color: var(--text-light-mute); }

/* sempercode-Wortmarke (nachgebaut nach sempercode.de) */
.brand {
  position: absolute; top: 56px; left: 128px;
  font: 700 34px/1 ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  letter-spacing: -0.02em; color: var(--text-light); white-space: nowrap;
}
.brand .cursor {
  display: inline-block; width: 0.55em; height: 0.11em; margin-left: 0.1em;
  vertical-align: baseline; background: #2dd4a0;
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.row { display: flex; gap: 28px; }
.col { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 28px; font-weight: 600; margin: 0; color: var(--teal); }
.card p { font-size: 24px; color: var(--text-mid); line-height: 1.5; margin: 0; }
.footer-num { position: absolute; left: 128px; bottom: 64px; font-size: 24px; color: #9a988e; }
.stat-box { display: flex; align-items: baseline; gap: 20px; background: var(--dark); border-radius: 16px; padding: 36px 44px; }
.stat-box .num { font-size: 60px; font-weight: 600; color: var(--amber); margin: 0; }
.stat-box .desc { font-size: 26px; color: var(--text-light-mute); margin: 0; }
.stat-panel { background: var(--dark); border-radius: 16px; padding: 32px 44px; display: flex; flex-direction: column; gap: 20px; }
.stat-lead { font-size: 26px; color: var(--text-light); margin: 0; }
.stat-grid { display: flex; gap: 28px; }
.stat-grid > div { flex: 1; }
.stat-grid .num { font-size: 52px; font-weight: 600; color: var(--amber); margin: 0; line-height: 1.1; }
.stat-grid .num sup { font-size: 0.55em; line-height: 0; }
.stat-grid .lbl { font-size: 22px; color: var(--text-light-mute); margin: 4px 0 0; }
.stat-foot { font-size: 22px; color: var(--text-light-mute); margin: 0; line-height: 1.5; }
table.demo { font-size: 22px; width: 100%; border-collapse: collapse; }
table.demo th { text-align: left; padding: 8px 0; color: var(--text-mute); font-weight: 500; }
table.demo td { padding: 8px 0; border-top: 1px solid var(--border); }
.flow { display: flex; align-items: center; gap: 14px; }
.flow .card { flex: 1; }
.arrow { font-size: 30px; color: #9a988e; }
.flow.summary { align-items: stretch; gap: 10px; }
.flow.summary .card { padding: 28px 24px; }
.flow.summary .arrow { align-self: center; }

#nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(20, 20, 20, 0.55);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 50;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
}
#nav button {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#nav button:active { transform: scale(0.94); }
#nav-count { color: #fff; font-size: 13px; min-width: 46px; text-align: center; font-family: var(--font); }

.widget-wrap { display: flex; flex-direction: column; gap: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.bar-row { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.bar-row:hover .bar-fill { filter: brightness(1.1); }
.bar-label { width: 160px; font-size: 22px; flex-shrink: 0; }
.bar-track { flex: 1; background: #f1efe8; border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal); border-radius: 6px; }
.bar-pct { width: 130px; text-align: right; font-size: 20px; color: var(--text-mute); flex-shrink: 0; }
.demo-controls { display: flex; gap: 10px; }
.demo-controls button {
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--light); font-size: 18px; cursor: pointer; color: var(--text-dark);
}
.corpus { font-size: 20px; color: var(--text-mute); padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.corpus-label { display: block; margin-bottom: 6px; }
.corpus ol { margin: 0; padding-left: 1.6em; columns: 3; column-gap: 32px; line-height: 1.5; font-family: ui-monospace, Consolas, monospace; color: var(--text-mid); }
.demo-controls button.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.ng-sentence { font-size: 34px; margin: 4px 0; }
.ng-sentence span { padding: 2px 6px; border-radius: 6px; color: var(--text-mute); }
.ng-sentence span.ctx { background: #e1f5ee; color: var(--teal); font-weight: 600; }
.ng-sentence span.gap { color: #ba7517; font-weight: 600; }
.ng-meta { font-size: 20px; color: var(--text-mute); margin: 0; }
.side-text { font-size: 26px; line-height: 1.5; margin: 0; }
.side-text.muted, .muted-inline { color: var(--text-mute); }
.muted-inline { font-weight: 400; font-size: 0.75em; }

/* Embedding-Heatmap */
table.emb { border-collapse: separate; border-spacing: 4px; font-size: 18px; }
table.emb th { font-weight: 500; color: var(--text-mute); padding: 0 4px 4px; text-align: center; }
table.emb td { text-align: center; padding: 6px 4px; border-radius: 6px; min-width: 86px; font-variant-numeric: tabular-nums; }
table.emb td.w { text-align: left; font-size: 22px; min-width: 150px; padding-left: 8px; color: var(--text-dark); background: none; }
table.emb tr.pick { cursor: pointer; }
table.emb tr.pick:hover td.w { color: var(--teal); }
table.emb tr.sel td.w { color: var(--teal); font-weight: 600; box-shadow: inset 4px 0 0 var(--teal); }
table.emb tr.result td.w { color: #ba7517; font-weight: 600; }
table.emb tr.result td { border-top: 2px solid #ba7517; }
.emb-sim { font-size: 24px; margin: 4px 0 0; }
.emb-sim b { color: var(--teal); }
.sim-tag { font-size: 16px; color: var(--text-mute); margin-left: 8px; }

/* LSTM */
.timeline { display: flex; gap: 20px; }
.timeline > div { flex: 1; border-top: 3px solid var(--teal); padding-top: 12px; }
.timeline .yr { font-size: 30px; font-weight: 600; color: var(--teal); margin: 0 0 6px; }
.timeline p { font-size: 19px; line-height: 1.45; color: var(--text-mid); margin: 0; }
.timeline b { color: var(--text-dark); }
.paper-link { color: var(--teal); font-weight: 600; font-size: 22px; text-decoration: underline; text-underline-offset: 4px; }
.link-hint { font-size: 17px; color: var(--text-mute); }
/* Transformer */
.sub-h { font-size: 30px; font-weight: 600; color: var(--teal); margin: 0; }
.par-compare { display: flex; flex-direction: column; gap: 10px; }
.par-compare > div { display: flex; align-items: center; gap: 18px; font-size: 20px; }
.par-compare .lbl { width: 140px; font-weight: 600; color: var(--text-dark); }
.par-compare .dots { font-size: 22px; letter-spacing: 2px; width: 300px; }
.par-compare .dots.seq { color: #b4b2a9; }
.par-compare .dots.par { color: #ef9f27; }
.par-compare .note { color: var(--text-mute); }
table.growth { font-size: 21px; }
.vec-compare { display: flex; align-items: center; gap: 24px; }
.vec-lbl { width: 280px; flex-shrink: 0; font-size: 20px; color: var(--text-mute); line-height: 1.35; }
.vec-lbl b { color: var(--text-dark); font-weight: 600; }
.toy-vec { display: flex; gap: 6px; }
.toy-vec span { display: flex; flex-direction: column; align-items: center; font-size: 14px; color: var(--text-mute); background: #f1efe8; border-radius: 6px; padding: 4px 10px; }
.toy-vec b { font-size: 18px; color: var(--text-dark); font-weight: 500; }
.ctx-controls { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.ctx-controls input { width: 260px; accent-color: var(--teal); }
#ctx-layer-val { color: var(--text-mute); font-size: 18px; }
.calc { font-size: 30px; color: var(--text-light); margin: 0; }
.calc b { color: var(--amber); }
.dev-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dev-grid .card { padding: 22px 26px; display: flex; flex-direction: column; gap: 8px; }
.dev-grid .card h3 { font-size: 23px; }
.dev-grid .card p { font-size: 19px; }
.infer-loop .card { padding: 20px 24px; }
.infer-loop .card h3 { font-size: 23px; }
.infer-loop .card p { font-size: 18px; }
.lstm-sentence { font-size: 32px; margin: 0; line-height: 1.6; }
.lstm-sentence span { padding: 2px 6px; border-radius: 6px; color: #b4b2a9; }
.lstm-sentence span.read { color: var(--text-dark); }
.lstm-sentence span.win { background: #faeeda; }
.lstm-sentence span.cur { outline: 2px solid #ba7517; }
.lstm-sentence span.mem { color: var(--teal); font-weight: 600; }
.lstm-sentence span.gap { color: #ba7517; font-weight: 600; }
.lstm-panel { background: var(--light); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; min-height: 330px; }
.lstm-panel h3 { font-size: 22px; font-weight: 600; color: var(--teal); margin: 0 0 4px; }
.lstm-window { display: flex; gap: 8px; min-height: 44px; }
.lstm-window span { background: #faeeda; border: 1px solid #ba7517; color: #633806; border-radius: 8px; padding: 6px 12px; font-size: 22px; }
.mem-slot { display: flex; gap: 12px; align-items: center; font-size: 22px; }
.mem-slot .k { width: 130px; color: var(--text-mute); font-size: 18px; }
.mem-slot .v { background: #e1f5ee; color: var(--teal); border-radius: 8px; padding: 4px 12px; font-weight: 600; }
.mem-slot .v.empty { background: none; color: #b4b2a9; font-weight: 400; }
.mem-slot .v.forgot { background: none; color: #b4b2a9; text-decoration: line-through; font-weight: 400; }
.lstm-log { font-size: 20px; color: var(--text-mid); margin: 8px 0 0; min-height: 30px; }
.pred-big { font-size: 24px; margin: 4px 0 0; }
.pred-big b { color: var(--teal); }
.seq-line { font-size: 26px; }
.seq-line b { font-weight: 600; }
.seq-hint { font-size: 20px; color: var(--text-mute); }

@media (max-width: 700px) {
  #nav { bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
}
