/* Ticket Data API product page (/ticket-data-api/). Prefix ap-, scoped under .ap-page.
   Tokens map onto the site's --sd-* system (css/public_theme.css) with a [data-theme="dark"] override.
   Spec: docs/superpowers/specs/2026-09-24-ticket-data-api-page-design.md */

.ap-page {
  /* surfaces + ink */
  --ap-bg: var(--bg-primary, #ffffff);
  --ap-band: #f5f5f7;
  --ap-card: var(--card-bg, #ffffff);
  --ap-ink: var(--sd-text, #3a4554);
  --ap-ink-2: var(--sd-text-secondary, #5a6574);
  --ap-ink-3: #6b7480;
  --ap-line: rgba(58, 69, 84, 0.14);
  --ap-line-2: rgba(58, 69, 84, 0.08);
  /* brand */
  --ap-coral: var(--sd-accent, #ec5d50);
  --ap-coral-d: var(--sd-accent-dark, #d94a3d);
  --ap-blue: var(--sd-primary, #3da4df);
  --ap-blue-t: rgba(61, 164, 223, 0.12);
  --ap-link: #1c6a99;   /* brand blue darkened for 4.5:1+ text on white and the #f5f5f7 band */
  --ap-indigo: #4f52d9;
  --ap-indigo-t: rgba(99, 102, 241, 0.12);
  --ap-green: #047857;
  --ap-green-dot: #10b981;
  --ap-green-t: rgba(16, 185, 129, 0.12);
  --ap-pop-bg: var(--sd-accent, #ec5d50);
  /* hero */
  --ap-hero-a: #3a4554;
  --ap-hero-b: #293042;
  --ap-hero-ink: #ffffff;
  --ap-hero-ink-2: #c9cfd8;
  --ap-hero-line: rgba(255, 255, 255, 0.16);
  /* console + code panels */
  --ap-panel: #1b2230;
  --ap-panel-2: #222b3b;
  --ap-panel-line: rgba(255, 255, 255, 0.08);
  --ap-panel-ink: #e6eaf0;
  --ap-panel-ink-2: #8e98a8;
  --ap-k: #8fd0f5;
  --ap-s: #f2c18a;
  --ap-n: #7ee0b0;
  --ap-b: #c4b5fd;
  /* shape */
  --ap-r-sm: var(--sd-radius-sm, 8px);
  --ap-r-md: var(--sd-radius-md, 12px);
  --ap-r-lg: var(--sd-radius-lg, 16px);
  --ap-shadow-sm: var(--sd-shadow-sm, 0 1px 3px rgba(58, 69, 84, 0.06));
  --ap-shadow-xl: var(--sd-shadow-xl, 0 25px 50px rgba(58, 69, 84, 0.12));
  --ap-focus: var(--sd-text, #3a4554);

  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ap-ink);
  background: var(--ap-bg);
  -webkit-font-smoothing: antialiased;
}

/* --ap-band deliberately does not map to --sd-bg-light: in dark mode that token equals the page
   ground (#1a1a2e), which would erase the alternating sections. --bg-secondary keeps them visible. */
[data-theme="dark"] .ap-page {
  --ap-band: var(--bg-secondary, #22223a);
  --ap-ink-3: #8c95a3;
  --ap-line: rgba(255, 255, 255, 0.12);
  --ap-line-2: rgba(255, 255, 255, 0.07);
  --ap-blue-t: rgba(61, 164, 223, 0.18);
  --ap-link: #8fd0f5;
  --ap-indigo: #a5b4fc;
  --ap-indigo-t: rgba(129, 132, 255, 0.18);
  --ap-green: #34d399;
  --ap-green-t: rgba(16, 185, 129, 0.18);
  --ap-hero-a: #232b3a;
  --ap-hero-b: #1a1a2e;
  --ap-hero-line: rgba(255, 255, 255, 0.14);
  --ap-panel: #131826;
  --ap-panel-2: #1a2030;
  --ap-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
  --ap-shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.55);
}

/* ---------- Resets against the global Webflow element rules ---------- */
.ap-page *,
.ap-page *::before,
.ap-page *::after { box-sizing: border-box; }
/* Element resets use :where() so they carry no element specificity: a component's
   single-class margin (.ap-lede, .ap-hero-fine, .ap-ep-foot …) must beat them. */
.ap-page :where(h1, h2, h3) {
  margin: 0; font-family: inherit; color: inherit; line-height: 1.15;
  letter-spacing: -0.01em; text-wrap: balance; font-weight: 700;
}
.ap-page :where(h2) { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
.ap-page :where(h3) { font-size: 1.05rem; font-weight: 600; }
.ap-page :where(p) { margin: 0; }
.ap-page :where(ul, ol, dl) { margin: 0; padding: 0; list-style: none; }
.ap-page :where(dd) { margin: 0; }
.ap-page a { color: var(--ap-link); text-decoration: none; }
.ap-page a:hover { text-decoration: underline; }
.ap-page :where(code, pre), .ap-page .ap-mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ap-page :where(code) { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.ap-page :where(pre) { margin: 0; white-space: pre; tab-size: 2; }
.ap-page :where(table) { width: 100%; border-collapse: collapse; border-spacing: 0; }
.ap-page :where(button) { font: inherit; }
.ap-page :where(a, button, summary):focus-visible {
  outline: 2px solid var(--ap-focus); outline-offset: 3px; border-radius: 4px;
}

/* ---------- Layout ---------- */
.ap-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.ap-section { padding-block: clamp(56px, 4vw + 32px, 96px); }
.ap-section--band { background: var(--ap-band); }
.ap-sec-head { max-width: 640px; display: grid; gap: 12px; margin-bottom: 40px; }
.ap-sec-head p { color: var(--ap-ink-2); font-size: 1.05rem; }
.ap-proof-value, .ap-rel-value, .ap-price, .ap-rate, .ap-inc { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.ap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
/* Variants carry the .ap-page prefix so they outrank the scoped `a` color rule. */
.ap-page .ap-btn:hover { text-decoration: none; }
.ap-page .ap-btn-primary { background: var(--ap-coral); color: #fff; }
.ap-page .ap-btn-primary:hover { background: var(--ap-coral-d); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(236, 93, 80, 0.28); }
.ap-page .ap-btn-ghost { background: transparent; color: var(--ap-hero-ink); border-color: rgba(255, 255, 255, 0.45); }
.ap-page .ap-btn-ghost:hover { border-color: rgba(255, 255, 255, 0.8); }
.ap-page .ap-btn-outline { background: transparent; color: var(--ap-ink); border-color: var(--ap-ink-3); }
.ap-page .ap-btn-outline:hover { border-color: var(--ap-ink); }
.ap-page .ap-btn-white { background: #fff; color: var(--ap-coral-d); }
.ap-page .ap-btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.ap-page .ap-btn-ghost-w { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.ap-page .ap-btn-ghost-w:hover { border-color: #fff; }

/* ---------- Hero ---------- */
.ap-hero {
  position: relative; overflow: hidden; color: var(--ap-hero-ink);
  /* Vertical gradient so the bottom edge is uniformly --ap-hero-b and the status bar's block joins it seamlessly. */
  background: linear-gradient(180deg, var(--ap-hero-a) 0%, var(--ap-hero-b) 100%);
  padding-block: clamp(56px, 6vw, 88px) clamp(40px, 4vw, 56px);
}
.ap-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
.ap-hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -120px; top: -160px;
  background: radial-gradient(closest-side, rgba(61, 164, 223, 0.28), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
/* minmax(0, …) tracks: the console's <pre> must scroll inside its column, never widen it. */
.ap-hero .ap-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.ap-hero-copy, .ap-hero-console, .ap-console, .ap-tile, .ap-step { min-width: 0; }
.ap-h1 { font-size: clamp(2.3rem, 1.4rem + 3.2vw, 3.7rem); line-height: 1.06; letter-spacing: -0.025em; color: #fff; }
.ap-lede { margin-top: 20px; font-size: 1.15rem; line-height: 1.55; color: var(--ap-hero-ink-2); max-width: 34rem; }
.ap-lede b { color: #fff; font-weight: 600; }
.ap-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ap-hero-fine { margin-top: 22px; font-size: 0.92rem; color: var(--ap-hero-ink-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ap-hero-fine li { display: inline-flex; align-items: center; gap: 8px; }
.ap-hero-fine li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ap-blue); flex: none; }

/* ---------- Console panel: the page's one signature object ---------- */
.ap-console {
  background: var(--ap-panel); border: 1px solid var(--ap-panel-line); border-radius: var(--ap-r-lg);
  box-shadow: var(--ap-shadow-xl), 0 0 60px rgba(61, 164, 223, 0.12);
  color: var(--ap-panel-ink); overflow: hidden; font-size: 0.86rem;
}
.ap-console-chrome { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--ap-panel-line); background: var(--ap-panel-2); }
.ap-dots { display: flex; gap: 6px; }
.ap-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); display: block; }
.ap-tabs { display: flex; gap: 2px; margin-left: 4px; overflow-x: auto; scrollbar-width: none; }
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tab { appearance: none; background: transparent; border: 0; color: var(--ap-panel-ink-2); font-weight: 500; padding: 7px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ap-tab[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, 0.08); }
.ap-tab:hover { color: #fff; }
.ap-ver { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ap-panel-ink-2); font-size: 0.78rem; white-space: nowrap; }
.ap-console-chrome .ap-ver { flex: none; }
.ap-ver b { color: var(--ap-k); font-weight: 600; background: rgba(143, 208, 245, 0.12); padding: 2px 7px; border-radius: 999px; font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; }
.ap-req { padding: 14px 16px 16px; border-bottom: 1px solid var(--ap-panel-line); }
.ap-req pre { overflow-x: auto; line-height: 1.55; font-size: 0.84rem; color: var(--ap-panel-ink); }
/* Request snippets and the quickstart block: m = command, c = keyword, s = string, u = literal, p = prompt */
.ap-req .m { color: var(--ap-n); font-weight: 600; }
.ap-req .c, .ap-step pre .c { color: var(--ap-b); }
.ap-req .s, .ap-step pre .s { color: var(--ap-s); }
.ap-req .u, .ap-step pre .u { color: var(--ap-n); }
.ap-step pre .p { color: var(--ap-panel-ink-2); }
.ap-copy {
  flex: none; appearance: none; cursor: pointer;
  border: 1px solid var(--ap-panel-line); background: rgba(255, 255, 255, 0.04); color: var(--ap-panel-ink-2);
  font-size: 0.74rem; font-weight: 500; padding: 5px 9px; border-radius: 6px; line-height: 1.2;
}
.ap-copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.ap-page .ap-copy:focus-visible { outline-color: #fff; }
.ap-res-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--ap-panel-line); font-size: 0.78rem; color: var(--ap-panel-ink-2); }
.ap-status { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; }
.ap-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ap-green-dot); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.ap-res-count { margin-left: auto; }
.ap-res { padding: 14px 16px 16px; overflow: auto; line-height: 1.5; font-size: 0.83rem; max-height: 372px; }
.ap-res .k, .ap-rec-code .k { color: var(--ap-k); }
.ap-res .s, .ap-rec-code .s { color: var(--ap-s); }
.ap-res .n, .ap-rec-code .n { color: var(--ap-n); }
.ap-res .b, .ap-rec-code .b { color: var(--ap-b); }
.ap-res .p, .ap-rec-code .p { color: var(--ap-panel-ink-2); }
.ap-res .hl { display: block; background: rgba(143, 208, 245, 0.07); box-shadow: inset 3px 0 0 var(--ap-blue); margin-inline: -16px; padding-inline: 16px; }
.ap-caption { margin-top: 14px; font-size: 0.84rem; color: var(--ap-hero-ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.ap-pill { font-size: 0.72rem; font-weight: 600; border: 1px solid var(--ap-hero-line); border-radius: 999px; padding: 2px 8px; color: #fff; }

/* ---------- Proof strip: the console's status bar ---------- */
/* A parallelogram band on the page background. The readout is one dark instrument in the
   console's palette: --ap-panel tiles fused with 1px seams, blue mono figures, a hairline top
   rule per tile, and a green rule + live dot on the tile that reports the last observed sale.
   The bar is pulled up over the hero's angled edge so it reads as tucked under the console. */
.ap-proof {
  --ap-proof-seam: #2a3446;
  --ap-proof-rule: rgba(143, 208, 245, 0.45);
  --ap-proof-rule-live: rgba(126, 224, 176, 0.65);
  /* The bar lives inside the hero's dark block; the one angled edge is below it, into the band. */
  position: relative; z-index: 1;
  background: var(--ap-hero-b);
  margin-top: 0; padding-block: 8px 104px;
}
.ap-proof::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
[data-theme="dark"] .ap-page .ap-proof {
  --ap-proof-seam: #232b3b;
  --ap-proof-rule: rgba(143, 208, 245, 0.4);
  --ap-proof-rule-live: rgba(126, 224, 176, 0.6);
}
.ap-proof-divider { position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; line-height: 0; pointer-events: none; }
.ap-proof-divider svg { display: block; width: 100%; height: 100%; }
.ap-proof-divider path { fill: var(--ap-band); }
/* One object, not five cards: the seam color shows through the 1px gap and the 1px outer border.
   Segments are content-sized like an editor status bar's: every reading keeps the same type
   size, the 14-character listings figure simply gets a wider segment, and four tiles (no sale
   in the last 24h) or five both fill the row. Flex, not grid, because flex shrinks segments in
   proportion to their content, so a short figure under a long label still gets room for it. */
.ap-proof-grid {
  position: relative; display: flex; gap: 1px;
  background: var(--ap-proof-seam); border: 1px solid var(--ap-proof-seam); border-radius: var(--ap-r-lg);
  overflow: hidden; box-shadow: var(--ap-shadow-xl);
}
.ap-proof-item {
  flex: 1 1 auto; display: grid; gap: 8px; align-content: start; padding: 20px 22px 22px;
  background: var(--ap-panel); border-top: 1px solid var(--ap-proof-rule);
}
.ap-proof-item--live { border-top-color: var(--ap-proof-rule-live); }
.ap-proof-item:has(.ap-live) { border-top-color: var(--ap-proof-rule-live); }
.ap-proof-value {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ap-k);
  /* Plex Mono advances 0.6em per glyph, so the five readings (54 glyphs + padding) fit the
     1200px wrap up to 28px and the 976px wrap at 1024px up to 24px; this ramp stays under both. */
  font-size: clamp(1.05rem, 0.35rem + 1.45vw, 1.75rem);
  white-space: nowrap;
}
.ap-proof-value.ap-live { color: var(--ap-n); }
.ap-proof-label { font-size: 0.86rem; line-height: 1.35; color: var(--ap-panel-ink-2); }
/* No min-width: 0 here: a zero automatic minimum lets the auto column under-size this segment. */
.ap-live { display: inline-flex; align-items: center; gap: 9px; }
/* Same dot and ring as the console's status line, with a slow ring pulse to say "live". */
.ap-live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ap-green-dot); flex: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
  animation: ap-live-pulse 2.4s ease-out infinite;
}
@keyframes ap-live-pulse {
  0% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}
@media (min-width: 768px) and (max-width: 991px) {
  /* Tablet: five segments across a 720px wrap; tighter padding buys the type its 17px. */
  .ap-proof-item { padding: 16px 14px 18px; }
}
@media (max-width: 767px) {
  .ap-proof-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .ap-proof-item { padding: 18px 18px 20px; }
  /* An odd fifth tile (the live one) takes the whole last row instead of leaving a half-empty one. */
  .ap-proof-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ap-proof-value { font-size: 1.4rem; }
}
/* Phones: one ledger line per reading (label left, figure right), so the figures stay at 1.5rem
   and the bar reads as a console status list instead of a 2x2 grid of small numbers. Each tile's
   hairline rule becomes the row separator, so the 1px seam gap is dropped to avoid a double line. */
@media (max-width: 479px) {
  .ap-proof { margin-top: -20px; padding-bottom: 88px; }
  .ap-proof-grid { grid-template-columns: 1fr; gap: 0; }
  .ap-proof-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; }
  .ap-proof-label { order: -1; font-size: 0.86rem; }
  .ap-proof-value { justify-self: end; text-align: right; font-size: 1.5rem; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-live i { animation: none; }
}

/* ---------- Endpoints table ---------- */
.ap-table-scroll { overflow-x: auto; }
.ap-ep { font-size: 0.95rem; }
.ap-ep th { text-align: left; font-weight: 500; color: var(--ap-ink-3); font-size: 0.82rem; padding: 0 12px 12px 0; border-bottom: 1px solid var(--ap-line); }
.ap-ep td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--ap-line-2); vertical-align: top; }
.ap-ep tr:last-child td { border-bottom: 0; }
.ap-method { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 6px; min-width: 52px; text-align: center; }
.ap-method--get { color: var(--ap-link); background: var(--ap-blue-t); }
.ap-method--post { color: var(--ap-indigo); background: var(--ap-indigo-t); }
.ap-ep-path { font-family: "IBM Plex Mono", monospace; font-size: 0.88rem; white-space: nowrap; }
.ap-page .ap-ep-path a { color: var(--ap-ink); }
.ap-var { color: var(--ap-link); }
.ap-ep-returns { color: var(--ap-ink-2); }
.ap-ep-bill { color: var(--ap-ink-2); font-size: 0.9rem; }
.ap-free { display: inline-block; font-size: 0.76rem; font-weight: 600; color: var(--ap-green); background: var(--ap-green-t); padding: 2px 8px; border-radius: 6px; }
.ap-note { display: block; color: var(--ap-ink-3); font-size: 0.84rem; margin-top: 3px; }
.ap-ep-foot { margin-top: 18px; font-size: 0.9rem; color: var(--ap-ink-3); }

/* ---------- Sale record ---------- */
.ap-rec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.ap-rec-code { background: var(--ap-panel); border: 1px solid var(--ap-panel-line); border-radius: var(--ap-r-md); color: var(--ap-panel-ink); padding: 18px 20px; font-size: 0.88rem; line-height: 1.6; overflow-x: auto; position: sticky; top: 84px; box-shadow: var(--ap-shadow-sm); }
.ap-fields { display: grid; }
.ap-field { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ap-line-2); }
.ap-field:first-child { padding-top: 0; }
.ap-field:last-child { border-bottom: 0; }
.ap-fn { display: block; font-family: "IBM Plex Mono", monospace; font-size: 0.88rem; color: var(--ap-ink); font-weight: 500; }
.ap-ft { display: block; font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; color: var(--ap-ink-3); margin-top: 2px; }
.ap-field dd { color: var(--ap-ink-2); font-size: 0.95rem; }
.ap-field dd code, .ap-rec-note code, .ap-faq-a code { font-size: 0.86em; color: var(--ap-ink); background: var(--ap-band); padding: 1px 5px; border-radius: 4px; }
.ap-rec-note { margin-top: 26px; padding: 16px 18px; background: var(--ap-blue-t); border-radius: var(--ap-r-sm); color: var(--ap-ink-2); font-size: 0.95rem; }
.ap-rec-note strong { color: var(--ap-ink); font-weight: 600; }

/* ---------- Production tiles ---------- */
.ap-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ap-line); border: 1px solid var(--ap-line); border-radius: var(--ap-r-lg); overflow: hidden; }
.ap-tile { background: var(--ap-card); padding: 26px 24px; display: grid; gap: 12px; align-content: start; }
.ap-tile h3 { font-size: 1.02rem; }
.ap-tile p { color: var(--ap-ink-2); font-size: 0.95rem; }
.ap-tile code { display: block; font-size: 0.8rem; color: var(--ap-ink); background: var(--ap-band); border: 1px solid var(--ap-line-2); border-radius: 8px; padding: 9px 11px; overflow-x: auto; white-space: pre; }
.ap-tile .ap-m { color: var(--ap-link); font-weight: 600; }

/* ---------- Quickstart ---------- */
/* The third step carries the code block, so it gets the widest track. */
.ap-steps { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 28px; counter-reset: ap-step; }
.ap-step { display: grid; gap: 10px; align-content: start; position: relative; padding-top: 18px; border-top: 2px solid var(--ap-line); }
.ap-step::before { counter-increment: ap-step; content: counter(ap-step); position: absolute; top: -13px; left: 0; background: var(--ap-bg); padding-right: 10px; font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 0.85rem; color: var(--ap-link); }
.ap-step h3 { font-size: 1.05rem; }
.ap-step p { color: var(--ap-ink-2); font-size: 0.95rem; }
.ap-step pre { margin-top: 6px; background: var(--ap-panel); color: var(--ap-panel-ink); border-radius: 10px; padding: 14px 16px; font-size: 0.8rem; line-height: 1.55; overflow-x: auto; border: 1px solid var(--ap-panel-line); }
.ap-qs-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ap-fine { color: var(--ap-ink-3); font-size: 0.9rem; }

/* ---------- Pricing ladder ---------- */
.ap-ladder th { text-align: left; font-weight: 500; font-size: 0.82rem; color: var(--ap-ink-3); padding: 0 12px 12px 0; border-bottom: 1px solid var(--ap-line); }
.ap-ladder th.ap-r, .ap-ladder td.ap-r { text-align: right; padding-right: 0; }
.ap-ladder td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--ap-line-2); font-size: 1rem; vertical-align: middle; }
.ap-ladder tr:last-child td { border-bottom: 0; }
.ap-plan { font-weight: 600; color: var(--ap-ink); display: inline-flex; align-items: center; gap: 10px; }
.ap-pop { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--ap-pop-bg); padding: 2px 7px; border-radius: 999px; }
.ap-price { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 1.05rem; }
.ap-price small { font-family: Inter, sans-serif; font-weight: 400; color: var(--ap-ink-3); font-size: 0.85rem; }
.ap-ladder .ap-inc { color: var(--ap-ink-2); }
.ap-rate { font-family: "IBM Plex Mono", monospace; color: var(--ap-ink); }
.ap-rate small { font-family: Inter, sans-serif; color: var(--ap-ink-3); font-size: 0.85rem; }
.ap-ladder tr.ap-payg td { background: var(--ap-blue-t); }
.ap-ladder tr.ap-payg td:first-child { border-radius: 10px 0 0 10px; padding-left: 12px; }
.ap-ladder tr.ap-payg td:last-child { border-radius: 0 10px 10px 0; padding-right: 12px; }
.ap-muted { color: var(--ap-ink-3); }
.ap-ladder-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 18px; font-size: 0.92rem; color: var(--ap-ink-2); }

/* ---------- FAQ ---------- */
.ap-faq { max-width: 760px; }
.ap-faq details { border-bottom: 1px solid var(--ap-line-2); }
.ap-faq details:first-of-type { border-top: 1px solid var(--ap-line); }
.ap-faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.02rem; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after { content: "+"; font-weight: 400; color: var(--ap-ink-3); font-size: 1.3rem; line-height: 1; transition: transform 0.2s; }
.ap-faq details[open] summary::after { transform: rotate(45deg); }
.ap-faq-a { padding: 0 0 18px; color: var(--ap-ink-2); max-width: 62ch; }

/* ---------- Final CTA ---------- */
.ap-cta { background: var(--ap-coral); color: #fff; padding-block: clamp(56px, 6vw, 88px); }
.ap-cta .ap-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.ap-cta h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.ap-cta p { margin-top: 10px; color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; }
.ap-cta-acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.ap-page .ap-cta :focus-visible { outline-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .ap-hero .ap-wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ap-hero::after { right: -240px; top: auto; bottom: -200px; }
  .ap-rec { grid-template-columns: 1fr; gap: 32px; }
  .ap-rec-code { position: static; }
  .ap-tiles { grid-template-columns: 1fr 1fr; }
  .ap-steps { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ap-cta .ap-wrap { grid-template-columns: 1fr; }
  .ap-cta-acts { justify-content: flex-start; }
  .ap-ep thead { display: none; }
  .ap-ep, .ap-ep tbody, .ap-ep tr, .ap-ep td { display: block; }
  .ap-ep tr { border-bottom: 1px solid var(--ap-line); padding-block: 16px; }
  .ap-ep tr:last-child { border-bottom: 0; }
  .ap-ep td { padding: 4px 0; border: 0; }
  .ap-ep-method { margin-bottom: 4px; }
  .ap-ep-path { white-space: normal; word-break: break-all; font-size: 0.92rem; }
}
@media (max-width: 639px) {
  .ap-tiles { grid-template-columns: 1fr; }
  .ap-ladder th.ap-inc, .ap-ladder td.ap-inc { display: none; }
  .ap-ladder td { font-size: 0.95rem; }
}
@media (max-width: 479px) {
  .ap-wrap { padding-inline: 16px; }
  /* Phones: dots + Copy on the first row, the four tabs on their own row. */
  .ap-console-chrome { flex-wrap: wrap; gap: 8px; padding-inline: 10px; }
  .ap-ver { display: none; }
  .ap-copy { margin-left: auto; }
  .ap-tabs { order: 3; flex-basis: 100%; margin-left: 0; }
  .ap-tab { padding-inline: 8px; }
  .ap-field { grid-template-columns: 1fr; gap: 6px; }
  .ap-res .hl { margin-inline: -16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-btn, .ap-faq summary::after { transition: none; }
  .ap-page .ap-btn:hover { transform: none; }
}
