/* ============================================================
   RIR Data API — the revenue surface (Model B).
   Echoes the RIR "product page" aesthetic (hero + tier cards +
   console + mono quickstart), recolored to MINT and rebuilt on
   our base.css tokens. EVERY selector is scoped to #view-api.
   ============================================================ */

/* ── HERO ───────────────────────────────────────────────────── */
#view-api .api-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(620px 320px at 88% -30%, rgba(95,176,137,0.14), transparent 70%),
    linear-gradient(150deg, var(--card-2), var(--card));
  border: 1px solid rgba(95,176,137,0.30);
  box-shadow: 0 0 0 1px rgba(95,176,137,0.06), 0 0 40px -10px rgba(95,176,137,0.18);
  padding: 34px 36px;
  margin-bottom: 26px;
}
#view-api .api-hero-inner { max-width: 720px; }
#view-api .api-hero .page-title { font-size: 3rem; margin-bottom: 14px; }
#view-api .api-hero-tags { margin-top: 18px; gap: 8px; }
#view-api .api-hero-cta { margin-top: 22px; gap: 10px; }
#view-api .api-hero-glyph {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  font-size: 190px; line-height: 1; color: var(--mint);
  opacity: 0.10; pointer-events: none; user-select: none;
  text-shadow: 0 0 60px rgba(95,176,137,0.5);
}

/* ── TIER CARDS ─────────────────────────────────────────────── */
#view-api .api-tier { display: flex; flex-direction: column; position: relative; }
#view-api .api-tier.pro {
  border-color: rgba(95,176,137,0.45);
  box-shadow: 0 0 0 1px rgba(95,176,137,0.10), 0 0 36px -8px rgba(95,176,137,0.22);
}
#view-api .api-tier.pro::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); pointer-events: none;
  background: radial-gradient(420px 160px at 50% -10%, rgba(95,176,137,0.10), transparent 70%);
}
#view-api .api-tier-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
#view-api .api-tier-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--text); letter-spacing: .01em; }
#view-api .api-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
#view-api .api-price-num { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--text); line-height: 1; }
#view-api .api-tier.pro .api-price-num { color: var(--mint); }
#view-api .api-price-per { font-size: 13px; color: var(--text-faint); font-weight: 500; }
#view-api .api-tier-tag { font-size: 12.5px; line-height: 1.5; min-height: 36px; margin-bottom: 12px; }
#view-api .api-feat { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
#view-api .api-feat li {
  position: relative; padding-left: 22px; font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
#view-api .api-feat li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal-glow); border: 1px solid var(--teal-dim);
  box-shadow: inset 0 0 0 2px var(--bg);
}
#view-api .api-feat b { color: var(--text); font-weight: 600; }
#view-api .api-limits {
  font-size: 11px; color: var(--text-faint); letter-spacing: .02em;
  padding: 9px 11px; border-radius: 8px; background: var(--bg-elevated);
  border: 1px solid var(--border); margin-bottom: 16px;
}
#view-api .api-tier-cta { margin-top: auto; }

/* ── CONSOLE ────────────────────────────────────────────────── */
#view-api .api-console-grid { gap: 22px; }
#view-api .api-console-out {
  margin-top: 12px; min-height: 22px; font-size: 13px; color: var(--text-muted);
}
#view-api .api-result {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #0d1219;
}
#view-api .api-result-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--bg-elevated);
}

/* ── MONO CODE (shared by console results + quickstart) ─────── */
#view-api .api-code {
  background: #0d1219; margin: 0; padding: 14px 16px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #aeb9c6;
  white-space: pre;
}
#view-api .api-code code { font-family: inherit; color: inherit; white-space: pre; }
#view-api .api-result .api-code { border: none; }
#view-api .api-quick .panel-title .ic { font-size: 13px; }
#view-api .api-code-block {
  border-radius: 0; max-height: 460px; overflow: auto;
  background:
    linear-gradient(180deg, rgba(95,176,137,0.03), transparent 120px),
    #0b1016;
}
#view-api .api-quick { overflow: hidden; }

/* ── MCP TOOL CARDS ─────────────────────────────────────────── */
#view-api .api-mcp { padding: 16px 18px; }
#view-api .api-mcp-name {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 7px; letter-spacing: .01em;
}
#view-api .api-mcp-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--teal-glow);
}
#view-api .api-mcp-desc { font-size: 12.5px; line-height: 1.55; }

/* ── NO-BULK-DUMP NOTE ──────────────────────────────────────── */
#view-api .api-note { margin-top: 30px; }
#view-api .api-note-glyph {
  font-size: 30px; line-height: 1; color: var(--mint); flex-shrink: 0;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
  background: var(--teal-glow); border: 1px solid var(--teal-dim);
}
#view-api .api-note-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* ── responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #view-api .api-hero-glyph { display: none; }
  #view-api .api-hero .page-title { font-size: 2.3rem; }
}
@media (max-width: 620px) {
  #view-api .api-console-grid { grid-template-columns: 1fr; }
  #view-api .api-hero { padding: 26px 20px; }
}
