:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f8fafc;
  --success: #137a4b;
  --danger: #b42318;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: #f3f5f8; }
button, input { font: inherit; }
.checkout-shell { width: min(1180px, calc(100% - 32px)); margin: 48px auto; }
.checkout-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: 0 24px 70px rgba(15, 23, 42, .08); }
.merchant-header { min-height: 76px; padding: 18px 28px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.merchant-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 750; }
.merchant-brand img { width: 132px; max-height: 38px; object-fit: contain; object-position: left center; }
.merchant-wordmark { font-size: 19px; }
.secure-pill, .bank-safe { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 7px 11px; font-size: 12px; color: #475467; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr); }
.checkout-main { padding: 44px 52px 56px; }
.order-summary { background: var(--soft); border-left: 1px solid var(--line); padding: 44px 38px; }
.eyebrow, .section-label { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 750; font-size: 11px; color: #667085; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.03; }
.checkout-heading > p:last-child { color: var(--muted); max-width: 570px; line-height: 1.6; }
.konek-section { margin-top: 34px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading-row h2 { margin: 0; font-size: 26px; }
.payment-copy { color: var(--muted); line-height: 1.55; max-width: 600px; }
[data-konek-host] { margin: 24px 0 10px; }
.fine-print, .server-note { color: #667085; font-size: 12px; line-height: 1.5; }
.payment-methods { margin-top: 34px; }
.method-placeholder { width: 100%; margin-top: 10px; min-height: 54px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #f9fafb; padding: 12px 16px; color: #344054; display: flex; justify-content: space-between; }
.method-placeholder span { color: #98a2b3; font-size: 12px; }
.summary-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.summary-title-row h2 { margin: 0; font-size: 20px; }
.summary-title-row span { font-size: 12px; color: #667085; }
.order-items { padding: 24px 0; border-bottom: 1px solid var(--line); }
.order-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 10px 0; }
.order-item__name { font-weight: 650; }
.order-item__meta { grid-column: 1; color: #667085; font-size: 12px; }
.order-item__price { grid-row: 1 / span 2; grid-column: 2; align-self: start; font-variant-numeric: tabular-nums; }
.totals { margin: 18px 0 0; }
.totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; }
.totals dt { color: #667085; }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.total-row { margin-top: 9px; padding-top: 17px !important; border-top: 1px solid var(--line); font-size: 19px; font-weight: 750; }
.total-row dt { color: var(--ink); }
.checkout-state { margin-top: 32px; border-radius: 16px; padding: 18px; }
.checkout-state--loading:not([hidden]) { background: #f8fafc; display: flex; gap: 12px; align-items: center; color: #475467; }
.checkout-state--error { background: #fff3f2; color: var(--danger); }
.checkout-state--error p { color: #7a271a; }
.checkout-state--success { background: #ecfdf3; color: #05603a; padding: 28px; }
.success-mark { width: 44px; height: 44px; border-radius: 50%; background: #d1fadf; display: grid; place-items: center; font-weight: 900; font-size: 24px; }
.checkout-state--success h2 { margin-bottom: 4px; }
.payment-result { margin: 18px 0; }
.payment-result div { display: flex; gap: 12px; padding: 5px 0; }
.payment-result dt { width: 90px; color: #477b65; }
.payment-result dd { margin: 0; word-break: break-word; }
.secondary-button, .primary-link { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; min-height: 44px; padding: 0 18px; text-decoration: none; font-weight: 700; }
.secondary-button { border: 1px solid #fecdca; background: white; color: #b42318; cursor: pointer; }
.primary-link { background: #111827; color: white; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d0d5dd; border-top-color: #344054; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) {
  .checkout-shell { width: min(100% - 20px, 680px); margin: 10px auto; }
  .checkout-card { border-radius: 20px; }
  .merchant-header { padding: 16px 20px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-main { padding: 32px 22px 38px; }
  .order-summary { grid-row: 1; border-left: 0; border-bottom: 1px solid var(--line); padding: 28px 22px; }
  .section-heading-row { flex-direction: column; }
}
