:root {
  --bg: #0b0d10;
  --bg-elev: #15181d;
  --bg-hi: #1c2027;
  --fg: #e6e8eb;
  --fg-mute: #8b95a4;
  --accent: #4ade80;
  --accent-2: #38bdf8;
  --warn: #fbbf24;
  --fail: #f87171;
  --border: #262b34;
  --radius: 10px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 14px; line-height: 1.45;
  min-height: 100vh;
}
header {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, #14181f, #0b0d10);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand h1 { margin: 0; font-size: 1.05rem; letter-spacing: .04em; font-weight: 600; }
.brand .host { color: var(--fg-mute); font-family: var(--mono); font-size: .85rem; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.9); }
}
nav { display: flex; gap: 1rem; flex: 1; }
nav a {
  color: var(--fg-mute); text-decoration: none; font-size: .9rem;
  padding: .35rem .7rem; border-radius: 6px; transition: all .15s;
}
nav a:hover { color: var(--fg); background: var(--bg-hi); }
.meta { color: var(--fg-mute); font-size: .8rem; font-family: var(--mono); display: flex; align-items: center; gap: .5rem; }
.meta .sep { margin: 0 .5rem; opacity: .4; }
.live-badge {
  color: var(--accent); font-family: var(--mono); font-size: .8rem;
  letter-spacing: .03em; font-weight: 600;
}
.nav-ai {
  background: rgba(74, 222, 128, .12) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(74, 222, 128, .25);
}
.nav-tool {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg) !important;
  font-size: .82rem;
}
.nav-tool:hover {
  border-color: var(--accent-2);
  color: var(--accent-2) !important;
  background: rgba(56,189,248,.08) !important;
}
.nav-sep {
  width: 1px; height: 22px; background: var(--border); margin: 0 .4rem;
  align-self: center;
}
nav { flex-wrap: wrap; row-gap: .35rem; }

main { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }
section { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
section h2 { margin: 0 0 .8rem 0; font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
section h2 small { color: var(--fg-mute); font-weight: 400; font-size: .8rem; }
.count {
  display: inline-block; background: var(--bg-hi); color: var(--fg-mute);
  padding: .1rem .5rem; border-radius: 999px; font-size: .75rem;
  font-family: var(--mono); margin-left: .4rem;
}
button {
  background: var(--bg-hi); color: var(--fg-mute);
  border: 1px solid var(--border); border-radius: 6px;
  padding: .35rem .7rem; font-size: .8rem; cursor: pointer;
  font-family: var(--sans);
}
button:hover { color: var(--fg); border-color: var(--accent-2); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  transition: border-color .2s;
}
.card:hover { border-color: #2f3540; }
.card-label { color: var(--fg-mute); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.card-value { font-size: 2rem; font-weight: 600; margin: .3rem 0 .5rem 0; font-family: var(--mono); }
.card-foot { color: var(--fg-mute); font-size: .8rem; font-family: var(--mono); }
.bar {
  height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden;
  margin: .3rem 0 .6rem 0;
}
.bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}

table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-elev); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
thead { background: #11141a; }
th, td {
  text-align: left; padding: .55rem .9rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
th { color: var(--fg-mute); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(56, 189, 248, 0.05); }
code { font-family: var(--mono); font-size: .85em; color: #c4d2e3; }
.muted { color: var(--fg-mute); }

.pill {
  display: inline-block; padding: .12rem .55rem; border-radius: 999px;
  font-size: .72rem; font-family: var(--mono); font-weight: 500;
  background: var(--bg-hi); color: var(--fg-mute);
}
.pill-active { background: rgba(74, 222, 128, .15); color: var(--accent); }
.pill-failed { background: rgba(248, 113, 113, .15); color: var(--fail); }
.pill-activating { background: rgba(251, 191, 36, .15); color: var(--warn); }
.pill-public { background: rgba(248, 113, 113, .15); color: var(--fail); }
.pill-local { background: rgba(56, 189, 248, .12); color: var(--accent-2); }

.row-fail td { background: rgba(248, 113, 113, .04); }

footer {
  text-align: center; padding: 2rem 1rem;
  color: var(--fg-mute); font-size: .75rem; font-family: var(--mono);
  border-top: 1px solid var(--border); margin-top: 2rem;
}
footer .sep { margin: 0 .5rem; opacity: .4; }

@media (max-width: 700px) {
  header { flex-wrap: wrap; gap: .8rem; padding: .8rem 1rem; }
  nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: .3rem; }
  .meta { font-size: .7rem; }
  main { padding: 1rem; }
  table { font-size: .75rem; }
  th, td { padding: .4rem .5rem; }
}

/* ─── Welcome / Tool-Tiles ─── */
.welcome { margin-bottom: 1.5rem; }
.welcome-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.welcome-head h2 { margin: 0 0 .25rem 0; font-size: 1.6rem; }
.welcome-head .muted { color: var(--fg-mute); margin: 0; }
.welcome-quick { display: flex; gap: .5rem; flex-wrap: wrap; }
.quick-btn {
  padding: .5rem .8rem; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--fg); text-decoration: none; font-size: .85rem;
  transition: all .15s;
}
.quick-btn:hover { border-color: var(--accent); color: var(--accent); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.tool-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-decoration: none; color: var(--fg);
  display: flex; flex-direction: column;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.tool-tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--fail);
}
.tool-tile.is-up::before { background: var(--accent); }
.tool-tile:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.tt-head {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .5rem;
}
.tt-icon { font-size: 1.4rem; }
.tt-name { font-weight: 600; flex: 1; }
.tt-status { font-size: 1rem; color: var(--fail); }
.tool-tile.is-up .tt-status { color: var(--accent); }
.tt-desc { color: var(--fg-mute); font-size: .85rem; margin: 0 0 .75rem 0; flex: 1; }
.tt-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--fg-mute); padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.tt-port { font-family: var(--mono); }
.tt-tutorial {
  color: var(--accent-2); text-decoration: none;
  font-size: .78rem;
}
.tt-tutorial:hover { text-decoration: underline; }

.nav-tutorial {
  background: rgba(56,189,248,.12) !important;
  color: var(--accent-2) !important;
  border: 1px solid rgba(56,189,248,.25);
}

/* ─── Tutorial-Seiten ─── */
.docs-main {
  max-width: 1200px; margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}
.docs-main.docs-hero-only { grid-template-columns: 1fr; }
.docs-hero { grid-column: 1 / -1; margin-bottom: 1rem; }
.docs-hero h2 { margin: 0 0 .25rem 0; }
.docs-hero .muted { color: var(--fg-mute); }
.docs-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.doc-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  text-decoration: none; color: var(--fg);
  transition: all .15s;
}
.doc-card:hover { border-color: var(--accent); }
.doc-card .doc-slug {
  font-family: var(--mono); font-size: .75rem; color: var(--fg-mute);
}
.doc-card h3 { margin: .35rem 0 0 0; font-size: 1rem; }

.doc-sidebar {
  position: sticky; top: 80px; align-self: flex-start;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.doc-sidebar h4 { margin: 0 0 .5rem 0; font-size: .8rem; text-transform: uppercase; color: var(--fg-mute); letter-spacing: .05em; }
.doc-sidebar ul { list-style: none; padding: 0; margin: 0; }
.doc-sidebar li { margin: .15rem 0; }
.doc-sidebar a {
  display: block; padding: .35rem .5rem; border-radius: 6px;
  color: var(--fg); text-decoration: none; font-size: .85rem;
}
.doc-sidebar a:hover { background: var(--bg-hi); }
.doc-sidebar a.active { background: rgba(74,222,128,.12); color: var(--accent); }

.doc-content {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: break-word;
}
.doc-content h1 { margin-top: 0; }
.doc-content h2 { border-bottom: 1px solid var(--border); padding-bottom: .35rem; margin-top: 2rem; }
.doc-content h3 { margin-top: 1.5rem; color: var(--accent-2); }
.doc-content code {
  background: var(--bg-hi); padding: .15rem .35rem;
  border-radius: 4px; font-family: var(--mono); font-size: .9em;
}
.doc-content pre {
  background: var(--bg); border: 1px solid var(--border);
  padding: 1rem; border-radius: var(--radius);
  overflow-x: auto;
}
.doc-content pre code { background: none; padding: 0; }
.doc-content table {
  border-collapse: collapse; margin: 1rem 0;
  width: 100%;
}
.doc-content th, .doc-content td {
  border: 1px solid var(--border); padding: .5rem .75rem;
  text-align: left;
}
.doc-content th { background: var(--bg-hi); }
.doc-content a { color: var(--accent-2); }
.doc-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1rem 0; padding: .25rem 1rem;
  background: rgba(74,222,128,.05);
  color: var(--fg);
}

@media (max-width: 760px) {
  .docs-main { grid-template-columns: 1fr; }
  .doc-sidebar { position: static; }
}

