/* emailverificationapi.io — developer docs aesthetic, mobile first */

/* The HTML hidden attribute must always win. Author rules like .progress{display:flex}
   otherwise override the UA [hidden]{display:none}, leaving loaders/bars stuck visible. */
[hidden] { display: none !important; }

:root {
  --bg: #0b0e16;
  --bg-raise: #11151f;
  --bg-code: #0d1019;
  --border: #1f2533;
  --border-soft: #181d2a;
  --indigo: #6366f1;
  --indigo-soft: #818cf8;
  --indigo-glow: rgba(99, 102, 241, 0.16);
  --text: #e2e8f0;
  --text-mute: #94a3b8;
  --text-faint: #64748b;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --grey: #94a3b8;
  --sans: "Manrope", sans-serif;
  --mono: "Fira Code", monospace;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible,
summary:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--indigo-glow);
  color: var(--indigo-soft);
  padding: 0.1em 0.4em;
  border-radius: 5px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── buttons ───────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(180deg, #767af5, var(--indigo));
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { background: linear-gradient(180deg, #8487f7, #6d70f3); color: #fff; }
.btn-ghost { color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo-soft); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ── header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 14, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo b { color: var(--indigo-soft); }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; }

.header-nav {
  display: none;
  gap: 1.4rem;
  margin-left: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.header-nav a { color: var(--text-mute); }
.header-nav a:hover { color: var(--text); text-decoration: none; }
@media (min-width: 760px) { .header-nav { display: flex; } }

.header-actions { margin-left: auto; display: flex; gap: 0.6rem; align-items: center; }
.header-actions .btn-ghost { display: none; }
@media (min-width: 560px) { .header-actions .btn-ghost { display: inline-block; } }

/* ── hero ──────────────────────────────────────── */
.hero {
  background:
    radial-gradient(60rem 30rem at 80% -10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(40rem 24rem at 8% 10%, rgba(56, 189, 248, 0.07), transparent 60%),
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 920px) { .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; } }

h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #f1f5f9 55%, var(--indigo-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.1rem;
}

.hero-lede { color: var(--text-mute); font-size: 1.08rem; max-width: 34rem; margin-bottom: 1.4rem; }

.stat-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.7rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mute);
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 8px var(--indigo); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0.8rem; }
.hero-note { color: var(--text-faint); font-size: 0.85rem; }

/* ── live demo panel ───────────────────────────── */
.demo-panel {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.08);
}
.demo-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.demo-path { background: none; color: var(--text); font-size: 0.95rem; padding: 0; }
.demo-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.method-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}
.m-post { background: var(--indigo); color: #fff; }
.m-get { background: rgba(52, 211, 153, 0.16); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.35); }

.demo-form { display: flex; gap: 0.6rem; }
.demo-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.62rem 0.85rem;
}
.demo-form input::placeholder { color: var(--text-faint); }
.demo-form input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-glow); }
.demo-form button {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(180deg, #767af5, var(--indigo));
  border: none;
  border-radius: var(--radius);
  padding: 0.62rem 1.2rem;
  cursor: pointer;
}
.demo-form button:hover { filter: brightness(1.08); }
.demo-form button:disabled { opacity: 0.5; cursor: wait; }

.demo-hint { color: var(--text-faint); font-size: 0.78rem; margin-top: 0.6rem; }

.demo-out { margin-top: 0.9rem; }
.demo-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-mute);
  padding: 0.6rem 0.2rem;
}
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { border-top-color: var(--border); } }

.demo-error {
  font-size: 0.88rem;
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
}

.demo-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}
.demo-remaining { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.55rem; }
.demo-cta {
  display: block;
  text-align: center;
  margin-top: 0.85rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(180deg, #767af5, var(--indigo));
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
}
.demo-cta:hover { text-decoration: none; filter: brightness(1.08); }

/* status pills + flag chips (shared by demo + overview) */
.status-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.p-deliverable { background: rgba(52, 211, 153, 0.14); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.4); }
.p-undeliverable { background: rgba(248, 113, 113, 0.12); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.4); }
.p-risky { background: rgba(251, 191, 36, 0.12); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.4); }
.p-unknown { background: rgba(148, 163, 184, 0.12); color: var(--grey); border: 1px solid rgba(148, 163, 184, 0.4); }

.flag-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--indigo-soft);
  background: var(--indigo-glow);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
}

/* ── docs shell (sidebar + content) ────────────── */
.docs-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 920px) {
  .docs-shell { grid-template-columns: 13.5rem 1fr; gap: 3rem; }
}

.side-nav { display: none; }
@media (min-width: 920px) {
  .side-nav {
    display: block;
    position: sticky;
    top: 4.5rem;
    align-self: start;
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
    padding: 2.2rem 0 2rem;
    font-size: 0.86rem;
  }
}
.side-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}
.side-link {
  display: block;
  color: var(--text-mute);
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-left: 2px solid var(--border-soft);
}
.side-link:hover { color: var(--text); text-decoration: none; }
.side-link.is-current { color: var(--indigo-soft); border-left-color: var(--indigo); }
.side-sub { padding-left: 1.4rem; font-weight: 500; font-family: var(--mono); font-size: 0.74rem; }

.docs-main { min-width: 0; padding: 1rem 0 2rem; }

.doc-section { padding: 2.4rem 0; border-bottom: 1px solid var(--border-soft); }
.doc-section:last-child { border-bottom: none; }

h2 {
  font-weight: 800;
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.doc-section p { color: var(--text-mute); margin-bottom: 1rem; max-width: 46rem; }
.doc-section p strong { color: var(--text); }
.doc-section p em { color: var(--text); font-style: italic; }

.fine-note { font-size: 0.85rem; color: var(--text-faint); }

/* status grid */
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1.2rem 0 1.4rem;
}
@media (min-width: 640px) { .status-grid { grid-template-columns: 1fr 1fr; } }
.status-card {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.status-card p { font-size: 0.88rem; margin: 0.6rem 0 0; }

/* ── code blocks + tabs ────────────────────────── */
.code-block {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  color: var(--text);
}
.code-block code { background: none; color: inherit; padding: 0; font-size: inherit; }

.block-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 1.2rem 0 0.5rem;
}
.resp-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(52, 211, 153, 0.12);
  border-radius: 5px;
  padding: 0.12rem 0.45rem;
  margin-left: 0.3rem;
  letter-spacing: 0;
}
.resp-mime {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
}

.code-tabs { margin: 1.2rem 0; }
.tab-row {
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-raise);
  padding: 0.4rem 0.5rem 0;
}
.tab-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-mute);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--indigo-soft); border-bottom-color: var(--indigo); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.tab-panel .code-block { border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 0; }

/* hand-rolled token colors */
.tk-k { color: #c084fc; }            /* keyword */
.tk-s { color: #86efac; }            /* string */
.tk-f { color: #93c5fd; }            /* function / command */
.tk-v { color: #f0abfc; }            /* variable / object */
.tk-c { color: #64748b; font-style: italic; } /* comment */
.tk-p { color: #94a3b8; }            /* punctuation */
.tk-fl { color: #a5b4fc; }           /* flag / header name */

/* JSON tokens (applied by script.js highlighter) */
.tok-key { color: #a5b4fc; }
.tok-str { color: #86efac; }
.tok-num { color: #fbbf24; }
.tok-bool { color: #f472b6; }
.tok-null { color: #94a3b8; }

/* ── endpoint cards ────────────────────────────── */
.ep-card {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.4rem;
}
.ep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.ep-head code {
  background: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0;
  word-break: break-all;
}
.ep-card .code-block { margin-bottom: 0.4rem; }
.ep-card p { font-size: 0.94rem; }

/* ── pricing ───────────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.9rem;
  margin: 1.4rem 0;
}
.price-card {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.1rem 1.1rem;
  position: relative;
}
.price-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-mute); margin-bottom: 0.4rem; }
.price-num { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.price-credits { color: var(--text); font-weight: 600; font-size: 0.9rem; }
.price-per { color: var(--text-faint); font-size: 0.78rem; font-family: var(--mono); margin-top: 0.3rem; }
.price-card.is-popular {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px var(--indigo), 0 12px 36px rgba(99, 102, 241, 0.25);
}
.pop-tag {
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--indigo);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
}

/* billing toggle — segmented pill */
.ev-billing-toggle {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem;
  margin: 0.4rem 0 0.2rem;
}
.ev-bill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-mute);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 0.42rem 1rem;
  cursor: pointer;
}
.ev-bill-btn:hover { color: var(--text); }
.ev-bill-btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, #767af5, var(--indigo));
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.ev-bill-save {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(52, 211, 153, 0.14);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
}
.ev-bill-btn.is-active .ev-bill-save { color: #fff; background: rgba(255, 255, 255, 0.18); }

/* monthly plan extras */
.price-interval { font-size: 0.95rem; font-weight: 700; color: var(--text-mute); margin-left: 0.15rem; }
.price-note { color: var(--text-faint); font-size: 0.78rem; margin-top: 0.5rem; line-height: 1.5; }

/* ── faq ───────────────────────────────────────── */
.faq-row {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  max-width: 46rem;
}
.faq-row summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 0.9rem 1.1rem;
  list-style: none;
  position: relative;
  padding-right: 2.4rem;
}
.faq-row summary::-webkit-details-marker { display: none; }
.faq-row summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--indigo-soft);
  font-weight: 400;
  font-size: 1.3rem;
}
.faq-row[open] summary::after { content: "−"; }
.faq-row p { padding: 0 1.1rem 1rem; font-size: 0.9rem; color: var(--text-mute); margin: 0; }

/* ── footer ────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-soft); background: #090c12; margin-top: 2rem; }
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.6rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; } }

.footer-brand { font-weight: 800; font-size: 1.05rem; }
.footer-brand b { color: var(--indigo-soft); }
.footer-tag { color: var(--text-faint); font-size: 0.88rem; margin: 0.5rem 0 1rem; max-width: 18rem; }
.footer-copy { color: var(--text-faint); font-size: 0.8rem; }

.footer-head {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}
.footer-col ul { list-style: none; margin-bottom: 1.4rem; }
.footer-col li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.footer-col a { color: var(--text-mute); }
.footer-col a:hover { color: var(--text); }

/* ── legal pages ───────────────────────────────── */
.legal-wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.legal-wrap h1 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
}
.legal-wrap h2 { font-size: 1.15rem; margin-top: 2.2rem; }
.legal-wrap p, .legal-wrap li { color: var(--text-mute); font-size: 0.94rem; margin-bottom: 0.85rem; }
.legal-wrap ul { margin: 0 0 1rem 1.4rem; }
.legal-updated { color: var(--text-faint); font-size: 0.82rem; margin-bottom: 2rem; }
