:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #14213d;
    --muted: #667085;
    --line: #e4e9f1;
    --brand: #007e73;
    --brand-dark: #00655d;
    --brand-soft: #effaf8;
    --danger: #b42318;
    --danger-bg: #fff3f2;
    --shadow: 0 16px 45px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 18px; }
.brand { color: var(--brand); font-size: 20px; font-weight: 800; text-decoration: none; }
.header-label { color: var(--muted); font-size: 14px; }
.page-shell { padding: 54px 0 80px; }

.hero, .page-heading { display: flex; justify-content: space-between; gap: 32px; align-items: flex-end; margin-bottom: 30px; }
.compact-hero { max-width: 850px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -.03em; }
h2 { margin: 0 0 12px; font-size: 22px; }
p { color: var(--muted); line-height: 1.65; margin: 0; }

.two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 24px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.muted { font-size: 14px; margin-bottom: 24px; }

.form-stack { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
input { width: 100%; padding: 13px 14px; border: 1px solid #cfd7e3; border-radius: 10px; font: inherit; color: var(--text); background: #fff; outline: none; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,126,115,.12); }
.validation { color: var(--danger); font-size: 13px; font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; border-color: #ccd5e2; color: var(--text); }

.flow-card { background: linear-gradient(180deg, #fff, #fbfdfd); }
.flow-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 18px; }
.flow-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.flow-list li > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.flow-list strong, .flow-list small { display: block; }
.flow-list small { color: var(--muted); margin-top: 3px; line-height: 1.35; }

.alert { display: grid; gap: 5px; margin-bottom: 22px; }
.alert.error { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }
.alert.error span { font-size: 14px; line-height: 1.5; }

.reference-pill, .request-id { border: 1px solid #cfe9e5; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.widget-card { padding: 0; overflow: hidden; min-height: 650px; }
.widget-loading { min-height: 650px; display: grid; place-items: center; color: var(--muted); }

.result-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.metric { box-shadow: none; }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.metric strong { font-size: 20px; }
.summary-card { box-shadow: none; margin-bottom: 20px; }
.summary-card p { font-size: 17px; color: var(--text); }
.json-card { padding: 0; overflow: hidden; }
.json-header { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.json-header h2 { margin: 0; }
pre { margin: 0; padding: 24px; overflow-x: auto; background: #101828; color: #e6edf7; line-height: 1.55; font-size: 13px; }
.raw-details { margin-top: 20px; padding: 0; overflow: hidden; box-shadow: none; }
.raw-details summary { padding: 18px 22px; cursor: pointer; font-weight: 800; }

@media (max-width: 820px) {
    .two-column, .result-summary, .form-grid { grid-template-columns: 1fr; }
    .page-heading, .hero { align-items: flex-start; flex-direction: column; }
    .header-label { display: none; }
    .page-shell { padding-top: 34px; }
    .json-header { align-items: flex-start; flex-direction: column; }
}
