/* ─────────────────────────────────────────────────────────────
   PayBridge Demo Suite — Layout & Components (on-brand redesign)
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
code { font-family: var(--font-mono); }

.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 22px;
  padding: 0 22px; height: 58px; flex: none;
  background: #100b0a; color: #f7f3ec; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-size: 13px; transition: background .3s ease;
}
.brand-word { font-family: var(--font-display); font-size: 21px; letter-spacing: .04em; }
.brand-sub {
  font-size: 10.5px; font-weight: 500; color: #9b948a; text-transform: uppercase; letter-spacing: .1em;
  padding-left: 12px; border-left: 1px solid #2c2622;
}

.vertical-pills { display: flex; gap: 4px; margin: 0 auto; background: #1c1613; border-radius: 999px; padding: 4px; }
.vertical-pills button {
  border: 0; background: transparent; color: #b3aca1;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: all .15s ease;
}
.vertical-pills button .vp-dot { width: 8px; height: 8px; border-radius: 50%; }
.vertical-pills button:hover { color: #f7f3ec; }
.vertical-pills button.active { background: #302722; color: #fff; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.env-switch { display: flex; background: #1c1613; border-radius: 999px; padding: 3px; }
.env-switch button {
  border: 0; background: transparent; color: #9b948a;
  padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; transition: all .15s ease;
}
.env-switch button.active { background: var(--accent); color: var(--on-accent); }

.status-ind {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  padding: 7px 13px; border-radius: 999px; background: var(--eng-surface, #1c1613); color: #b3aca1;
  min-width: 150px; justify-content: center;
  margin-left: auto; /* sits at the right edge of the engine-room tab bar */
}
.status-ind .si-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status-ind.idle       { color: #9b948a; }
.status-ind.drafting   { color: #d8b46b; }
.status-ind.processing { color: #6fb0ff; }
.status-ind.processing .si-dot { animation: pulse 1s ease-in-out infinite; }
.status-ind.ok     { color: #4fd08a; background: rgba(18,183,106,.12); }
.status-ind.action { color: #f0b45c; background: rgba(245,158,11,.12); }
.status-ind.error  { color: #ff7a7a; background: rgba(239,68,68,.12); }
@keyframes pulse { 50% { opacity: .35; } }

/* ── Sub bar ─────────────────────────────────────────────── */
.subbar {
  display: flex; align-items: center; gap: 16px;
  padding: 9px 22px; flex: none;
  background: #1a1512; border-bottom: 1px solid #000; color: #cfc8bd;
}
.model-switch { display: flex; background: #100b0a; border-radius: var(--r-sm); padding: 3px; }
.model-btn {
  border: 0; background: transparent; color: #9b948a;
  padding: 7px 13px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; transition: all .15s ease;
}
.model-btn:hover { color: #f7f3ec; }
.model-btn.active { background: #2c2622; color: #fff; }
.mb-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; background: #3a322c; color: #cfc8bd;
}
.model-btn.active .mb-tag { background: var(--accent); color: var(--on-accent); }
.model-desc { font-size: 11.5px; color: #8b8578; }

/* ── Split panels ────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; flex: 1; min-height: 0; }
.pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pane-left  { background: var(--paper); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; }
/* Always top-anchored: iframes and screens change the card's height, and
   vertical centering would slide the chrome/URL bar with every change. */
.pane-left > .browser { margin: 0 auto; }
.pane-right { background: var(--eng-bg); border-left: 1px solid #000; min-height: 0; }

/* ── Browser frame (left) ────────────────────────────────── */
.browser {
  width: 100%; max-width: 470px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden;
  /* no width transition — an animated resize slides the chrome/URL bar around */
}
/* Iframe-heavy flows (inline 3DS + Rapyd toolkit) render wider/taller than the
   470px checkout card, so let them expand to the pane and shed body padding.
   Classes are toggled from JS — :has() invalidation is unreliable across the
   container-type boundary on .browser-body. */
.browser.wide-3ds { max-width: 640px; }
.browser.wide-tk { max-width: 980px; }
.browser.wide-3ds .browser-body { padding: 18px; }
/* toolkit stage runs edge-to-edge: the two-tone columns own their padding */
.browser.wide-tk .browser-body { padding: 0; }
.browser-body { position: relative; container-type: inline-size; }
#rapyd-checkout { min-width: min(500px, 100%); }  /* toolkit needs ≥500px to lay out */
#rapyd-checkout, #rapyd-checkout iframe { width: 100% !important; max-width: 100%; }
.browser-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.browser-chrome .dot { width: 11px; height: 11px; border-radius: 50%; }
.browser-chrome .dot.r { background: #ff5f57; }
.browser-chrome .dot.y { background: #febc2e; }
.browser-chrome .dot.g { background: #28c840; }
.urlbar {
  flex: 1; display: flex; align-items: center; gap: 7px; margin: 0 6px;
  /* fixed cap so the chrome reads the same at every card width */
  max-width: 340px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 12px; color: var(--ink-2); font-family: var(--font-mono);
}
.urlbar .lock { font-size: 10px; }
.chrome-tag {
  margin-left: auto;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); background: var(--surface); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px;
}
.browser-body { padding: 20px 22px 22px; }

/* ── Checkout ────────────────────────────────────────────── */
.co-merchant { font-family: var(--font-display); font-size: 25px; letter-spacing: .02em; line-height: 1; color: var(--ink); }
.co-tagline { font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }

.co-order {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2);
}
.co-thumb { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 19px; color: #fff; }
.co-order-info { flex: 1; min-width: 0; }
.co-order-name { font-size: 14.5px; font-weight: 700; }
.co-order-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.co-order-price { font-family: var(--font-display); font-size: 20px; letter-spacing: .01em; }

.co-totals { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 14px; }
.co-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.co-line.total { font-size: 15px; color: var(--ink); font-weight: 700; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.co-line.total .co-total-amt { font-family: var(--font-display); font-size: 20px; font-weight: 400; }

.co-paylabel { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.co-paylabel .lbl { font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); }
.use-test { font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; }
.use-test:hover { text-decoration: underline; }

/* Fields */
.co-field { margin-bottom: 10px; }
.co-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.co-input {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface);
  padding: 0 14px; height: 42px; transition: border-color .15s ease, box-shadow .15s ease;
}
.co-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.co-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); height: 100%; min-width: 0; }
.co-input input::placeholder { color: var(--ink-4); }
.co-input .field-ico { color: var(--ink-3); font-size: 15px; flex: none; }
.card-brand { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--accent); flex: none; }
.co-row { display: flex; gap: 12px; }
.co-row .co-field { flex: 1; }

.co-tds { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); margin: 4px 0 12px; cursor: pointer; user-select: none; }
.co-tds input { width: 16px; height: 16px; accent-color: var(--accent); }
.co-tds em { font-style: normal; color: var(--ink-4); }
.co-tds code { font-size: 11px; color: var(--accent); }

.co-cta {
  width: 100%; height: 48px; border: 0; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent);
  font-family: var(--font-display); font-size: 17px; letter-spacing: .03em;
  transition: filter .15s ease, transform .05s ease;
}
.co-cta:hover { filter: brightness(1.05); }
.co-cta:active { transform: translateY(1px); }
.co-cta:disabled { opacity: .45; cursor: not-allowed; }

.co-secure { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); margin-top: 15px; }
.co-secure b { color: var(--ink-2); }

/* Toolkit placeholder */
.co-toolkit { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 26px; text-align: center; background: var(--surface-2); }
.co-toolkit .tk-ico { font-size: 28px; }
.co-toolkit .tk-title { font-size: 14px; font-weight: 700; margin-top: 9px; }
.co-toolkit .tk-desc { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.co-toolkit em { color: var(--ink-4); }

/* ── Right: tabs ─────────────────────────────────────────── */
.rtabs {
  display: flex; align-items: center; gap: 2px; flex: none;
  padding: 0 16px; border-bottom: 1px solid var(--eng-line); background: var(--eng-bg);
}
.rtab {
  border: 0; background: transparent; color: var(--eng-muted);
  padding: 15px 15px 13px; font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s ease;
}
.rtab:hover { color: var(--eng-text); }
.rtab.active { color: var(--eng-text); border-bottom-color: var(--accent); }
.rtabs-meta { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--eng-faint); }

.rpanels { flex: 1; min-height: 0; position: relative; }
/* Everything in the engine room reads as technical output → monospace. */
.rpanel { display: none; position: absolute; inset: 0; overflow-y: auto; padding: 18px; font-family: var(--font-mono); }
.rpanel.active { display: block; }

/* ── Request panel ───────────────────────────────────────── */
/* method + endpoint on one line, with room to breathe before HEADERS */
.req-headline { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.method-pill { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; letter-spacing: .06em; }
/* colours mirror docs.rapyd.net: POST green · GET blue · DELETE red */
.method-pill.post   { background: rgba(18,183,106,.14);  color: #3ddc8a; }
.method-pill.get    { background: rgba(59,130,246,.16);  color: #6fa8ff; }
.method-pill.put,
.method-pill.patch  { background: rgba(245,158,11,.16);  color: #f0b45c; }
.method-pill.delete { background: rgba(239,68,68,.16);   color: #ff8a8a; }
.req-path { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--eng-text); word-break: break-all; }

.eng-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--eng-faint); margin: 0 0 8px; }
.req-headers {
  display: grid; grid-template-columns: max-content 1fr;
  column-gap: 18px; row-gap: 7px; align-items: baseline;
  padding: 13px 15px; margin-bottom: 18px;
  background: var(--eng-surface); border: 1px solid var(--eng-line); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 11.5px;
}
.req-headers .hk { color: var(--syn-key); white-space: nowrap; }
.req-headers .hv { color: var(--eng-muted); word-break: break-all; }
.req-bodylabel { display: flex; align-items: baseline; gap: 8px; }
.req-bodylabel .hint { font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--eng-faint); font-style: italic; }

/* ── JSON viewer (line-numbered) ─────────────────────────── */
.tok-key  { color: var(--syn-key); }
.tok-str  { color: var(--syn-str); }
.tok-num  { color: var(--syn-num); }
.tok-bool { color: var(--syn-bool); }
.tok-punc { color: var(--syn-punc); }

.jsonv { display: flex; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; border: 1px solid var(--eng-line); border-radius: var(--r-sm); background: var(--eng-bg); overflow: hidden; }
.jsonv-gutter { flex: none; text-align: right; padding: 11px 9px 11px 12px; color: var(--eng-faint); user-select: none; background: rgba(0,0,0,.18); border-right: 1px solid var(--eng-line); }
.jsonv-gutter span { display: block; }
.jsonv-body { flex: 1; min-width: 0; overflow-x: auto; padding: 11px 13px; }
.jsonv-line { white-space: pre; color: var(--eng-text); }
/* full-row field↔JSON highlight, Claude Code style: tinted line + coloured
   gutter number. The body row bleeds edge-to-edge via negative margins. */
.jsonv-line { transition: background .12s ease; margin: 0 -13px; padding: 0 13px; }
.jsonv-line.sync-hit { background: var(--sync-hl); box-shadow: inset 3px 0 0 var(--sync-edge); }
.jsonv-gutter span { transition: background .12s ease, color .12s ease; margin: 0 -9px 0 -12px; padding: 0 9px 0 12px; }
.jsonv-gutter span.sync-hit { background: var(--sync-hl); color: var(--sync-edge); font-weight: 700; }
.jv-empty { color: var(--eng-faint); }

/* ── Empty / sending states ──────────────────────────────── */
.eng-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; text-align: center; }
.eng-empty .ee-ico { font-size: 24px; opacity: .5; }
.eng-empty .ee-text { font-size: 12.5px; color: var(--eng-faint); line-height: 1.55; max-width: 320px; }
.eng-empty code { font-size: 11.5px; color: var(--eng-muted); }
.eng-sending { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 44px 20px; font-size: 13px; color: var(--eng-muted); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--eng-line); border-top-color: var(--info); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Response panel ──────────────────────────────────────── */
.resp-http { font-family: var(--font-mono); font-size: 12px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.resp-http .rc { padding: 3px 9px; border-radius: 5px; }
.resp-http.ok .rc  { background: rgba(18,183,106,.16); color: #4fd08a; }
.resp-http.err .rc { background: rgba(239,68,68,.16); color: #ff8a8a; }

/* ── Webhooks panel ──────────────────────────────────────── */
.wh-hint { padding: 13px 15px; border-radius: var(--r-sm); border: 1px solid var(--eng-line); background: var(--eng-surface); }
.wh-hint.ok  { border-left: 3px solid var(--ok); }
.wh-hint.err { border-left: 3px solid var(--err); }
.wh-evt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--eng-text); }
.wh-desc { font-size: 11.5px; color: var(--eng-muted); margin-top: 5px; line-height: 1.5; }
.wh-desc em { color: var(--eng-faint); }
.wh-desc code, .tds-desc code { font-size: 10.5px; color: var(--syn-num); }
.tds-prompt { padding: 15px; border-radius: var(--r-sm); border: 1px solid var(--eng-line); border-left: 3px solid var(--warn); background: var(--eng-surface); }
.tds-title { font-size: 13.5px; font-weight: 700; color: var(--eng-text); }
.tds-desc { font-size: 12px; color: var(--eng-muted); margin: 6px 0 13px; line-height: 1.55; }
.mini-cta { border: 0; border-radius: var(--r-sm); background: var(--warn); color: #2a1c05; font-size: 12px; font-weight: 700; padding: 9px 15px; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 22px; border-radius: 10px; z-index: 999;
  font-size: 13px; font-weight: 600; color: #fff; background: #17140f;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease;
}
.toast-err { background: var(--err); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── Toolkit flow (left) ─────────────────────────────────── */
.tk-note { font-size: 12px; color: var(--ink-3); line-height: 1.5; margin-bottom: 14px; }
.tk-note b { color: var(--ink-2); }
#rapyd-checkout { min-height: 120px; }

/* Toolkit config — grouped panel in the payment column (row grammar:
   human label + dimmed param left, control right), swapped for the
   toolkit iframe on render */
.tk-config {
  display: flex; flex-direction: column; min-height: 100%;
  background: var(--eng-bg); border: 1px solid var(--eng-line); border-radius: var(--r-md);
  padding: 13px 16px 16px;
}
.tkc-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--eng-line); }
.tkc-title { color: var(--eng-muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.tkc-hint { margin-left: auto; color: var(--eng-faint); font-size: 10px; font-family: var(--font-mono); }
.tkc-sec { padding: 13px 0 2px; border-bottom: 1px solid var(--eng-line); }
.tkc-sec:last-of-type { border-bottom: 0; }
.tkc-sec[hidden] { display: none; }
.tkc-sec-label { display: flex; align-items: baseline; color: var(--eng-faint); font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 10px; }
.tkc-sec-hint { margin-left: auto; font-family: var(--font-mono); font-size: 9px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.tkc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.tkc-row[hidden] { display: none; }
.tkc-lab { font-size: 12.5px; font-weight: 600; color: var(--eng-text); line-height: 1.25; min-width: 0; }
/* long unbreakable params (digital_wallets_buttons_customization.apple_pay)
   must wrap, or the label's min-content width pushes the controls out of the panel */
.tkc-lab code { display: block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; color: var(--eng-faint); margin-top: 2px; overflow-wrap: anywhere; }
.tkc-seg { display: flex; gap: 2px; background: var(--eng-surface); border: 1px solid var(--eng-line); border-radius: 8px; padding: 2px; flex: none; }
.tkc-sec > .tkc-seg { width: 100%; margin-bottom: 11px; }
.tkc-seg button {
  flex: 1; border: 0; background: transparent; color: var(--eng-muted);
  padding: 6px 12px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; transition: all .12s ease;
}
.tkc-seg button:hover { color: var(--eng-text); }
.tkc-seg button.active { background: var(--eng-surface-2); color: var(--eng-text); }
.tkc-wallet { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--eng-text); }
.dw-logo { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.dw-logo.apple { background: #000; border: 1px solid var(--eng-line); }
.dw-logo.google { background: #fff; }
.tkc-selects { display: flex; gap: 6px; flex: 1; max-width: 240px; }
.tkc-switch-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tkc-switch {
  appearance: none; width: 34px; height: 19px; margin: 0; cursor: pointer; position: relative;
  border-radius: 999px; background: var(--eng-surface-2); border: 1px solid var(--eng-line);
  transition: background .15s ease, border-color .15s ease;
}
.tkc-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--eng-muted); transition: left .15s ease, background .15s ease;
}
.tkc-switch:checked { background: var(--accent); border-color: var(--accent); }
.tkc-switch:checked::after { left: 17px; background: #fff; }
.tkc-input {
  flex: 1; min-width: 0; max-width: 190px; border: 1px solid var(--eng-line); border-radius: 7px;
  background: var(--eng-surface); padding: 7px 10px; font-size: 11.5px; color: var(--eng-text);
  font-family: var(--font-mono);
}
.tkc-input:focus { outline: 0; border-color: var(--accent); }
.tkc-color {
  flex: none; width: 30px; height: 28px; padding: 2px; cursor: pointer;
  border: 1px solid var(--eng-line); border-radius: 7px; background: var(--eng-surface);
}
.tkc-colorfield { display: flex; align-items: center; gap: 6px; }
.tkc-hex { max-width: 90px; text-transform: uppercase; }
.tkc-wallet-custom { margin: -3px 0 11px 35px; }
.tkc-select {
  flex: 1; min-width: 0; border: 1px solid var(--eng-line); border-radius: 7px;
  background: var(--eng-surface); padding: 6px 8px; font-size: 11px; color: var(--eng-text);
  font-family: var(--font-mono);
}
.tkc-cta { margin-top: 16px; }

/* Two-tone checkout stage: tinted merchant summary | white Rapyd column.
   Columns stretch to match each other's real content height (no fixed floor —
   that left the config panel with dead space when its content was short).
   Both tracks are fr-based so they share growth; minimums fit a 14" MBP. */
.tk-checkout { display: grid; grid-template-columns: minmax(186px, 2fr) minmax(532px, 4.5fr); gap: 0; align-items: stretch; }
.tk-summary {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface-2); border-right: 1px solid var(--line);
  padding: 20px 18px;
}
.tk-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; letter-spacing: .02em; }
.tk-brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-size: 15px;
}
.tk-sum-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 9px; }
.tk-summary .co-order { background: var(--surface); margin: 0 0 12px; }
.co-line .free { color: #129e63; font-weight: 600; }
.tk-secure { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.tk-secure-head { font-size: 12px; font-weight: 700; }
.tk-secure p { font-size: 11px; color: var(--ink-3); line-height: 1.5; margin: 7px 0 10px; }
.tk-badges { display: flex; gap: 6px; align-items: center; }
.tk-badges span { font-size: 8.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 4px; }
.b-visa { background: #1a1f71; color: #fff; }
.b-mc { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); padding: 4px 6px !important; }
.b-mc i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.b-mc i:first-child { background: #eb001b; }
.b-mc i:last-child { background: #f79e1b; margin-left: -4px; }
/* 16px sides: 532px track − 32 = 500px, the toolkit's minimum */
.tk-paycol { min-width: 0; padding: 16px; }
.tk-paycol .co-cta { margin-top: 12px; }
@container (max-width: 717px) {
  .tk-checkout { grid-template-columns: 1fr; min-height: 0; }
  .tk-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .tk-secure { margin-top: 14px; }
}

/* optional SE controls deck below the client site (unused by current flows) */
.demo-controls {
  width: 100%; max-width: 980px; margin: 14px auto 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 13px 16px 15px;
}

.tk-redirect { text-align: center; padding: 8px 0; }
.tk-redirect-title { font-size: 15px; font-weight: 700; }
.tk-redirect-desc { font-size: 12px; color: var(--ink-3); line-height: 1.5; margin: 7px 0 15px; }

/* ── Console (right) — terminal log, tag-per-line ────────── */
.tk-console {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.9;
  background: var(--eng-bg); border: 1px solid var(--eng-line); border-radius: var(--r-sm);
  padding: 12px 14px;
}
.cl-line { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.cl-time { color: var(--eng-faint); flex: none; }
.cl-tag {
  flex: none; width: 34px; font-weight: 700; text-transform: lowercase;
}
.cl-tag.cl-sys  { color: var(--eng-muted); }
.cl-tag.cl-app  { color: #6fa8ff; }
.cl-tag.cl-api  { color: #4fd08a; }
.cl-tag.cl-tk   { color: #f0b45c; }
.cl-tag.cl-poll { color: var(--eng-faint); }
.cl-msg { color: var(--eng-text); overflow: hidden; text-overflow: ellipsis; }
.cl-msg.cl-ok  { color: #4fd08a; }
.cl-msg.cl-err { color: #ff8a8a; }
.cl-msg.cl-action { color: #f0b45c; }
.cl-detail { color: var(--eng-muted); }
.cl-cursor { color: var(--eng-faint); animation: cl-blink 1s step-end infinite; }
@keyframes cl-blink { 50% { opacity: 0; } }

/* ── Webhooks panel (Phase 4) ────────────────────────────── */
.wh-status {
  display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600;
  color: var(--eng-muted); margin-bottom: 14px;
}
.wh-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--eng-faint); }
.wh-status.live { color: var(--eng-text); }
.wh-status.live .wh-status-dot { background: var(--info); animation: pulse 1s ease-in-out infinite; }
.wh-status .wh-ref { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--eng-faint); }

.wh-note {
  font-size: 11.5px; color: var(--eng-muted); line-height: 1.5; margin-bottom: 14px;
  padding: 11px 13px; border-radius: var(--r-sm); border: 1px solid var(--eng-line);
  border-left: 3px solid var(--warn); background: var(--eng-surface);
}
.wh-note code { color: var(--syn-num); }

.wh-waiting { font-size: 12px; color: var(--eng-faint); padding: 18px 0; text-align: center; font-style: italic; }
.wh-waiting code { color: var(--eng-muted); font-style: normal; }

/* pill row — response + webhook parity */
.eng-pillrow { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.wh-pill { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: .03em; background: var(--eng-surface-2); color: var(--eng-muted); }
.wh-pill.evt { color: var(--eng-text); }
.wh-pill.success { background: rgba(18,183,106,.16); color: #4fd08a; }
.wh-pill.failure { background: rgba(239,68,68,.16); color: #ff8a8a; }
.wh-pill.pending { background: rgba(245,158,11,.16); color: #f0b45c; }
.wh-pill.field { font-weight: 500; }

/* expandable webhook cards */
.wh-card { border: 1px solid var(--eng-line); border-radius: var(--r-sm); background: var(--eng-surface); margin-bottom: 8px; overflow: hidden; border-left: 3px solid var(--eng-faint); }
.wh-card.success { border-left-color: var(--ok); }
.wh-card.failure { border-left-color: var(--err); }
.wh-card.pending { border-left-color: var(--warn); }
.wh-card-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 13px; flex-wrap: wrap; }
.wh-card-head::-webkit-details-marker { display: none; }
.wh-chev { color: var(--eng-faint); font-size: 10px; transition: transform .15s ease; }
details[open] .wh-chev { transform: rotate(90deg); }
.wh-verify { margin-left: auto; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--eng-surface-2); color: var(--eng-muted); }
.wh-verify.ok { background: rgba(18,183,106,.16); color: #4fd08a; }
.wh-verify.warn { background: rgba(245,158,11,.16); color: #f0b45c; }
.wh-card-json { padding: 0 13px 13px; }

.wh-fallback { margin-top: 14px; padding: 12px 13px; border-radius: var(--r-sm); background: var(--eng-surface); border: 1px dashed var(--eng-line); font-size: 12px; color: var(--eng-muted); }
.wh-fallback-tag { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 5px; background: var(--eng-surface-2); color: var(--eng-muted); margin-right: 8px; }
.wh-fallback code { font-family: var(--font-mono); font-size: 11px; color: var(--syn-num); }
.wh-fallback-note { font-size: 10.5px; color: var(--eng-faint); margin-top: 6px; }

/* ── Left-panel screens: processing / 3DS / success / error ── */
.screen { text-align: center; padding: 34px 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.screen-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; margin-bottom: 6px; }
.screen-badge { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: #fff; margin-bottom: 4px; }
.screen-badge.ok { background: linear-gradient(135deg, #12b76a, #0e9f5b); box-shadow: 0 8px 24px rgba(18,183,106,.35); }
.screen-badge.err { background: linear-gradient(135deg, #f04438, #d92d20); box-shadow: 0 8px 24px rgba(240,68,56,.32); }
.screen-title { font-family: var(--font-display); font-size: 26px; letter-spacing: .02em; }
.screen-sub { font-size: 13px; color: var(--ink-3); }
.screen-hint { font-size: 11.5px; color: var(--ink-4); max-width: 290px; margin-top: 2px; line-height: 1.45; }
.screen-facts { width: 100%; margin: 16px 0 4px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.screen-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 13px; font-size: 12px; border-bottom: 1px solid var(--line); }
.screen-facts > div:last-child { border-bottom: 0; }
.screen-facts span { color: var(--ink-3); flex: none; }
.screen-facts code { font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--surface-2); padding: 2px 7px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen .co-cta { margin-top: 8px; }

/* next-step callout on the success screen */
.screen-next {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; margin-top: 4px; max-width: 360px;
}

/* out-of-window annotations below the client site */
.offstage { width: 100%; max-width: 470px; margin: 12px auto 0; }
.browser.wide-tk ~ .offstage { max-width: 980px; }

/* customer's bank-app view (standalone, outside the window) */
.bank-view { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-align: left; }
.bank-view-label { font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); margin: 1px 2px 8px; }
.bank-view-label code { font-family: var(--font-mono); font-size: 9.5px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.bank-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 3px rgba(23,20,15,.06);
}
.bank-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 16px; font-weight: 700;
  background: #e8ebfd; color: #4f6bed;
}
.bank-info { min-width: 0; }
.bank-desc { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bank-date { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.bank-amt { margin-left: auto; text-align: right; flex: none; }
.bank-amt-main { font-size: 14.5px; font-weight: 800; white-space: nowrap; }
.bank-amt-fx { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }

.screen-3ds { display: flex; flex-direction: column; min-height: 0; }
.screen-3ds-bar { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px; }
.tds-lock { font-size: 22px; }
.screen-3ds-title { font-size: 15px; font-weight: 700; }
.screen-3ds-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* Height tracks the viewport so the whole Rapyd 3DS simulator (incl. its
   buttons) is visible without zooming out — 290px ≈ everything above/around
   the iframe (bars, chrome, paddings), so the card centers fully in view. */
.tds-frame { flex: none; display: block; width: 100%; margin: 0 auto; height: clamp(480px, calc(100vh - 290px), 820px); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 940px) {
  .split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .pane-right { border-left: 0; border-top: 1px solid #000; }
  .vertical-pills { margin: 0; }
  .brand-sub { display: none; }
}

/* ═════════════════════════════════════════════════════════════
   Design refresh — "Checkout Success.dc.html" (Claude Design).
   Left panel only: Hanken Grotesk, 24px cards, animated badges,
   click-to-copy facts, gradient CTAs, recolored config panel.
   Appended as an override layer; the engine room keeps its base.
   ═════════════════════════════════════════════════════════════ */

@keyframes cs-pop { 0% { transform: scale(.4); opacity: 0; } 55% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes cs-ring { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes cs-check { 0% { stroke-dashoffset: 32; } 100% { stroke-dashoffset: 0; } }
@keyframes cs-rise { 0% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.rise-1 { animation: cs-rise .5s ease-out .15s both; }
.rise-2 { animation: cs-rise .5s ease-out .22s both; }
.rise-3 { animation: cs-rise .5s ease-out .28s both; }
.rise-4 { animation: cs-rise .5s ease-out .34s both; }
.rise-5 { animation: cs-rise .5s ease-out .40s both; }
.rise-6 { animation: cs-rise .5s ease-out .48s both; }

.pane-left { background: #e9e6df; font-family: 'Hanken Grotesk', var(--font-sans), sans-serif; }
/* Never flex-shrink the card/annotations: a compressed card clips its own
   content via overflow:hidden instead of letting the pane scroll. */
.pane-left > * { flex-shrink: 0; }
.pane-left .browser {
  border: 0; border-radius: 24px;
  box-shadow: 0 1px 2px rgba(30,20,10,.05), 0 24px 60px -20px rgba(30,20,10,.22);
}

/* chrome bar */
.browser-chrome { gap: 14px; padding: 15px 18px; background: #fff; border-bottom: 1px solid #f0eee9; }
.browser-chrome .dot { width: 12px; height: 12px; }
.urlbar {
  justify-content: center; height: 34px; max-width: none; margin: 0;
  background: #f4f2ee; border: 0; border-radius: 9px;
  font-family: inherit; font-size: 13.5px; color: #4a463f;
}
.chrome-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #8a857b;
  background: transparent; border: 1px solid #e3e0d9; border-radius: 8px; padding: 7px 11px;
}
.browser-body { padding: 26px 30px 28px; }
.browser.wide-tk .browser-body { padding: 0; }
/* 3DS: the simulator page needs a ≥610px viewport to centre its ~545px card,
   so the iframe runs the full card width edge-to-edge — the simulator's own
   page margins do the framing. */
.browser.wide-3ds { max-width: 680px; }
.browser.wide-3ds .browser-body { padding: 20px 0 10px; }
.browser.wide-3ds .screen-3ds-bar { padding: 0 22px 16px; }
.tds-frame { height: clamp(380px, calc(100vh - 400px), 460px); }

/* checkout (PCI flow) */
.co-merchant { font-family: inherit; font-size: 27px; font-weight: 800; letter-spacing: -.01em; color: #191714; }
.co-tagline { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .11em; color: #a8a297; margin-top: 6px; }
.co-order { gap: 14px; margin: 22px 0 0; padding: 14px 16px; background: #faf8f4; border: 1px solid #efece5; border-radius: 14px; }
.co-thumb { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; }
.co-order-name { font-size: 15.5px; font-weight: 700; color: #211e19; }
.co-order-desc { font-size: 12.5px; color: #a29d93; }
.co-order-price { font-family: inherit; font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: #211e19; }
.co-totals { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #eeebe4; }
.co-line { font-size: 14.5px; color: #5b564d; margin-bottom: 8px; }
.co-line .free { color: #22a55a; font-weight: 600; }
.co-line.total { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eeebe4; font-size: 17px; font-weight: 800; color: #191714; }
.co-line.total .co-total-amt { font-family: inherit; font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.co-paylabel { margin: 24px 0 0; }
.co-paylabel .lbl { font-size: 11px; letter-spacing: .11em; color: #a8a297; }
.use-test { font-size: 13px; font-weight: 600; }
.co-field { margin-bottom: 0; }
.co-field label { font-size: 13px; font-weight: 600; color: #3f3b34; margin: 13px 0 7px; }
.co-row { gap: 14px; }
/* flex min-width:auto would let the inputs' intrinsic width overflow the card */
.co-row .co-field { min-width: 0; }
.co-input { height: 52px; padding: 0 16px; border: 1.5px solid #e6e2da; border-radius: 12px; }
.co-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.co-input input { font-family: var(--font-mono); font-size: 15px; color: #211e19; }
.co-input input#f-name { font-family: inherit; }
.co-tds { gap: 11px; margin: 20px 0 0; font-size: 14px; color: #4a463f; }
.co-tds input {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0;
  border-radius: 6px; border: 1.5px solid #cfcabf; background: #fff;
  position: relative; cursor: pointer; transition: all .15s;
}
.co-tds input:checked { background: var(--accent); border-color: var(--accent); }
.co-tds input:checked::after {
  content: ''; position: absolute; left: 6px; top: 2.6px; width: 5px; height: 9.5px;
  border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(43deg);
}
.co-cta {
  margin-top: 24px; height: 56px; border-radius: 14px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform .12s ease, box-shadow .2s ease;
}
.co-cta:hover { transform: translateY(-1px); filter: none; box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--accent) 62%, transparent); }
.co-cta:active { transform: translateY(0); }

/* end screens: animated badge + facts */
.screen { padding: 14px 8px 8px; }
.cs-badge-wrap { position: relative; width: 78px; height: 78px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; }
.cs-ring { position: absolute; inset: 0; border-radius: 50%; background: #22a55a; animation: cs-ring .9s ease-out .1s both; }
.cs-ring.err { background: #ef4444; }
.cs-glow { position: absolute; inset: 0; border-radius: 50%; filter: blur(6px); transform: scale(1.4); background: radial-gradient(circle, rgba(34,165,90,.35), transparent 70%); }
.cs-glow.err { background: radial-gradient(circle, rgba(220,38,38,.32), transparent 70%); }
.cs-badge {
  position: relative; width: 78px; height: 78px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: cs-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
.cs-badge.ok { background: linear-gradient(160deg, #22a55a, #159149); box-shadow: 0 10px 24px -6px rgba(21,145,73,.55); }
.cs-badge.err { background: linear-gradient(160deg, #ef4444, #b91c1c); box-shadow: 0 10px 24px -6px rgba(185,28,28,.55); }
.cs-badge.ok svg path { stroke-dasharray: 32; animation: cs-check .4s ease-out .35s both; }
.cs-badge.err svg path { stroke-dasharray: 24; animation: cs-check .3s ease-out .35s both; }
.cs-badge.err svg path + path { animation-delay: .5s; }
.screen-title { font-family: inherit; font-size: 37px; font-weight: 800; letter-spacing: -.025em; color: #191714; }
.screen-sub { font-size: 15.5px; color: #94908a; }
.screen-sub b, .screen-sub strong { color: #3f3b34; font-weight: 700; }
.screen-next {
  margin-top: 16px; max-width: none; width: 100%;
  padding: 15px 18px; background: #faf8f4; border: 1px solid #efece5; border-radius: 13px;
  font-size: 14px; line-height: 1.55; color: #5b564d; text-align: center;
}
.screen-next.err { background: #fdf3f3; border-color: #f6dede; color: #9a3b3b; }
.screen-facts { margin: 22px 0 0; border: 1px solid #eeebe4; border-radius: 14px; overflow: hidden; }
.screen-facts > div { padding: 14px 16px; background: #fdfcfa; border-bottom: 0; border-top: 1px solid #f2efe9; }
.screen-facts > div:first-child { border-top: 0; }
.screen-facts > div:hover { background: #faf8f3; }
.screen-facts span { font-size: 13px; color: #9b968d; }
.screen-facts code {
  font-family: var(--font-mono); font-size: 12.5px; color: #2c2924; background: none; padding: 0;
  cursor: pointer; line-height: 1.4;
}
.screen-facts code.danger { color: #c62828; }
.cs-secondary {
  margin-top: 12px; width: 100%; height: 48px; cursor: pointer;
  border: 1px solid #e6e2da; border-radius: 14px; background: #fff; color: #5b564d;
  font-family: inherit; font-size: 15px; font-weight: 600; transition: background .15s;
}
.cs-secondary:hover { background: #faf8f4; }

/* bank-app view */
.offstage { animation: cs-rise .5s ease-out .48s both; }
.bank-view { background: #fbfaf7; border: 1px solid #e9e5dd; border-radius: 18px; padding: 16px 18px; }
.bank-view-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #a29d93; margin: 0 0 12px; }
.bank-view-label code { font-size: 11px; letter-spacing: 0; }
.bank-card { gap: 14px; border: 1px solid #eeebe4; border-radius: 13px; padding: 14px 16px; box-shadow: none; background: #fff; }
.bank-ico { width: 42px; height: 42px; border-radius: 12px; background: #f1ecff; color: var(--accent); }
.bank-desc { font-size: 15px; font-weight: 700; color: #211e19; }
.bank-date { font-size: 12.5px; color: #a29d93; }
.bank-amt-main { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: #211e19; }

/* 3-D Secure screen */
.screen-3ds-bar { align-items: flex-start; gap: 12px; padding: 0 0 20px; border-bottom: 1px solid #f0eee9; }
.tds-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; background: #f4f2ee; display: grid; place-items: center; }
.screen-3ds-title { font-size: 16px; font-weight: 700; color: #191714; }
.screen-3ds-sub { font-size: 13.5px; color: #94908a; line-height: 1.4; }
/* simulator rendered directly — no wrapper boxes; full-bleed iframe, the
   simulator page centres its own card within it */
.tds-frame { border: 0; border-radius: 0; width: 100%; margin: 4px auto 0; }

/* toolkit stage: white summary | dark config panel */
.tk-summary { background: transparent; border-right: 1px solid #f0eee9; padding: 26px 26px 22px; }
.tk-brand { gap: 11px; font-family: inherit; font-size: 19px; font-weight: 800; color: #191714; letter-spacing: 0; }
.tk-brand-mark { width: 34px; height: 34px; border-radius: 9px; font-family: inherit; font-size: 16px; font-weight: 800; }
.tk-sum-label { font-size: 11px; letter-spacing: .11em; color: #a8a297; margin: 22px 0 10px; }
.tk-summary .co-order { background: #faf8f4; margin: 0; padding: 12px; }
.tk-summary .co-thumb { width: 44px; height: 44px; border-radius: 11px; }
.tk-summary .co-totals { margin-top: 18px; }
.tk-secure { padding-top: 18px; border-top: 1px solid #eeebe4; }
.tk-secure-head { font-size: 13.5px; font-weight: 700; color: #211e19; }
.tk-secure p { font-size: 12px; color: #a29d93; margin: 8px 0 14px; }
.tk-badges span { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; color: #fff; border-radius: 5px; padding: 5px 8px; }
.b-visa { background: #1a1f71; }
.b-mc { background: #eb001b !important; border: 0 !important; color: #fff; padding: 5px 8px !important; }
.tk-paycol { padding: 20px; }

/* config panel — dark #100f16 recolor */
.tk-config { background: #100f16; border: 0; border-radius: 20px; padding: 24px 26px 26px; font-family: inherit; }
.tkc-head { border-bottom: 0; padding-bottom: 0; }
.tkc-title { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; color: #c7c2e0; }
.tkc-hint { font-size: 12px; color: #6f6a86; }
.tkc-sec { border-bottom: 0; padding: 22px 0 0; }
.tkc-sec ~ .tkc-sec { border-top: 1px solid #211f2c; margin-top: 22px; }
.tkc-sec-label { font-size: 11px; letter-spacing: .11em; color: #6f6a86; margin-bottom: 13px; }
.tkc-sec-hint { font-size: 11px; color: #5a5670; }
.tkc-row { margin-bottom: 15px; }
.tkc-lab { font-size: 15px; font-weight: 600; color: #fff; }
.tkc-lab code { font-size: 12px; color: #6f6a86; }
.tkc-seg { background: #1a1824; border: 0; border-radius: 9px; padding: 4px; gap: 5px; }
.tkc-sec > .tkc-seg { border-radius: 11px; gap: 6px; }
.tkc-seg button { font-size: 14px; font-weight: 600; color: #8681a0; padding: 10px 14px; border-radius: 8px; }
.tkc-seg button:hover { color: #fff; }
.tkc-seg button.active { background: #2c2942; color: #fff; }
.tkc-seg[data-opt="mode"] button { border: 1.5px solid transparent; }
.tkc-seg[data-opt="mode"] button.active { background: rgba(59,130,246,.16); border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.tkc-switch { width: 46px; height: 26px; background: #2a2740; border: 0; }
.tkc-switch::after { top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; }
.tkc-switch:checked { background: var(--accent); }
.tkc-switch:checked::after { left: 23px; }
.tkc-input { max-width: 220px; height: 42px; background: #1a1824; border: 1px solid #2a2740; border-radius: 9px; color: #fff; font-family: inherit; font-size: 14px; padding: 0 14px; }
.tkc-input:focus { border-color: var(--accent); }
.tkc-hex { max-width: 100px; padding: 0 12px; }
.tkc-wallet-custom { margin-left: 41px; }
.tkc-select { height: 38px; background: #1a1824; border: 1px solid #2a2740; border-radius: 9px; color: #fff; font-family: inherit; font-size: 13px; padding: 0 10px; cursor: pointer; }
.tkc-color { width: 40px; height: 40px; background: #1a1824; border: 1px solid #2a2740; border-radius: 9px; }
.tkc-wallet { font-size: 15px; color: #fff; gap: 11px; }
.dw-logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.dw-logo.apple { background: #fff; border: 0; }
.tkc-cta { margin-top: 26px; height: 60px; font-size: 17px; }

/* ── Compact fit — 14" laptop @ 100% ─────────────────────────
   Below ~920px of viewport height the full-size client card overflows the
   fold. Zoom the client pane down (the engine room is untouched — its
   text-heavy panels keep full size) and tighten the most generous spacing
   so both flows fit without scrolling. Larger displays keep the full-size
   design exactly as approved. */
@media (max-height: 920px) {
  .pane-left { zoom: 0.85; }

  /* checkout card */
  .browser-body { padding: 22px 26px 24px; }
  .co-order { margin-top: 18px; }
  .co-totals { margin-top: 16px; }
  .co-paylabel { margin-top: 20px; }
  .co-field label { margin: 11px 0 6px; }
  .co-cta { margin-top: 20px; height: 52px; }

  /* toolkit config panel */
  .tk-paycol { padding: 12px; }
  .tk-summary { padding: 20px 22px 18px; }
  .tk-config { padding: 16px 20px 18px; }
  .tkc-sec { padding-top: 11px; }
  .tkc-sec ~ .tkc-sec { margin-top: 11px; }
  .tkc-row { margin-bottom: 8px; }
  .tkc-lab { font-size: 13.5px; }
  .tkc-lab code { font-size: 11px; }
  .tkc-input { height: 34px; font-size: 13px; }
  .tkc-select { height: 30px; font-size: 12px; }
  .tkc-seg button { padding: 6px 12px; font-size: 13px; }
  .tkc-switch { width: 40px; height: 22px; }
  .tkc-switch::after { width: 16px; height: 16px; }
  .tkc-switch:checked::after { left: 21px; }
  .tkc-color { width: 32px; height: 32px; }
  .tkc-wallet { font-size: 13.5px; }
  .dw-logo { width: 26px; height: 26px; }
  .tkc-wallet-custom { margin-left: 37px; }
  .tkc-cta { margin-top: 14px; height: 46px; font-size: 15px; }
}
