.pmts-page {
  --pmts-navy: #101b34;
  --pmts-steel: #42536d;
  --pmts-rule: #d9e3f0;
  --pmts-code-font: "IBM Plex Mono", Consolas, monospace;
}

.pmts-page :focus-visible {
  outline: 2px solid #084cff;
  outline-offset: 4px;
}

.pmts-hero {
  padding: 24px 0 clamp(44px, 6vw, 90px);
  background: radial-gradient(ellipse at 77% 35%, #e3edff 0, transparent 58%), #f6f9ff;
}

.pmts-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #53617a;
  font-size: 13px;
}

.pmts-crumb a { color: var(--blue); }
.pmts-crumb a:hover { text-decoration: underline; }

.pmts-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(34px, 5vw, 68px);
}

.pmts-hero-copy .lead {
  max-width: 34em;
  font-size: clamp(15px, 1.5vw, 18px);
}

.pmts-brand {
  color: var(--blue);
  font-size: clamp(16px, 1.6vw, 21px);
  letter-spacing: -.025em;
  margin: 0 0 14px;
}

.pmts-hero h1 {
  color: var(--pmts-navy);
  font-size: clamp(36px, 4vw, 58px);
  letter-spacing: -.06em;
  line-height: 1.15;
  margin: 0 0 20px;
}

.pmts-hero-preview, .pmts-example {
  min-width: 0;
  margin: 0;
  border: 1px solid #263851;
  border-radius: 14px;
  background: #111e35;
  color: #e9f1ff;
  overflow: hidden;
  box-shadow: 0 18px 40px #183b7222;
}

.pmts-window-bar, .pmts-example-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 17px;
  background: #192841;
  border-bottom: 1px solid #34435b;
  font-size: 13px;
}

.pmts-window-bar strong > span, .pmts-window-example, .pmts-example-bar > span {
  color: #b9cbe5;
}

.pmts-window-example, .pmts-example-bar > span {
  font-size: 11px;
  white-space: nowrap;
}

.pmts-window-dots {
  display: flex;
  gap: 5px;
}

.pmts-window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8098b7;
}

.pmts-window-content {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  min-height: 262px;
}

.pmts-window-agent {
  min-width: 0;
  border-left: 1px solid #34435b;
  background: #15233b;
}

.pmts-window-file {
  padding: 11px 14px;
  border-bottom: 1px solid #34435b;
  color: #c1d2e9;
  font: 12px/1.5 var(--pmts-code-font);
  overflow-wrap: anywhere;
}

.pmts-diff-label {
  padding: 16px 14px 0;
  font-size: 12px;
  color: #b8cae3;
}

.pmts-page pre {
  margin: 10px 0 0;
  font: 13px/1.6 var(--pmts-code-font);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.pmts-page pre code { font: inherit; }

.pmts-page pre code span {
  display: block;
  padding: 3px 14px;
}

.pmts-page pre .removed { color: #ffb8c1; background: #552b3f; }
.pmts-page pre .added { color: #9ef2cd; background: #17423c; }

.pmts-agent-body { padding: 15px 14px; }

.pmts-mode-tag {
  display: inline-block;
  padding: 1px 9px;
  background: #274571;
  color: #e2efff;
  border-radius: 4px;
  font: 12px/1.6 var(--pmts-code-font);
}

.pmts-agent-request { margin: 9px 0 14px; font-size: 14px; }

.pmts-approval {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  background: #273449;
  border: 1px solid #735f47;
  border-radius: 6px;
  font-size: 12px;
}

.pmts-approval strong { color: #ffe3ad; }
.pmts-approval code { overflow-wrap: anywhere; font-family: var(--pmts-code-font); }

.pmts-hero-preview figcaption {
  padding: 9px 16px;
  border-top: 1px solid #34435b;
  color: #c1d2e9;
  font-size: 12px;
}

.pmts-section-nav {
  border-block: 1px solid var(--pmts-rule);
  background: white;
}

.pmts-section-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px clamp(12px, 4vw, 44px);
}

.pmts-section-nav a {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
}

.pmts-section-nav a:hover { color: var(--blue); }

.pmts-section {
  scroll-margin-top: 85px;
  padding-block: clamp(52px, 7vw, 96px);
}

.pmts-heading .section-intro { margin-bottom: 0; }
.pmts-heading + * { margin-top: 28px; }

.pmts-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--pmts-rule);
  border-radius: 10px;
  background: #eff4fc;
}

.pmts-mode-tabs button {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--pmts-steel);
  font-weight: 800;
}

.pmts-mode-tabs button:hover { background: #e4edfc; }

.pmts-mode-tabs button[aria-selected="true"] {
  border-color: #a6bcf7;
  background: white;
  color: #063bb9;
}

.pmts-mode-tabs small { font: 12px/1.5 var(--pmts-code-font); }

.pmts-mode-panel {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: clamp(20px, 4vw, 60px);
  margin-top: 20px;
  padding: clamp(18px, 3.5vw, 44px);
  border: 1px solid var(--pmts-rule);
  border-radius: 12px;
  background: #f8faff;
}

.pmts-mode-panel[hidden] { display: none; }

.pmts-scope {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 4px;
  background: #e4edff;
  color: #1646a5;
  font-size: 13px;
  font-weight: 700;
}

.pmts-page .pmts-section h3 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -.025em;
  line-height: 1.4;
}

.pmts-mode-copy p, .pmts-feature-grid p, .pmts-architecture p,
.pmts-deployment-grid p, .pmts-start-list p {
  margin: 0;
  color: var(--pmts-steel);
  font-size: 15px;
}

.pmts-example-body { padding: 14px; }

.pmts-prompt {
  padding: 10px 12px;
  background: #223658;
  border-radius: 5px;
  font-size: 14px;
}

.pmts-example pre { padding-block: 4px; background: #0b1529; }
.pmts-example-body > p { margin: 10px 0 0; color: #c7d8f2; font-size: 13px; }

.pmts-feature-grid, .pmts-architecture {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pmts-feature-grid article, .pmts-architecture li {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--pmts-rule);
  border-radius: 10px;
  background: white;
}

.pmts-deployment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pmts-deployment-grid article {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--pmts-rule);
  border-radius: 10px;
  background: white;
}

.pmts-deployment-grid .pmts-deployment-airgap {
  border-color: #92b1f4;
  border-top: 4px solid var(--blue);
  background: #eaf1ff;
}

.pmts-deployment-airgap h3 span {
  display: inline-block;
  margin-inline-start: 5px;
  color: #1646a5;
  font-size: 14px;
  letter-spacing: 0;
}

.pmts-architecture {
  gap: 28px;
  margin-top: 18px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.pmts-architecture li {
  position: relative;
  background: white;
}

.pmts-architecture li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -24px;
  width: 17px;
  height: 9px;
  background: #557aba;
  clip-path: polygon(0 35%, 62% 35%, 62% 0, 100% 50%, 62% 100%, 62% 65%, 0 65%);
}

.pmts-architecture span {
  display: block;
  margin-bottom: 5px;
  color: #1646a5;
  font-size: 13px;
  font-weight: 800;
}

.pmts-note { margin: 13px 0 0; color: #53617a; font-size: 13px; }

.pmts-start {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 6vw, 85px);
}

.pmts-start .resource-links { margin-top: 18px; }

.pmts-start-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pmts-start-step;
}

.pmts-start-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 4px 13px;
  padding: 14px 0;
  border-top: 1px solid var(--pmts-rule);
}

.pmts-start-list li::before {
  counter-increment: pmts-start-step;
  content: counter(pmts-start-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #1646a5;
  background: #e1ebff;
  font-weight: 800;
}

.pmts-start-list li h3 { margin-bottom: 0; }
.pmts-page .cta .btn { flex: 0 0 auto; }
.pmts-page .cta .btn:focus-visible { outline-color: white; }

@media (max-width: 1050px) {
  .pmts-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .pmts-window-content { grid-template-columns: minmax(0, 1fr); }
  .pmts-window-agent { border-left: 0; border-top: 1px solid #34435b; }
}

@media (max-width: 740px) {
  .pmts-hero-grid, .pmts-mode-panel, .pmts-start { grid-template-columns: minmax(0, 1fr); }
  .pmts-hero h1 { font-size: clamp(34px, 7vw, 47px); }
  .pmts-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmts-architecture, .pmts-deployment-grid { grid-template-columns: minmax(0, 1fr); }
  .pmts-architecture li + li::before { top: -19px; left: calc(50% - 8px); transform: rotate(90deg); }
  .pmts-mode-tabs button { flex-direction: column; align-items: center; gap: 2px; }
}

@media (max-width: 460px) {
  .pmts-feature-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.pmts-page) { scroll-behavior: auto; }
}
