/* ==========================================================================
   Das Digitalpaket — Gestaltungsgrundlage
   Farben tragen Information: Grün = Leistung ITESP, Teal = Leistung Levius.
   ========================================================================== */

:root {
  --ink:        #0f1b2d;
  --ink-soft:   #24354d;
  --mute:       #5d6b7e;
  --paper:      #eceff3;
  --paper-2:    #e3e7ed;
  --white:      #ffffff;
  --line:       #d3d9e0;
  --line-soft:  #e6eaef;

  --itesp:      #4e8f33;
  --itesp-dim:  #edf4e9;
  --levius:     #0e8f88;
  --levius-dim: #e6f3f2;
  --warn:       #a75a12;
  --warn-dim:   #fdf3e6;
  --err:        #a32b28;
  --err-dim:    #fbecec;

  --seam: linear-gradient(90deg, var(--itesp) 0 50%, var(--levius) 50% 100%);

  --r-s: 3px;
  --r-m: 6px;
  --r-l: 10px;

  --shadow-lift: 0 1px 0 rgba(15,27,45,.04), 0 12px 32px -18px rgba(15,27,45,.35);

  --wrap: 1148px;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; letter-spacing: -.022em; margin: 0; line-height: 1.08; }
h1 { font-size: clamp(2.15rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); letter-spacing: -.02em; }
h3 { font-size: 1.16rem; letter-spacing: -.012em; }
h4 { font-size: .98rem; font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1rem 0; }
a  { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
strong { font-weight: 600; }
small { font-size: .82rem; }

:focus-visible {
  outline: 2px solid var(--levius);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.prose { font-family: var(--serif); font-size: 1.02rem; line-height: 1.62; max-width: 66ch; }
.prose p:last-child { margin-bottom: 0; }
.lead { font-family: var(--serif); font-size: clamp(1.06rem, 2.1vw, 1.24rem); line-height: 1.56; color: var(--ink-soft); max-width: 54ch; }
.mute { color: var(--mute); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* --- Kopf ---------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(236,239,243,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; flex-direction: column; gap: 5px; text-decoration: none; }
.brand b { font-size: 1.06rem; font-weight: 700; letter-spacing: -.03em; }
.brand b span { color: var(--mute); font-weight: 500; }
.brand i { display: block; height: 3px; background: var(--seam); border-radius: 2px; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { font-size: .93rem; font-weight: 500; text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.nav a.btn { color: var(--white); }
.nav a.btn:hover { color: var(--white); }

/* --- Knöpfe -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: 13px 22px; border-radius: var(--r-m);
  border: 1px solid var(--ink); background: var(--ink); color: var(--white);
  text-decoration: none; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn:hover { background: #1b2c46; border-color: #1b2c46; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--white); border-color: var(--ink-soft); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: .86rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink); border-color: var(--ink); }

/* --- Flächen ------------------------------------------------------------- */

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section.dark { background: var(--ink); color: var(--white); }
section.dark h2, section.dark h3 { color: var(--white); }
section.dark .lead, section.dark .prose { color: #c2cddb; }
section.dark .card { background: #17263c; border-color: #2a3c57; color: var(--white); }
section + section { border-top: 1px solid var(--line); }
section.dark + section, section + section.dark { border-top: 0; }

.head { max-width: 62ch; margin-bottom: 36px; }
.head p { margin-top: 14px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 26px;
}
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding: 76px 0 68px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: start; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .88rem; color: var(--mute); margin-top: 18px; }

/* Paketschein: Hero-Objekt mit perforierter Kante */
.schein {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-lift);
  padding: 26px 28px 24px;
}
.schein::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 10px;
  background:
    radial-gradient(circle at 5px 8px, var(--paper) 4.6px, transparent 5px) 0 0/10px 10px repeat-x;
}
.schein-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.schein-top h2 { font-size: 1.12rem; letter-spacing: -.01em; }
.schein-top span { font-size: .8rem; color: var(--mute); font-weight: 500; }
.pos { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0 16px 16px; border-bottom: 1px solid var(--line-soft); position: relative; }
.pos::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; }
.pos.levius::before { background: var(--levius); }
.pos.itesp::before { background: var(--itesp); }
.pos b { font-size: 1rem; font-weight: 600; }
.pos .who { font-size: .8rem; color: var(--mute); grid-column: 1; }
.pos .price { text-align: right; font-weight: 600; font-size: 1rem; align-self: start; }
.pos .price s { display: block; font-weight: 400; font-size: .8rem; color: var(--mute); text-decoration-thickness: 1px; }
.pos .detail { grid-column: 1 / -1; font-size: .86rem; color: var(--ink-soft); margin-top: 6px; }
.schein-sum { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 18px; padding-bottom: 8px; }
.schein-sum .k { font-weight: 600; }
.schein-sum .k small { display: block; font-weight: 400; color: var(--mute); }
.schein-sum .v { font-size: 2.05rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.schein-sum .v small { display: block; text-align: right; font-size: .78rem; font-weight: 400; color: var(--mute); letter-spacing: 0; margin-top: 6px; }
.saving { display: inline-block; margin-top: 4px; font-size: .84rem; font-weight: 600; color: var(--itesp); background: var(--itesp-dim); border-radius: var(--r-s); padding: 3px 8px; }

/* --- Leistungslisten ----------------------------------------------------- */

.part { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); overflow: hidden; }
.part-head { padding: 20px 24px 18px; border-bottom: 1px solid var(--line-soft); }
.part-head .by { font-size: .82rem; font-weight: 600; color: var(--mute); margin-bottom: 6px; }
.part-head h3 { margin-bottom: 6px; }
.part-head p { font-size: .9rem; color: var(--mute); margin: 0; }
.part.levius { border-top: 3px solid var(--levius); }
.part.itesp { border-top: 3px solid var(--itesp); }
.part.levius .part-head .by { color: var(--levius); }
.part.itesp .part-head .by { color: var(--itesp); }
.feat { list-style: none; margin: 0; padding: 8px 24px 22px; }
.feat li { position: relative; padding: 11px 0 11px 26px; font-size: .95rem; border-bottom: 1px solid var(--line-soft); }
.feat li:last-child { border-bottom: 0; }
.feat li::before {
  content: ""; position: absolute; left: 2px; top: 18px; width: 9px; height: 9px;
  border-radius: 50%; border: 2px solid var(--line);
}
.part.levius .feat li::before { border-color: var(--levius); }
.part.itesp .feat li::before { border-color: var(--itesp); }
.feat li span { display: block; color: var(--mute); font-size: .87rem; margin-top: 3px; }

/* --- Ablauf (echte Reihenfolge, daher numeriert) ------------------------- */

.flow { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.flow li {
  counter-increment: s;
  display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  background: var(--white); border: 1px solid var(--line); padding: 20px 22px;
}
.flow li:first-child { border-radius: var(--r-l) var(--r-l) 0 0; }
.flow li:last-child { border-radius: 0 0 var(--r-l) var(--r-l); }
.flow li::before {
  content: counter(s); font-weight: 700; font-size: 1.02rem; color: var(--mute);
  border-right: 1px solid var(--line-soft); padding-right: 18px;
}
.flow li h4 { margin-bottom: 5px; font-size: 1rem; }
.flow li p { margin: 0; font-size: .92rem; color: var(--ink-soft); max-width: 72ch; }
.flow li b.tag { font-size: .76rem; font-weight: 600; padding: 2px 7px; border-radius: var(--r-s); margin-left: 8px; vertical-align: 2px; }
.tag.t-levius { background: var(--levius-dim); color: #0a6b66; }
.tag.t-itesp { background: var(--itesp-dim); color: #3a6b26; }

/* --- Hinweise ------------------------------------------------------------ */

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--mute);
  background: var(--white); border-radius: 0 var(--r-m) var(--r-m) 0;
  padding: 18px 20px; font-size: .93rem;
}
.note h4 { margin-bottom: 6px; }
.note p:last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--warn); background: var(--warn-dim); border-color: #f0dcc2; }
.note.ok { border-left-color: var(--itesp); background: var(--itesp-dim); border-color: #d5e6cd; }
.note.info { border-left-color: var(--levius); background: var(--levius-dim); border-color: #cde6e4; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { max-width: 78ch; }
.faq details { border-bottom: 1px solid var(--line); background: transparent; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 19px 34px 19px 0; position: relative;
  font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 27px;
  width: 10px; height: 10px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute);
  transform: rotate(45deg); transition: transform .16s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .answer { padding: 0 0 22px; }
.faq .answer p { margin-bottom: .7rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* --- Zielgruppen-Kacheln ------------------------------------------------- */

.target { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; }
.target h3 { margin-bottom: 8px; }
.target p { font-size: .93rem; color: var(--mute); margin: 0; }
.target .state { font-size: .8rem; font-weight: 600; color: var(--itesp); margin-bottom: 12px; }
.target.soon { background: transparent; border-style: dashed; }
.target.soon .state { color: var(--mute); }
.target.soon h3 { color: var(--ink-soft); }
a.target:hover { border-color: var(--ink-soft); }

/* --- Formulare ----------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field > label, .field .lbl { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 7px; }
.field .hint { font-size: .84rem; color: var(--mute); margin-top: 7px; }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; font-family: var(--sans); font-size: .97rem; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--white);
}
input:focus, select:focus, textarea:focus { border-color: var(--levius); outline: none; box-shadow: 0 0 0 3px rgba(14,143,136,.16); }
input[readonly] { background: var(--paper-2); color: var(--ink-soft); }
.row { display: grid; gap: 14px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.row.zipcity { grid-template-columns: 130px 1fr; }
.err-msg { font-size: .84rem; color: var(--err); margin-top: 7px; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.field.invalid .err-msg { display: block; }

.suffix { display: flex; align-items: stretch; }
.suffix input { border-radius: var(--r-m) 0 0 var(--r-m); }
.suffix .fix {
  display: flex; align-items: center; padding: 0 13px; font-size: .92rem; color: var(--mute);
  border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r-m) var(--r-m) 0; background: var(--paper-2);
}
.check-state { font-size: .86rem; margin-top: 8px; font-weight: 500; }
.check-state.free { color: var(--itesp); }
.check-state.busy { color: var(--mute); }
.check-state.no { color: var(--err); }

/* Bestätigungs-Kästen */
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--white); padding: 17px 19px; margin-bottom: 12px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--levius); cursor: pointer; }
.consent .t { display: block; font-size: .96rem; font-weight: 600; }
.consent .s { display: block; font-size: .87rem; color: var(--mute); margin-top: 5px; font-family: var(--serif); line-height: 1.5; }
.consent:has(input:checked) { border-color: var(--itesp); background: var(--itesp-dim); }
.consent.required-missing { border-color: var(--err); background: var(--err-dim); }

/* Schritte */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }
.steps li { list-style: none; display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--mute); font-weight: 500; }
.steps li + li::before { content: ""; width: 22px; height: 1px; background: var(--line); }
.steps li b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: .78rem; }
.steps li[data-state=current] { color: var(--ink); }
.steps li[data-state=current] b { background: var(--ink); color: var(--white); border-color: var(--ink); }
.steps li[data-state=done] b { background: var(--itesp); border-color: var(--itesp); color: var(--white); }

.order-grid { display: grid; grid-template-columns: 1fr 352px; gap: 40px; align-items: start; }
.aside { position: sticky; top: 92px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.sum-line.total { border-bottom: 0; padding-top: 15px; font-size: 1.02rem; font-weight: 700; }

/* --- App ---------------------------------------------------------------- */

.app-head { background: var(--ink); color: var(--white); }
.app-head .topbar-in { height: 62px; }
.app-head .brand b { color: var(--white); }
.app-head .brand b span { color: #8b9db4; }
.app-head .nav a { color: #b9c6d6; }
.app-head .nav a:hover, .app-head .nav a[aria-current="page"] { color: var(--white); box-shadow: none; }
/* --- Nutzermenü in der Kopfzeile --------------------------------------- */

.usermenu { position: relative; margin-left: 6px; }
.usermenu > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 5px; border-radius: 999px;
  border: 1px solid #2a3c57; color: #b9c6d6; font-size: .86rem;
}
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover { border-color: #3d5375; color: var(--white); }
.usermenu[open] > summary { border-color: #3d5375; color: var(--white); }
.usermenu > summary b {
  width: 28px; height: 28px; border-radius: 50%; background: #24354d; color: var(--white);
  display: grid; place-items: center; font-size: .76rem; font-weight: 600; letter-spacing: .02em;
}
.usermenu-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu[open] > summary svg { transform: rotate(180deg); }

.usermenu-panel {
  position: absolute; right: 0; top: 46px; z-index: 60; min-width: 260px;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-lift); padding: 6px;
}
.usermenu-head { padding: 12px 13px 13px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-head b { display: block; font-size: .95rem; }
.usermenu-head span { display: block; font-size: .82rem; color: var(--mute); margin-top: 2px; word-break: break-all; }
.usermenu-mfa { display: flex !important; align-items: center; gap: 7px; margin-top: 8px !important; word-break: normal !important; }
.usermenu-mfa i { width: 7px; height: 7px; border-radius: 50%; background: var(--itesp); flex: none; }
.usermenu-mfa i.warn { background: var(--warn); }
.usermenu-panel a {
  display: block; padding: 10px 13px; font-size: .92rem; font-weight: 500;
  text-decoration: none; color: var(--ink); border-radius: var(--r-s);
}
.usermenu-panel a:hover { background: var(--paper); }
.usermenu-panel a.usermenu-out { color: var(--err); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-s) var(--r-s); }
.app-head .usermenu-panel a { color: var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--white); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.pill.ok { color: #3a6b26; background: var(--itesp-dim); border-color: #d5e6cd; }
.pill.ok::before { background: var(--itesp); }
.pill.wait { color: var(--warn); background: var(--warn-dim); border-color: #f0dcc2; }
.pill.wait::before { background: var(--warn); }
.pill.err { color: var(--err); background: var(--err-dim); border-color: #f0cdcc; }
.pill.err::before { background: var(--err); }
.pill.off::before { background: var(--line); }

.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setup-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; display: flex; flex-direction: column; }
.setup-card.levius { border-top: 3px solid var(--levius); }
.setup-card.itesp { border-top: 3px solid var(--itesp); }
.setup-card .by { font-size: .8rem; font-weight: 600; margin-bottom: 8px; }
.setup-card.levius .by { color: var(--levius); }
.setup-card.itesp .by { color: var(--itesp); }
.setup-card h3 { margin-bottom: 8px; }
.setup-card p { font-size: .92rem; color: var(--mute); }
.setup-card .foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.panel { display: none; margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; }
.panel[data-open="true"] { display: block; }
.panel > h3 { margin-bottom: 6px; }
.panel .sub { font-size: .93rem; color: var(--mute); margin-bottom: 24px; }
.fieldset { border: 0; margin: 0 0 26px; padding: 0; }
.fieldset > legend { font-size: .95rem; font-weight: 700; padding: 0 0 4px; }
.fieldset .legend-sub { font-size: .87rem; color: var(--mute); margin-bottom: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 20px 1fr auto; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; align-items: start; }
.timeline li:last-child { border-bottom: 0; }
.timeline li .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--line); }
.timeline li[data-state=done] .dot { background: var(--itesp); }
.timeline li[data-state=wait] .dot { background: var(--warn); }
.timeline li[data-state=err] .dot { background: var(--err); }
.timeline li b { font-weight: 600; }
.timeline li span { display: block; color: var(--mute); font-size: .86rem; margin-top: 2px; }
.timeline li time { font-size: .82rem; color: var(--mute); white-space: nowrap; }

/* Tabellen (Admin) */
.tbl-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th { font-size: .8rem; font-weight: 600; color: var(--mute); background: var(--paper-2); border-bottom: 1px solid var(--line); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr[data-clickable] { cursor: pointer; }
table.data tbody tr[data-clickable]:hover { background: #f7f9fb; }
table.data .ref { font-weight: 600; white-space: nowrap; }
table.data .sub { color: var(--mute); font-size: .82rem; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; }
.kpi .v { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.kpi .k { font-size: .86rem; color: var(--mute); margin-top: 4px; }
.kpi.alert .v { color: var(--err); }

.drawer-bg { display: none; position: fixed; inset: 0; background: rgba(15,27,45,.42); z-index: 60; }
.drawer-bg[data-open="true"] { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); z-index: 61; overflow-y: auto; padding: 28px; transform: translateX(100%); transition: transform .2s ease; }
.drawer-bg[data-open="true"] .drawer { transform: none; }
.drawer .x { position: absolute; top: 20px; right: 22px; background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--mute); }
.log { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8rem; background: var(--ink); color: #d6e0ec; border-radius: var(--r-m); padding: 16px; overflow-x: auto; line-height: 1.7; }
.log b { color: #7fd4cd; font-weight: 400; }
.log i { color: #f0b775; font-style: normal; }

/* --- Fuß ---------------------------------------------------------------- */

footer.site { background: var(--ink); color: #b9c6d6; padding: 52px 0 34px; font-size: .9rem; }
footer.site a { color: var(--white); text-decoration-color: #465a76; }
/*
 * Vier Spalten, seit die Ratgeberseiten dazugekommen sind: Im Dreierraster
 * rutschte „Rechtliches" in eine zweite Reihe und ließ zwei Drittel der Breite
 * leer. Die erste Spalte trägt den Text und bekommt mehr Platz.
 */
footer.site .cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 30px 34px;
  margin-bottom: 30px;
  align-items: start;
}

/* Die Rechtsverweise sind neun Punkte — als eine Spalte wären sie eine sehr
   lange Leiste. Zwei Spalten, sobald der Platz reicht. */
footer.site .cols .recht ul { columns: 2; column-gap: 20px; }
@media (max-width: 1080px) { footer.site .cols .recht ul { columns: 1; } }

@media (max-width: 1080px) {
  footer.site .cols { grid-template-columns: 1.3fr 1fr 1fr; }
  footer.site .cols > :first-child { grid-column: 1 / -1; max-width: 62ch; }
}
footer.site h4 { color: var(--white); margin-bottom: 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { padding: 3px 0; }
footer.site p { max-width: 46ch; }
footer.site .fine { border-top: 1px solid #24354d; padding-top: 22px; font-size: .82rem; color: #8b9db4; display: flex; gap: 22px; flex-wrap: wrap; }
footer.site .seam-bar { height: 3px; background: var(--seam); border-radius: 2px; width: 54px; margin-bottom: 18px; }

/* Fuß im Kundenbereich: schmal und ruhig, klar vom Inhalt getrennt. */
.app-foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--paper); }
.app-foot .inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap; padding: 20px 0 26px; font-size: .86rem; color: var(--mute);
}
.app-foot .wer { font-weight: 600; color: var(--ink); }
.app-foot .wer .mute { font-weight: 400; }
.app-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.app-foot nav a { color: var(--mute); text-decoration-color: var(--line); }
.app-foot nav a:hover { color: var(--ink); }

/* Streifen mit Bestell- und Zahlungsangaben unter den Karten.
   Abgesetzt durch eine Linie, damit es nicht wie vergessener Text wirkt. */
.meta-strip {
  display: flex; gap: 30px; flex-wrap: wrap; align-items: baseline;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .9rem;
}
.meta-strip .lbl { display: block; font-size: .78rem; color: var(--mute); margin-bottom: 2px; }
.meta-strip b { font-weight: 600; }
.meta-strip .mute { color: var(--mute); }
.meta-strip nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 640px) { .meta-strip nav { margin-left: 0; width: 100%; } }

/* Anforderungen an das Passwort.
   Drei Zustände: unberührt grau, erfüllt grünes Häkchen, offen rotes Kreuz.
   Solange nichts getippt ist, bleibt alles grau — sechs rote Kreuze zur
   Begrüßung wären eine Rüge für etwas, das der Kunde noch nicht getan hat. */
.pwbox {
  border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 60%, #fff);
  padding: 12px 16px 14px; margin: -4px 0 24px;
}
.pwbox .head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.pwbox .titel { font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--mute); }
.pwbox .zaehler { font-size: .82rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.pwbox[data-erfuellt="true"] { border-color: color-mix(in srgb, var(--itesp) 45%, var(--line)); }
.pwbox[data-erfuellt="true"] .zaehler { color: var(--itesp); font-weight: 600; }

.pwbox ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px 18px;
}
.pwbox li {
  display: flex; align-items: center; gap: 9px;
  font-size: .89rem; color: var(--mute); transition: color .15s;
}

/* Zeichen als gedrehte Ränder statt als Schriftzeichen: So verschiebt sich die
   Zeile beim Umschalten nicht, und die Größe hängt nicht an der Schriftart. */
.pwbox li i {
  flex: none; position: relative; width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--line); background: #fff; transition: all .15s;
}
.pwbox li i::before, .pwbox li i::after {
  content: ""; position: absolute; opacity: 0; transition: opacity .15s;
}

/* Erfüllt: grünes Kästchen mit Häkchen */
.pwbox li.ok { color: var(--ink); }
.pwbox li.ok i { background: var(--itesp); border-color: var(--itesp); }
.pwbox li.ok i::after {
  left: 4.5px; top: 1.5px; width: 5px; height: 8px;
  border: solid #fff; border-width: 0 1.7px 1.7px 0;
  transform: rotate(45deg); opacity: 1;
}

/* Offen, nachdem getippt wurde: rotes Kreuz */
.pwbox li.fehlt { color: var(--err); }
.pwbox li.fehlt i { border-color: var(--err); background: #fff; }
.pwbox li.fehlt i::before, .pwbox li.fehlt i::after {
  left: 3px; top: 6.4px; width: 10px; height: 0;
  border-top: 1.7px solid var(--err); opacity: 1;
}
.pwbox li.fehlt i::before { transform: rotate(45deg); }
.pwbox li.fehlt i::after  { transform: rotate(-45deg); }

/* Hinweisliste im Kundenbereich.
   Der Punkt sitzt über die Zeilenhöhe ausgerichtet, nicht über einen
   Pixelversatz — der verschiebt sich, sobald eine Zeile umbricht. */
.hint-item { display: flex; gap: 10px; padding: 5px 0; line-height: 1.55; }
.hint-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); margin-top: calc((1.55em - 7px) / 2);
}
/* Ein Rat, keine offene Aufgabe: neutraler Punkt. */
.hint-dot.rat { background: var(--line); border: 1px solid var(--mute); }

/* Auswahlkachel: Radio mit Beschreibung, für wenige klare Vorgaben. */
label.wahl {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fff; transition: border-color .15s, background .15s;
}
label.wahl:hover { border-color: color-mix(in srgb, var(--itesp) 40%, var(--line)); }
label.wahl.aktiv { border-color: var(--itesp); background: color-mix(in srgb, var(--itesp) 5%, #fff); }
label.wahl input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
label.wahl > span { display: block; }
label.wahl b { display: block; font-size: .95rem; margin-bottom: 3px; }
label.wahl .s { display: block; font-size: .84rem; color: var(--mute); line-height: 1.5; }

/* Farbwahl: Punkt plus Name, damit die Farbe nicht allein die Bedeutung trägt. */
label.farbwahl {
  position: relative; display: inline-flex; gap: 8px; align-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 10px;
  background: #fff; font-size: .88rem;
}
label.farbwahl.aktiv { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
label.farbwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.farbwahl > span { width: 16px; height: 16px; border-radius: 50%; flex: none; }
label.farbwahl b { font-weight: 500; }

/*
 * Verborgen heißt verborgen.
 *
 * `[hidden]` ist im Browser nur `display: none` mit der Gewichtung eines
 * Attributs — jede eigene Regel mit Klassenname schlägt es. Genau das ist
 * passiert: `label.gruendung { display: flex }` machte das Kästchen „in
 * Gründung" wieder sichtbar, obwohl das Skript es verborgen hatte. Diese Regel
 * gilt für alle künftigen Fälle mit.
 */
[hidden] { display: none !important; }

/* Kästchen „in Gründung" unter der Rechtsform. */
label.gruendung {
  display: flex; align-items: center; gap: 9px;
  margin-top: 10px; font-size: .89rem; cursor: pointer;
}
label.gruendung input { width: 17px; height: 17px; }

/* Hinweis auf den fehlenden Rechtsformzusatz — auffälliger als ein normaler
   Hinweis, weil er eine Handlung anbietet, aber keine Fehlermeldung ist. */
.hint.zusatz {
  margin-top: 6px; padding: 8px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 12%, #fff);
  border-left: 3px solid var(--warn); color: var(--ink);
}
.hint.zusatz b { font-weight: 600; }

/* Knopf, der wie ein Link aussieht — für Aktionen mitten im Satz, die ein
   Formular brauchen (etwa „neu senden“ mit CSRF-Merkmal). */
.linkish {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--levius); text-decoration: underline; text-underline-offset: 2px;
}
.linkish:hover { color: var(--ink); }

/* --- Einstellungen: Seitenspalte und Übersicht -------------------------- */

.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 20px; }
.settings-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-s);
  font-size: .93rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.settings-nav a:hover { background: var(--white); color: var(--ink); box-shadow: none; }
.settings-nav a[aria-current="page"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-card); }
.settings-nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line); }
.settings-nav .dot.ok { background: var(--itesp); }
.settings-nav .dot.warn { background: var(--warn); }
.settings-nav .dot.off { background: var(--err); }

a.settings-card { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s ease; }
a.settings-card:hover { box-shadow: var(--shadow-lift); }

@media (max-width: 800px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .settings-nav a { white-space: nowrap; }
}

/* --- Mobilmenü (ohne JavaScript, über <details>) ------------------------- */

.nav-mob { display: none; margin-left: auto; position: relative; }
.nav-mob > summary {
  list-style: none; cursor: pointer; width: 42px; height: 38px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 9px;
  background: var(--white);
}
.nav-mob > summary::-webkit-details-marker { display: none; }
.nav-mob > summary span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-mob[open] > summary { border-color: var(--ink-soft); }
.nav-mob-panel {
  position: absolute; right: 0; top: 46px; z-index: 50;
  min-width: 220px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-lift); padding: 6px;
}
.nav-mob-panel a {
  display: block; padding: 11px 13px; font-size: .96rem; font-weight: 500;
  text-decoration: none; color: var(--ink); border-radius: var(--r-s);
}
.nav-mob-panel a:hover { background: var(--paper); }
.nav-mob-panel a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav-mob-panel a:last-child { margin-top: 4px; background: var(--ink); color: var(--white); text-align: center; }
.app-head .nav-mob > summary { background: transparent; border-color: #2a3c57; }
.app-head .nav-mob > summary span { background: var(--white); }

/* Kurzangabe mit Erläuterung im Tooltip. Der Text steht zusätzlich im
   Markup (.tip-detail), damit er ohne Maus und für Vorleseprogramme da ist. */
.tip { border-bottom: 1px dotted var(--mute); cursor: help; }
.tip-detail { display: block; font-size: .82rem; color: var(--mute); margin-top: 3px; }
@media (hover: hover) and (min-width: 901px) {
  .tip-detail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* --- Bewegung / Zugänglichkeit ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 900px) {
  .hero-grid, .order-grid, .g2, .g3, .g4, .setup, .row.c2, .row.c3, footer.site .cols { grid-template-columns: 1fr; }
  .g4 { gap: 14px; }
  .aside { position: static; }
  .nav { gap: 12px; }
  .nav { display: none; }
  .nav-mob { display: block; }
  /* Das Nutzermenü bleibt auch schmal erreichbar. */
  .app-head .nav { display: flex; }
  .app-head .nav a { display: none; }
  .app-head .nav .usermenu { display: block; margin-left: 0; }
  section { padding: 52px 0; }
  .hero { padding: 44px 0 48px; }
  .drawer { width: 100%; }
  .tbl-wrap { overflow-x: auto; }
  table.data { min-width: 860px; }
}

/* Wortmarke eines Partners in einer Überschrift: Die Bildhöhe folgt der
   Schriftgröße, damit die Zeile nicht springt, wenn das Logo fehlt. */
h3 .marke { display: block; height: 1.45em; width: auto; margin: 2px 0 2px; }

/* Drei Angaben unter dem Kopfbereich: Wert groß, Erklärung klein darunter.
   Umbricht auf schmalen Geräten untereinander, ohne dass Wert und Erklärung
   auseinanderfallen. */
.hero-fakten { display: flex; flex-wrap: wrap; gap: 8px 34px; margin: 22px 0 0; }
.hero-fakten dt { font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; }
.hero-fakten dd { margin: 1px 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 560px) { .hero-fakten { gap: 12px 24px; } }

/* „Anmelden" im Kopf: sichtbar, aber leiser als der Bestellknopf. Eine
   senkrechte Linie trennt es von den Seitenpunkten — es ist etwas anderes als
   eine weitere Seite. */
.nav .nav-login {
  margin-left: 6px; padding-left: 16px; position: relative; font-weight: 500;
}
.nav .nav-login::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 16px; background: var(--line);
}

/* ---------------------------------------------------------- Website-Editor */
/* Drei Spalten: Abschnitte | Formular | Vorschau. Die Vorschau ist so breit
   wie möglich, weil sie das ist, worum es geht. */
.wrap-weit { max-width: 1440px; }
.editor { display: grid; grid-template-columns: 200px minmax(320px, 1fr) minmax(360px, 1.15fr);
          gap: 22px; align-items: start; }
.editor-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.editor-nav a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none;
                color: var(--ink); border: 1px solid transparent; }
.editor-nav a b { display: block; font-size: .95rem; }
.editor-nav a span { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.editor-nav a:hover { background: var(--panel); }
.editor-nav a[aria-current] { border-color: var(--line); background: #fff;
                              box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.editor-form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.editor-form h2 { font-size: 1.15rem; margin: 0 0 14px; }
.editor-aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.editor-vorschau { position: sticky; top: 76px; }
.editor-vorschau-kopf { display: flex; justify-content: space-between; font-size: .85rem;
                        color: var(--muted); margin-bottom: 6px; }
.editor-vorschau iframe { width: 100%; height: calc(100vh - 150px); min-height: 520px;
                          border: 1px solid var(--line); border-radius: 12px; background: #fff; }
/* Die Vorschau ragte auf mittleren Breiten rechts hinaus: Drei Spalten mit
   Mindestbreiten passten nicht mehr in 1240 px. Unter 1320 px wandern die
   Abschnitte als Reihe nach oben, Formular und Vorschau teilen sich die
   Breite. */
@media (max-width: 1320px) {
  .editor { grid-template-columns: minmax(300px, 1fr) minmax(320px, 1fr); }
  .editor-nav { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; }
  .editor-nav a span { display: none; }
  .editor-nav a { padding: 8px 12px; }
}
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .editor-vorschau { position: static; }
  .editor-vorschau iframe { height: 560px; }
}

/* Schalter: zwei bis drei Werte als Segment. */
.schalter { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.schalter label { position: relative; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter span { display: block; padding: 7px 13px; font-size: .9rem; cursor: pointer;
                 border-right: 1px solid var(--line); background: #fff; }
.schalter label:last-child span { border-right: 0; }
.schalter input:checked + span { background: var(--ink); color: #fff; }
.schalter input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Wahlzeilen: Radiogruppe als Liste, eine Zeile je Wert. */
.wahlzeilen { display: flex; flex-direction: column; gap: 2px; }
.wahlzeile { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 6px;
             cursor: pointer; }
.wahlzeile:hover { background: var(--panel); }
.wahlzeile input { margin: 0; position: relative; top: 1px; }
.wahlzeile em { font-style: normal; color: var(--muted); font-size: .9rem; }

/* Schreibweise der freien Texte: links das Getippte, rechts das Ergebnis. */
.schreibweise { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
                font-size: .9rem; }
.schreibweise > b { display: block; margin-bottom: 8px; }
.schreibweise .zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.schreibweise pre { margin: 0; background: var(--panel); border-radius: 6px; padding: 10px;
                    font-size: .82rem; line-height: 1.45; white-space: pre-wrap; }
.schreibweise .ergebnis { padding: 4px 2px; }
.schreibweise .ergebnis h4 { margin: 0 0 2px; font-size: .92rem; }
.schreibweise .ergebnis p { margin: 0 0 10px; }
@media (max-width: 560px) { .schreibweise .zwei { grid-template-columns: 1fr; } }

/* Zugeklappte Bausteine im Abschnitt Extras. */
details.extra { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin-bottom: 8px; }
details.extra summary { padding: 11px 0; cursor: pointer; list-style: none; display: flex; gap: 8px;
                        align-items: baseline; flex-wrap: wrap; }
details.extra summary::-webkit-details-marker { display: none; }
details.extra summary::before { content: "+"; width: 16px; color: var(--muted); font-weight: 600; }
details.extra[open] summary::before { content: "–"; }
details.extra summary em { font-style: normal; color: var(--muted); font-size: .88rem; }
details.extra > .field, details.extra > .row, details.extra > .consent, details.extra > .hint
  { margin-bottom: 12px; }

/* Hinweis für Gewerbetreibende: sichtbar, aber kein Warnkasten. */
.b2b-hinweis { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--accent);
               padding: 4px 0 4px 12px; margin: 16px 0 0; max-width: 58ch; }

/* Nächster Schritt auf den Ratgeberseiten. */
.naechster-schritt { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
