:root {
  --navy-950: #091529;
  --navy-900: #10223d;
  --navy-800: #17355d;
  --blue-700: #165aa7;
  --blue-600: #1f6dc1;
  --blue-100: #eaf3ff;
  --teal-600: #0a8a7a;
  --teal-100: #e7f8f5;
  --amber-700: #9a5b00;
  --amber-100: #fff6dc;
  --red-700: #b42318;
  --red-100: #fff0ee;
  --ink: #142033;
  --muted: #5e6b7d;
  --line: #d9e1ea;
  --line-strong: #c4cfdb;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --page: #edf2f7;
  --shadow: 0 12px 30px rgba(16, 34, 61, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --focus: 0 0 0 3px rgba(31, 109, 193, 0.24);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 109, 193, 0.08), transparent 28rem),
    var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

code {
  padding: 0.08rem 0.3rem;
  border-radius: 5px;
  background: #edf1f6;
  color: #263750;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10000;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--navy-950);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  color: white;
  background:
    linear-gradient(110deg, rgba(22, 90, 167, 0.24), transparent 54%),
    var(--navy-950);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: min(1440px, calc(100% - 2rem));
  min-height: 104px;
  margin: 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 15px;
  background: rgba(255,255,255,0.09);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.eyebrow, .section-kicker {
  margin: 0 0 0.15rem;
  color: #9ecbff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 850px;
  margin: 0.18rem 0 0;
  color: #c9d7e8;
  font-size: 0.92rem;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: max-content;
  padding: 0.52rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  color: #dbe7f5;
  background: rgba(255,255,255,0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f1b24a;
  box-shadow: 0 0 0 4px rgba(241, 178, 74, 0.15);
}

.connection-pill.is-ok .status-dot { background: #49d1b7; box-shadow: 0 0 0 4px rgba(73,209,183,.16); }
.connection-pill.is-error .status-dot { background: #ff847a; box-shadow: 0 0 0 4px rgba(255,132,122,.15); }

.page-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 1.25rem auto 4rem;
}

.journey-strip {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.journey-strip ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-strip li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 72px;
  padding: 0.8rem 1rem;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.journey-strip li:last-child { border-right: 0; }
.journey-strip li::after {
  position: absolute;
  right: -6px;
  z-index: 2;
  width: 10px;
  height: 10px;
  content: "";
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: inherit;
  transform: rotate(45deg);
}
.journey-strip li:last-child::after { display: none; }
.journey-strip li.is-current { color: var(--navy-900); background: var(--blue-100); }
.journey-strip li.is-complete { color: #0b675c; background: var(--teal-100); }

.step-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: white;
  font-size: 0.78rem;
  font-weight: 800;
}
.is-current .step-number { color: white; border-color: var(--blue-600); background: var(--blue-600); }
.is-complete .step-number { color: white; border-color: var(--teal-600); background: var(--teal-600); }
.journey-strip strong, .journey-strip small { display: block; }
.journey-strip strong { font-size: 0.88rem; }
.journey-strip small { margin-top: 0.05rem; font-size: 0.72rem; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 1rem;
}

.main-column, .side-column { display: grid; gap: 1rem; min-width: 0; }
.side-column > * { min-width: 0; max-width: 100%; }

.panel {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading.compact { align-items: center; }
.panel-heading h2 { margin: 0; color: var(--navy-900); font-size: 1.16rem; letter-spacing: -0.012em; }
.panel-heading p:not(.section-kicker) { max-width: 760px; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.87rem; }
.section-kicker { color: var(--blue-700); }

.method-badge, .meta-badge {
  flex: 0 0 auto;
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.025em;
}
.method-badge.get { color: #145498; background: var(--blue-100); }
.method-badge.post { color: #087466; background: var(--teal-100); }
.meta-badge { color: #526176; background: #edf1f6; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.connection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }

.merchant-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.7rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #b8d4cd;
  border-radius: var(--radius-sm);
  background: #f3fbf8;
}
.merchant-summary-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: white; background: var(--teal-600); font-size: 0.78rem; font-weight: 900; }
.merchant-summary-content { min-width: 0; }
.merchant-summary small, .merchant-summary strong, .merchant-summary code { display: block; }
.merchant-summary small { color: var(--muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.merchant-summary strong { margin-top: 0.08rem; color: var(--navy-900); font-size: 0.88rem; }
.merchant-summary code { margin-top: 0.08rem; overflow: hidden; color: #526176; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.merchant-badge { padding: 0.3rem 0.5rem; border-radius: 999px; color: #0b675c; background: #d8f2eb; font-size: 0.67rem; font-weight: 900; }
.merchant-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem 0.6rem; }
.merchant-details { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(120px, 0.65fr); gap: 0.55rem; margin: 0.7rem 0 0; }
.merchant-details div { min-width: 0; padding: 0.58rem 0.65rem; border: 1px solid #cfe3dd; border-radius: 8px; background: white; }
.merchant-details dt { color: var(--muted); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.055em; text-transform: uppercase; }
.merchant-details dd { margin: 0.16rem 0 0; overflow: hidden; color: var(--navy-900); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.7rem; font-weight: 650; overflow-wrap: anywhere; }
.merchant-summary-actions { display: grid; justify-items: end; gap: 0.5rem; }
.merchant-default-button { min-height: 32px; padding: 0.3rem 0.5rem; border: 1px solid #9eb9d7; background: white; white-space: nowrap; }
.merchant-accounts { padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.merchant-accounts-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.merchant-accounts-heading h3 { margin: 0; color: var(--navy-900); font-size: 0.9rem; }
.merchant-accounts-heading p { margin: 0.12rem 0 0; color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.merchant-account-list { display: grid; gap: 0.55rem; }
.merchant-account-card { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-width: 0; padding: 0.68rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: white; }
.merchant-account-card.is-current { border-color: #80c4b7; box-shadow: inset 3px 0 0 var(--teal-600); }
.merchant-account-copy { display: flex; align-items: baseline; flex-wrap: wrap; min-width: 0; gap: 0.18rem 0.55rem; }
.merchant-account-name { color: var(--navy-900); font-size: 0.82rem; font-weight: 850; }
.merchant-account-copy code { color: #526176; font-size: 0.67rem; }
.merchant-account-copy small { flex-basis: 100%; overflow: hidden; color: var(--muted); font-size: 0.68rem; font-weight: 450; overflow-wrap: anywhere; }
.merchant-account-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.5rem; }
.merchant-account-status { padding: 0.25rem 0.45rem; border-radius: 999px; color: #0b675c; background: #e4f5f0; font-size: 0.64rem; font-weight: 850; white-space: nowrap; }
.merchant-use-button { min-height: 32px; padding: 0.3rem 0.55rem; font-size: 0.7rem; }

.field { display: grid; align-content: start; gap: 0.32rem; min-width: 0; color: #28364a; font-size: 0.84rem; font-weight: 700; }
.field small, .field-hint { color: var(--muted); font-size: 0.74rem; font-weight: 400; line-height: 1.45; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: white;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input:focus, .field select:focus { border-color: var(--blue-600); box-shadow: var(--focus); }
.field input:disabled, .field select:disabled { color: #526176; background: #f0f3f7; cursor: not-allowed; }
.field.is-sensitive input { font-family: "SFMono-Regular", Consolas, monospace; }

.input-with-action { position: relative; display: block; }
.input-with-action input { padding-right: 4.2rem !important; }
.input-with-action .icon-button { position: absolute; top: 5px; right: 5px; min-height: 32px; padding: 0.25rem 0.55rem; }

.icon-button, .text-button {
  border: 0;
  border-radius: 7px;
  color: var(--blue-700);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}
.icon-button { min-width: 34px; min-height: 34px; border: 1px solid var(--line); background: var(--surface-soft); }
.icon-button:hover, .text-button:hover { color: var(--navy-900); background: var(--blue-100); }
.icon-button:focus-visible, .text-button:focus-visible, .button:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-button:disabled { opacity: 0.45; cursor: not-allowed; }

.button-row, .workflow-actions, .section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.58rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 800;
  transition: transform 100ms ease, background 120ms ease, border-color 120ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: 0.48; cursor: not-allowed; }
.button.primary { color: white; background: var(--blue-600); border-color: var(--blue-600); }
.button.primary:hover:not(:disabled) { background: var(--blue-700); }
.button.secondary { color: var(--blue-700); background: white; border-color: #9eb9d7; }
.button.secondary:hover:not(:disabled) { background: var(--blue-100); }
.button.success { color: white; background: var(--teal-600); border-color: var(--teal-600); }
.button.danger { color: var(--red-700); background: white; border-color: #e6afa9; }
.button.inverse { color: var(--navy-950); background: white; border-color: white; }
.button.ghost-inverse { color: white; background: transparent; border-color: rgba(255,255,255,.4); }

.switch-control, .check-control, .radio-control {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.48rem;
  color: #344156;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
}
.switch-control { margin-left: auto; }
.switch-control input, .check-control input, .radio-control input { margin-top: 0.18rem; accent-color: var(--blue-600); }

.inline-message {
  margin-top: 0.9rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #334155;
  background: var(--surface-soft);
  font-size: 0.82rem;
  white-space: pre-wrap;
}
.inline-message.success { color: #0b675c; border-color: #9bd8cc; background: var(--teal-100); }
.inline-message.error { color: var(--red-700); border-color: #efb9b4; background: var(--red-100); }
.inline-message.info { color: #145498; border-color: #b6d3f4; background: var(--blue-100); }

.check-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.check-item { display: flex; align-items: center; gap: 0.55rem; padding: 0.62rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); font-size: 0.76rem; }
.check-item strong, .check-item small { display: block; }
.check-item small { color: var(--muted); }
.check-symbol { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 900; }
.check-item.ok .check-symbol { color: white; background: var(--teal-600); }
.check-item.error .check-symbol { color: white; background: var(--red-700); }
.check-item.pending .check-symbol { color: var(--amber-700); background: var(--amber-100); }

.merchant-onboarding {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #aac4e1;
  border-radius: var(--radius-md);
  background: #fbfdff;
}
.merchant-onboarding > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  list-style: none;
  cursor: pointer;
  color: var(--blue-700);
  background: var(--blue-100);
}
.merchant-onboarding > summary::-webkit-details-marker { display: none; }
.merchant-onboarding > summary::after { content: "+"; font-size: 1.1rem; font-weight: 900; }
.merchant-onboarding[open] > summary::after { content: "−"; }
.merchant-onboarding > summary strong, .merchant-onboarding > summary small { display: block; }
.merchant-onboarding > summary strong { font-size: 0.88rem; }
.merchant-onboarding > summary small { margin-top: 0.08rem; color: var(--muted); font-size: 0.73rem; font-weight: 400; }
.merchant-onboarding-body { padding: 1rem; border-top: 1px solid #c9dbed; }
.merchant-onboarding-body > p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.merchant-grid { margin-top: 0.9rem; }
.merchant-actions { margin-top: 0; }
.security-note {
  padding: 0.7rem 0.8rem;
  border: 1px solid #ead198;
  border-radius: var(--radius-sm);
  color: #704712;
  background: var(--amber-100);
  font-size: 0.76rem;
  line-height: 1.45;
}
.merchant-auth-note { margin: 0.75rem 0 0 !important; font-size: 0.72rem !important; }

.schema-sections { display: grid; gap: 0.8rem; }

.schema-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}
.schema-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  list-style: none;
  cursor: pointer;
  background: #fbfcfe;
}
.schema-card summary::-webkit-details-marker { display: none; }
.schema-card summary::after { content: "+"; color: var(--blue-700); font-size: 1.1rem; font-weight: 800; }
.schema-card[open] summary::after { content: "−"; }
.schema-card summary:hover { background: var(--blue-100); }
.schema-card-title { min-width: 0; }
.schema-card-title strong { display: block; color: var(--navy-900); font-size: 0.92rem; }
.schema-card-title small { display: block; margin-top: 0.1rem; overflow: hidden; color: var(--muted); font-size: 0.74rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.schema-card-body { padding: 1rem; border-top: 1px solid var(--line); }
.schema-card-body > .form-grid + .form-grid { margin-top: 0.85rem; }

.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-bottom: 0.8rem; }
.option-card { display: flex; gap: 0.55rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); cursor: pointer; }
.option-card:has(input:checked) { border-color: #80afe2; background: var(--blue-100); }
.option-card input { margin-top: 0.18rem; accent-color: var(--blue-600); }
.option-card strong, .option-card small { display: block; }
.option-card strong { font-size: 0.8rem; }
.option-card small { margin-top: 0.08rem; color: var(--muted); font-size: 0.7rem; }

.display-value, .info-value {
  min-height: 42px;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #39475a;
  background: var(--surface-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.info-value { grid-column: 1 / -1; min-height: auto; color: var(--muted); font-family: inherit; }

.skeleton-card {
  height: 118px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 37%, #edf1f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skeleton-card.short { height: 82px; }

.empty-state {
  margin: 0;
  padding: 1rem 1.1rem;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.session-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #ead198;
  border-radius: 11px;
  color: #704712;
  background: var(--amber-100);
}
.session-banner.success { color: #0b675c; border-color: #9bd8cc; background: var(--teal-100); }
.session-banner.info { color: #145498; border-color: #b6d3f4; background: var(--blue-100); }
.session-banner.error { color: var(--red-700); border-color: #efb9b4; background: var(--red-100); }
.session-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: white; background: currentColor; font-size: 0; }
.session-icon::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: white; }
.session-banner strong { display: block; font-size: 0.88rem; }
.session-banner p { margin: 0.14rem 0 0; font-size: 0.77rem; }
.workflow-actions { padding-top: 0.25rem; }
.results-fallback { margin-top: 0.75rem; }

.sticky-panel { position: sticky; top: 1rem; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; margin: 0; }
.status-grid div { min-width: 0; padding: 0.6rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.status-grid dt { color: var(--muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.status-grid dd { margin: 0.1rem 0 0; overflow: hidden; color: var(--navy-900); font-size: 0.78rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.status-grid dd.yes { color: var(--teal-600); }
.status-grid dd.no { color: var(--muted); }
.poll-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.72rem; }

.request-log { display: grid; gap: 0.45rem; max-height: 530px; overflow: auto; padding-right: 0.15rem; }
.empty-log { margin: 0; padding: 1rem 0; color: var(--muted); font-size: 0.78rem; text-align: center; }
.log-entry { padding: 0.65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.log-entry.is-error { border-color: #efb9b4; background: var(--red-100); }
.log-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.log-entry-head strong { min-width: 0; overflow: hidden; color: var(--navy-900); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.log-entry-head time { flex: 0 0 auto; color: var(--muted); font-size: 0.64rem; }
.log-entry p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.7rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.log-status { display: inline-block; margin-right: 0.35rem; padding: 0.08rem 0.3rem; border-radius: 4px; color: white; background: var(--teal-600); font-size: 0.62rem; }
.is-error .log-status { background: var(--red-700); }

.live-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  padding: 0.65rem;
  background: rgba(3, 11, 24, 0.88);
  backdrop-filter: blur(5px);
}
.live-modal:not([hidden]) { display: grid; }
.live-window { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: #050a12; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.live-toolbar { display: grid; grid-template-columns: auto minmax(200px, 1fr) auto auto; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem; color: white; background: var(--navy-950); }
.live-toolbar strong, .live-badge { display: block; }
.live-toolbar strong { margin-top: 0.12rem; font-size: 0.88rem; }
.live-badge { color: #f9c55b; font-size: 0.62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.live-toolbar p { margin: 0; color: #bac9da; font-size: 0.72rem; }
.live-window iframe { width: 100%; height: 100%; min-height: 0; border: 0; background: #000; }

.noscript-message { position: fixed; inset: auto 1rem 1rem; z-index: 9999; padding: 1rem; border-radius: 10px; color: white; background: var(--red-700); }

@media (max-width: 1050px) {
  .content-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-panel { position: static; }
  .request-log { max-height: 330px; }
}

@media (max-width: 760px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr); min-height: 94px; }
  .connection-pill { grid-column: 1 / -1; justify-self: start; margin: -0.4rem 0 0.65rem 4.2rem; }
  .journey-strip { overflow-x: auto; }
  .journey-strip ol { min-width: 650px; }
  .content-grid, .side-column { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .connection-grid, .option-grid, .check-results { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .merchant-summary { grid-template-columns: auto minmax(0, 1fr); }
  .merchant-summary-actions { grid-column: 2; justify-items: start; }
  .merchant-details { grid-template-columns: minmax(0, 1fr); }
  .merchant-account-card { align-items: flex-start; flex-direction: column; }
  .merchant-account-card-actions { width: 100%; justify-content: space-between; }
  .switch-control { width: 100%; margin-left: 0; }
  .live-toolbar { grid-template-columns: 1fr auto; }
  .live-toolbar p { grid-column: 1 / -1; grid-row: 2; }
  .live-toolbar .button { min-height: 36px; padding: 0.42rem 0.6rem; font-size: 0.72rem; }
}

@media (max-width: 480px) {
  .header-inner, .page-shell { width: min(100% - 1rem, 1440px); }
  .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
  .connection-pill { margin-left: 3.65rem; }
  .panel { padding: 1rem; border-radius: 14px; }
  .status-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-heading { display: grid; }
  .method-badge, .meta-badge { justify-self: start; }
  .workflow-actions .button, .section-actions .button { width: 100%; }
  .live-modal { padding: 0; }
  .live-window { border-radius: 0; }
}

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