:root {
  color-scheme: light;
  --ink: #172238;
  --muted: #697589;
  --line: #e5e9ef;
  --soft: #f6f7fa;
  --accent: #252e53;
  --accent-hover: #111a38;
  --success: #116b50;
  --danger: #a8333b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff;
}

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

.page-shell {
  min-height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
}

.summary-panel {
  background: var(--soft);
  position: relative;
  isolation: isolate;
}

.summary-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 100% 0 auto;
  width: 100vw;
  background: var(--soft);
}

.summary-inner {
  min-height: 100vh;
  padding: 44px clamp(36px, 5.5vw, 88px) 34px clamp(32px, 5vw, 76px);
  display: flex;
  flex-direction: column;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 710;
  letter-spacing: .01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
}

.summary-main { margin-top: clamp(76px, 12vh, 154px); }
.eyebrow {
  margin: 0 0 16px;
  color: #68748a;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.summary-main h1 {
  max-width: 410px;
  margin: 0;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.24;
  letter-spacing: -.035em;
  font-weight: 690;
}

.summary-subtitle {
  margin: 12px 0 0;
  max-width: 350px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-amount {
  margin-top: 36px;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: -.055em;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.amount-caption { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.summary-divider { height: 1px; margin: 35px 0 25px; background: #dfe3e9; }
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 14px;
}
.summary-line strong {
  max-width: 64%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 590;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.summary-line-total { margin-top: 0; color: var(--ink); font-weight: 650; }
.summary-line-total strong { font-size: 17px; font-weight: 720; }

.summary-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 54px;
  color: #8992a1;
  font-size: 11px;
  line-height: 1.5;
}
.shield-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid #b1b9c5;
  border-radius: 50%;
  color: #667587;
  font-size: 11px;
}

.checkout-panel { background: #fff; }
.checkout-inner {
  max-width: 590px;
  padding: 66px clamp(32px, 6vw, 86px) 34px clamp(32px, 6vw, 86px);
  margin: 0 auto;
}
.checkout-heading { margin-bottom: 33px; }
.checkout-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 0;
  border: 0;
  color: #56647a;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.back-button:hover { color: var(--accent); }
.back-button:focus-visible { outline: 2px solid #8d98c8; outline-offset: 3px; border-radius: 4px; }
.return-note { margin: -12px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e4e8f1;
  border-radius: 999px;
  color: #54647b;
  background: #f8f9fb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}
.step-dot { width: 6px; height: 6px; border-radius: 50%; background: #727dc6; }
.checkout-heading h2 {
  margin: 24px 0 8px;
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.checkout-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > span { color: #40506a; font-size: 12px; font-weight: 650; }
.required { color: #c24f57; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 98px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #a1aab8; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #8d98c8;
  box-shadow: 0 0 0 3px rgba(111, 123, 188, .13);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2367758b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.advanced-fields { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 19px; }
.advanced-fields summary {
  display: flex;
  justify-content: space-between;
  color: #56667c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}
.advanced-fields summary::-webkit-details-marker { display: none; }
.advanced-fields[open] summary span { transform: rotate(180deg); }
.advanced-content { padding-top: 22px; }
.form-hint { margin: 20px 0 20px; color: #8a95a5; font-size: 11px; line-height: 1.6; }

.primary-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 9px 19px rgba(33, 44, 80, .15);
  font-size: 14px;
  font-weight: 700;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.primary-button:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 22px rgba(33,44,80,.2); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.button-arrow { font-size: 18px; font-weight: 400; line-height: 1; }

.inline-error {
  margin: 13px 0;
  padding: 11px 13px;
  border: 1px solid #f2d3d5;
  border-radius: 8px;
  background: #fff6f6;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.payment-status {
  margin-bottom: 28px;
  padding: 13px 15px;
  border-radius: 9px;
  background: #f2f5fa;
  color: #43536c;
  font-size: 12px;
  line-height: 1.55;
}
.payment-status.success { background: #edf8f3; color: var(--success); }
.payment-status.warning { background: #fff8ed; color: #8f611f; }
.mock-banner { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #dfc88d; border-radius: 9px; background: #fff8e8; color: #795312; font-size: 12px; font-weight: 650; line-height: 1.6; }
.method-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.method-heading h3 { margin: 0; font-size: 14px; font-weight: 700; }
.method-heading span { color: #95a0ae; font-size: 11px; }
.method-list { display: grid; gap: 10px; }
.method-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid #dfe5ed;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  width: 100%;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.method-card:hover { border-color: #abb5c7; }
.method-card:disabled { opacity: .55; cursor: wait; }
.method-card:focus-visible { outline: 3px solid rgba(111,123,188,.28); outline-offset: 2px; }
.method-arrow { margin-left: auto; color: #667797; font-size: 19px; }
.method-card.selected { border-color: #546389; background: #fafbfe; box-shadow: 0 0 0 1px #546389 inset; }
.method-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.method-card:focus-within { outline: 3px solid rgba(111,123,188,.24); outline-offset: 2px; }
.method-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; flex: none; font-size: 25px; font-weight: 700; }
.pix-icon { color: #16a689; background: #e8f8f3; transform: rotate(0deg); }
.paypal-icon { color: #18437b; background: #eaf2fc; font-family: Georgia, serif; font-style: italic; }
.method-copy { display: grid; gap: 4px; }
.method-copy strong { font-size: 14px; font-weight: 700; }
.method-copy small { color: #8792a2; font-size: 11px; }
.radio-decoration { width: 17px; height: 17px; margin-left: auto; border: 1.5px solid #b8c2cf; border-radius: 50%; }
.selected .radio-decoration { border: 5px solid #536187; }

.payment-total { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 18px; padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.payment-total strong { font-size: 21px; font-weight: 740; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.payment-action { margin-top: 19px; padding: 18px; border: 1px solid #dce5ef; border-radius: 10px; background: #fbfcfe; text-align: center; }
.payment-action h3 { margin: 0 0 7px; font-size: 15px; }
.payment-action p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.payment-action img { width: min(220px, 100%); margin: 10px auto; border-radius: 8px; }
.action-controls { display: grid; gap: 10px; margin-top: 18px; }
.secondary-button { min-height: 46px; border: 1px solid #cbd4e0; border-radius: 8px; background: #fff; color: var(--accent); font-size: 13px; font-weight: 700; }
.secondary-button:hover:not(:disabled) { background: #f2f5fa; }
.secondary-button:disabled { opacity: .55; cursor: not-allowed; }
.payment-action + .method-heading { margin-top: 28px; }
.action-link { display: inline-block; padding: 12px 18px; border-radius: 8px; background: #fff; border: 1px solid #9da9bc; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.action-link:hover { background: #f2f5fa; }
.status-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 23px; color: #929dad; font-size: 11px; }
.status-tools button, .subtle-button { border: 0; padding: 0; background: none; color: #4d5f87; font-size: 11px; font-weight: 670; }
.status-tools button:hover, .subtle-button:hover { text-decoration: underline; }
.subtle-button { display: block; margin: 28px auto 0; }
.checkout-footer { margin-top: 62px; color: #9aa4b1; font-size: 11px; line-height: 1.5; text-align: center; }
.result-inner { padding-top: clamp(90px, 20vh, 190px); }
.result-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #edf1f7; color: #526487; font-size: 28px; font-weight: 700; }
.result-icon.result-success { background: #e5f6ef; color: var(--success); }
.result-inner h2 { margin: 24px 0 10px; font-size: 28px; letter-spacing: -.035em; }
.result-message { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.result-back { display: inline-grid; place-items: center; margin-top: 28px; padding: 0 20px; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 850px) {
  .page-shell { display: block; }
  .summary-panel::before { display: none; }
  .summary-inner { min-height: auto; padding: 26px 28px 30px; }
  .summary-main { margin-top: 42px; }
  .summary-main h1 { font-size: 25px; }
  .hero-amount { margin-top: 22px; font-size: 40px; }
  .summary-divider { margin: 24px 0 17px; }
  .summary-footer { padding-top: 22px; }
  .checkout-inner { padding: 43px 28px 32px; max-width: 620px; }
  .checkout-footer { margin-top: 42px; }
}

@media (max-width: 520px) {
  .summary-inner { padding: 22px 21px 28px; }
  .checkout-inner { padding: 34px 21px 28px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .field-full { grid-column: auto; }
  .summary-main { margin-top: 36px; }
  .summary-subtitle { font-size: 12px; }
  .summary-footer { font-size: 10px; }
  .checkout-heading { margin-bottom: 28px; }
  .checkout-heading h2 { font-size: 27px; }
}
