/* appreviews. Dark, quiet, typographic. One accent, one mono. */

:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --panel: #12161e;
  --panel-2: #171c26;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #eef1f6;
  --ink-2: #b6bfcd;
  --muted: #7d889a;
  --accent: #7aa2ff;
  --accent-2: #a8c1ff;
  --accent-ink: #0b0d12;
  --star: #f5b93a;
  --ok: #4cd08a;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 60px -30px rgba(0, 0, 0, 0.8);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(122, 162, 255, 0.16), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
::selection { background: rgba(122, 162, 255, 0.35); }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.95rem; }
strong { font-weight: 600; color: var(--ink); }
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: 0.25rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); padding: 0.1em 0.4em; border-radius: 6px; color: var(--ink); }
pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 2;
}
pre code { background: none; border: 0; padding: 0; font-size: 0.8rem; color: var(--ink-2); }
pre .k { color: #c9d4ff; }           /* JSON keys */
pre .s { color: #9ee3b4; }           /* strings */
pre .n { color: #f6c177; }           /* numbers, null, bool */
pre .c { color: var(--muted); }      /* comments / prompt */

table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: 0.95rem; }
td, th { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.wrap { width: min(72rem, 100% - 2.5rem); margin: 0 auto; }
.narrow { width: min(46rem, 100% - 2.5rem); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mono { font-family: var(--mono); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 1.25rem; height: 1px; background: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 38rem; line-height: 1.55; }

.mt { margin-top: 1.25rem; }
.mt-1 { margin-top: 1rem; }
.right { text-align: right; }
.intro { padding: 4rem 0 1.5rem; max-width: 44rem; }
.intro h1 { margin: 0.75rem 0; }
.intro .lede { margin: 0; }
.docs article h1 { font-size: 2.2rem; margin: 0.75rem 0 1rem; }
.pack-row { margin: 0; }
.pack-row .buy { display: flex; align-items: center; gap: 1rem; }

/* Header and footer */
header.site {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 3.75rem; }
header.site nav { display: flex; align-items: center; gap: 1.5rem; }
header.site nav a, header.site nav button.link { color: var(--ink-2); font-size: 0.95rem; text-decoration: none; }
header.site nav a:hover, header.site nav button.link:hover { color: #fff; }
header.site nav a.btn { color: var(--accent-ink); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-size: 1.05rem; }
.brand svg { width: 22px; height: 22px; }
@media (max-width: 40rem) { header.site nav { gap: 1rem; } header.site nav .hide-s { display: none; } }

footer.site { border-top: 1px solid var(--line); margin-top: 5rem; padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
footer.site nav { display: flex; gap: 1.4rem; }
footer.site a { color: var(--ink-2); }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 10px;
  padding: 0.7rem 1.15rem; font: inherit; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { background: var(--accent-2); color: var(--accent-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn.small { padding: 0.45rem 0.85rem; font-size: 0.875rem; border-radius: 8px; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; cursor: pointer; }
button.link:hover { color: #fff; }
button.link.danger { color: var(--danger); }
form.button_to { display: inline; margin: 0; }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); }
.hint { color: var(--muted); font-size: 0.82rem; font-weight: 400; }
input[type="email"], input[type="password"], input[type="text"] {
  font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.25); }
input::placeholder { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.inline { display: flex; gap: 0.6rem; }
.inline input { flex: 1; }

.banner { margin: 1.25rem auto 0; padding: 0.8rem 1rem; border-radius: var(--radius-s); border: 1px solid; font-size: 0.95rem; }
.banner.alert { background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.35); color: #ffb3b3; }
.banner.notice { background: rgba(76, 208, 138, 0.1); border-color: rgba(76, 208, 138, 0.35); color: #a9ecc6; }

/* Cards and panels */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-bottom: 0.75rem; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 56rem) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

/* Code window */
.window { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.window .bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.window .dots { display: flex; gap: 6px; margin-right: 0.5rem; }
.window .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.window .tab { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); padding: 0.25rem 0.6rem; border-radius: 6px; }
.window .tab.on { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.window .bar .copy { margin-left: auto; }
.window pre { margin: 0; border: 0; border-radius: 0; padding: 1.1rem 1.2rem; background: transparent; }
.window pre + pre { border-top: 1px solid var(--line); }
.copy { background: none; border: 1px solid var(--line-2); color: var(--muted); border-radius: 6px; padding: 0.25rem 0.55rem; font: inherit; font-size: 0.75rem; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
.copy[data-copied] { color: var(--ok); border-color: rgba(76, 208, 138, 0.5); }

/* Home */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (max-width: 60rem) { .hero { grid-template-columns: 1fr; } }
.hero h1 { margin: 1rem 0 1.25rem; max-width: 18ch; font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
.hero .lede { margin-bottom: 1.75rem; }
.hero .btn-row { margin-bottom: 1.5rem; }
.stores { display: flex; gap: 1.25rem; align-items: center; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }
.stores span { display: inline-flex; align-items: center; gap: 0.5rem; }
.stores svg { width: 18px; height: 18px; fill: currentColor; }

.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin: 1rem 0 0; }
.proof div { padding: 1.25rem 1.5rem; border-right: 1px solid var(--line); }
.proof div:last-child { border-right: 0; }
.proof b { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; }
.proof span { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 56rem) { .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } .proof div:nth-child(2) { border-right: 0; } .proof div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0.6rem 0 0.75rem; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }

.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.feature .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(122, 162, 255, 0.12); color: var(--accent-2); margin-bottom: 1rem; }
.feature .icon svg { width: 18px; height: 18px; }
.feature h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 56rem) { .reviews { grid-template-columns: 1fr; } }
.review { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: flex; flex-direction: column; gap: 0.6rem; }
.review .who { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); }
.review .who b { color: var(--ink-2); font-weight: 500; }
.review h4 { font-size: 1rem; }
.review p { margin: 0; color: var(--ink-2); font-size: 0.95rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.stars { display: inline-flex; gap: 2px; color: var(--star); letter-spacing: 0; }
.stars svg { width: 14px; height: 14px; fill: currentColor; }
.stars .off { color: rgba(255, 255, 255, 0.14); }
.app-chip { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 1rem; }
.app-chip img { width: 48px; height: 48px; border-radius: 11px; }
.app-chip b { display: block; }
.app-chip span { color: var(--muted); font-size: 0.85rem; }
.app-chip .rating { margin-left: auto; text-align: right; }
.app-chip .rating b { font-size: 1.25rem; letter-spacing: -0.02em; }

/* Packs */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 56rem) { .packs { grid-template-columns: 1fr; } }
.pack { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.pack.featured { border-color: rgba(122, 162, 255, 0.5); background: linear-gradient(180deg, rgba(122, 162, 255, 0.1), var(--panel) 60%); }
.pack .tag { position: absolute; top: -0.7rem; left: 1.25rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 0.2rem 0.6rem; border-radius: 999px; }
.pack .name { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.pack .credits { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.pack .price { font-size: 2.4rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin: 0.4rem 0 0; }
.pack .per { color: var(--muted); font-size: 0.9rem; }
.pack ul { list-style: none; padding: 0; margin: 1rem 0 1.25rem; color: var(--ink-2); font-size: 0.92rem; }
.pack ul li { padding-left: 1.4rem; position: relative; margin: 0.35rem 0; }
.pack ul li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6rem; height: 0.35rem; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.pack form, .pack .btn { margin-top: auto; }
.pack form .btn { width: 100%; }
.packs.compact { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
@media (max-width: 48rem) { .faq { grid-template-columns: 1fr; } }
.faq h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.faq p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.cta-band { margin-top: clamp(3rem, 7vw, 5.5rem); padding: clamp(2rem, 5vw, 3.5rem); border-radius: 20px; border: 1px solid rgba(122, 162, 255, 0.35); background: radial-gradient(800px 300px at 20% 0%, rgba(122, 162, 255, 0.22), transparent 70%), var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { margin: 0; color: var(--ink-2); }

/* Docs */
.docs { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3.5rem; padding: 3rem 0 0; }
@media (max-width: 56rem) { .docs { grid-template-columns: 1fr; gap: 1.5rem; } .docs aside { position: static; } }
.docs aside { position: sticky; top: 5rem; align-self: start; font-size: 0.9rem; }
.docs aside b { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 1.25rem 0 0.5rem; }
.docs aside a { display: block; color: var(--ink-2); padding: 0.25rem 0; }
.docs aside a:hover { color: #fff; }
.docs aside code { background: none; border: 0; padding: 0; color: inherit; font-size: 0.8rem; }
.docs article > section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.docs article > section:last-child { border-bottom: 0; }
.docs article h2 { margin-bottom: 0.75rem; }
.docs article h3 { margin: 2rem 0 0.75rem; }
.docs article p, .docs article li { color: var(--ink-2); }
.endpoint { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 2.5rem 0 1rem; }
.endpoint .method { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 6px; background: rgba(76, 208, 138, 0.15); color: var(--ok); }
.endpoint code { font-size: 1rem; background: none; border: 0; padding: 0; color: var(--ink); }
.endpoint .free { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.1rem 0.5rem; }
.params th:first-child, .params td:first-child { width: 8rem; }
.params td code { white-space: nowrap; }
.status { font-family: var(--mono); font-weight: 600; }

/* Dashboard */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 3rem 0 1.75rem; }
.page-head h1 { font-size: 2rem; }
.page-head p { margin: 0.25rem 0 0; color: var(--muted); }
.stat { padding: 1.25rem 1.5rem; }
.stat .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.stat .value { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin: 0.35rem 0 0.25rem; }
.stat .sub { color: var(--muted); font-size: 0.85rem; }
.stat.low .value { color: var(--danger); }
.new-key { border-color: rgba(122, 162, 255, 0.55); background: radial-gradient(600px 200px at 0% 0%, rgba(122, 162, 255, 0.18), transparent 70%), var(--panel); margin-bottom: 1.25rem; }
.key-box { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; margin: 0.75rem 0 1rem; }
.key-box code { flex: 1; background: none; border: 0; padding: 0; font-size: 0.95rem; word-break: break-all; color: var(--ink); }
.keys td { vertical-align: middle; }
.keys .name { color: var(--ink-2); }
.keys td:last-child { text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 0.5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars .bar i { display: block; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity: 0.9; }
.bars .bar:hover i { opacity: 1; filter: brightness(1.15); }
.bars .bar.zero i { background: rgba(255, 255, 255, 0.06); }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; margin-top: 0.5rem; }
.usage-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.25rem; }
.usage-total b { font-size: 1.5rem; letter-spacing: -0.03em; }
.empty { color: var(--muted); padding: 1.5rem 0; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius-s); }

/* Auth */
.auth { width: min(26rem, 100% - 2.5rem); margin: clamp(2.5rem, 8vw, 6rem) auto 0; }
.auth .card { padding: 2rem; }
.auth h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.auth .card > p.muted { margin-bottom: 1.5rem; }
.auth .btn { margin-top: 0.5rem; }
.auth .alt { text-align: center; margin: 1.25rem 0 0; color: var(--muted); font-size: 0.92rem; }
.auth .alt a { color: var(--ink-2); }
.auth .errors { color: #ffb3b3; font-size: 0.9rem; margin: -0.25rem 0 0.5rem; padding-left: 1rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
