:root {
  --navy-950: #071426;
  --navy-900: #0b1f3a;
  --navy-800: #13315c;
  --navy-700: #1e4682;
  --blue-600: #1d4ed8;
  --blue-50: #eff6ff;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --bg-page: #f8fafc;
  --white: #ffffff;
  --emerald-700: #047857;
  --emerald-50: #ecfdf5;
  --red-700: #b91c1c;
  --red-50: #fef2f2;
  --amber-700: #b45309;
  --amber-50: #fffbeb;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background: var(--bg-page);
  line-height: 1.55;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--font-mono); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 920px; }

/* Header */
.site-header {
  background: var(--navy-900);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: -0.01em; }
.brand-text small { font-size: 11px; color: #94a3b8; }

.main-nav { display: flex; gap: 20px; align-items: center; }
.main-nav a { color: #cbd5e1; font-size: 14px; font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: var(--white); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
}
.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.lang-btn.active { background: var(--white); color: var(--navy-900); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  padding: 44px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 32px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 10px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.hero-lead {
  font-size: 16px;
  color: var(--slate-700);
  margin: 0 0 20px;
}
.hero .hero-lead {
  color: #dbeafe;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-navy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
}
.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.metric-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px;
}
.metric-val { font-size: 26px; font-weight: 800; color: #fff; font-family: var(--font-mono); }
.metric-label { font-size: 12px; color: #cbd5e1; margin-top: 4px; }

/* Sections & Cards */
.section { padding: 44px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0 0 4px; font-size: 24px; color: var(--navy-900); }
.muted { color: var(--slate-500); margin: 0; font-size: 14px; }

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-100);
}
.card-header h3 { margin: 0; font-size: 16px; color: var(--navy-900); }
.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
}

/* Samples Bar */
.samples-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.samples-label { font-size: 13px; font-weight: 700; color: var(--navy-900); }
.samples-list { display: flex; flex-wrap: wrap; gap: 10px; }
.sample-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--navy-900);
  transition: border-color 0.15s, background 0.15s;
}
.sample-btn:hover { border-color: var(--blue-600); background: var(--blue-50); }
.sample-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--emerald-50);
  color: var(--emerald-700);
}
.sample-btn-warn .sample-badge { background: var(--red-50); color: var(--red-700); }

/* Workspace */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  background: var(--bg-page);
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--blue-600); background: var(--blue-50); }
.dropzone-icon { font-size: 22px; color: var(--blue-600); font-weight: 800; }
.dropzone-text { font-size: 14px; font-weight: 600; color: var(--navy-900); margin-top: 4px; }
.dropzone-hint { font-size: 12px; color: var(--slate-500); margin-top: 4px; }

.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--slate-700); margin-bottom: 5px; }
.code-area {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  resize: vertical;
}
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: #1e40af; }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover:not(:disabled) { background: var(--navy-800); }
.btn-ghost { background: var(--white); color: var(--navy-900); border-color: var(--slate-200); }
.btn-ghost:hover:not(:disabled) { background: var(--slate-100); }
.full-w { width: 100%; }

/* Report Display */
.report-empty { color: var(--slate-500); font-size: 14px; padding: 18px 4px; }
.verdict-banner {
  padding: 14px 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-weight: 700;
}
.verdict-pass { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid #a7f3d0; }
.verdict-fail { background: var(--red-50); color: var(--red-700); border: 1px solid #fecaca; }

.finding-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.finding-item {
  border: 1px solid #fecaca;
  background: #fffafa;
  border-left: 4px solid var(--red-700);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
}
.finding-item.warning {
  border-color: #fde68a;
  background: var(--amber-50);
  border-left-color: var(--amber-700);
}
.finding-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.finding-diff {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  padding: 5px 8px;
  border-radius: 5px;
}
.finding-fix { margin-top: 5px; color: var(--slate-700); font-size: 12px; }

.passed-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pass-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--emerald-50);
  color: var(--emerald-700);
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid #a7f3d0;
}

/* Preview Card */
.preview-card { margin-top: 20px; }
.hidden { display: none !important; }
.invoice-sheet { display: flex; flex-direction: column; gap: 18px; }
.sheet-parties { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.sheet-box {
  background: var(--bg-page);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
}
.sheet-box h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-500); }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-table th, .sheet-table td { padding: 8px 10px; border-bottom: 1px solid var(--slate-200); text-align: left; }
.sheet-table th { background: var(--slate-100); font-size: 12px; color: var(--navy-900); }
.sheet-table td.num, .sheet-table th.num { text-align: right; font-family: var(--font-mono); }
.totals-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.totals-box { background: var(--navy-900); color: var(--white); border-radius: 8px; padding: 14px; font-size: 13px; }
.totals-row { display: flex; justify-content: space-between; padding: 4px 0; }
.totals-row.grand { border-top: 1px solid rgba(255, 255, 255, 0.2); margin-top: 6px; padding-top: 8px; font-size: 15px; font-weight: 800; }

/* Generator Form */
.tab-switch { display: inline-flex; background: var(--slate-100); padding: 3px; border-radius: 8px; border: 1px solid var(--slate-200); }
.tab-btn { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--slate-700); cursor: pointer; }
.tab-btn.active { background: var(--navy-900); color: var(--white); }
.form-section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy-800); margin: 14px 0 8px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 10px; }
.input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font-size: 13px;
  background: var(--white);
  color: var(--slate-900);
}
.input:focus { outline: 2px solid rgba(29, 78, 216, 0.25); border-color: var(--blue-600); }

/* Error Catalog Grid */
.error-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.error-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 16px;
  color: inherit;
  transition: transform 0.12s, border-color 0.12s;
}
.error-card:hover { transform: translateY(-2px); border-color: var(--blue-600); text-decoration: none; }
.error-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.code-pill { font-family: var(--font-mono); font-size: 12px; font-weight: 800; background: var(--navy-900); color: #fff; padding: 3px 8px; border-radius: 5px; }
.bt-pill { font-family: var(--font-mono); font-size: 11px; color: var(--slate-500); }
.error-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--navy-900); }
.error-card p { margin: 0 0 12px; font-size: 13px; color: var(--slate-500); flex: 1; }
.card-cta { font-size: 12px; font-weight: 700; color: var(--blue-600); }

/* Pricing */
.billing-email-bar {
  max-width: 440px;
  margin-bottom: 18px;
}
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price-card {
  background: var(--bg-page);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-featured { background: var(--white); border: 2px solid var(--blue-600); box-shadow: 0 8px 24px rgba(29, 78, 216, 0.12); }
.price-badge {
  position: absolute;
  top: -11px;
  right: 16px;
  background: var(--blue-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.price-tier { font-size: 14px; font-weight: 800; color: var(--navy-900); text-transform: uppercase; letter-spacing: 0.04em; }
.price-amount { font-size: 32px; font-weight: 800; color: var(--navy-900); margin: 8px 0; font-family: var(--font-mono); }
.price-amount span { font-size: 14px; font-weight: 500; color: var(--slate-500); }
.price-list { padding-left: 18px; margin: 14px 0 18px; font-size: 13px; color: var(--slate-700); flex: 1; }
.price-list li { margin-bottom: 6px; }
.checkout-toast {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--navy-900);
  color: #e2e8f0;
  font-size: 13px;
}
.checkout-toast a { color: #93c5fd; font-weight: 600; }
.billing-result-card { margin-top: 12px; }

/* Error Detail & Legal Pages */
.breadcrumb { font-size: 13px; color: var(--slate-500); margin-bottom: 12px; }
.error-hero-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.detail-block { margin-top: 18px; }
.detail-block h2 { margin: 0 0 10px; font-size: 18px; color: var(--navy-900); }
.xml-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.code-pre {
  margin: 0;
  padding: 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 7px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
}
.status-fail { background: var(--red-50); color: var(--red-700); font-weight: 800; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.status-pass { background: var(--emerald-50); color: var(--emerald-700); font-weight: 800; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.fix-list { padding-left: 20px; font-size: 14px; }
.fix-list li { margin-bottom: 6px; }
.faq-item { border-top: 1px solid var(--slate-100); padding-top: 12px; margin-top: 12px; }
.faq-item:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.faq-item h3 { margin: 0 0 4px; font-size: 15px; color: var(--navy-900); }
.related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.related-pill { font-size: 12px; font-family: var(--font-mono); background: var(--slate-100); color: var(--navy-900); padding: 6px 10px; border-radius: 6px; }
.legal-content h2 { font-size: 17px; color: var(--navy-900); margin-top: 18px; }
.legal-content h2:first-child { margin-top: 0; }

/* Footer & Disclaimer */
.site-footer {
  background: var(--navy-950);
  color: #cbd5e1;
  padding: 36px 0 28px;
  font-size: 13px;
}
.disclaimer-box {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
  color: #fef3c7;
}
.legal-content .disclaimer-box { background: var(--amber-50); border-color: #fde68a; color: var(--amber-700); }
.disclaimer-title { font-weight: 800; margin-bottom: 4px; color: #fde68a; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 0.8fr; gap: 24px; margin-bottom: 24px; }
.site-footer h4 { color: var(--white); margin: 0 0 10px; font-size: 14px; }
.footer-error-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-error-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 7px;
  border-radius: 4px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: #cbd5e1; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .hero-grid, .workspace-grid, .xml-compare-grid, .sheet-parties, .totals-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .pricing-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}
