:root {
  --bg: #0b1120;
  --bg-soft: #121a2b;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --white: #ffffff;
  --violet: #7c3aed;
  --violet-soft: rgba(124, 58, 237, 0.16);
  --primary: #0ea5e9;
  --shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
  --radius: 28px;
  --radius-sm: 18px;
  --accent: #f97316;
  --accent-alt: #f59e0b;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --accent-line: rgba(249, 115, 22, 0.22);
  --accent-text: #f59e0b;
  --hero-a: rgba(249, 115, 22, 0.22);
  --hero-b: rgba(245, 158, 11, 0.16);
  --hero-c: rgba(251, 191, 36, 0.12);
}

body.theme-ewaybill {
  --accent: #f97316;
  --accent-alt: #f59e0b;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --accent-line: rgba(249, 115, 22, 0.22);
  --accent-text: #f59e0b;
  --hero-a: rgba(249, 115, 22, 0.22);
  --hero-b: rgba(245, 158, 11, 0.16);
  --hero-c: rgba(251, 191, 36, 0.12);
}

body.theme-einvoice {
  --accent: #10b981;
  --accent-alt: #14b8a6;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --accent-line: rgba(16, 185, 129, 0.22);
  --accent-text: #34d399;
  --hero-a: rgba(16, 185, 129, 0.22);
  --hero-b: rgba(20, 184, 166, 0.16);
  --hero-c: rgba(6, 182, 212, 0.12);
}

body.theme-errorcodes {
  --accent: #f43f5e;
  --accent-alt: #f97316;
  --accent-soft: rgba(244, 63, 94, 0.14);
  --accent-line: rgba(244, 63, 94, 0.22);
  --accent-text: #fb7185;
  --hero-a: rgba(244, 63, 94, 0.2);
  --hero-b: rgba(249, 115, 22, 0.16);
  --hero-c: rgba(251, 191, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: inherit;
  color: var(--text);
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 18%, #ffffff 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.page-header {
  background: transparent;
}

.header-logo {
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

.nav-link,
.menu-trigger {
  color: #ffffff;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.menu-trigger:hover {
  color: #9dd5ff;
}

.page-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.page-header.is-scrolled .header-logo {
  filter: none;
}

.page-header.is-scrolled .nav-link,
.page-header.is-scrolled .menu-trigger,
.page-header.is-scrolled [data-menu-toggle] {
  color: #334155;
}

.page-header.is-scrolled .nav-link:hover,
.page-header.is-scrolled .menu-trigger:hover,
.page-header.is-scrolled [data-menu-toggle]:hover {
  color: #0284c7;
}

.menu-nav {
  position: relative;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-popover {
  position: absolute;
  top: 100%;
  left: 0;
  width: 288px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.menu-nav:hover .menu-popover,
.menu-nav:focus-within .menu-popover,
.menu-nav.is-open .menu-popover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-nav.is-open .menu-chevron {
  transform: rotate(180deg);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: #eff6ff;
}

.menu-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
}

.menu-icon.api {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.menu-icon.master {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
}

.menu-icon.error {
  background: linear-gradient(135deg, #f43f5e, #f97316);
}

.menu-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.menu-item-copy {
  display: none;
}

.mobile-panel {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.mobile-section-title {
  padding: 8px 16px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #334155;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
  background: #eff6ff;
  color: #0284c7;
}

.mobile-link-title {
  font-size: 16px;
  font-weight: 500;
}

.mobile-login {
  display: block;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 96px;
  background:
    radial-gradient(circle at top left, var(--hero-a), transparent 38%),
    radial-gradient(circle at bottom right, var(--hero-b), transparent 36%),
    linear-gradient(135deg, #0f172a 0%, #111827 54%, #1f2937 100%);
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
}

.hero h1 {
  margin: 22px 0 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.gradient-text {
  display: block;
  background: linear-gradient(120deg, var(--accent), #ffffff 42%, var(--accent-alt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 720px;
  margin-top: 24px;
  color: #dbe3ef;
  font-size: 19px;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.feature {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.hero-card {
  position: relative;
  padding: 30px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.kicker {
  position: relative;
  z-index: 1;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-card h2 {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.2;
}

.stats-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat {
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.stat-value {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  margin-top: 6px;
  color: #dbe3ef;
  font-size: 13px;
}

.content {
  padding: 72px 0;
}

.cards-section + .cards-section,
.callout-grid {
  margin-top: 72px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.section-title.eway {
  background: rgba(249, 115, 22, 0.14);
  color: #f97316;
}

.section-title.einvoice {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.section-heading {
  margin: 18px 0 0;
  color: #0f172a;
  font-size: clamp(34px, 4.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-copy {
  max-width: 760px;
  margin-top: 18px;
  color: #475569;
  font-size: 18px;
  line-height: 1.85;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wide-card {
  grid-column: span 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 24px 16px;
}

.card h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.3;
}

.card-copy {
  margin: 10px 24px 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.count-pill {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.count-pill.eway {
  background: rgba(249, 115, 22, 0.14);
  color: #f97316;
}

.count-pill.einvoice {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 24px 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

thead th {
  padding: 14px 0;
  border-bottom: 1px solid #dbe2ea;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

thead th:first-child {
  padding-right: 16px;
}

tbody td {
  padding: 14px 0;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 14px;
  vertical-align: top;
}

tbody td:first-child {
  width: 180px;
  padding-right: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.mapping-table {
  min-width: 980px;
}

.mapping-table tbody td {
  white-space: nowrap;
}

.mapping-table tbody td:first-child {
  width: auto;
  font-family: inherit;
  font-weight: 700;
}

.callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.callout-card {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
}

.callout-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.callout-card h2 {
  margin: 14px 0 0;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.2;
}

.callout-card p {
  margin: 14px 0 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 1100px) {
  .hero-grid,
  .cards-grid,
  .callout-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: span 1;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 112px 0 80px;
  }

  .hero-card,
  .card,
  .callout-card {
    border-radius: 24px;
  }

  .feature-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 54px);
  }

  .hero-copy,
  .section-copy {
    font-size: 17px;
  }

  .card-header {
    flex-direction: column;
  }

  tbody td:first-child {
    width: 140px;
  }
}
