:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --navy: #0F172A;
  --navy-light: #1E293B;
  --emerald: #059669;
  --emerald-bright: #10B981;
  --emerald-soft: #ECFDF5;
  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --text: #0F172A;
  --text-muted: #475569;
  --border: #E2E8F0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top notice bar */
.top-notice {
  background: var(--navy);
  color: #E2E8F0;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

/* Header & Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tld {
  color: var(--emerald);
  font-weight: 800;
}

.brand-text small {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--navy);
  background: var(--surface-alt);
}

.nav-link.active {
  color: var(--emerald);
  background: var(--emerald-soft);
}

.nav-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--navy);
  color: #fff;
}

.nav-link.active .nav-badge {
  background: var(--emerald);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
}

/* Hero Section */
.page-hero {
  padding: 36px 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 10px;
}

.page-hero p.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 780px;
}

/* Calculator Grid */
.calc-workspace {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}

.calc-panel,
.result-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.result-panel {
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  position: sticky;
  top: 90px;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Preset pills */
.preset-group {
  margin-bottom: 20px;
}

.preset-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover,
.preset-btn.active {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* Form inputs & sliders */
.input-group {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-alt);
}

.input-group:last-of-type {
  border-bottom: none;
  margin-bottom: 6px;
  padding-bottom: 0;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 10px;
}

.input-header label {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--navy);
}

.input-help {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-value-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.num-input {
  width: 105px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  color: var(--navy);
  background: var(--surface);
}

.num-input:focus,
.select-input:focus {
  outline: 2px solid var(--emerald);
  border-color: transparent;
}

.unit-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 38px;
}

.range-slider {
  width: 100%;
  accent-color: var(--emerald);
  height: 6px;
  cursor: pointer;
  margin-top: 4px;
}

.select-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--surface);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald);
}

/* Result Panel styling */
.result-panel .panel-title {
  color: #E2E8F0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-metric {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
}

.hero-metric-label {
  font-size: 0.85rem;
  color: #94A3B8;
  display: block;
  margin-bottom: 4px;
}

.hero-metric-value {
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  font-weight: 800;
  color: #34D399;
  line-height: 1.15;
}

.hero-metric-sub {
  font-size: 0.88rem;
  color: #CBD5E1;
  margin-top: 6px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.metric-box span {
  display: block;
  font-size: 0.78rem;
  color: #94A3B8;
}

.metric-box strong {
  font-size: 1.12rem;
  color: #F8FAFC;
  font-weight: 700;
}

/* Breakdown list & progress bar */
.breakdown-bar {
  display: flex;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.1);
}

.bar-segment.elhandel { background: #38BDF8; }
.bar-segment.elnat    { background: #F59E0B; }
.bar-segment.skatt    { background: #A855F7; }

.breakdown-list {
  list-style: none;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.breakdown-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: #CBD5E1;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.breakdown-list li:last-child {
  border-bottom: none;
}

.breakdown-list li strong {
  color: #FFFFFF;
}

.savings-callout {
  margin-top: 16px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #ECFDF5;
}

.savings-callout strong {
  color: #34D399;
}

.share-calc-btn {
  margin-top: 14px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-calc-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Affiliate / Comparison Card */
.affiliate-card {
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 2px solid #A7F3D0;
  border-radius: var(--radius-lg);
  padding: 26px;
  margin: 32px 0;
}

.affiliate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.affiliate-badge {
  background: var(--emerald);
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

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

.affiliate-card h3 {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.affiliate-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.affiliate-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.affiliate-item {
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.affiliate-item-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.affiliate-item h4 {
  font-size: 1.04rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.affiliate-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-affiliate {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--emerald);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.btn-affiliate:hover {
  background: #047857;
}

/* SEO Content & Tables */
.seo-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.seo-article h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 24px 0 12px;
  letter-spacing: -0.015em;
}

.seo-article h2:first-child {
  margin-top: 0;
}

.seo-article h3 {
  font-size: 1.18rem;
  color: var(--navy);
  margin: 20px 0 8px;
}

.seo-article p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.seo-article ul,
.seo-article ol {
  margin: 0 0 16px 22px;
  color: var(--text-muted);
}

.seo-article li {
  margin-bottom: 6px;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--surface-alt);
  color: var(--navy);
  font-weight: 700;
}

/* FAQ & Cross-links */
.faq-section,
.tools-crosslink {
  margin-bottom: 44px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.55rem;
  color: var(--navy);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.faq-item summary {
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  font-size: 1rem;
}

.faq-body {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-mini-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
}

.tool-mini-card:hover,
.tool-mini-card.current {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-icon {
  font-size: 1.65rem;
  line-height: 1;
}

.tool-mini-card strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 4px;
}

.tool-mini-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #94A3B8;
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand strong {
  color: #FFFFFF;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 10px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.footer-col a {
  color: #CBD5E1;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--emerald-bright);
}

.key-figures-list strong {
  color: #34D399;
}

.footer-disclaimer {
  margin-top: 12px;
  font-size: 0.78rem;
  color: #64748B;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 920px) {
  .calc-workspace,
  .affiliate-items,
  .faq-grid,
  .tools-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .result-panel {
    position: static;
  }
  .mobile-menu-btn {
    display: block;
  }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
  }
  .main-nav.open {
    display: flex;
  }
  .header-inner {
    flex-wrap: wrap;
  }
}
