:root {
  color-scheme: light;
  --color-text: #1d1d1f;
  --color-heading: #1d1d1f;
  --color-muted: #636367;
  --color-background: #f5f5f7;
  --color-surface: #ffffff;
  --color-border: #dedee3;
  --color-border-strong: #86868b;
  --color-primary: #0066cc;
  --color-primary-hover: #004f9e;
  --color-focus: #0071e3;
  --color-success: #17633f;
  --color-success-background: #eaf5ef;
  --color-danger: #9b2c2c;
  --color-danger-background: #fff1f0;
  --color-notice-background: #f0f0f3;
  --content-width: 70rem;
  --radius: 1.5rem;
  --shadow: 0 8px 32px rgb(0 0 0 / 4%);
}

.terms-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.terms-consent label {
  flex: 1;
  min-width: 0;
}

.legal-section {
  margin-block: 2rem;
}

.legal-section--important {
  padding: 1.25rem;
  border: 2px solid var(--color-border-strong);
  border-left: 0.375rem solid var(--color-primary);
  border-radius: 0.5rem;
  background: var(--color-notice-background);
}

@media print {
  .legal-section--important {
    border-color: #000;
    background: #fff;
  }
}

.terms-consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-height: 1.25rem;
  padding: 0;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--color-background);
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
p,
dl {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.2;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 2rem));
  margin-inline: auto;
  padding-bottom: 4.5rem;
}

.site-header {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.wordmark {
  color: var(--color-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--color-heading);
  text-decoration: none;
}

.site-header__note {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 27rem);
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.hero-assurance {
  margin: 1.75rem 0 0;
  color: var(--color-heading);
  font-size: 0.9375rem;
  font-weight: 600;
}

.service-details {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.service-details h2 {
  margin-bottom: 1.75rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
}

.service-details .notice {
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-muted);
  line-height: 1.7;
}

.service-details strong {
  color: var(--color-heading);
}

.hero-copy {
  min-width: 0;
  max-width: 38rem;
}

.hero-copy h1,
.intake-header h1,
.card--narrow h1,
.receipt-heading h1 {
  margin: 0.35rem 0 1rem;
  font-family: inherit;
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.intake-header h1,
.card--narrow h1,
.receipt-heading h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.lede {
  max-width: 40rem;
  color: var(--color-muted);
  font-size: 1.25rem;
  line-height: 1.6;
}

.product-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.product-summary dt {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.product-summary dd {
  margin: 0.2rem 0 0;
  color: var(--color-heading);
  font-size: 0.9375rem;
  font-weight: 600;
}

.card {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.card--narrow {
  max-width: 42rem;
  margin: 4rem auto;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.lookup-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.lookup-card h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
}

.step-marker {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  border: 0;
  border-radius: 0;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.step-marker::before {
  content: "Step";
}

.step-marker span {
  display: inline;
  font: inherit;
}

.stacked-form {
  display: grid;
  gap: 1.25rem;
}

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

.field-group {
  display: grid;
  gap: 0.375rem;
  align-content: start;
}

.field-group--wide {
  grid-column: 1 / -1;
}

.field-group label {
  color: var(--color-heading);
  font-size: 0.875rem;
  font-weight: 600;
}

.field-group small {
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

input,
select,
textarea {
  min-width: 0;
  width: 100%;
  min-height: 2.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.75rem;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  padding: 0.875rem 1rem;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #515154;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-focus);
  outline: 3px solid rgb(0 113 227 / 24%);
  outline-offset: 1px;
}

input[type="file"] {
  min-height: auto;
  padding: 0.5rem;
}

.n-number-input {
  display: flex;
  align-items: stretch;
}

.n-number-input span {
  display: grid;
  min-width: 2.875rem;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  border-right: 0;
  border-radius: 0.75rem 0 0 0.75rem;
  background: #f5f5f7;
  color: var(--color-heading);
  font-weight: 600;
}

.n-number-input input {
  border-radius: 0 0.75rem 0.75rem 0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.button {
  transition: background-color 160ms ease, border-color 160ms ease;
  display: inline-flex;
  min-height: 2.875rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:focus-visible,
a:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgb(0 113 227 / 35%);
  outline-offset: 3px;
}

.button--primary {
  border-color: #0071e3;
  background: #0071e3;
  color: #ffffff;
}

.button--primary:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
  color: #ffffff;
}

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

.button--secondary:hover {
  border-color: var(--color-heading);
  background: #f0f0f3;
  color: var(--color-heading);
}

.privacy-note {
  margin: 1.5rem 0 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.notice {
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-notice-background);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
}

.notice p,
.notice h2 {
  margin-top: 0;
}

.notice p:last-child,
.notice ul:last-child,
.notice h2:last-child {
  margin-bottom: 0;
}

.notice--success {
  border-color: #9ac7ae;
  background: var(--color-success-background);
  color: #11492f;
}

.notice--error {
  border-color: #e4afaa;
  background: var(--color-danger-background);
  color: #762222;
}

.intake-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.5rem 0 1.5rem;
}

.intake-header .step-marker {
  flex: none;
  margin-bottom: 0.5rem;
}

.order-form {
  display: grid;
  gap: 1.5rem;
}

.form-section {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: none;
}

.form-section--terms {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.form-section--terms > h2,
.form-section--terms > p {
  margin: 0;
}

.section-heading {
  display: flex;
  gap: 0.75rem;
}

.section-heading > span {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-heading p {
  margin: 0.3rem 0 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.checkout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.checkout-bar div {
  display: grid;
}

.checkout-bar span {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.checkout-bar strong {
  color: var(--color-heading);
  font-size: 1.25rem;
}

.back-link {
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
}

.order-receipt {
  max-width: 58rem;
  margin: 0 auto;
  padding: 3.5rem 0;
}

.receipt-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.receipt-heading p {
  margin: 0.375rem 0 0;
  color: var(--color-muted);
}

.status-pill {
  max-width: 100%;
  display: inline-block;
  border: 1px solid #8cb9a0;
  border-radius: 999px;
  background: var(--color-success-background);
  color: #11492f;
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

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

.receipt-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: none;
}

.receipt-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  border-top: 1px solid var(--color-border);
  padding: 0.7rem 0;
}

.detail-list dt,
.contact-summary span {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.detail-list dd {
  margin: 0;
  color: var(--color-heading);
  font-weight: 600;
  text-align: right;
}

.contact-summary {
  display: grid;
  margin-top: 1.125rem;
}

.contact-summary:first-of-type {
  margin-top: 0;
}

.contact-summary strong {
  margin-top: 0.25rem;
  color: var(--color-heading);
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
}

.receipt-total span {
  color: var(--color-muted);
}

.receipt-total strong {
  color: var(--color-heading);
  font-size: 1.25rem;
}

.checkout-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(20rem, 1.15fr);
  align-items: start;
  gap: 2.5rem;
  margin-top: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: clamp(1.5rem, 4vw, 2rem);
}

.checkout-panel h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.375rem;
}

.checkout-panel p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.payment-form {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.payment-element {
  min-height: 7.5rem;
}

.payment-loading {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.payment-message {
  border-left: 4px solid var(--color-danger);
  background: var(--color-danger-background);
  color: #762222;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
}

.payment-message--success {
  border-color: var(--color-success);
  background: var(--color-success-background);
  color: #11492f;
}

.payment-form .button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 48rem) {
  .site-header__note {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding: 3rem 0;
  }

  .lookup-card {
    width: 100%;
  }

  .product-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
  }

  .product-summary div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }

  .product-summary dd {
    text-align: right;
  }

  .intake-header {
    align-items: flex-start;
    padding-top: 2.5rem;
  }

  .form-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

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

  .field-group--wide {
    grid-column: auto;
  }

  .checkout-panel .button {
    width: 100%;
  }
}

@media (max-width: 30rem) {
  .page-shell {
    width: min(100% - 1.25rem, var(--content-width));
  }

  .site-header {
    min-height: 4rem;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .lookup-card {
    padding: 1.25rem;
  }

  .intake-header,
  .receipt-heading,
  .checkout-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .checkout-bar .button {
    width: 100%;
  }

  .detail-list div {
    display: grid;
    gap: 0.2rem;
  }

  .detail-list dd {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  html:focus-within {
    scroll-behavior: auto;
  }
}
