/* zen — minimal, eine Spalte, ein Akzent.
   Der Akzent (Rost) steht NUR fuer „du bist dran". Alles Informative ist grau.
   Keine Icons, keine Leisten, keine Schatten. */

@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/source-serif-4-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/source-serif-4-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/fonts/source-serif-4-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/fonts/source-serif-4-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --grund: #fdfcfa;
  --tinte: #1a1a1a;
  --text2: #3d3d3d;
  --leise: #6b6b6b;
  --linie: #e6e3dd;
  --linie2: #efece6;
  --flaeche: #f4f2ee;
  --rahmen: #c9c5bd;
  --akzent: #b3401a;
  --toast: #1a1a1a;
  --toast-text: #fdfcfa;
  --toast-akzent: #f0b49c;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #161514; --tinte: #ecebe8; --text2: #cfccc6; --leise: #9b9892; --linie: #2e2c29;
    --linie2: #262422; --flaeche: #22201e; --rahmen: #4a4743; --akzent: #e58a63;
    --toast: #ecebe8; --toast-text: #161514; --toast-akzent: #a8401a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --grund: #161514; --tinte: #ecebe8; --text2: #cfccc6; --leise: #9b9892; --linie: #2e2c29;
  --linie2: #262422; --flaeche: #22201e; --rahmen: #4a4743; --akzent: #e58a63;
  --toast: #ecebe8; --toast-text: #161514; --toast-akzent: #a8401a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font-family: var(--serif); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--rahmen); text-underline-offset: 3px; }
a:hover { color: var(--akzent); }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: 0.85em; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

/* ── Login ─────────────────────────────────────────────── */
.login { max-width: 30em; margin: 0 auto; padding: 18vh 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { margin: 0; font-weight: 400; font-size: 34px; }
.login p { margin: 0; color: var(--leise); }

/* ── Rahmen ────────────────────────────────────────────── */
.zen { min-height: 100vh; }
.spalte {
  max-width: 600px; margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 44px;
}
@media (min-width: 1000px) {
  .zen { display: grid; grid-template-columns: minmax(380px, 560px) minmax(0, 1fr); gap: 56px;
         max-width: 1240px; margin: 0 auto; padding: 0 32px; }
  .spalte { margin: 0; padding-left: 0; padding-right: 0; }
  /* Kein Zentrieren ohne Detail: die Liste steht immer links an derselben Stelle,
     sonst springt sie beim Oeffnen/Schliessen eines Tickets hin und her. */
}

/* ── Kopf ──────────────────────────────────────────────── */
.kopf { display: flex; flex-direction: column; gap: 4px; }
.marke { font-size: 15px; letter-spacing: 0.08em; color: var(--leise); display: flex; justify-content: space-between; align-items: baseline; }
.marke button { border: 0; background: none; padding: 0; color: var(--leise); font-size: 14px; letter-spacing: 0; }
.tag { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
.tag h1 { margin: 0; font-size: 26px; font-weight: 400; line-height: 1.2; }
@media (min-width: 600px) { .tag h1 { font-size: 30px; } }
.tag button { border: 0; background: none; min-width: 32px; min-height: 44px; font-size: 24px; color: var(--leise); padding: 0 4px; flex: none; }
.tag button:disabled { opacity: 0.25; cursor: default; }
.zahl { font-size: 15px; color: var(--leise); }
.zahl button { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--rahmen); text-underline-offset: 3px; }

/* ── Abschnitte ────────────────────────────────────────── */
.abschnitt { display: flex; flex-direction: column; }
.abschnitt > h2, .strom-kopf h2 {
  margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leise);
}
.abschnitt.du > h2 { color: var(--akzent); }
.leer { margin: 0; padding: 20px 0; border-top: 1px solid var(--linie); color: var(--leise); font-style: italic; }

/* ── Karten (Handlungsbedarf) ──────────────────────────── */
.karte { padding: 20px 0; border-top: 1px solid var(--linie); display: flex; flex-direction: column; gap: 10px; }
.karte.gewaehlt { background: var(--flaeche); margin: 0 -14px; padding: 20px 14px; border-radius: 10px; border-top-color: transparent; }
.karte-text { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.karte-text:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; border-radius: 4px; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--leise); line-height: 1.4; }
.titel { font-size: 19px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.frage { font-size: 16px; color: var(--text2); overflow-wrap: anywhere; }
.frage .wer { font-family: var(--mono); font-size: 12px; color: var(--leise); }
.buendel-liste { margin: 2px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--leise); }
.buendel-liste li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

.knopf {
  min-height: 44px; padding: 0 18px; border-radius: 22px; font-size: 15px; line-height: 1.2;
  border: 1px solid var(--rahmen); background: transparent; color: var(--tinte);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center;
}
.knopf.voll { background: var(--tinte); border-color: var(--tinte); color: var(--grund); }
.knopf.voll:hover { color: var(--grund); opacity: 0.88; }
.knopf:disabled { opacity: 0.4; cursor: default; }
.chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 18px; font-size: 14px; }

/* ── Weitere (eingeklappt) ─────────────────────────────── */
.weitere-auf { all: unset; cursor: pointer; padding: 14px 0; border-top: 1px solid var(--linie); color: var(--leise); font-size: 15px; }
.weitere-auf:focus-visible { outline: 2px solid var(--akzent); }
.reihe { all: unset; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linie2); font-size: 16px; }
.reihe:focus-visible { outline: 2px solid var(--akzent); }
.reihe .meta { align-self: center; }

/* ── Strom (Info) ──────────────────────────────────────── */
.strom-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.umschalter { display: flex; gap: 14px; font-size: 14px; }
.umschalter button { border: 0; background: none; padding: 8px 0; color: var(--leise); }
.umschalter button[aria-pressed="true"] { color: var(--tinte); text-decoration: underline; text-decoration-color: var(--akzent); text-underline-offset: 5px; }
.kompass { margin: 0 0 12px; font-size: 16px; color: var(--text2); font-style: italic; }
.zeile { border-top: 1px solid var(--linie2); }
.zeile-knopf { all: unset; cursor: pointer; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 10px 0; font-size: 15px; color: var(--leise); width: 100%; }
.zeile-knopf:focus-visible { outline: 2px solid var(--akzent); }
.zeile .zeit { font-family: var(--mono); font-size: 12px; padding-top: 3px; }
.zeile .faden { color: var(--tinte); }
.zeile .stand { font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.zeile .stand.dran { color: var(--akzent); }
.zeile.rausch .zeile-knopf { color: var(--leise); opacity: 0.85; }
.zeile-mehr { margin: 0 0 12px 54px; font-size: 15px; color: var(--text2); display: flex; flex-direction: column; gap: 10px; }
.zeile-mehr p { margin: 0; overflow-wrap: anywhere; }

/* ── Detail ────────────────────────────────────────────── */
.detail {
  position: fixed; inset: 0; z-index: 10; background: var(--grund); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom));
}
.detail-innen { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
/* Desktop: die Seite selbst scrollt nicht, jede Spalte fuer sich (wie ein
   Mailprogramm). Vorher scrollte die Seite UND das Detail — zwei Leisten
   nebeneinander am rechten Rand. */
@media (min-width: 1000px) {
  body:has(.zen:not([hidden])) { overflow: hidden; }
  .zen { height: 100vh; overflow: hidden; }
  .spalte, .detail { height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--linie) transparent; }
  .spalte { padding-right: 16px; margin-right: -16px; }
  .detail { position: static; inset: auto; padding: 40px 16px 80px 0; }
  .detail-innen { margin: 0; }
}
.zurueck { all: unset; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; color: var(--leise); align-self: flex-start; }
.zurueck:focus-visible { outline: 2px solid var(--akzent); }
.detail header { display: flex; flex-direction: column; gap: 6px; }
.detail h2.gross { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.detail .frage-gross { margin: 0; font-size: 16px; color: var(--akzent); }
.verlauf { display: flex; flex-direction: column; }
.eintrag { border-top: 1px solid var(--linie); }
.eintrag-knopf { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 14px 0; width: 100%; }
.eintrag-knopf:focus-visible { outline: 2px solid var(--akzent); }
.eintrag-knopf .k { font-size: 16px; overflow-wrap: anywhere; }
.eintrag-knopf .mehr { color: var(--leise); font-size: 14px; }
.eintrag.du .k { color: var(--leise); }
.voll-text { padding: 0 0 16px; font-size: 16px; overflow-wrap: anywhere; }
.voll-text > :first-child { margin-top: 0; }
.voll-text p, .voll-text ul, .voll-text ol { margin: 0 0 10px; }
.voll-text pre { overflow-x: auto; background: var(--flaeche); padding: 10px; border-radius: 6px; font-size: 13px; }
.voll-text table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.voll-text td, .voll-text th { border: 1px solid var(--linie); padding: 4px 8px; }
.voll-text img { max-width: 100%; height: auto; }
.voll-text blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 2px solid var(--linie); color: var(--leise); }
.gitlab { padding-top: 12px; font-size: 14px; color: var(--leise); }

.antwort { display: flex; flex-direction: column; gap: 12px; }
.antwort label, .antwort .klein-titel { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leise); }
.antwort textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--rahmen); border-radius: 10px;
  background: var(--grund); color: var(--tinte); font: inherit; font-size: 16px; resize: vertical; min-height: 100px;
}
.antwort .hinweis { margin: 0; font-size: 13px; color: var(--leise); }
.antwort .hinweis.warn { color: var(--akzent); }
.optionen { display: flex; flex-direction: column; gap: 8px; }
.optionen .knopf { justify-content: flex-start; text-align: left; padding: 10px 18px; }
.laedt { color: var(--leise); font-style: italic; }

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed; z-index: 20; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; min-height: 52px; padding: 0 8px 0 20px; border-radius: 26px;
  background: var(--toast); color: var(--toast-text); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px;
}
.toast button { border: 0; background: none; min-height: 44px; padding: 0 14px; color: var(--toast-akzent); }
.toast.fehler { background: var(--akzent); color: #fff; }
.toast.fehler button { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .karte, .zeile { transition: opacity .15s; }
}
