:root {
  color-scheme: light;
  --ink: #0b1220;
  --muted: #4b576b;
  --line: #e0e5ec;
  --surface: #fff;
  --accent: #ff6b00;
  --background: #f3f5f8;
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
.frame { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.site-header { color: var(--surface); background: var(--ink); }
.navigation { display: flex; justify-content: space-between; align-items: center; min-height: 77px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.environment { color: #ffd0ad; border: 1px solid #6a4838; border-radius: 99px; padding: 4px 12px; font-size: .78rem; font-weight: 650; }

.intro { padding: clamp(34px, 6vw, 78px) 0 30px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.056em; line-height: 1.07; }
.intro p { max-width: 58ch; padding-top: 15px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3.5vw, 35px); }
.card h2 { font-size: 1.23rem; letter-spacing: -.024em; line-height: 1.2; }
.scenario form { display: grid; gap: 10px; margin-top: 23px; }
.scenario label { font-size: .86rem; font-weight: 690; }
select, button { font: inherit; width: 100%; min-height: 47px; border-radius: 9px; }
select { border: 1px solid #aeb8c6; background: var(--surface); color: var(--ink); padding: 8px 10px; }
button { color: var(--ink); background: var(--accent); font-weight: 750; border: 1px solid transparent; padding: 9px 14px; cursor: pointer; }
button:hover { background: #ff8231; }
button.secondary { background: var(--surface); border-color: #aeb8c6; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #2c67d8; outline-offset: 3px; }

.heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.status { display: inline-block; background: #e8edf5; color: #324661; border-radius: 99px; padding: 3px 10px; font-size: .8rem; font-weight: 720; text-align: center; }
.status[data-state="OBSERVED_SUCCESS"], .status[data-state="RECONCILED"] { background: #e5f2ea; color: #17653f; }
.status[data-state="MANUAL_REVIEW"], .status[data-state="FAILED"] { background: #fff0df; color: #863d07; }
#guidance { color: var(--muted); margin-top: 10px; }
.amount { font-size: clamp(2rem, 4vw, 3rem); font-weight: 790; letter-spacing: -.06em; margin: 12px 0 4px; }
.details { margin: 0 0 16px; }
.details div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 5px 0; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.payment-options { display: grid; gap: 10px; margin-bottom: 14px; }
.upi-app { color: var(--ink); background: var(--accent); font-weight: 750; border-radius: 9px; padding: 9px 14px; text-align: center; }
figure { margin: 0; text-align: center; }
figure img { display: block; margin-inline: auto; border: 1px solid var(--line); border-radius: 10px; }
figcaption { color: var(--muted); font-size: .82rem; margin-top: 3px; }
details { font-size: .9rem; }
summary { color: #304668; cursor: pointer; }
code { display: block; padding: 8px; overflow-wrap: anywhere; background: var(--background); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.actions button { width: auto; }
.error, .notice { color: #863d07; background: #fff0df; padding: 9px 10px; border-radius: 8px; margin-top: 14px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 16px; padding: 30px 0; color: var(--muted); font-size: .84rem; }

@media (max-width: 690px) {
  .frame { width: calc(100% - 30px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media print {
  body, .site-header, .card { color: #0b1220; background: white; }
  .site-header, .intro, .scenario, .actions, .payment-options, #webhook-panel { display: none !important; }
  .frame { width: 100%; }
  .workspace { display: block; }
  .checkout h2::after { content: " · WIGOUPI synthetic receipt"; }
}
