:root {
  color-scheme: light;
  --background: #f3f7fd;
  --surface: #ffffff;
  --text: #172033;
  --muted: #647187;
  --line: #dfe6f1;
  --primary: #2458d3;
  --primary-dark: #1744b2;
  --primary-soft: #eaf1ff;
  --success: #08785a;
  --success-soft: #e8f7f1;
  --error: #a22d35;
  --error-soft: #fff0f1;
  --warning-soft: #fff7df;
  --shadow: 0 28px 80px rgba(24, 57, 112, 0.14);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(60, 116, 235, 0.1), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, var(--background) 58%, #f7f9fd 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(215, 225, 239, 0.85);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner,
.page-shell,
.site-footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(36, 88, 211, 0.24);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.secure-pill,
.status-pill,
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #bce9d9;
  border-radius: 999px;
  background: var(--success-soft);
  padding: 7px 11px;
  color: #086146;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.secure-pill svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(570px, 1.18fr);
  gap: clamp(36px, 5vw, 74px);
  align-items: center;
  min-height: calc(100vh - 135px);
  padding-block: 56px 70px;
}

.intro {
  max-width: 470px;
}

.eyebrow,
.stage-label {
  display: inline-block;
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  border-radius: 999px;
  background: var(--primary-soft);
  padding: 8px 12px;
}

.intro h1 {
  max-width: 520px;
  margin: 20px 0 0;
  font-size: clamp(40px, 4.1vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.052em;
}

.intro > p {
  max-width: 450px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce7f7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px;
  font-size: 13px;
  font-weight: 650;
}

.benefit-list span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.preview-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 18px;
  border-left: 3px solid #d69b1e;
  padding: 4px 0 4px 11px;
  color: #6f5a29;
  font-size: 12px;
  line-height: 1.5;
}

.preview-notice strong {
  flex: none;
}

.portal-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 225, 239, 0.9);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps {
  padding: 26px 30px 22px;
  border-bottom: 1px solid #edf1f6;
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  min-width: 0;
}

.steps li > span {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: #edf1f6;
  transition: background 180ms ease;
}

.steps li > small {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: #9aa5b6;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steps li.is-active > span,
.steps li.is-complete > span {
  background: var(--primary);
}

.steps li.is-active > small {
  color: var(--primary);
}

.steps li.is-complete > small {
  color: #5071b5;
}

.stage {
  padding: 30px;
}

.stage:not(.is-visible) {
  display: none;
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(175px, 0.84fr) minmax(280px, 1.16fr);
  gap: 28px;
  align-items: start;
}

.receipt-guide {
  overflow: hidden;
  margin: 9px 0 0 3px;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fafbfc);
  box-shadow: 0 16px 36px rgba(37, 66, 112, 0.1);
  transform: rotate(-1.2deg);
}

.receipt-title {
  border-bottom: 1px dashed #ccd5e1;
  background: #f8fafc;
  padding: 12px;
  color: #66758a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-align: center;
}

.receipt-body {
  padding: 20px 16px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.receipt-body p {
  margin: 17px 0 7px;
  color: #5b6676;
  font-size: 10px;
}

.paper-line {
  display: block;
  height: 6px;
  margin: 8px 0;
  border-radius: 99px;
  background: #e6eaf0;
}

.paper-line.wide { width: 85%; }
.paper-line.medium { width: 64%; }
.paper-line.full { width: 100%; margin-top: 18px; }
.paper-line.short { width: 55%; }

.marked-number {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  border-radius: 8px;
  background: var(--primary-soft);
  padding: 7px;
  color: #21468e;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.marked-number b,
.field > span b {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 10px;
}

.form-panel h3,
.stage-heading h3,
.success-view h3 {
  margin: 5px 0 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.stage-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.field {
  display: block;
  margin-top: 18px;
}

.field > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #253147;
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.field > span em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 48px;
  border: 1px solid #d9e2ee;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  padding: 0 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: #a5afbd;
  font-weight: 500;
}

.field input:focus {
  border-color: #7295e7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 88, 211, 0.1);
}

.field input:invalid:not(:placeholder-shown) {
  border-color: #d78489;
}

.field > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.text-button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 130ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  padding: 0 19px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(36, 88, 211, 0.21);
}

.form-panel > .primary-button {
  width: 100%;
  margin-top: 20px;
}

.primary-button:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 12px 28px rgba(36, 88, 211, 0.27);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.text-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.42;
}

.primary-button.is-loading {
  cursor: wait;
}

.primary-button.is-loading:disabled {
  opacity: 1;
}

.button-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: button-spin 700ms linear infinite;
}

.button-spinner[hidden] {
  display: none;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.secondary-button {
  min-height: 48px;
  border: 1px solid #d8e0eb;
  background: #fff;
  padding: 0 19px;
  color: #42516a;
}

.secondary-button:hover {
  background: #f6f8fb;
}

.text-button {
  display: block;
  margin: 10px auto 0;
  background: transparent;
  padding: 6px 9px;
  color: var(--primary);
  font-size: 12px;
}

.text-button:hover {
  background: var(--primary-soft);
}

.privacy-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.message {
  margin-top: 15px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
}

.message.error {
  border: 1px solid #f2c9cc;
  background: var(--error-soft);
  color: var(--error);
}

.message.success {
  border: 1px solid #bfe6d9;
  background: var(--success-soft);
  color: #075c45;
}

.message.warning {
  border: 1px solid #ead8a3;
  background: var(--warning-soft);
  color: #765600;
}

.stage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.receipt-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.receipt-summary > div {
  border: 1px solid #e0e7f1;
  border-radius: 14px;
  background: #f8faff;
  padding: 14px;
}

.receipt-summary small,
.receipt-summary strong {
  display: block;
}

.receipt-summary small,
.review-section small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.receipt-summary strong {
  margin-top: 5px;
  font-size: 18px;
}

.products {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid #e0e7f1;
  border-radius: 16px;
}

.product-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f6;
}

.product-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.product-row div strong,
.product-row div small {
  display: block;
}

.product-row div strong {
  font-size: 13px;
  line-height: 1.35;
}

.product-row div small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.product-row > strong {
  font-size: 13px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #f8faff;
  padding: 14px 15px;
  font-size: 14px;
}

.confirm-box {
  display: flex;
  cursor: pointer;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  padding: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.confirm-box:has(input:checked) {
  border-color: #9eb9ef;
  background: #f3f7ff;
}

.confirm-box input,
.optional-toggle input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}

.confirm-box span,
.confirm-box strong,
.confirm-box small {
  display: block;
}

.confirm-box strong {
  font-size: 13px;
}

.confirm-box small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.button-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.buyer-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  cursor: pointer;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  padding: 14px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-card:has(input:checked) {
  border-color: #7fa0e8;
  background: #f4f7ff;
  box-shadow: 0 0 0 3px rgba(36, 88, 211, 0.07);
}

.choice-card > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #eef2f7;
  color: #4e5e75;
  font-size: 13px;
  font-weight: 850;
}

.choice-card:has(input:checked) .choice-icon {
  background: var(--primary);
  color: #fff;
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  font-size: 12px;
  line-height: 1.35;
}

.choice-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.details-panel {
  margin-top: 16px;
  border: 1px solid #e1e8f1;
  border-radius: 16px;
  background: #fbfcfe;
  padding: 17px;
}

.details-panel[hidden] {
  display: none;
}

.subtype-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  border-radius: 11px;
  background: #eaf0f7;
  padding: 4px;
}

.subtype-switch label {
  cursor: pointer;
}

.subtype-switch input {
  position: absolute;
  opacity: 0;
}

.subtype-switch span {
  display: block;
  border-radius: 8px;
  padding: 9px 10px;
  color: #647187;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.subtype-switch label:has(input:checked) span {
  background: #fff;
  box-shadow: 0 3px 10px rgba(25, 50, 87, 0.09);
  color: var(--text);
}

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

.field-grid[hidden] {
  display: none;
}

.field-grid .full {
  grid-column: 1 / -1;
}

.company-lookup {
  margin-top: 12px;
}

.company-lookup-status {
  margin: 0;
  border: 1px solid #dce5f1;
  border-radius: 11px;
  background: #f3f6fa;
  padding: 10px 12px;
  color: #52627a;
  font-size: 12px;
  line-height: 1.5;
}

.company-lookup-status.is-loading {
  border-color: #c8d8f7;
  background: #f1f6ff;
  color: #2c55a9;
}

.company-lookup-status.is-success {
  border-color: #bfe6d9;
  background: var(--success-soft);
  color: #075c45;
}

.company-lookup-status.is-error {
  border-color: #f2c9cc;
  background: var(--error-soft);
  color: var(--error);
}

.company-lookup-status.is-warning {
  border-color: #ead8a3;
  background: var(--warning-soft);
  color: #765600;
}

.company-lookup-retry {
  margin-top: 9px;
  border: 1px solid #2e5cdb;
  border-radius: 10px;
  background: #fff;
  padding: 9px 13px;
  color: #2451c8;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.company-lookup-retry:hover {
  background: #eef4ff;
}

.company-lookup-retry[hidden] {
  display: none;
}

.company-card {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid #cbdaf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(25, 50, 87, 0.07);
}

.company-card[hidden],
.company-confirm[hidden],
.company-manual-card[hidden] {
  display: none;
}

.company-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e8edf5;
  background: #f8faff;
  padding: 14px;
}

.company-card-heading small,
.company-card-heading h4 {
  display: block;
}

.company-card-heading small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.company-card-heading h4 {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.company-status {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--success-soft);
  padding: 6px 9px;
  color: #087056;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.company-status.is-warning {
  background: var(--warning-soft);
  color: #765600;
}

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

.company-details > div {
  min-width: 0;
  padding: 12px 14px;
}

.company-details > div + div {
  border-left: 1px solid #edf1f6;
}

.company-details > .company-address {
  grid-column: 1 / -1;
  border-top: 1px solid #edf1f6;
  border-left: 0;
}

.company-details dt,
.company-details dd {
  margin: 0;
}

.company-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.company-details dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #26334a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.company-confirm {
  margin-top: 12px;
  background: #fff;
}

.company-manual-card {
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #cbdaf2;
  border-radius: 14px;
  background: #fff;
}

.company-manual-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e8edf5;
  background: #f8faff;
  padding: 13px 14px;
}

.company-manual-heading small,
.company-manual-heading h4 {
  display: block;
}

.company-manual-heading small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.company-manual-heading h4 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 15px;
}

.company-manual-heading .text-button.compact {
  width: auto;
  margin: 0;
  padding: 6px 0;
  font-size: 11px;
}

.company-manual-card > .field-grid {
  padding: 3px 14px 0;
}

.manual-company-note {
  margin: 4px 14px 14px;
  border-radius: 10px;
  background: var(--warning-soft);
  padding: 10px 11px;
  color: #765600;
  font-size: 11px;
  line-height: 1.5;
}

.database-note,
.data-min-note,
.legal-note {
  border-radius: 11px;
  color: #496079;
  font-size: 11px;
  line-height: 1.5;
}

.database-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 13px;
  background: #edf7f4;
  padding: 10px 11px;
  color: #17614d;
}

.database-note span {
  font-weight: 900;
}

.optional-toggle {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
  color: #334158;
  font-size: 12px;
  font-weight: 700;
}

.optional-toggle small {
  display: inline;
  margin-left: 4px;
  color: var(--muted);
  font-weight: 500;
}

.data-min-note {
  margin: 14px 0 0;
  background: #f0f4f9;
  padding: 10px 11px;
}

.privacy-details {
  margin-top: 14px;
  border: 1px solid #d8e2ef;
  border-radius: 11px;
  background: #f7f9fc;
  color: #3d4c63;
  font-size: 11px;
  line-height: 1.55;
}

.privacy-details summary {
  position: relative;
  cursor: pointer;
  padding: 11px 38px 11px 13px;
  color: #284b8e;
  font-weight: 800;
  list-style: none;
}

.privacy-details summary::-webkit-details-marker {
  display: none;
}

.privacy-details summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  font-size: 17px;
  line-height: 1;
}

.privacy-details[open] summary::after {
  content: "−";
}

.privacy-details > div {
  border-top: 1px solid #e2e8f1;
  padding: 4px 13px 11px;
}

.privacy-details p {
  margin: 8px 0 0;
}

.privacy-details a {
  color: #2451c8;
  font-weight: 750;
}

.generation-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 22px;
  border: 1px solid #cbdaf2;
  border-radius: 13px;
  background: #f4f7fd;
  padding: 13px 15px;
  color: #32445f;
}

.generation-note::before {
  content: "✓";
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.generation-note strong,
.generation-note small {
  display: block;
}

.generation-note strong {
  font-size: 13px;
}

.generation-note strong b {
  color: var(--primary-dark);
}

.generation-note small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.date-pill {
  border-color: #cad9f5;
  background: var(--primary-soft);
  color: #2c55a9;
}

.review-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin-top: 25px;
  border: 1px solid #dfe6f1;
  border-radius: 16px;
}

.review-section {
  min-height: 116px;
  padding: 17px;
}

.review-section + .review-section {
  border-left: 1px solid #e6ebf2;
}

.review-section strong,
.review-section span {
  display: block;
}

.review-section strong {
  margin-top: 8px;
  font-size: 15px;
}

.review-section span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.legal-note {
  margin-top: 15px;
  border-left: 3px solid #83a2df;
  background: #f4f7fc;
  padding: 11px 13px;
}

.success-view {
  max-width: 690px;
  margin-inline: auto;
  padding: 14px 0 4px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border: 8px solid #d9f2e9;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.success-view > p:not(.stage-label) {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.success-view .message {
  margin-top: 20px;
  text-align: left;
}

.invoice-result-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 22px 0 0;
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: #fff;
  text-align: left;
}

.invoice-result-card > div {
  padding: 13px 15px;
}

.invoice-result-card > div:nth-child(even) {
  border-left: 1px solid #e7ecf3;
}

.invoice-result-card > div:nth-child(n + 3) {
  border-top: 1px solid #e7ecf3;
}

.invoice-result-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-result-card dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.invoice-result-card .wide {
  grid-column: 1 / -1;
}

.invoice-result-card > .wide {
  border-left: 0;
}

.delivery-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 22px;
}

.delivery-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: #f9fbff;
  padding: 17px;
  text-align: left;
}

.delivery-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
}

.delivery-card h4 {
  margin: 13px 0 0;
  color: var(--text);
  font-size: 15px;
}

.delivery-card > p:not(.delivery-status) {
  min-height: 42px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.delivery-card .primary-button {
  width: 100%;
  margin-top: auto;
}

.result-email-field {
  margin: 12px 0 14px;
}

.result-email-field input {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.delivery-divider {
  display: grid;
  place-items: center;
  color: #8a96aa;
  font-size: 10px;
  font-weight: 800;
}

.delivery-status {
  min-height: 34px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.delivery-status.is-success {
  color: var(--success);
}

.delivery-status.is-error {
  color: var(--error);
}

.delivery-status.is-warning {
  color: #765600;
}

.start-over-button {
  margin-top: 22px;
}

.site-footer {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(215, 225, 239, 0.8);
  color: var(--muted);
  font-size: 11px;
}

button:focus-visible,
input:focus-visible,
.choice-card:has(input:focus-visible),
.subtype-switch label:has(input:focus-visible) span,
.confirm-box:has(input:focus-visible) {
  outline: 3px solid rgba(36, 88, 211, 0.24);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 44px 60px;
  }

  .intro {
    max-width: 700px;
  }

  .intro h1 {
    max-width: 680px;
    font-size: clamp(38px, 7vw, 54px);
  }

  .intro > p {
    max-width: 650px;
  }

  .benefit-list {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  .secure-pill {
    padding: 7px;
    font-size: 0;
  }

  .secure-pill svg {
    width: 17px;
    height: 17px;
  }

  .page-shell {
    gap: 32px;
    padding-top: 32px;
  }

  .intro h1 {
    margin-top: 16px;
    font-size: 38px;
  }

  .intro > p {
    margin-top: 16px;
    font-size: 16px;
  }

  .benefit-list {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .preview-notice {
    display: block;
  }

  .preview-notice span {
    display: block;
  }

  .portal-card {
    border-radius: 19px;
  }

  .steps {
    padding: 20px 18px 17px;
  }

  .steps li > small {
    font-size: 9px;
  }

  .stage {
    padding: 22px 18px;
  }

  .stage-grid {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .receipt-guide {
    width: min(230px, 80%);
    margin-inline: auto;
  }

  .stage-heading {
    display: block;
  }

  .stage-heading .status-pill,
  .stage-heading .date-pill {
    margin-top: 12px;
  }

  .buyer-types,
  .field-grid,
  .review-card,
  .invoice-result-card {
    grid-template-columns: 1fr;
  }

  .field input {
    font-size: 16px;
  }

  .field > small,
  .company-lookup-status,
  .database-note,
  .company-details dd,
  .company-confirm small {
    font-size: 13px;
  }

  .company-card-heading {
    display: block;
  }

  .company-manual-heading {
    display: block;
  }

  .company-manual-heading .text-button.compact {
    margin-top: 8px;
  }

  .company-status {
    display: inline-block;
    margin-top: 9px;
    font-size: 12px;
  }

  .company-details {
    grid-template-columns: 1fr;
  }

  .company-details > div + div,
  .company-details > .company-address {
    grid-column: auto;
    border-top: 1px solid #edf1f6;
    border-left: 0;
  }

  .review-section + .review-section {
    border-top: 1px solid #e6ebf2;
    border-left: 0;
  }

  .invoice-result-card > div,
  .invoice-result-card > div:nth-child(even) {
    grid-column: auto;
    border-top: 1px solid #e7ecf3;
    border-left: 0;
  }

  .invoice-result-card > div:first-child {
    border-top: 0;
  }

  .delivery-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .delivery-divider {
    min-height: 20px;
  }

  .button-row > * {
    flex: 1;
  }

  .site-footer {
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
