/* kappital.de – console theme ------------------------------------------- */
:root {
  --bg: #0b0e14;
  --bg-elev: #10161f;
  --bg-elev2: #151d2a;
  --border: #223044;
  --fg: #d6dde8;
  --muted: #8593a8;
  --green: #5ef08a;
  --amber: #ffb454;
  --cyan: #59c2ff;
  --magenta: #ff7eb6;
  --red: #ff6b6b;
  --link: #59c2ff;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --font: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", "Fira Code", Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1e8;
  --bg-elev: #fbfaf5;
  --bg-elev2: #efeadb;
  --border: #d5ccb6;
  --fg: #1f2430;
  --muted: #6b7280;
  --green: #0f7a3d;
  --amber: #b45309;
  --cyan: #0b63b8;
  --magenta: #b4236f;
  --red: #b91c1c;
  --link: #0b63b8;
  --shadow: 0 10px 30px rgba(60,50,20,.15);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
}
/* subtle scanlines + vignette */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%);
}
:root[data-theme="light"] body::before {
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.03) 0 1px, transparent 1px 3px);
}
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--green); text-decoration-color: var(--green); }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--amber); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 6px 10px; z-index: 10; }
.skip:focus { left: 8px; }

.term {
  position: relative; z-index: 1;
  max-width: 1040px;
  margin: 24px auto 40px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (max-width: 720px) { .term { margin: 0; border-radius: 0; border-left: 0; border-right: 0; } }

/* header ------------------------------------------------------------------ */
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elev2);
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.term-title { margin-left: 8px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-toggle {
  font: inherit; color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 2px 4px;
}
.theme-toggle:hover { color: var(--green); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 20px 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 700; font-size: 26px; letter-spacing: .02em; }
.brand:hover { color: var(--fg); }
.brand-name { color: var(--green); }
.brand-sm { font-size: 18px; }
.caret { display: inline-block; width: .6em; height: 1.1em; background: var(--green); margin-left: 2px; animation: blink 1.1s steps(2, start) infinite; vertical-align: -2px; }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.tagline { color: var(--muted); font-size: 13px; }
.nav { padding: 6px 20px 18px; border-bottom: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.nav a { text-decoration: none; color: var(--cyan); padding: 2px 4px; border-radius: 4px; }
.nav a::before { content: ""; }
.nav a:hover { background: color-mix(in srgb, var(--cyan) 15%, transparent); color: var(--fg); }
.nav a.active { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.nav a.active::after { content: "*"; color: var(--muted); }
.prompt { color: var(--green); font-weight: 700; }
.cmd-text { color: var(--amber); }
.comment { color: var(--muted); font-style: italic; }
.muted { color: var(--muted); }
.ok { color: var(--green); font-weight: 700; } .warn { color: var(--amber); font-weight: 700; }
.heart { color: var(--magenta); font-style: normal; }

/* pixel art --------------------------------------------------------------- */
.px { display: inline-block; image-rendering: pixelated; vertical-align: middle; }
.px-brand { width: 40px; height: 40px; }
.px-card { width: 64px; height: 64px; }
.px-app { width: 48px; height: 48px; }
.px-page { width: 80px; height: 80px; flex-shrink: 0; }
.card:hover .px-card, .app:hover .px-app { transform: translateY(-2px) scale(1.06); }
.px-card, .px-app { transition: transform .15s steps(3); }

/* body -------------------------------------------------------------------- */
.term-body { padding: 18px 20px 30px; }
.cmdline { margin: 0 0 14px; font-size: 14px; }
.doc { max-width: 760px; }
.doc.terms { max-width: 820px; }
.doc-icon { display: flex; gap: 22px; align-items: flex-start; }
@media (max-width: 560px) { .doc-icon { flex-direction: column; gap: 10px; } }
.doc h1 { font-size: 24px; margin: 0 0 14px; color: var(--green); }
.doc h1::before { content: "# "; color: var(--muted); }
.doc h2 { font-size: 18px; margin: 30px 0 10px; color: var(--amber); scroll-margin-top: 20px; }
.doc h2::before { content: "## "; color: var(--muted); }
.doc h3 { font-size: 15px; margin: 22px 0 8px; color: var(--cyan); }
.doc h3::before { content: "### "; color: var(--muted); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc ul { list-style: none; padding-left: 1.2em; }
.doc ul li::before { content: "-"; color: var(--green); display: inline-block; width: 1.2em; margin-left: -1.2em; }
.doc blockquote { margin: 0 0 14px; padding: 6px 14px; border-left: 3px solid var(--border); color: var(--muted); }
.doc strong { color: var(--fg); }
.legal { font-size: 14px; }
.legal p { margin-bottom: 12px; }
.hero p { font-size: 17px; }
.hero p:first-of-type::first-letter { color: var(--amber); }

pre { font-family: var(--font); white-space: pre-wrap; word-break: break-word; }
.boot {
  margin: 0 0 22px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; line-height: 1.6; color: var(--fg);
}
.boot .line { display: block; }
.boot.typing .line.hidden { display: none; }
.kv { margin: 0 0 16px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13.5px; }
.kv .k { color: var(--cyan); }

/* solution cards ---------------------------------------------------------- */
.cards { display: grid; gap: 14px; margin-top: 10px; }
.card {
  display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: start;
  padding: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s;
}
.card:hover { border-color: var(--green); }
.card-icon { display: flex; justify-content: center; padding-top: 4px; }
.card-tag { font-size: 12px; margin-bottom: 6px; }
.card-tag .idx { color: var(--amber); }
.card p { margin: 0; }
@media (max-width: 480px) { .card { grid-template-columns: 56px 1fr; } .px-card { width: 48px; height: 48px; } }

/* app banner -------------------------------------------------------------- */
.apps { margin-top: 30px; padding-top: 22px; border-top: 1px dashed var(--border); }
.apps h2 { margin: 0 0 4px; font-size: 20px; color: var(--green); }
.apps h2::before { content: "## "; color: var(--muted); }
.apps > .muted { margin: 0 0 16px; }
.app-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.app { display: flex; flex-direction: column; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.app-protein { border-color: color-mix(in srgb, var(--cyan) 45%, var(--border)); }
.app-wine { border-color: color-mix(in srgb, var(--magenta) 45%, var(--border)); }
.app-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.app h3 { margin: 0; font-size: 17px; }
.app p { margin: 0 0 16px; color: var(--fg); flex: 1; }
.btn { display: block; text-align: center; padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; color: #0b0e14 !important; }
.app-protein .btn { background: linear-gradient(135deg, #06b6d4, #2563eb); color: #fff !important; }
.app-wine .btn { background: linear-gradient(135deg, #881337, #be123c); color: #fff !important; }
.btn:hover { filter: brightness(1.12); }

/* footer ------------------------------------------------------------------ */
.term-foot { padding: 18px 20px 20px; border-top: 1px dashed var(--border); background: var(--bg-elev2); font-size: 13.5px; }
.foot-cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot-col p { margin: 0 0 6px; }
.foot-links a { color: var(--cyan); }
.eof { margin: 18px 0 0; font-size: 12px; }
