/* =======================
   🌐 Globale Farbvariablen
   ======================= */
:root {
  --orange: orange;
  --orange-dark: darkorange;
  --grau-hell: #f9f9f9;
  --blau: #007BFF;
  --weiß: #fff;
  --grau-text: #777;
  --dunkelgrau: #222;
  --rot: #f44336;

  /* Usage-Card Farben */
  --usage-brand: #ff8a00;
  --usage-text:  #1f2937;
  --usage-muted: #6b7280;
  --usage-bg:    #f9fafb;
  --usage-card:  #ffffff;
  --usage-border:#e5e7eb;
  --usage-ok:    #16a34a;
  --usage-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* =======================
   🧱 Grundlayout
   ======================= */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--grau-hell);
  color: #333;
}

/* =======================
   🔝 Navigation (zentriert, mit Dropdowns)
   ======================= */
.site-nav {
  background-color: var(--dunkelgrau);
  color: var(--weiß);
  padding: 12px 16px;
}

/* Burger (mobil) */
.site-nav .burger {
  display: none;
  background: none;
  border: none;
  color: var(--weiß);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Link-Zeile */
.site-nav .nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* Links & Buttons wie Links */
.site-nav a,
.site-nav .nav-link {
  color: var(--weiß);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
}
.site-nav a:hover,
.site-nav .nav-link:hover {
  background: rgba(255,255,255,0.08);
}

/* Dropdown-Container */
.site-nav .nav-item { position: relative; }
.site-nav .nav-item.dropdown { position: relative; }

/* Toggle-Button (Tools/Blog) wie Link stylen */
.site-nav .dropdown-toggle {
  background: none;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  color: var(--weiß);
  border-radius: 6px;
}
.site-nav .dropdown-toggle:hover {
  background: rgba(255,255,255,0.08);
}

/* Dropdown-Menü (Desktop) */
.site-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--weiß);
  color: #333;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  z-index: 1000;
}
.site-nav .nav-item:hover > .dropdown-menu { display: block; }
.site-nav .nav-item.open > .dropdown-menu { display: block; }
.site-nav .nav-item:focus-within > .dropdown-menu { display: block; }

.site-nav .dropdown-menu li { list-style: none; }
.site-nav .dropdown-menu a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
}
.site-nav .dropdown-menu a:hover { background: #f5f5f5; }
.site-nav .dropdown-menu hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 6px 0;
}

/* etwas Hover-Puffer am Toggle */
.site-nav .dropdown-toggle,
.site-nav .nav-link {
  padding-bottom: 10px;
}

/* Mobil-Layout */
@media (max-width: 768px) {
  .site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .site-nav .burger { display: inline-block; }

  .site-nav .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
  }
  .site-nav .nav-links.show { display: flex; }

  /* Dropdowns im Flow darstellen */
  .site-nav .dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .site-nav .dropdown-menu a {
    padding: 10px 12px;
    border-radius: 6px;
  }
}

/* =======================
   📦 Container
   ======================= */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* =======================
   📰 Überschriften
   ======================= */
h1, h2, h3 { color: var(--dunkelgrau); }
h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}
h3 { margin-top: 30px; }

/* =======================
   ⚠️ Flash-Nachrichten
   ======================= */
.flashes {
  list-style-type: none;
  padding: 0;
  margin: 20px 0;
}
.flashes li {
  background-color: #ffdddd;
  border-left: 5px solid var(--rot);
  padding: 12px 18px;
  margin-bottom: 10px;
  color: #333;
  border-radius: 6px;
}

/* =======================
   📋 Listen (z. B. SEO-Ergebnisse)
   ======================= */
ul { list-style-type: none; padding: 0; }
li {
  background: var(--weiß);
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 10px;
  border-radius: 6px;
}

/* =======================
   🔁 Buttons
   ======================= */
.btn-small {
  background: var(--orange);
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}
.btn-small:hover { background: var(--orange-dark); }

.button-orange {
  background: var(--orange);
  color: var(--weiß);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  display: inline-block;
  margin-top: 12px;
  transition: background 0.3s ease;
}
.button-orange:hover { background: var(--orange-dark); color: var(--weiß); }

/* =======================
   🧠 Content-Ideen: klickbare URLs
   ======================= */
.seo-url-btn {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer;
  font-weight: bold;
}
.seo-url-btn:hover { text-decoration: underline; }

.timestamp { color: #888; font-size: 0.9em; margin-left: 1rem; }

.action-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* =======================
   📁 Details & Previews
   ======================= */
details summary {
  cursor: pointer;
  font-weight: bold;
  margin-top: 8px;
}
details pre {
  white-space: pre-wrap;
  margin-top: 8px;
}

/* =======================
   🗂️ Tabs (Dashboard)
   ======================= */
.tab-container { margin-top: 30px; }
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-button {
  background: var(--weiß);
  color: var(--orange);
  padding: 12px 24px;
  font-size: 1rem;
  border: 1px solid var(--orange);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}
.tab-button:hover { background: var(--orange-dark); color: var(--weiß); }
.tab-button.active { background: var(--orange); color: var(--weiß); }

.tab-content {
  display: none;
  background: var(--grau-hell);
  border-radius: 0 0 12px 12px;
  padding: 20px;
  margin-top: -1px;
  border: 1px solid #ddd;
}
.tab-content.active { display: block; }

/* =======================
   🖼️ Bild-Grid
   ======================= */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.image-grid img {
  max-width: 100%;
  border-radius: 8px;
}
.image-grid img:hover {
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

/* =======================
   🧾 Fußzeile
   ======================= */
footer {
  margin-top: 60px;
  padding: 20px;
  background: var(--dunkelgrau);
  color: var(--weiß);
  text-align: center;
  font-size: 0.9rem;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer li {
  margin: 10px 0;
  background: none;
  border: none;
  padding: 0;
}
footer a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.3s ease;
}
footer a:hover {
  background: orange;
  color: #222;
  text-decoration: none;
}

/* =======================
   🎯 Startseite (Landing)
   ======================= */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.landing-box {
  background: var(--weiß);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.2s ease;
}
.landing-box:hover { transform: translateY(-3px); }

/* =======================
   💬 Chat
   ======================= */
#chat-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 300px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  z-index: 9999;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#chat-log {
  height: 200px;
  overflow-y: auto;
  font-size: 0.9em;
  margin-bottom: 10px;
  border: 1px solid #eee;
  padding: 5px;
}
#chat-form { display: flex; }
#chat-input { flex: 1; padding: 5px; }
#chat-form button { padding: 5px 10px; }

/* =======================
   🔐 Forms
   ======================= */
.form-auth input[type="text"],
.form-auth input[type="email"],
.form-auth input[type="password"],
.form-auth input[type="submit"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}
.form-auth input[type="submit"] {
  background: var(--orange);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}
.form-auth input[type="submit"]:hover { background: var(--orange-dark); }

/* ===== Admin-Styles ===== */
.tab-container.admin .card {
  background: var(--weiß);
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
}
.tab-container.admin .list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tab-container.admin .list > li {
  background: var(--weiß);
  border: 1px solid #eee;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}
.tab-container.admin .list-plain {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
}
.tab-container.admin .list-plain > li {
  background: none;
  border: none;
  padding: 4px 0;
  margin: 0;
}
.tab-container.admin .link-small {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--blau);
}
.tab-container.admin .link-small:hover { text-decoration: underline; }
.tab-container.admin .muted { color: var(--grau-text); }
.tab-container.admin .mt-6 { margin-top: 6px; }
.tab-container.admin fieldset {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}
.tab-container.admin legend { font-weight: 600; color: var(--dunkelgrau); }
.tab-container.admin input[type="text"],
.tab-container.admin input[type="email"],
.tab-container.admin input[type="number"],
.tab-container.admin textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 6px 0 10px;
  background: var(--weiß);
}
.tab-container.admin td .btn-small {
  display: inline-block;
  margin: 2px 0;
}

/* =======================
   📰 Blog-Layout
   ======================= */
.blog-text p { margin: 0 0 1em; }

.blog-container {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.sidebar {
  width: 20%;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.blog-main { flex: 1; }
.blog-list li { margin-bottom: 1.5rem; }
#blog-search,
#blog-calendar {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* =======================
   🏠 Startseite – Overrides
   ======================= */

/* Wrapper der Startseite zentrieren */
.startpage{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Trennlinie */
.startpage .section-divider{
  width: 420px;
  max-width: 60%;
  margin: 40px auto;
  border: 0;
  border-top: 2px solid #eee;
}

/* --- GLOBALER LISTEN-RESET NUR AUF STARTSEITE --- */
.startpage ul{
  list-style: disc;
  padding-left: 1.25rem;
  margin: .4rem 0 .6rem;
}
.startpage li{
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: .35rem 0 !important;
  border-radius: 0 !important;
}

/* Zwei Tarif-Karten (oben & unten) wirklich mittig begrenzen */
.startpage .tarif-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
  justify-content: center;
}

/* Karten */
.startpage .tarif-box{
  background: var(--weiß);
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.startpage .tarif-box p{
  margin: 6px 0 12px;
  color: var(--grau-text);
}

/* Details / Akkordeon */
.startpage details{ margin: 10px 0; }
.startpage details summary{
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.startpage details summary::before{
  content: "▸";
  transition: transform .15s ease;
}
.startpage details[open] summary::before{ transform: rotate(90deg); }

/* Feature-Kacheln (SEO-Check / Content-Ideen / …) */
.startpage .landing-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.startpage .landing-box{
  background: var(--weiß);
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

/* Hinweis-Box */
.startpage .note-block{
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  border-left: 4px solid var(--orange);
  padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  border-radius: 10px;
}

/* API-/Entwicklungs-Section */
.startpage .feature{
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fafafa;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.startpage .feature-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 10px;
}
.startpage .feature-grid details{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
}
.startpage .feature-grid summary{ font-weight: 700; }

/* Mobile-Einspaltig für o. g. Grids */
@media (max-width: 768px){
  .startpage .section-divider{ max-width: 80%; }
  .startpage .tarif-grid{
    grid-template-columns: 1fr;
    max-width: 680px;
  }
  .startpage .feature-grid{ grid-template-columns: 1fr; }
}

/* ==== Usage Sidebar – eindeutig benannte Klassen ==== */
.usage-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Desktop: rechte Sidebar */
@media (min-width: 980px){
  .usage-layout{
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}
.usage-main{ min-width: 0; }

.usage-card{
  background: var(--usage-card);
  border: 1px solid var(--usage-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--usage-shadow);
  position: sticky;
  top: 16px;
}
.usage-title{
  font-size: 1.05rem;
  margin: 0 0 10px 0;
  color: var(--usage-text);
  display: flex; align-items: center; gap: 8px;
}
.usage-badge{
  background: rgba(255,138,0,.12);
  color: var(--usage-brand);
  border: 1px solid rgba(255,138,0,.35);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: capitalize;
  font-weight: 600;
}
.usage-item{ padding: 12px 0; border-top: 1px dashed var(--usage-border); }
.usage-item:first-of-type{ border-top: 0; }

.usage-row{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.usage-label{ font-weight: 700; color: var(--usage-text); }
.usage-meta{ display: flex; gap: 6px; flex-wrap: wrap; }
.usage-chip{
  font-size: .82rem;
  color: var(--usage-muted);
  border: 1px solid var(--usage-border);
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
}
.usage-chip-ok{
  color: var(--usage-ok);
  border-color: rgba(22,163,74,.35);
  background: rgba(22,163,74,.08);
}
.usage-sub{ margin-top: 6px; font-size: .9rem; color: var(--usage-muted); }

.usage-progress{
  margin-top: 10px;
  height: 8px;
  width: 100%;
  background: var(--usage-bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--usage-border);
}
.usage-bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--usage-brand), #ffa733);
  border-right: 1px solid rgba(0,0,0,.05);
  transition: width .4s ease;
}
.usage-counts{ margin-top: 6px; font-size: .9rem; color: var(--usage-text); }

/* Mobile-Optimierung */
@media (max-width: 979px){
  .usage-card{ position: static; }
  .usage-row{ gap: 6px; }
  .usage-meta{ gap: 4px; }
}

/* ▶️ „nach rechts schieben“ Varianten – sauber & mit Mobile-Reset */
.startpage .tarif-grid.tarif-grid--right{
  margin-top: 16px;
  margin-left: auto;
  margin-right: -100px; /* ggf. anpassen */
  justify-content: end;
}
@media (max-width: 768px){
  .startpage .tarif-grid--right{
    margin: 16px auto 0;
    justify-content: center;
    margin-right: 0;
  }
}

.startpage .tarif-grid.tarif-grid--by_middle{
  margin-top: 16px;
  margin-left: auto;
  margin-right: -100px; /* ggf. anpassen */
  justify-content: end;
}
@media (max-width: 768px){
  .startpage .tarif-grid--by_middle{
    margin: 16px auto 0;
    justify-content: center;
    margin-right: 0;
  }
}

/* Hinweis-Block rechtsrücken + Mobile-Reset */
.startpage .note-block{
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid #eee;
  border-left: 5px solid var(--orange);
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  border-radius: 12px;
  line-height: 1.55;
}
.startpage .note-block strong{ color: #111; }
.startpage .note-block.note-block--right{
  margin-left: auto;
  margin-right: auto; /* bewusst neutral – per Bedarf anpassen */
  max-width: 780px;
}
@media (max-width: 768px){
  .startpage .note-block.note-block--right{
    margin: 20px auto;
    max-width: 100%;
  }
}

/* Feature-Grid rechtsrücken + Mobile-Reset */
.startpage .feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 20px auto;
}
.startpage .feature-grid.feature-grid--right {
  margin-left: auto;
  margin-right: -10px; /* optionaler „Schubser“ nach rechts */
  max-width: 1000px;
}
@media (max-width: 768px) {
  .startpage .feature-grid.feature-grid--right {
    margin: 20px auto;
    margin-right: 0;
    max-width: 100%;
  }
}

/* =======================
   🚨 Emergency-Bereich (Index)
   ======================= */
.emergency-section {
  margin-top: 20px;
  padding: 15px;
  border: 2px solid #b30000;
  border-radius: 8px;
  background: #fff5f5;
  text-align: center;
}
.emergency-text {
  font-size: 1.05rem;
  color: #800000;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.4;
}
.emergency-button {
  display: inline-block;
  background-color: #cc0000; /* bewusst rot für Notfall-CTA */
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.emergency-button:hover {
  background-color: #e60000;
  transform: scale(1.03);
}
.emergency-button:active {
  background-color: #990000;
  transform: scale(0.98);
}

/* Notfallhilfe-Seite Container (neutral, ohne Button-Farb-Override) */
.emergency-page {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  text-align: center;
}
.emergency-page h1{ margin-top:0; color:#cc0000; }
.emergency-points{
  list-style: none;
  padding-left: 0;
  margin: 12px 0 14px;
}
.emergency-points li{ margin: 6px 0; }
.emergency-note{
  background: #fff5f5;
  border: 2px solid #b30000;
  color: #800000;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0 18px;
}
.emergency-login-hint{ color:#b30000; font-weight:600; }
.emergency-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
/* optionale Varianten */
.emergency-button.secondary{ background:#6b7280; }
.emergency-button.danger{ background:#cc0000; }
.emergency-button.secondary:hover{ background:#565d66; }
.emergency-button.danger:hover{ background:#e00000; }

/* =======================
   💰 Pricing-Karten (3 Pakete)
   ======================= */
.pricing-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.tarif-card {
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column; /* für Button unten */
}
.tarif-card:hover { transform: translateY(-4px); }

.tarif-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.tarif-card .price {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--orange);
}
.tarif-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left; /* optional: besser lesbar */
}
.tarif-card ul li {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}

/* Einheitliche Buttons via Variablen */
.btn-upgrade, .btn-start {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-upgrade:hover, .btn-start:hover {
  background: var(--orange-dark);
}

/* Container: mobiletaugliches Grid (ersetzt Konflikte) */
.tarif-grid.pretty-pricing{
  display: grid;
  gap: 20px;
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  justify-content: center;
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px){
  .tarif-grid.pretty-pricing{
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

/* Mobile: 1 Spalte */
@media (max-width: 640px){
  .tarif-grid.pretty-pricing{
    grid-template-columns: 1fr;
  }
}

/* Falls .pretty-pricing irgendwo als Flex gesetzt war – NICHT mehr nötig
   (Konflikt beseitigt). */

/* Ende */



/* ===== Mobile-Fixes & Overflow-Guards (am Ende einfügen) ===== */

/* 0) Sauberer Box-Model-Reset */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* 1) Notfall-Kasten: niemals überlaufen lassen */
.emergency-section,
.emergency-page,
.startpage .tarif-box {
  max-width: 100%;
  width: 100%;
  min-width: 0;             /* Grid-Items dürfen schrumpfen */
  overflow-wrap: anywhere;  /* lange Wörter umbrechen */
  word-break: break-word;
}

/* Button im Notfall-Kasten darf umbrechen */
.emergency-button {
  white-space: normal;
  inline-size: auto;   /* kein erzwungener Einzeiler */
}

/* 2) Zwei-Karten-Grid (Pro One-Page SEO & Hands Free) wirklich responsiv */
.startpage .tarif-grid {
  /* statt fix "repeat(2, minmax(360px, 1fr))" – flüssiger */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 3) "Nach rechts schieben" nur auf sehr breiten Screens anwenden */
.startpage .tarif-grid.tarif-grid--right,
.startpage .tarif-grid.tarif-grid--by_middle {
  margin-right: 0;              /* Default: kein Negativ-Margin */
  justify-content: center;      /* schön mittig */
}

/* ab 1200px darf geschoben werden */
@media (min-width: 1200px){
  .startpage .tarif-grid.tarif-grid--right,
  .startpage .tarif-grid.tarif-grid--by_middle {
    margin-right: -100px;       /* dein gewünschter Schubser */
    justify-content: end;
  }
}

/* 4) Preis-Karten: sicher schrumpfbar */
.tarif-card, .landing-box, .startpage .feature-grid details {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 5) Letzte Sicherheitsleine: horizontales Scrollen auf Mobile verhindern */
@media (max-width: 768px){
  body { overflow-x: hidden; }
}




/* Notfallhilfe: Mobile-Fix für Login/Registrieren oben */
.emergency-page .emergency-login-hint{
  display:block;
  margin: 6px 0 8px;
  line-height: 1.35;
  word-break: break-word;
}
.emergency-page > a.emergency-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  margin:6px 6px 0 0;
  max-width:100%;
  min-width:0;
  white-space:normal;
}
@media (max-width:600px){
  .emergency-page > a.emergency-button{
    display:block;
    width:100%;
    margin:8px 0 0;
  }
}
.emergency-page{ overflow-x:hidden; }




/* Note-Block mit CTA rechts, mobil stacked */
.note-inline-grid{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
@media (max-width: 768px){
  .note-inline-grid{
    grid-template-columns: 1fr;
  }
  .note-inline-grid .button-orange{
    width: 100%;
    text-align: center;
  }
}



/* ===== Landing-Kacheln: gleiche Höhe + CTA unten, gleich groß ===== */

/* Grid-Items voll strecken */
.landing-grid{
  align-items: stretch; /* sorgt pro Reihe für gleiche Kartenhöhe */
}

/* Jede Kachel als Flex-Container (vertikal) */
.landing-grid .landing-box{
  display: flex;
  flex-direction: column;
  min-width: 0;          /* verhindert Overflow */
}

/* Abstände ein bisschen normieren */
.landing-grid .landing-box h2,
.landing-grid .landing-box h3{
  margin: 0 0 8px;
}
.landing-grid .landing-box p{
  margin: 0 0 14px;
}

/* CTA: immer unten andocken + gleiche Größe + volle Breite */
.landing-grid .landing-box .button-orange{
  margin-top: auto;                 /* schiebt den Button an den Kachelboden */
  display: inline-flex;             /* zentriert Button-Text */
  align-items: center;
  justify-content: center;
  width: 100%;                      /* gleiche Breite in allen Kacheln */
  min-height: 44px;                 /* gleiche Höhe (gute Touch-Zone) */
  padding: 12px 16px;               /* einheitliche Innenabstände */
  line-height: 1.2;
  white-space: normal;              /* darf umbrechen, kein Overflow */
}

/* Optional: auf sehr schmalen Geräten noch etwas Luft */
@media (max-width: 480px){
  .landing-grid .landing-box .button-orange{
    min-height: 48px;
  }
}





/* ===== Pricing-Karten: CTA unten + gleiche Button-Größe ===== */

/* Karten auf gleiche Höhe pro Reihe strecken */
.tarif-grid.pretty-pricing{
  align-items: stretch; /* Grid-Items füllen die Zeile */
}

/* Karte als Flex-Spalte → CTA kann nach unten gedrückt werden */
.tarif-card{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Typografie/Abstände in der Karte etwas normieren */
.tarif-card h3{ margin: 0 0 8px; }
.tarif-card .price{ margin: 0 0 12px; }
.tarif-card ul{
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.tarif-card ul li{
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}

/* FORM-Variante (Standard/Premium): Form an den Kartenboden drücken */
.tarif-card form{
  margin-top: auto;     /* schiebt das Form nach unten */
  width: 100%;
}

/* LINK-Variante (Free): direkter Link an den Kartenboden */
.tarif-card > .btn-start{
  margin-top: auto;     /* schiebt den Link nach unten */
}

/* Einheitliche CTA-Größe & volle Breite (gilt für beide Varianten) */
.tarif-card .btn-upgrade,
.tarif-card .btn-start{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;          /* gleiche Breite */
  min-height: 48px;     /* gleiche Höhe / Touch-Zone */
  padding: 12px 16px;
  font-weight: 700;
  text-align: center;
  white-space: normal;  /* darf umbrechen, kein Overflow */
  box-sizing: border-box;
}

/* Optional: auf sehr schmalen Geräten etwas größer */
@media (max-width: 480px){
  .tarif-card .btn-upgrade,
  .tarif-card .btn-start{
    min-height: 52px;
  }
}



/* ========= Grundtypografie ========= */
html { font-size: 16px; }
body{
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: #1f2937; /* etwas dunkler als #333, wirkt hochwertiger */
}

/* Headlines bewusst eigenständiger */
h1, h2, h3{
  font-family: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0f172a; /* tieferes Dunkel */
  margin: 0 0 .6rem;
}

/* Responsive Type-Scale per clamp (keine Media Queries nötig) */
h1{ font-size: clamp(2rem, 1.2rem + 2.5vw, 3.2rem); }
h2{ font-size: clamp(1.4rem, 1.0rem + 1.5vw, 2.2rem); }
h3{ font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.4rem); }
p, li{ font-size: 1rem; }

/* Buttons wirken mit fetterem Font wertiger */
.button-orange,
.btn-upgrade,
.btn-start,
.tab-button{
  font-family: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.005em;
}

/* Landing- & Pricing-Kacheln: harmonische Abstände */
.landing-grid .landing-box h2,
.landing-grid .landing-box h3{ margin-bottom: .35rem; }
.landing-grid .landing-box p{ margin-bottom: .9rem; }

/* Kleine Feinheiten */
small, .muted, .timestamp{ color:#6b7280; }





/* ===== So funktioniert’s – abgesetzter Look + sanft pulsierender CTA ===== */

/* Wrapper mit zartem Orange-Hintergrund */
.how-it-works{
  position: relative;
  padding: 24px 20px 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,138,0,.06) 0%, rgba(255,138,0,.02) 100%);
  border: 1px solid rgba(255,138,0,.18);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

/* dünne Akzentleiste oben */
.how-it-works::before{
  content:"";
  position:absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  opacity: .85;
}

/* Grid wie gehabt – Items gleich hoch */
.how-it-works .steps-grid{
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 14px;
}

/* Karten leicht abgehoben – orangefarbener Rand sehr dezent */
.how-it-works .step-card{
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 1px solid rgba(255,138,0,.18);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.how-it-works .step-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  border-color: rgba(255,138,0,.28);
}

.how-it-works .step-card h3{ margin: 6px 0 6px; }
.how-it-works .step-card p{ margin: 0 0 14px; color: var(--grau-text); }

/* Nummern-Badge */
.how-it-works .step-badge{
  position: absolute;
  top: -12px;
  left: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.how-it-works .step-badge::after{ content: counter(step); }

/* CTA: unten andocken + sanfter Orange-Puls NUR in dieser Sektion */
.how-it-works .step-card .button-orange{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  white-space: normal;
  animation: orangePulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255,138,0,0);
}

/* Beim Hover/Focus die Animation stoppen und Farbe fix verdunkeln */
.how-it-works .step-card .button-orange:hover,
.how-it-works .step-card .button-orange:focus{
  animation: none;
  background: var(--orange-dark);
}

/* Sanfte Puls-Animation (Hintergrund & „Atem“-Schein) */
@keyframes orangePulse{
  0%, 100% {
    background: var(--orange);
    box-shadow: 0 0 0 0 rgba(255,138,0,0);
  }
  50% {
    background: var(--orange-dark);
    box-shadow: 0 0 0 8px rgba(255,138,0,.12);
  }
}

/* Respektiere reduzierte Bewegung */
@media (prefers-reduced-motion: reduce){
  .how-it-works .step-card .button-orange{
    animation: none;
  }
}

/* Mobile Feinschliff */
@media (max-width: 480px){
  .how-it-works .step-card .button-orange{ min-height: 48px; }
}




/* === So funktioniert’s: finaler Fix === */

/* OL-/LI-Effekte neutralisieren */
.how-it-works .steps-grid{
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  counter-reset: step;
}

/* Globales li-Kartenstyling hier abschalten */
.how-it-works .steps-grid > li{
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* Karte definiert wieder das gewünschte Aussehen + Nummernlogik */
.how-it-works .step-card{
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(255,138,0,.18);
  border-radius: 12px;
  padding: 18px;
  counter-increment: step;   /* Nummern hier zählen */
  isolation: isolate;
}

/* Badge zeigt nur die Zahl (keine weitere Erhöhung) */
.how-it-works .step-badge{
  counter-increment: none;
  position: absolute;
  top: -14px;
  left: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  z-index: 1;
}
.how-it-works .step-badge::after{ content: counter(step); }

/* CTA unten + dezenter Puls */
.how-it-works .step-card .button-orange{
  margin-top: auto;
  display: inline-flex; align-items:center; justify-content:center;
  width:100%; min-height:44px; padding:12px 16px; white-space:normal;
  animation: howPulseBg 2.2s ease-in-out infinite;
}
.how-it-works .step-card .button-orange:hover,
.how-it-works .step-card .button-orange:focus{
  animation: none; background: var(--orange-dark);
}
@keyframes howPulseBg { 0%,100%{filter:none;} 50%{filter:brightness(1.06) saturate(1.05);} }

@media (prefers-reduced-motion: reduce){
  .how-it-works .step-card .button-orange{ animation: none; }
}



/* === "So funktioniert’s": Zahlen/Batches entfernen === */
.how-it-works .steps-grid{
  list-style: none;     /* keine Browser-Ziffern */
  counter-reset: none;  /* kein eigener Counter */
  padding: 0;
  margin: 14px 0 0;
}
.how-it-works .steps-grid > li{ list-style: none; }

/* Karten zählen nicht mehr */
.how-it-works .step-card{ counter-increment: none; }

/* Badge mit Zahl ausblenden */
.how-it-works .step-badge{ display: none !important; }

/* Für ganz hartnäckige Marker (manche Browser) */
.how-it-works .steps-grid ::marker{ content: none; }
