/* QuraniAPI UI refresh — 2026-11-16. Loaded after style.css; same brand colours & fonts. */
html { scroll-padding-top: calc(var(--nav-h) + 12px); }
body { font-size: 16px; line-height: 1.65; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.01em; }
pre, code { overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { max-width: 100%; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.qa-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ── Navbar polish ── */
.nav-links .nav-free, .nav-links .nav-cta { text-align: center; }
@media (max-width: 900px) {
  .nav-links li:has(.nav-free), .nav-links li:has(.nav-cta) { border-bottom: 0; margin-top: .75rem; }
  .nav-links a.nav-free, .nav-links a.nav-cta { padding: 12px 18px !important; }
}

/* ── Home hero v2 ── */
.qa-hero { position: relative; overflow: hidden; color: #fff; background: var(--primary-dark);
  padding: calc(var(--nav-h) + 36px) 0 40px; border-bottom: 1px solid rgba(134,239,172,.18); }
.qa-hero .home-hero-bg { position: absolute; inset: 0; }
.qa-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: clamp(1.5rem,4vw,3rem); align-items: center; }
.qa-eyebrow { display: inline-flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; font-size: .8rem; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-gold); padding: 6px 14px; border-radius: 50px; margin-bottom: 1rem; color: #fef9c3; }
.qa-eyebrow b { color: #86efac; font-weight: 700; }
.qa-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem,4.2vw,3.1rem); line-height: 1.1; margin-bottom: .9rem; }
.qa-hero h1 .gold { color: var(--accent-light); font-style: italic; }
.qa-lead { font-size: clamp(1rem,1.4vw,1.12rem); opacity: .92; max-width: 560px; margin-bottom: 1.4rem; }
.qa-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.3rem; }
.qa-actions .btn { padding: 13px 24px; }
.qa-stats { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.qa-stats li { font-size: .82rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 6px 12px; border-radius: 10px; }
.qa-stats strong { color: var(--accent-light); margin-right: 4px; }
.qa-code { background: #071812; border: 1px solid rgba(201,162,39,.35); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; min-width: 0; }
.qa-code-head { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.08); font-size: .78rem; color: rgba(255,255,255,.7); }
.qa-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 16px 0 0 #eab308, 32px 0 0 #22c55e; margin-right: 38px; }
.qa-code-url { display: flex; gap: .5rem; align-items: center; padding: .75rem 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.qa-get { background: #15803d; color: #fff; font-weight: 700; font-size: .7rem; padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }
.qa-code-url code { color: #fde68a; overflow-wrap: anywhere; }
.qa-code pre { margin: 0; padding: 1rem; color: #d1fae5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.55; max-height: 300px; overflow: auto; white-space: pre; }
.qa-code-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .65rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .78rem; color: rgba(255,255,255,.65); }
.qa-code-foot a { color: #86efac; font-weight: 600; }

/* ── Steps ── */
.qa-steps { padding: 26px 0 8px; }
.qa-steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.qa-step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: flex-start; box-shadow: var(--shadow-sm); }
.qa-step-n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fde047; font-weight: 800; display: grid; place-items: center; }
.qa-step h3 { font-size: 1rem; margin-bottom: .2rem; font-family: var(--font-body); font-weight: 700; color: var(--primary-dark); }
.qa-step p { font-size: .88rem; color: var(--text-muted); margin: 0; }
.qa-step a, .qa-step button.link-btn { font-weight: 600; }

/* ── Section titles ── */
.qa-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qa-sec-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem,2.6vw,2rem); color: var(--primary-dark); line-height: 1.2; }
.qa-sec-head p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ── FAQ ── */
.qa-faq { padding: 36px 0 48px; }
.qa-faq-list { display: grid; gap: .65rem; max-width: 860px; }
.qa-faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 0 1.1rem; }
.qa-faq summary { cursor: pointer; list-style: none; padding: 1rem 0; font-weight: 700; color: var(--primary-dark); display: flex; justify-content: space-between; gap: 1rem; }
.qa-faq summary::-webkit-details-marker { display: none; }
.qa-faq summary::after { content: '+'; color: var(--accent-dark); font-size: 1.3rem; line-height: 1; }
.qa-faq details[open] summary::after { content: '–'; }
.qa-faq details p { padding: 0 0 1rem; color: var(--text-muted); margin: 0; }

/* ── Cards / buttons ── */
.home-api-grid { gap: 1rem; }
.home-api-card { transition: transform var(--transition), box-shadow var(--transition); }
.home-api-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn { min-height: 42px; }
.btn-sm { min-height: 38px; }

/* ── API detail ── */
.qa-detail-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.qa-detail-actions .btn { padding: 11px 20px; }
.api-endpoint-hero { display: block; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.json-preview { max-height: 460px; overflow: auto; }
.code-block pre { overflow-x: auto; white-space: pre; }
.code-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.qa-about-api { max-width: 1200px; margin: 0 auto 2.5rem; padding: 0 clamp(1rem,4vw,2rem); }
.qa-about-api .panel { padding: 1.4rem 1.5rem; }
.qa-about-api h2 { font-family: var(--font-display); color: var(--primary-dark); font-size: 1.5rem; margin-bottom: .5rem; }
.qa-about-api ol { padding-left: 1.2rem; color: var(--text-muted); }
.qa-about-api li { margin: .25rem 0; }
.qa-related { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.qa-related a { font-size: .85rem; background: var(--bg-warm); border: 1px solid var(--border); padding: 6px 12px; border-radius: 50px; }

/* ── Docs ── */
.docs-layout { grid-template-columns: 200px minmax(0,1fr); }
.docs-main, .docs-card { min-width: 0; }
.docs-code-block { display: block; overflow-wrap: anywhere; }
.docs-endpoint-item { min-width: 0; }
.docs-endpoint-item code { overflow-wrap: anywhere; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .qa-hero-grid { grid-template-columns: minmax(0,1fr); }
  .qa-code pre { max-height: 230px; }
}
@media (max-width: 768px) {
  .qa-hero { padding: calc(var(--nav-h) + 18px) 0 26px; }
  .qa-step { padding: .85rem 1rem; }
  .docs-layout { grid-template-columns: minmax(0,1fr); }
  .docs-sidebar-nav { position: static; flex-direction: row; }
  .docs-sidebar-nav { display: flex; overflow-x: auto; gap: .4rem; }
  .docs-sidebar-nav a { white-space: nowrap; }
  .docs-endpoint-item { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .qa-steps-grid { grid-template-columns: minmax(0,1fr); gap: .6rem; }
}
@media (max-width: 480px) {
  .qa-hero h1 { font-size: 1.85rem; }
  .qa-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .qa-actions .btn { width: 100%; padding: 12px 10px; font-size: .9rem; }
  .qa-actions .qa-docs-link { grid-column: 1 / -1; }
  .qa-code-url { font-size: .72rem; }
  .qa-code pre { font-size: .72rem; }
  .qa-detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .qa-detail-actions .btn { width: 100%; padding: 11px 8px; }
}
/* The header now carries the Get API Key button, so the separate premium banner is redundant */
.api-detail-header:has(.qa-detail-actions) ~ .api-detail-body #upgrade-banner { display: none !important; }
