:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --border: #e2e8f0;
  --rank-1: #16a34a;
  --rank-2: #65a30d;
  --rank-3: #ca8a04;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #1e2a44 320px, #f1f5f9 320px);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header.hero {
  text-align: center;
  color: #fff;
  padding: 8px 0 28px;
}

header.hero h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
}

header.hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 24px;
  margin-bottom: 24px;
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

details.card summary {
  cursor: pointer;
  list-style: none;
}

details.card summary::-webkit-details-marker {
  display: none;
}

details.card summary h2 {
  display: inline-block;
}

details.card summary h2::before {
  content: "▾ ";
  font-size: 0.9em;
}

details.card:not([open]) summary h2::before {
  content: "▸ ";
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.form-grid[hidden] {
  display: none;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.toggle-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.toggle-group button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.toggle-group button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.calc-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.calc-btn:hover {
  background: var(--accent-dark);
}

#results {
  display: none;
}

#results.visible {
  display: block;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.summary-chip {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.summary-chip .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.summary-chip .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

#screenshot-area {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

#screenshot-area .ss-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}

#screenshot-area .ss-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

#screenshot-area .ss-header span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tariff-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1.5px solid var(--border);
}

.tariff-row.rank-1 {
  border-color: var(--rank-1);
  background: #f0fdf4;
}

.tariff-row.rank-2 {
  border-color: var(--rank-2);
  background: #f7fee7;
}

.tariff-row.rank-3 {
  border-color: var(--rank-3);
  background: #fefce8;
}

.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text-muted);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.rank-1 .rank-badge {
  background: var(--rank-1);
}
.rank-2 .rank-badge {
  background: var(--rank-2);
}
.rank-3 .rank-badge {
  background: var(--rank-3);
}

.tariff-info {
  flex: 1;
  min-width: 0;
}

.tariff-info .name {
  font-weight: 700;
  font-size: 1rem;
}

.tariff-info .sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.anbieter-link {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.anbieter-link:hover {
  text-decoration: underline;
}

.tariff-info .estimated-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
}

.tariff-cost {
  text-align: right;
  flex-shrink: 0;
}

.tariff-cost .total {
  font-weight: 800;
  font-size: 1.15rem;
}

.tariff-cost .breakdown {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footnotes {
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.footnotes strong {
  color: var(--text);
}

.hint-row {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.karten-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.karten-option:hover {
  background: #f8fafc;
}

.karten-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.karten-option-keine {
  font-weight: 700;
  border: 1.5px solid var(--border);
  margin-bottom: 14px;
}

.karten-auswahl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 20px;
}

.karten-gruppe {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}

.karten-gruppe-titel {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px 6px;
}

.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.affiliate-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.affiliate-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.affiliate-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-nav {
  margin-top: 4px;
}

.footer-nav a {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-nav a:hover {
  color: var(--accent-dark);
}

.footer-nav-link {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.footer-nav-link:hover {
  color: #fff;
}

.legal-card h1 {
  font-size: 1.4rem;
  margin-top: 0;
}

.legal-card h2 {
  font-size: 1rem;
  margin-top: 24px;
}

.legal-card p {
  line-height: 1.6;
  color: var(--text);
}

.contact-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #f8fafc;
  resize: vertical;
}

.contact-form .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.checkbox-field .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  background: #fef2f2;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .tariff-row {
    flex-wrap: wrap;
  }
  .tariff-cost {
    text-align: left;
    width: 100%;
  }
}
