:root {
  --stellar-deep-navy: #07203f;
  --stellar-navy: #0a2c50;
  --stellar-blue: #1e6fd0;
  --stellar-blue-dark: #155cad;
  --stellar-teal: #008bbf;
  --stellar-cyan: #3fc6ff;
  --stellar-cyan-ink: #0d6f96;
  --stellar-ice: #eaf6ff;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f7fbfe;
  --canvas: #f2f7fb;
  --text: #0b2747;
  --text-soft: #526a84;
  --text-faint: #536b82;
  --border: #d9e5ef;
  --border-strong: #bfd1df;
  --success: #087e5b;
  --success-bg: #e6f7f1;
  --warning: #9b5b08;
  --warning-bg: #fff4dd;
  --danger: #b33a46;
  --danger-bg: #fff0f2;
  --shadow-sm: 0 4px 14px rgba(7, 32, 63, .06);
  --shadow-md: 0 18px 48px rgba(7, 32, 63, .10);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --page-width: 1200px;
  --font: 'Montserrat', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color-scheme: light;
  font-family: var(--font);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--canvas); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-180%); padding: 10px 14px; border-radius: var(--radius-sm); background: var(--white); color: var(--stellar-deep-navy); font-weight: 700; box-shadow: var(--shadow-md); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--stellar-cyan); outline-offset: 3px; }

.page-shell { width: min(calc(100% - 48px), var(--page-width)); margin-inline: auto; }
.site-header { position: sticky; z-index: 20; top: 0; height: 82px; color: var(--white); background: rgba(7, 32, 63, .97); border-bottom: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(16px); }
.header-inner { position: relative; width: min(calc(100% - 48px), var(--page-width)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand-link { display: inline-flex; flex: 0 0 auto; align-items: center; }
.brand-logo-wide { width: 240px; height: auto; }
.brand-logo-compact { display: none; width: 64px; height: 64px; }
.primary-nav { display: flex; align-items: center; justify-content: center; gap: 30px; margin-left: auto; }
.primary-nav a { position: relative; min-height: 32px; display: inline-flex; align-items: center; color: rgba(255, 255, 255, .76); font-size: 13px; font-weight: 600; text-decoration: none; }
.primary-nav a::after { position: absolute; right: 0; bottom: -10px; left: 0; height: 2px; content: ''; transform: scaleX(0); transform-origin: center; background: var(--stellar-cyan); transition: transform 160ms ease; }
.primary-nav a:hover { color: var(--white); }
.primary-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.session-button, .nav-toggle { min-height: 44px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; color: var(--white); background: rgba(255,255,255,.06); cursor: pointer; font-size: 12px; font-weight: 700; }
.session-button { padding: 8px 12px; }
.nav-toggle { display: none; align-items: center; gap: 8px; padding: 8px 11px; }
.nav-toggle svg { width: 18px; height: 18px; }
.environment-badge, .live-label, .health-chip, .demo-chip, .secure-label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.environment-badge { padding: 9px 12px; border: 1px solid rgba(63, 198, 255, .28); border-radius: 999px; color: var(--stellar-ice); background: rgba(63, 198, 255, .08); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #42d6a4; box-shadow: 0 0 0 4px rgba(66, 214, 164, .14); }
.environment-badge[data-tone="danger"] { color: #ffd9dd; border-color: rgba(255,118,132,.35); background: rgba(179,58,70,.18); }
.environment-badge[data-tone="danger"] .status-dot, .live-label[data-tone="danger"] .status-dot { background: #ff7684; box-shadow: 0 0 0 4px rgba(255,118,132,.14); }

.hero { position: relative; overflow: hidden; color: var(--white); background: var(--stellar-deep-navy); }
.hero::before { position: absolute; inset: 0; content: ''; pointer-events: none; opacity: .55; background-image: linear-gradient(rgba(63,198,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(63,198,255,.045) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(to right, #000, transparent 78%); }
.hero::after { position: absolute; top: -240px; right: -180px; width: 680px; height: 680px; content: ''; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(63, 198, 255, .17), rgba(30, 111, 208, .05) 42%, transparent 68%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); gap: 72px; align-items: center; min-height: 590px; padding-block: 74px; }
.section-kicker, .card-eyebrow { margin: 0; color: var(--stellar-cyan-ink); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-kicker-light { color: var(--stellar-cyan); }
.hero h1 { max-width: 720px; margin: 16px 0 22px; font-size: clamp(42px, 5vw, 64px); font-weight: 600; line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.hero-summary { max-width: 680px; margin: 0; color: rgba(234, 246, 255, .78); font-size: 17px; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.2; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.button svg { width: 18px; height: 18px; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .72; }
.button.is-busy svg { animation: pulse 1s ease-in-out infinite; }
.button-accent { color: var(--stellar-deep-navy); background: var(--stellar-cyan); box-shadow: 0 10px 28px rgba(63, 198, 255, .15); }
.button-accent:hover:not(:disabled) { background: #71d5ff; }
.button-ghost { color: var(--white); border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .06); }
.button-ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .1); }
.button-primary { color: var(--white); background: var(--stellar-blue); box-shadow: 0 10px 24px rgba(30, 111, 208, .18); }
.button-primary:hover:not(:disabled) { background: var(--stellar-blue-dark); }
.button-secondary { color: var(--stellar-navy); border-color: var(--border-strong); background: var(--white); }
.button-secondary:hover:not(:disabled) { border-color: var(--stellar-blue); color: var(--stellar-blue); }
.button-tertiary { color: var(--text-soft); border-color: transparent; background: transparent; }
.button-tertiary:hover:not(:disabled) { color: var(--stellar-blue); background: var(--stellar-ice); }
.button-compact { min-height: 44px; padding: 9px 14px; }
.button-full { width: 100%; }
.hero-notice { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: rgba(234, 246, 255, .64); font-size: 12px; line-height: 1.5; }
.hero-notice svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--stellar-cyan); }

.route-card { padding: 26px; border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-lg); background: rgba(10, 44, 80, .82); box-shadow: 0 24px 70px rgba(0, 0, 0, .18); backdrop-filter: blur(12px); }
.route-card-head, .surface-head, .payment-preview-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.route-card .card-eyebrow { color: var(--stellar-cyan); }
.route-card h2, .surface h3, .control-card h3 { margin: 7px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.live-label { color: rgba(255,255,255,.7); font-size: 11px; font-weight: 600; }
.live-label .status-dot { width: 7px; height: 7px; }
.route-steps { margin: 25px 0 22px; padding: 0; list-style: none; }
.route-steps li { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 13px; align-items: center; min-height: 58px; }
.route-steps li:not(:last-child)::after { position: absolute; top: 43px; bottom: -3px; left: 18px; width: 1px; content: ''; background: rgba(63, 198, 255, .25); }
.route-steps > li > span { z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(63, 198, 255, .35); border-radius: 50%; color: var(--stellar-cyan); background: var(--stellar-navy); font-size: 10px; font-weight: 700; }
.route-steps strong, .route-steps small { display: block; }
.route-steps strong { font-size: 13px; font-weight: 600; }
.route-steps small { margin-top: 4px; color: rgba(234, 246, 255, .58); font-size: 11px; }
.rail-policy { padding-top: 17px; border-top: 1px solid rgba(255, 255, 255, .1); }
.rail-policy p { margin: 0 0 10px; color: rgba(234, 246, 255, .55); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.rail-list { display: flex; flex-wrap: wrap; gap: 7px; }
.rail-list span { padding: 7px 9px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .05); font-size: 10px; font-weight: 600; }
.rail-list .rail-blocked { color: #ffb8bf; border-color: rgba(255, 118, 132, .2); background: rgba(179, 58, 70, .16); }

.content-shell { padding-block: 0 80px; }
.metric-grid { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -38px; }
.metric-card { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-label { color: var(--text-soft); font-size: 12px; font-weight: 600; }
.metric-card strong { margin: 7px 0 4px; color: var(--stellar-deep-navy); font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.metric-card small { color: var(--text-faint); font-size: 11px; }
.metric-featured { border-top: 3px solid var(--stellar-blue); }
.metric-attention { border-top: 3px solid var(--warning); }
.metric-error { border-top: 3px solid var(--danger); }
.metric-error strong { font-size: 18px; letter-spacing: -.02em; }
.metric-loading strong { color: var(--border-strong); }

.content-section { padding-top: 74px; scroll-margin-top: 80px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.section-heading h2, .handoff-copy h2 { margin: 7px 0 7px; font-size: clamp(27px, 3vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.section-heading p:not(.section-kicker), .handoff-copy > p:not(.section-kicker) { max-width: 680px; margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.65; }
.compact-heading { margin-bottom: 22px; }
.operations-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .45fr); gap: 18px; }
.surface { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.table-card, .runtime-card { padding: 24px; }
.updated-at { color: var(--text-faint); font-size: 12px; }
.health-chip { padding: 7px 9px; border-radius: 999px; color: var(--success); background: var(--success-bg); font-size: 12px; font-weight: 700; }
.health-chip .status-dot { width: 6px; height: 6px; background: var(--success); box-shadow: none; }
.health-chip[data-tone="checking"] { color: var(--stellar-cyan-ink); background: var(--stellar-ice); }
.health-chip[data-tone="danger"] { color: var(--danger); background: var(--danger-bg); }
.health-chip[data-tone="danger"] .status-dot { background: var(--danger); }
.operations-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .45fr); gap: 12px; margin-top: 20px; }
.filter-field { display: grid; gap: 6px; color: var(--text-soft); font-size: 12px; font-weight: 600; }
.filter-field input, .filter-field select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text); background: var(--white); }
.table-wrap { min-height: 290px; margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 15px 12px; text-align: left; border-bottom: 1px solid #e9f0f5; }
th { color: var(--text-faint); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
td { color: var(--text-soft); }
td strong { color: var(--text); font-weight: 600; }
td strong + small { display: block; margin-top: 4px; color: var(--text-faint); font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-subtle); }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.status-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-success { color: var(--success); background: var(--success-bg); }
.status-warning { color: var(--warning); background: var(--warning-bg); }
.status-danger { color: var(--danger); background: var(--danger-bg); }
.status-neutral { color: var(--stellar-cyan-ink); background: var(--stellar-ice); }
.runtime-list { margin: 20px 0 0; }
.runtime-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #e9f0f5; }
.runtime-list > div:last-child { border-bottom: 0; }
.runtime-list dt { color: var(--text-faint); font-size: 12px; }
.runtime-list dd { margin: 0; color: var(--text); font-size: 12px; font-weight: 600; text-align: right; }
.runtime-error dd { color: var(--danger); }
.table-skeleton { display: grid; gap: 12px; padding-top: 6px; }
.table-skeleton span { height: 44px; border-radius: var(--radius-sm); background: linear-gradient(90deg, #eef4f8 25%, #f8fbfd 50%, #eef4f8 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.empty-state, .error-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 50%; color: var(--stellar-blue); background: var(--stellar-ice); }
.empty-icon svg { width: 22px; height: 22px; }
.empty-state strong, .error-state strong { font-size: 15px; }
.empty-state p, .error-state p { max-width: 360px; margin: 7px 0 12px; color: var(--text-soft); font-size: 12px; line-height: 1.6; }
.error-state { color: var(--danger); background: var(--danger-bg); border-radius: var(--radius-md); }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; border: 0; color: var(--stellar-blue); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; }
.text-link:hover { color: var(--stellar-blue-dark); text-decoration: underline; }
.row-action { min-width: 44px; min-height: 40px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--stellar-blue); background: var(--white); cursor: pointer; font-size: 12px; font-weight: 700; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 12px; }
.table-pagination > div { display: flex; gap: 8px; }

.handoff-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.handoff-copy > p:not(.section-kicker) { max-width: 570px; font-size: 15px; }
.check-list { display: grid; gap: 12px; margin: 25px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 13px; font-weight: 500; }
.check-list li span { width: 23px; height: 23px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-bg); font-size: 12px; font-weight: 700; }
.payment-preview { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.payment-preview-top { align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.payment-preview-top > div, .merchant-row { display: flex; align-items: center; gap: 12px; }
.payment-preview-top small, .payment-preview-top strong, .merchant-row small, .merchant-row strong { display: block; }
.payment-preview-top small, .merchant-row small { margin-bottom: 3px; color: var(--text-faint); font-size: 12px; }
.payment-preview-top strong, .merchant-row strong { font-size: 12px; font-weight: 600; }
.merchant-avatar { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--white); background: var(--stellar-navy); font-size: 16px; font-weight: 700; }
.demo-chip { padding: 6px 9px; border-radius: 999px; color: var(--stellar-cyan-ink); background: var(--stellar-ice); font-size: 10px; font-weight: 700; }
.payment-preview-body { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: 28px; }
.payment-preview-body > img { width: 164px; height: 164px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.payment-amount small { color: var(--text-faint); font-size: 11px; }
.payment-amount > strong { display: block; margin-top: 6px; color: var(--stellar-deep-navy); font-size: 34px; font-weight: 600; letter-spacing: -.045em; }
.payment-amount > strong span { font-size: 18px; vertical-align: 8px; }
.payment-amount p { margin: 3px 0 17px; color: var(--text-soft); font-size: 11px; }

.control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.control-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.control-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 23px; border-radius: 10px; color: var(--stellar-blue); background: var(--stellar-ice); }
.control-icon svg { width: 22px; height: 22px; }
.control-card h3 { font-size: 16px; }
.control-card > p:last-child { margin: 11px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.65; }
.trace-section { padding-top: 40px; }
.trace-details { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.trace-details summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 21px 24px; cursor: pointer; list-style: none; }
.trace-details summary::-webkit-details-marker { display: none; }
.trace-details summary > span:first-child { display: grid; gap: 7px; }
.trace-details summary strong { font-size: 15px; font-weight: 600; }
.summary-action { display: inline-flex; align-items: center; gap: 12px; color: var(--stellar-blue); font-size: 11px; font-weight: 700; }
.summary-action span { font-size: 18px; transition: transform 160ms ease; }
.trace-details[open] .summary-action span { transform: rotate(45deg); }
.trace-body { padding: 0 24px 24px; border-top: 1px solid var(--border); }
.trace-body > p { margin: 18px 0 12px; color: var(--text-soft); font-size: 12px; }
pre { max-height: 420px; margin: 0; padding: 18px; overflow: auto; border-radius: 10px; color: #d8efff; background: #061b34; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(360px, calc(100vw - 32px)); padding: 13px 16px; transform: translateY(25px); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: var(--white); background: var(--stellar-navy); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; font-size: 12px; font-weight: 600; transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast[data-tone="error"] { background: #832b35; }
.modal { width: min(calc(100% - 32px), 760px); max-height: min(84vh, 820px); padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); background: var(--white); box-shadow: 0 30px 90px rgba(7,32,63,.25); }
.modal::backdrop { background: rgba(7,32,63,.64); backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 7px 0 0; font-size: 24px; }
.icon-button { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface-subtle); cursor: pointer; font-size: 24px; line-height: 1; }
.modal-body { max-height: calc(84vh - 94px); padding: 24px; overflow: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 24px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--border); }
.detail-grid > div { padding: 14px; background: var(--white); }
.detail-grid dt { color: var(--text-faint); font-size: 12px; }
.detail-grid dd { margin: 7px 0 0; font-size: 13px; font-weight: 600; }
.modal-body h3 { margin: 0 0 12px; font-size: 15px; }
.detail-loading { min-height: 180px; display: grid; place-items: center; color: var(--text-soft); }
.detail-trace { max-height: 360px; }
.form-error { min-height: 20px; margin-top: 8px; margin-bottom: 8px; color: var(--danger); font-size: 12px; }
.site-footer { padding: 30px 0; color: rgba(255,255,255,.56); background: var(--stellar-deep-navy); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner img { width: 170px; height: auto; }
.footer-inner p { margin: 0; font-size: 11px; }

/* Checkout */
.checkout-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--surface-subtle); }
.checkout-header { width: min(calc(100% - 48px), 1080px); height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-inline: auto; }
.checkout-header img { width: 240px; height: auto; }
.checkout-header a { display: inline-flex; }
.secure-label { color: var(--success); font-size: 11px; font-weight: 600; }
.secure-label svg { width: 17px; height: 17px; }
.payment-main { width: min(calc(100% - 48px), 1080px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); gap: 24px; align-items: stretch; margin: 24px auto 48px; }
.checkout-card, .checkout-assurance { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.checkout-card { padding: clamp(26px, 4vw, 44px); border: 1px solid var(--border); background: var(--surface); }
.checkout-intro h1 { margin: 7px 0 9px; font-size: clamp(29px, 4vw, 38px); font-weight: 600; letter-spacing: -.04em; }
.checkout-intro > p:last-child { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.6; }
.merchant-row { margin-top: 30px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.checkout-summary { margin: 24px 0; }
.checkout-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 15px 2px; border-bottom: 1px solid var(--border); }
.checkout-summary dt { color: var(--text-soft); font-size: 12px; }
.checkout-summary dd { margin: 0; color: var(--text); font-size: 12px; font-weight: 600; text-align: right; }
.checkout-summary .amount-row { padding-block: 20px; }
.checkout-summary .amount-row dt { color: var(--text); font-weight: 600; }
.checkout-summary .amount-row dd { color: var(--stellar-deep-navy); font-size: 28px; letter-spacing: -.035em; }
.checkout-summary .amount-row dd > span { font-size: 15px; vertical-align: 6px; }
.checkout-summary .amount-row dd small { color: var(--text-faint); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.payment-actions { display: grid; gap: 8px; }
.payment-status { display: flex; gap: 11px; margin-top: 20px; padding: 14px; border-radius: 10px; color: var(--stellar-cyan-ink); background: var(--stellar-ice); }
.payment-status[data-tone="pending"] { color: var(--warning); background: var(--warning-bg); }
.payment-status[data-tone="success"] { color: var(--success); background: var(--success-bg); }
.payment-status[data-tone="error"] { color: var(--danger); background: var(--danger-bg); }
.status-icon { width: 20px; height: 20px; display: grid; flex: 0 0 auto; place-items: center; }
.status-icon svg { width: 19px; height: 19px; }
.payment-status strong, .payment-status p { display: block; }
.payment-status strong { font-size: 12px; }
.payment-status p { margin: 3px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.5; }
.checkout-assurance { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 42px); color: var(--white); background: var(--stellar-deep-navy); }
.checkout-assurance > img { width: 240px; height: auto; margin-bottom: 58px; }
.checkout-assurance h2 { margin: 8px 0 14px; font-size: clamp(26px, 3vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.checkout-assurance > div > p:last-child { margin: 0; color: rgba(234,246,255,.7); font-size: 13px; line-height: 1.7; }
.checkout-assurance ul { display: grid; gap: 17px; margin: 32px 0; padding: 0; list-style: none; }
.checkout-assurance li { display: flex; gap: 12px; align-items: flex-start; }
.checkout-assurance li > span { width: 23px; height: 23px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--stellar-deep-navy); background: var(--stellar-cyan); font-size: 12px; font-weight: 700; }
.checkout-assurance li strong, .checkout-assurance li small { display: block; }
.checkout-assurance li strong { font-size: 12px; }
.checkout-assurance li small { margin-top: 3px; color: rgba(234,246,255,.72); font-size: 12px; line-height: 1.5; }
.assurance-footnote { margin: auto 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(234,246,255,.7); font-size: 12px; line-height: 1.65; }
.checkout-footer { padding: 20px 24px; color: var(--text-faint); font-size: 12px; text-align: center; }

/* Dedicated operator sign-in */
.login-page { min-height: 100vh; background: var(--white); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .92fr) minmax(520px, 1.08fr); }
.login-brand-panel { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: clamp(36px, 5vw, 72px); overflow: hidden; color: var(--white); background: var(--stellar-deep-navy); }
.login-brand-panel::before { position: absolute; inset: 0; content: ''; opacity: .55; pointer-events: none; background-image: linear-gradient(rgba(63,198,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(63,198,255,.05) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(145deg, #000, transparent 74%); }
.login-brand-panel::after { position: absolute; right: -280px; bottom: -300px; width: 680px; height: 680px; content: ''; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(63,198,255,.2), rgba(30,111,208,.06) 45%, transparent 70%); }
.login-logo, .login-brand-copy, .login-assurance { position: relative; z-index: 1; }
.login-logo { width: min(250px, 68%); }
.login-logo img { width: 100%; height: auto; }
.login-brand-copy { max-width: 630px; margin-block: auto 56px; padding-top: 88px; }
.login-brand-copy h1 { margin: 15px 0 20px; font-size: clamp(38px, 4.4vw, 62px); font-weight: 600; line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.login-brand-copy > p:last-child { max-width: 560px; margin: 0; color: rgba(234,246,255,.72); font-size: 15px; line-height: 1.75; }
.login-assurance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 26px 0 0; border-top: 1px solid rgba(255,255,255,.14); list-style: none; }
.login-assurance li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.login-assurance li > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(63,198,255,.34); border-radius: 50%; color: var(--stellar-cyan); font-size: 9px; font-weight: 700; }
.login-assurance strong, .login-assurance small { display: block; }
.login-assurance strong { font-size: 11px; line-height: 1.4; }
.login-assurance small { margin-top: 5px; color: rgba(234,246,255,.56); font-size: 10px; line-height: 1.55; }
.login-form-panel { min-height: 100vh; display: grid; place-items: center; padding: clamp(28px, 6vw, 88px); background: var(--surface-subtle); }
.login-form-wrap { width: min(100%, 470px); }
.login-mobile-logo { display: none; }
.login-form-wrap h2 { margin: 10px 0 12px; color: var(--stellar-deep-navy); font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.15; letter-spacing: -.04em; }
.login-intro { min-height: 48px; margin: 0 0 28px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.login-notice { margin: -10px 0 22px; padding: 12px 14px; border: 1px solid #b9e4d5; border-radius: 10px; color: var(--success); background: var(--success-bg); font-size: 12px; font-weight: 600; }
.login-form { display: grid; gap: 18px; }
.login-form > div { display: grid; gap: 18px; }
.login-field { display: grid; gap: 8px; color: var(--text); font-size: 12px; font-weight: 700; }
.login-field input { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); background: var(--white); transition: border-color 150ms ease, box-shadow 150ms ease; }
.login-field input:hover { border-color: #9cb7ca; }
.login-field input:focus { border-color: var(--stellar-blue); outline: 0; box-shadow: 0 0 0 3px rgba(30,111,208,.13); }
.field-help { margin: -8px 0 0; color: var(--text-faint); font-size: 11px; line-height: 1.55; }
.form-error { min-height: 20px; margin: -2px 0 0; color: var(--danger); font-size: 12px; font-weight: 600; line-height: 1.5; }
.login-session { display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: center; margin: 0 0 20px; padding: 16px; border: 1px solid #b9e4d5; border-radius: 12px; background: var(--success-bg); }
.session-success { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--success); font-size: 18px; font-weight: 700; }
.login-session strong { display: block; color: var(--success); font-size: 13px; }
.login-session p { margin: 4px 0 0; color: var(--text-soft); font-size: 11px; line-height: 1.5; }
.login-continue { color: var(--white); text-decoration: none; }
.login-privacy { margin: 34px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 11px; line-height: 1.6; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: minmax(300px, .78fr) minmax(460px, 1.22fr); }
  .login-brand-panel { padding: 38px; }
  .login-brand-copy { padding-top: 60px; }
  .login-assurance { grid-template-columns: 1fr; }
  .primary-nav { position: absolute; top: calc(100% + 10px); right: 0; width: min(320px, calc(100vw - 32px)); display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: var(--stellar-deep-navy); box-shadow: var(--shadow-md); }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { min-height: 44px; padding: 8px 12px; border-radius: 8px; }
  .primary-nav a:hover { background: rgba(255,255,255,.08); }
  .primary-nav a::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 46px; padding-block: 64px 86px; }
  .hero-copy { max-width: 760px; }
  .route-card { max-width: 680px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .operations-grid, .handoff-section { grid-template-columns: 1fr; }
  .handoff-section { gap: 34px; }
  .payment-preview { max-width: 620px; }
  .control-grid { grid-template-columns: 1fr; }
  .control-card { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; }
  .control-card .control-icon { grid-row: 1 / span 3; margin-bottom: 0; }
  .control-card > p:last-child { grid-column: 2; }
  .payment-main { grid-template-columns: 1fr; max-width: 660px; }
  .checkout-assurance > img { margin-bottom: 42px; }
}

@media (max-width: 700px) {
  .login-shell { display: block; min-height: 100vh; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; place-items: start center; padding: 34px 24px 44px; }
  .login-form-wrap { width: min(100%, 480px); }
  .login-mobile-logo { width: 200px; display: block; margin-bottom: clamp(58px, 16vh, 110px); }
  .login-mobile-logo img { width: 100%; height: auto; }
  .page-shell, .header-inner, .checkout-header, .payment-main { width: min(calc(100% - 32px), var(--page-width)); }
  .site-header { height: 72px; }
  .brand-logo-wide { display: none; }
  .brand-logo-compact { display: block; width: 64px; height: 64px; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .environment-badge { padding: 8px 10px; font-size: 10px; }
  .session-button { padding-inline: 9px; }
  .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .hero-grid { min-height: 0; padding-block: 52px 76px; }
  .hero h1 { font-size: clamp(38px, 11vw, 50px); }
  .hero-summary { font-size: 15px; }
  .metric-grid { margin-top: -28px; }
  .metric-card { min-height: 116px; padding: 18px; }
  .content-section { padding-top: 58px; }
  .section-heading { align-items: flex-start; }
  .table-card, .runtime-card { padding: 20px; }
  .table-wrap { min-height: auto; overflow: visible; }
  table, tbody { display: block; }
  thead { display: none; }
  tr { display: grid; gap: 9px; padding: 16px 0; border-bottom: 1px solid var(--border); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: minmax(95px, .7fr) 1fr; gap: 12px; align-items: center; padding: 0; border: 0; text-align: right; }
  td::before { content: attr(data-label); color: var(--text-faint); font-size: 12px; font-weight: 600; text-align: left; text-transform: uppercase; }
  td .status-badge { justify-self: end; }
  tbody tr:hover { background: transparent; }
  .payment-preview-body { gap: 20px; padding: 22px; }
  .payment-preview-body > img { width: 142px; height: 142px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .checkout-header { height: 78px; }
  .checkout-header img { width: 190px; }
  .secure-label { font-size: 9px; }
  .payment-main { margin-top: 12px; }
}

@media (max-width: 500px) {
  .session-button { min-width: 52px; padding-inline: 7px; font-size: 11px; }
  .session-button span { display: none; }
  .session-button::after { content: attr(data-compact-label); }
  .login-form-panel { padding-inline: 20px; }
  .login-mobile-logo { width: 174px; margin-bottom: 54px; }
  .hero-actions, .section-heading { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 106px; padding: 15px; }
  .metric-card strong { font-size: 26px; }
  .route-card { padding: 20px; }
  .route-card-head { align-items: center; }
  .payment-preview-body { grid-template-columns: 1fr; }
  .payment-preview-body > img { width: 156px; height: 156px; }
  .control-card { display: block; }
  .control-card .control-icon { margin-bottom: 19px; }
  .control-card > p:last-child { grid-column: auto; }
  .trace-details summary { align-items: flex-start; padding: 18px; }
  .summary-action { font-size: 0; }
  .summary-action span { font-size: 18px; }
  .trace-body { padding: 0 18px 18px; }
  .toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }
  .checkout-header { align-items: center; }
  .checkout-header img { width: 160px; }
  .secure-label { max-width: 88px; white-space: normal; line-height: 1.3; text-align: right; }
  .checkout-card, .checkout-assurance { border-radius: var(--radius-md); }
  .checkout-summary > div { align-items: flex-start; }
  .operations-toolbar { grid-template-columns: 1fr; }
  .table-pagination { align-items: stretch; flex-direction: column; }
  .table-pagination > div { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-head, .modal-body { padding: 18px; }
}

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