:root {
  color-scheme: light;
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --ink: #18202b;
  --muted: #5e6a78;
  --rule: #d9dee7;
  --accent: #635bff;
  --accent-dark: #4d47cc;
  --green: #157a55;
  --amber: #8a5200;
  --red: #b42318;
  --shadow: 0 18px 50px rgb(24 32 43 / 8%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-size: 16px;
}

button,
input,
select {
  font: inherit;
}

img,
input,
select {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.wordmark-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.header-note {
  color: var(--muted);
  font-size: 14px;
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: clamp(36px, 7vw, 96px);
  padding: clamp(64px, 9vw, 112px) 0 56px;
  align-items: center;
}

.eyebrow,
.price-label,
.next-label,
.result-status {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero-summary {
  max-width: 700px;
  margin: 26px 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 21px);
}

.hero-points,
.price-card ul,
.evidence-list {
  margin: 0;
  padding-left: 1.25rem;
}

.hero-points li + li,
.price-card li + li,
.evidence-list li + li {
  margin-top: 8px;
}

.price-card {
  padding: 30px;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.price {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.price-card > p:not(.price):not(.price-label),
.candidate-note {
  color: var(--muted);
}

.candidate-note {
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

.privacy-strip {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  align-items: center;
  border: 1px solid #b9ded0;
  border-radius: 12px;
  background: #f1fbf7;
}

.privacy-strip p {
  margin: 0;
}

.privacy-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.workflow {
  width: min(760px, 100%);
  margin: clamp(64px, 10vw, 120px) auto;
}

.section-heading {
  margin-bottom: 36px;
}

.section-heading > p:last-child {
  color: var(--muted);
}

form {
  display: grid;
  gap: 22px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}

legend {
  padding: 0 8px;
  font-size: 18px;
  font-weight: 800;
}

legend span {
  margin-right: 8px;
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

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

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

.question > p {
  min-height: 3em;
  margin: 0 0 14px;
  font-weight: 750;
}

.question label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  margin-top: 11px;
  align-items: start;
  color: var(--muted);
  cursor: pointer;
}

input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.file-panel {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px dashed #aeb7c4;
  border-radius: 10px;
  background: var(--canvas);
}

.file-label {
  display: block;
  font-weight: 800;
}

.field-help,
.fieldset-help,
.local-note {
  color: var(--muted);
  font-size: 14px;
}

input[type="file"] {
  display: block;
  width: 100%;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}

.success-message {
  color: var(--green);
  font-weight: 700;
}

.error-message,
.form-error {
  color: var(--red);
  font-weight: 700;
}

.success-message:empty,
.error-message:empty,
.form-error:empty {
  display: none;
}

.primary-action {
  width: fit-content;
  min-height: 50px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--accent-dark);
}

.result-panel {
  margin-top: 34px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--amber);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout-panel,
.supported-inputs,
.legal-card,
.article-card,
.private-card {
  margin-top: 34px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout-panel {
  border-top: 4px solid var(--accent);
}

.checkout-panel[hidden],
.private-card[hidden],
.close-form[hidden] {
  display: none;
}

.checkout-panel > p:not(.eyebrow),
.support-grid p,
.legal-card p,
.article-card p,
.private-card p {
  color: var(--muted);
}

.supported-inputs {
  margin: 0 0 88px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.support-grid article {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--canvas);
}

.support-grid h3 {
  margin-top: 0;
}

.content-shell,
.private-shell {
  width: min(760px, calc(100% - 40px));
  padding: clamp(48px, 8vw, 88px) 0;
}

.content-shell h1,
.private-shell h1 {
  font-size: clamp(36px, 6vw, 58px);
}

.content-shell h2,
.private-shell h2 {
  margin-top: 38px;
  font-size: clamp(24px, 4vw, 34px);
}

.legal-meta,
.article-meta {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.article-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.private-card {
  margin-top: 28px;
}

.private-card[data-state="CLOSED"] {
  border-left: 5px solid var(--green);
}

.private-card[data-state="NEEDS_EVIDENCE"],
.private-card[data-state="FOLLOW_UP"] {
  border-left: 5px solid var(--amber);
}

.private-card[data-state="ERROR"],
.private-card[data-state="REFUNDED"],
.private-card[data-state="EXPIRED"] {
  border-left: 5px solid var(--red);
}

.close-form {
  margin-top: 34px;
}

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

.field-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field-grid input,
.field-grid select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #aeb7c4;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.local-processing {
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  background: #f1fbf7;
  color: var(--ink) !important;
  font-weight: 750;
}

.result-panel[data-status="READY_FOR_PAID_WORKFLOW"] {
  border-left-color: var(--green);
}

.result-panel[data-status="OUTSIDE_SCOPE"] {
  border-left-color: var(--muted);
}

.result-panel > p:not(.result-status),
.result-boundary {
  color: var(--muted);
}

.next-action {
  margin: 26px 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--canvas);
}

.next-action p {
  margin: 0;
}

.result-boundary {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

.how-it-works {
  padding: 64px 0 88px;
  border-top: 1px solid var(--rule);
}

.how-it-works ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0;
  padding: 0;
  list-style: none;
}

.how-it-works li {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}

.how-it-works li > span {
  display: block;
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.how-it-works li > strong {
  font-size: 20px;
}

.how-it-works li > p,
.disclaimer {
  color: var(--muted);
}

footer {
  padding: 28px 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

footer nav {
  margin-top: 8px;
}

@media (max-width: 800px) {
  .hero,
  .question-grid,
  .question-grid.three-columns,
  .how-it-works ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .support-grid,
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .question > p {
    min-height: auto;
  }

  .header-note {
    display: none;
  }
}

@media (max-width: 420px) {
  .site-header,
  main,
  .content-shell,
  .private-shell {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding-top: 48px;
  }

  h1 {
    font-size: 38px;
  }

  .price-card,
  fieldset,
  .result-panel,
  .how-it-works li {
    padding: 20px;
  }

  .checkout-panel,
  .supported-inputs,
  .legal-card,
  .article-card,
  .private-card {
    padding: 20px;
  }

  input[type="file"] {
    padding: 8px;
  }
}

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