:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-muted: #f6efe5;
  --surface-dark: #0b1f2c;
  --ink: #112230;
  --ink-soft: #2f434f;
  --muted: #55666f;
  --muted-soft: #859399;
  --line: #ece3d6;
  --line-strong: #ddd1bf;
  --primary: #0f7e7d;
  --primary-deep: #0a5a5a;
  --primary-soft: #e1f1ee;
  --accent: #e2643c;
  --accent-deep: #c44a25;
  --accent-soft: #fce5db;
  --gold: #e8b14b;
  --gold-soft: #fbf0d6;
  --navy: #0b1f2c;
  --navy-soft: #143345;
  --positive: #1f7a59;
  --warning: #b06a16;
  --risk: #c0392b;
  --teal-dark: #0a5a5a;
  --shadow-sm: 0 1px 2px rgba(11, 31, 44, 0.06);
  --shadow-md: 0 14px 38px rgba(11, 31, 44, 0.12);
  --shadow-lg: 0 30px 70px rgba(11, 31, 44, 0.22);
  --shadow-color: 0 20px 46px rgba(15, 126, 125, 0.22);
  --shadow-coral: 0 16px 34px rgba(226, 100, 60, 0.32);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 11px;
  --grad-warm: linear-gradient(135deg, #0f7e7d 0%, #0a5a5a 55%, #0b1f2c 100%);
  --grad-coral: linear-gradient(135deg, #ef7a4f 0%, #e2643c 52%, #c44a25 100%);
  --grad-hero: linear-gradient(165deg, #0d2a37 0%, #0f3d44 48%, #115a57 100%);
  --grad-gold: linear-gradient(135deg, #f0c163 0%, #e8b14b 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 560px at 92% -6%, rgba(226, 100, 60, 0.16), transparent 58%),
    radial-gradient(760px 560px at -8% 2%, rgba(15, 126, 125, 0.16), transparent 56%),
    radial-gradient(680px 480px at 50% 108%, rgba(232, 177, 75, 0.12), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.has-page-loader {
  overflow: hidden;
}

body.has-preview-result [data-preview-reset] {
  display: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

/* ---------------------------------------------------------------- loader */

#loader-wrapper {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(251, 247, 241, 0.96);
}

.loader-panel {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.loader-progress-shell {
  width: min(320px, 100%);
}

.loader-progress-copy {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.loader-progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.loader-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease-out;
}

/* ---------------------------------------------------------------- shell */

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 72px;
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: var(--shadow-sm);
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brandmark-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-warm);
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--shadow-color);
}

.brandmark-word {
  display: flex;
  flex-direction: column;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.brandmark-word small {
  margin-top: 3px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-link {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 160ms ease;
}

.topbar-link:hover {
  color: var(--primary-deep);
}

.topbar-cta {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- type */

.eyebrow,
.flow-kicker,
.preview-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(15, 126, 125, 0.18);
}

.hero h1,
.section-heading h2,
.flow-card h2,
.preview-hero-card h3,
.modal-copy h2 {
  margin: 16px 0 0;
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

/* ---------------------------------------------------------------- hero */

.hero {
  margin-top: 36px;
}

#diagnostico,
.preview-shell {
  scroll-margin-top: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.94fr);
  gap: 48px;
  align-items: start;
}

.hero-copy {
  padding-top: 8px;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.05rem, 4vw, 3.2rem);
}

.hero-accent {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 60%, var(--gold) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 18px 0 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
}

.hero-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 1rem;
  line-height: 1;
}

.hero-points li:nth-child(2) .hero-point-icon {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.hero-points li:nth-child(3) .hero-point-icon {
  background: var(--gold-soft);
  color: var(--warning);
}

.hero-points strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.98rem;
  font-weight: 600;
}

.hero-points span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--muted-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- flow card */

.flow-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.flow-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--grad-coral);
}

.hero-diagnostic-card {
  width: 100%;
  padding: clamp(22px, 3vw, 30px);
}

.flow-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.flow-kicker {
  color: var(--accent-deep);
}

.flow-card h2 {
  font-size: 1.5rem;
}

.flow-progress {
  position: relative;
  height: 6px;
  margin: 22px 0 16px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.flow-progress-bar {
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-warm);
  transition: width 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-status {
  min-height: 22px;
  margin-bottom: 4px;
  color: var(--primary-deep);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}

.step-panel {
  display: none;
  animation: rise 200ms ease;
}

.step-panel.is-active {
  display: block;
}

.field-group {
  margin-top: 20px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

#classificationSummary {
  max-width: 62ch;
  margin: 6px 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-soft);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- inputs */

.text-input,
.select-input,
.textarea-input,
.lead-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-input::placeholder,
.textarea-input::placeholder {
  color: var(--muted-soft);
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus,
.lead-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 107, 107, 0.14);
}

.select-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 15px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.textarea-input {
  resize: vertical;
  line-height: 1.55;
}

.sector-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.selected-sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.selected-sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.selected-sector-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.selected-sector-chip strong {
  font-size: 1rem;
  line-height: 1;
}

.selected-sector-empty {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- choice + class cards */

.choice-grid,
.class-suggestions,
.preview-summary-grid,
.preview-class-grid,
.faq-list,
.input-grid,
.system-grid {
  display: grid;
  gap: 12px;
}

.choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card,
.class-card {
  position: relative;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.option-card:hover,
.class-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.option-card.is-selected,
.class-card.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1.5px var(--primary), var(--shadow-sm);
}

.option-card strong,
.class-card strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
}

.option-card span,
.class-card span,
.class-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.class-suggestions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.class-card {
  padding: 18px;
}

.class-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: flex-start;
}

.class-card-copy {
  min-width: 0;
}

.class-card-copy strong {
  line-height: 1.32;
}

.class-card .class-card-summary {
  margin-top: 6px;
}

.class-card-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.class-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.class-card .class-pill {
  margin-top: 0;
  align-self: flex-start;
}

.class-card .class-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.class-reason-list {
  display: grid;
  gap: 8px;
}

.class-reason {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.class-reason::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.class-card ul,
.preview-class-card ul,
.preview-warning-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.class-card li,
.preview-class-card li,
.preview-warning-list li {
  color: var(--muted);
  line-height: 1.55;
}

.selected-class-summary,
.lead-summary {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.flow-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.captcha-block {
  margin-top: 12px;
}

#classifyCaptchaContainer:not(:empty) {
  min-height: 72px;
}

/* ---------------------------------------------------------------- buttons */

.button {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease, background 160ms ease,
    border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.button-primary {
  color: #fff;
  background: var(--grad-coral);
  box-shadow: var(--shadow-coral);
}

.button-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(226, 100, 60, 0.4);
}

.button-primary:active:not(:disabled) {
  transform: translateY(0);
}

.button-secondary {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.button-block {
  width: 100%;
}

.button-compact {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.topbar-cta.button-primary {
  box-shadow: 0 8px 18px rgba(226, 100, 60, 0.3);
}

/* ---------------------------------------------------------------- section headings */

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.62;
}

/* ---------------------------------------------------------------- how it works */

.system-section,
.preview-shell,
.faq {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.system-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.system-card {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.system-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}

.system-card:nth-child(2)::before { background: var(--accent); }
.system-card:nth-child(3)::before { background: var(--gold); }
.system-card:nth-child(4)::before { background: var(--navy-soft); }

.system-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.system-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  min-width: 40px;
  height: 40px;
  gap: 8px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.96rem;
  font-weight: 600;
}

.system-card:nth-child(2) .system-step { background: var(--accent-soft); color: var(--accent-deep); }
.system-card:nth-child(3) .system-step { background: var(--gold-soft); color: var(--warning); }
.system-card:nth-child(4) .system-step { background: #e2e8ec; color: var(--navy-soft); }

.system-card h3 {
  margin: 16px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.system-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.compliance-note {
  margin: 24px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.62;
}

.compliance-note strong {
  font-weight: 600;
}

/* ---------------------------------------------------------------- preview */

body.has-preview-result .preview-shell {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.preview-result {
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.preview-result.is-hidden,
.modal-backdrop.is-hidden {
  display: none;
}

.preview-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.preview-hero-card h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.preview-hero-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.preview-kicker {
  color: var(--primary-deep);
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
  color: #fff;
  background: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.preview-badge[data-tone="positive"] {
  background: var(--positive);
}

.preview-badge[data-tone="attention"] {
  background: var(--primary);
}

.preview-badge[data-tone="warning"] {
  background: var(--warning);
}

.preview-badge[data-tone="risk"] {
  background: var(--risk);
}

.preview-summary-grid {
  margin-top: 22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.summary-card strong {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-card span {
  display: block;
  margin-top: 8px;
  font-size: 1.04rem;
  font-weight: 600;
}

.preview-warning-list {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #fbf3e4;
  border: 1px solid #e6d2ac;
}

.preview-warning-list.is-hidden {
  display: none;
}

.preview-warning-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--warning);
}

.preview-class-grid {
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-class-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.preview-class-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.preview-class-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.preview-class-card .class-meta {
  margin-top: 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.preview-table-block {
  margin-top: 24px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.preview-table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.preview-table-head h3 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.preview-table-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

td {
  color: var(--ink-soft);
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.preview-footer-cta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: var(--grad-warm);
  color: #fff;
  box-shadow: var(--shadow-color);
}

.preview-footer-cta strong {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.preview-footer-cta p {
  color: rgba(255, 255, 255, 0.82);
}

.preview-footer-cta p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.preview-footer-cta .button {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- faq */

.faq-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.faq-item {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  margin: 0 0 10px;
  font-family: "Inter", sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.35;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

/* ---------------------------------------------------------------- modals */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 42, 53, 0.42);
}

.modal-card {
  width: min(680px, 100%);
  position: relative;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal-copy h2 {
  font-size: 1.6rem;
}

.modal-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease;
}

.modal-close:hover {
  border-color: var(--muted);
}

.input-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.lead-form label {
  display: block;
}

.lead-form span {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 600;
}

.lead-form .lead-summary,
.lead-form .flow-status {
  margin-top: 16px;
}

.lead-form .button-block {
  margin-top: 18px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  margin-top: 72px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface-dark);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 24px 28px;
}

.site-footer-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.site-footer-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer-link {
  width: fit-content;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.site-footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-cta {
  display: flex;
  justify-content: center;
}

.site-footer-cta .button {
  white-space: nowrap;
}

.site-footer-brand {
  min-width: 0;
  display: grid;
  justify-items: center;
  justify-self: center;
  gap: 12px;
  text-align: center;
}

.site-footer-brand-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.site-footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.site-footer-logo {
  display: none;
  max-width: min(100%, 240px);
  width: auto;
  height: clamp(58px, 7vw, 78px);
}

.site-footer-surface-dark .site-footer-logo-for-dark,
.site-footer-surface-light .site-footer-logo-for-light {
  display: block;
}

/* ---------------------------------------------------------------- privacy doc */

.doc-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.doc-back {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 160ms ease;
}

.doc-back:hover {
  color: var(--ink);
}

.doc-header {
  margin-top: 48px;
}

.doc-header h1 {
  margin: 14px 0 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.doc-updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc-intro {
  margin: 24px 0 0;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.doc-section {
  margin-top: 40px;
}

.doc-section h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.doc-section p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.72;
}

.doc-section ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.doc-section li {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.66;
}

.doc-section a {
  color: var(--primary-deep);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------- animations */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------- responsive */

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

  .hero h1 {
    max-width: 20ch;
  }

  .system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  /* Bring the diagnostic card above the trust points on mobile so the
     entry point is visible much earlier. hero-copy becomes transparent
     to the layout so its children can be ordered against the card. */
  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .hero-copy {
    display: contents;
  }

  .hero-copy .eyebrow-pill { order: 1; }
  .hero h1 { order: 2; }
  .hero-lead { order: 3; }
  .hero-diagnostic-card { order: 4; }
  .hero-points { order: 5; }
  .hero-note { order: 6; }

  .hero-lead {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .preview-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-class-grid {
    grid-template-columns: 1fr;
  }

  .faq-list {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-brand {
    grid-column: 1 / -1;
    justify-items: center;
    justify-self: center;
    text-align: center;
  }

  .site-footer-logo-wrap {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 16px 56px;
  }

  .topbar {
    padding: 10px 12px 10px 14px;
    gap: 10px;
  }

  .topbar-link {
    display: none;
  }

  .topbar-actions {
    gap: 10px;
  }

  .hero {
    margin-top: 22px;
  }

  .system-section,
  .preview-shell,
  .faq {
    margin-top: 48px;
    padding-top: 32px;
  }

  .hero-diagnostic-card {
    padding: 20px;
  }

  .choice-grid,
  .choice-grid-compact,
  .class-suggestions,
  .preview-summary-grid,
  .input-grid {
    grid-template-columns: 1fr;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .sector-picker {
    grid-template-columns: 1fr;
  }

  .flow-actions {
    flex-direction: column;
  }

  .flow-actions .button {
    width: 100%;
  }

  .preview-hero-card,
  .preview-table-head,
  .preview-footer-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-footer-cta .button {
    width: 100%;
  }

  .site-footer {
    padding: 24px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loader-progress-fill,
  .flow-progress-bar {
    transition: none;
  }

  .step-panel,
  .button,
  .option-card,
  .class-card {
    transition: none;
    animation: none;
  }
}
