/* qaisdebugs site: tokens, glass, nav, buttons and footer shared by every page. */
:root {
  --bg: #070a14;
  --bg-2: #0d1222;
  --text: #e8ecf6;
  --muted: #9aa4bd;
  --faint: #6b7590;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --edge: rgba(255, 255, 255, 0.12);
  --edge-soft: rgba(255, 255, 255, 0.07);
  --radius: 22px;
  --sans: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
code, pre { font-family: var(--mono); }
:not(.install) > code { font-size: 0.88em; color: #c7d2fe; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--edge-soft); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* ---- the backdrop the glass sits on ---------------------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 700px at 50% -10%, #111a33 0%, var(--bg) 60%); }
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.orb.cyan { width: 520px; height: 520px; background: var(--cyan); top: -120px; left: -140px; opacity: 0.32; }
.orb.violet { width: 600px; height: 600px; background: var(--violet); top: 30%; right: -220px; opacity: 0.28; animation-duration: 28s; }
.orb.green { width: 420px; height: 420px; background: var(--green); bottom: -160px; left: 25%; opacity: 0.16; animation-duration: 34s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } html { scroll-behavior: auto; } }

/* ---- glass ------------------------------------------------------------------------------ */
.glass {
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
/* Grid columns may shrink below a long one-line command, which then scrolls in its box. */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cyan); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-top: 12px; }
.lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 680px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.gradient-text { background: linear-gradient(100deg, #f8fafc 10%, var(--cyan) 45%, var(--violet) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- nav ---------------------------------------------------------------------------------- */
.nav { position: sticky; top: 14px; z-index: 10; margin-top: 14px; }
.nav .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 18px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-links .pill { color: var(--text); border: 1px solid var(--edge); background: rgba(255,255,255,0.05); }
@media (max-width: 760px) { .nav-links .section-link { display: none; } }
/* The smallest phones fit the brand and Guides; GitHub stays linked from the page and footer. */
@media (max-width: 370px) { .nav-links .pill { display: none; } }

/* ---- buttons and the install line ---------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform 0.15s, box-shadow 0.2s, background 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #06101a; background: linear-gradient(120deg, var(--cyan), #67e8f9 40%, var(--violet)); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28); }
.btn.ghost { border: 1px solid var(--edge); background: rgba(255,255,255,0.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn svg { width: 18px; height: 18px; }

.install { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 16px; font-family: var(--mono); font-size: 15px; max-width: 100%; }
.install .prompt { color: var(--green); user-select: none; }
.install code { white-space: nowrap; overflow-x: auto; flex: 1; text-align: left; scrollbar-width: none; }
.copy { flex: none; border: 1px solid var(--edge); background: rgba(255,255,255,0.07); color: var(--text); font: 600 13px var(--sans); padding: 8px 12px; border-radius: 10px; cursor: pointer; transition: background 0.2s; }
.copy:hover { background: rgba(255,255,255,0.13); }
.copy.done { color: var(--green); border-color: rgba(52, 211, 153, 0.5); }
@media (max-width: 420px) { .install { font-size: 13.5px; gap: 8px; } }

footer { padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 18px; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(17, 24, 45, 0.92); } }

/* ---- guides ---------------------------------------------------------------------------------- */
.article { width: min(780px, 100% - 32px); margin-inline: auto; padding: 56px 0 24px; }
.article > * { min-width: 0; max-width: 100%; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.article h1 { font-size: clamp(32px, 5.4vw, 52px); font-weight: 800; letter-spacing: -0.03em; margin-top: 16px; }
.article .meta { color: var(--faint); font-size: 14px; margin: 14px 0 0; }
.article .lead { margin: 18px 0 0; max-width: none; }
.article h2 { font-size: clamp(23px, 3vw, 30px); margin-top: 52px; scroll-margin-top: 96px; }
.article h3 { font-size: 19px; margin-top: 30px; }
.article p, .article li { color: #c9d1e3; font-size: 17px; }
.article ul, .article ol { padding-left: 22px; display: grid; gap: 8px; }
.article a:not(.btn) { color: var(--cyan); text-underline-offset: 3px; }
.article strong { color: var(--text); }
.toc { padding: 20px 24px; margin-top: 30px; }
.toc b { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cyan); }
.toc ol { margin: 10px 0 0; }
.toc li { font-size: 15.5px; }
.article .toc a { color: var(--muted); text-decoration: none; }
.article .toc a:hover { color: var(--text); }
pre.code { margin: 18px 0; padding: 16px 18px; border-radius: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; color: #dbe4ff; }
pre.code > code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.note { margin: 22px 0; padding: 16px 20px; border-radius: 16px; border-left: 3px solid var(--cyan); }
.note p { margin: 0; font-size: 16px; }
.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: 16px; }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.table-scroll th, .table-scroll td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--edge-soft); color: #c9d1e3; }
.table-scroll th { color: var(--text); font-weight: 600; }
.table-scroll tr:last-child td { border-bottom: 0; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 20px; }
.related > * { min-width: 0; }
.article .related a, .related a { display: block; padding: 18px 20px; text-decoration: none; color: var(--text); font-weight: 600; transition: transform 0.2s, border-color 0.2s; }
.related a:hover { transform: translateY(-2px); border-color: rgba(167, 139, 250, 0.45); }
.related span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; }
.guide-cta { margin-top: 60px; padding: 32px clamp(18px, 4vw, 28px); display: grid; gap: 16px; justify-items: start; }
.guide-cta > * { min-width: 0; max-width: 100%; }
.guide-cta h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); }
.guide-cta p { margin: 0; }
