:root {
  color-scheme: light;
  --background: #f9fafb;
  --surface: #ffffff;
  --primary: #1f4b99;
  --primary-dark: #153670;
  --accent: #0c8c6c;
  --text: #1a1c1f;
  --text-muted: #4b5563;
  --border: #d1d5db;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
button:hover {
  text-decoration: none;
}

header {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  gap: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a,
.nav-links button.nav-trigger {
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links button.nav-trigger:hover,
.nav-links a:focus-visible,
.nav-links button.nav-trigger:focus-visible {
  color: var(--primary);
}

.nav-item {
  position: relative;
}

.dropdown {
  position: absolute;
  left: 0;
  top: 120%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  display: none;
  min-width: 210px;
}

.dropdown a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: rgba(31, 75, 153, 0.08);
}

.nav-item:focus-within .dropdown,
.nav-item:hover .dropdown {
  display: block;
}

.role-selector {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.role-selector select {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--text);
}

.privacy-ribbon {
  background: #0b1120;
  color: #f8fafc;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem 1rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1,
h2,
h3,
h4 {
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 0.5rem;
}

h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
}

.role-callout {
  background: rgba(31, 75, 153, 0.08);
  border: 1px solid rgba(31, 75, 153, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--primary-dark);
  font-weight: 500;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.secondary {
  background: rgba(31, 75, 153, 0.12);
  color: var(--primary-dark);
}

.button.neutral {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.button:hover {
  transform: translateY(-1px);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.value-card,
.section-card,
.form-card {
  background: var(--surface);
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.value-card h3 {
  margin-top: 0;
}

.section-card ul,
.section-card ol {
  padding-left: 1.25rem;
}

.form-card form {
  display: grid;
  gap: 1.5rem;
}

.form-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--text-muted);
  gap: 0.35rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

fieldset {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 1rem;
}

legend {
  padding: 0 0.5rem;
  font-weight: 600;
}

.result-card {
  margin-top: 2rem;
  background: #041b48;
  color: #f1f5f9;
  border-radius: 1.1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: none;
}

.result-card.active {
  display: block;
}

.result-band {
  font-size: 1.8rem;
  font-weight: 700;
}

.result-band.green {
  color: #34d399;
}

.result-band.amber {
  color: #fbbf24;
}

.result-band.red {
  color: #f87171;
}

.result-card ul {
  padding-left: 1.25rem;
}

.download-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

blockquote {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

table th,
table td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
  font-size: 0.9rem;
}

footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 2rem 1.5rem 2.5rem;
  margin-top: 3rem;
}

footer .footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

footer p {
  margin: 0.25rem 0;
}

footer a {
  color: #cbd5f5;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.consent-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 1.25rem 1.5rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  display: none;
  gap: 1rem;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease-out,
              box-shadow 0.3s ease;
}

.consent-banner.active {
  display: flex;
  animation: slideUpFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
             subtlePulse 2s ease-in-out 0.5s 2;
}

.consent-banner:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.consent-banner button {
  margin-left: auto;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consent-banner button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes slideUpFadeIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.25);
  }
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--text-muted);
}

.success-message {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(12, 140, 108, 0.12);
  border: 1px solid rgba(12, 140, 108, 0.4);
  color: #0b6651;
  display: none;
}

.success-message.active {
  display: block;
}

.alert-message {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #b91c1c;
}

.badge-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 780px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .role-selector {
    width: 100%;
  }

  main {
    padding: 2rem 1rem 3rem;
  }
}

@media print {
  header,
  .privacy-ribbon,
  .consent-banner,
  footer,
  .download-actions .button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    max-width: none;
    padding: 1rem;
  }
}

/* Button group styling for A/B test variants */
.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.button-group .button {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

@media (max-width: 480px) {
  .button-group {
    flex-direction: column;
  }
  
  .button-group .button {
    flex: none;
  }
}

/* Landing page layout */
body.landing {
  background: linear-gradient(180deg, #eff4ff 0%, #f9fafb 45%, #ffffff 100%);
  min-height: 100vh;
  color: var(--text);
}

body.landing header {
  background: transparent;
  box-shadow: none;
  position: static;
}

body.landing .privacy-ribbon {
  font-size: 0.85rem;
}

body.landing .header-inner {
  max-width: 1100px;
  padding: 1.75rem 1.5rem 1rem;
  margin: 0 auto;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.landing .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.landing .header-actions a {
  font-weight: 500;
  color: var(--text-muted);
}

body.landing .header-actions a:hover,
body.landing .header-actions a:focus-visible {
  color: var(--primary);
}

.button.small,
button.button.small {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
}

.eyebrow {
  display: inline-flex;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--primary);
}

body.landing main {
  max-width: 1100px;
  padding: 3rem 1.5rem 5rem;
  margin: 0 auto;
  display: grid;
  gap: 3.5rem;
}

body.landing .hero {
  background: var(--surface);
  border-radius: 1.75rem;
  padding: clamp(2rem, 3vw, 2.75rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.landing .hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  body.landing .hero-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  }
}

body.landing .hero-copy h1 {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
}

body.landing .hero-copy .lead {
  margin-bottom: 1.75rem;
  color: var(--text-muted);
}

body.landing .feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.65rem;
}

body.landing .feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  font-size: 0.98rem;
}

body.landing .feature-list li::before {
  content: "✔";
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

body.landing .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

body.landing .cta-buttons .button {
  flex: 1 1 220px;
  min-width: 210px;
  text-align: center;
}

body.landing .cta-buttons .button.secondary {
  border: 1px solid rgba(31, 75, 153, 0.2);
  background: rgba(31, 75, 153, 0.08);
}

body.landing .cta-buttons .button.neutral {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

body.landing .hero-aside {
  display: grid;
  gap: 1.5rem;
}

body.landing .summary-card {
  background: rgba(31, 75, 153, 0.08);
  border: 1px solid rgba(31, 75, 153, 0.18);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: none;
}

body.landing .summary-card h2,
body.landing .summary-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

body.landing .summary-card ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

body.landing .summary-card li {
  margin-bottom: 0.45rem;
  color: var(--primary-dark);
}

body.landing .summary-card .note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

body.landing .summary-card.secondary {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
}

body.landing .summary-card.secondary p {
  color: var(--text-muted);
}

body.landing .resource-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.landing .resource-card {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
}

body.landing .resource-card h3 {
  margin: 0 0 0.5rem;
}

body.landing .resource-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.landing .portal-callout {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #f8fafc;
  border-radius: 1.75rem;
  padding: clamp(2rem, 3vw, 2.75rem);
  display: grid;
  gap: 1.5rem;
}

body.landing .portal-callout h2 {
  color: #fff;
  margin: 0.5rem 0 0.75rem;
}

body.landing .portal-callout p {
  margin: 0;
  color: rgba(241, 245, 249, 0.9);
}

body.landing .portal-callout .portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
}

body.landing .portal-callout .portal-button:hover,
body.landing .portal-callout .portal-button:focus-visible {
  background: #f1f5f9;
}

body.landing .portal-callout small {
  color: rgba(241, 245, 249, 0.8);
}

body.landing footer {
  background: transparent;
  color: var(--text-muted);
  padding: 0 1.5rem 3rem;
  margin-top: 0;
}

body.landing footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

body.landing footer .footer-links {
  margin: 0;
  gap: 1.25rem;
}

body.landing footer a {
  color: var(--primary);
}

@media (max-width: 640px) {
  body.landing .header-inner {
    padding: 1.25rem 1.25rem 0.75rem;
  }

  body.landing main {
    padding: 2.5rem 1.25rem 4.5rem;
    gap: 3rem;
  }

  body.landing .cta-buttons {
    flex-direction: column;
  }

  body.landing .cta-buttons .button {
    width: 100%;
    min-width: unset;
  }

  body.landing footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Language Switcher Footer Component */
.language-switcher-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

.lang-current {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.lang-divider {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.3);
}

.lang-switch {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.lang-switch:hover {
  opacity: 0.8;
  text-decoration: underline;
}
