/* Zelon API — design system */
:root {
  color-scheme: light;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --paper: #f8fafc;
  --surface: #ffffff;
  --dark: #060b16;
  --dark-2: #0d1526;
  --dark-line: #ffffff1a;
  --brand: #10b981;
  --brand-600: #059669;
  --brand-700: #047857;
  --brand-50: #ecfdf5;
  --accent: #6366f1;
  --danger: #e11d48;
  --teal: var(--brand-600);
  --radius: 14px;
  --shadow-sm: 0 1px 2px #0f172a0d, 0 1px 3px #0f172a0a;
  --shadow-md: 0 8px 24px -6px #0f172a1a, 0 2px 6px #0f172a0a;
  --shadow-lg: 0 30px 80px -20px #0f172a40;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.6; }
a { color: inherit; text-decoration: none; }
code { font: 0.9em var(--mono); background: #eef2f7; padding: 2px 6px; border-radius: 6px; }

/* Brand */
.brand { font-size: 20px; font-weight: 750; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.brand > span:last-child { font-weight: 500; opacity: 0.55; margin-left: -6px; }
.mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  background: linear-gradient(135deg, #34d399, #059669 60%, #6366f1 130%);
  color: #fff; font-size: 17px; font-weight: 800; border-radius: 10px; padding: 0;
  box-shadow: 0 6px 16px -4px #10b98188, inset 0 1px 0 #ffffff55;
}

/* Header */
header {
  position: sticky; top: 0; z-index: 30; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(5vw, 24px);
  background: #060b16d9; backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--dark-line); color: #fff;
}
header nav { display: flex; align-items: center; gap: 30px; font-size: 14.5px; font-weight: 500; }
header nav > a:not(.btn) { color: #cbd5e1; transition: color 0.15s; }
header nav > a:not(.btn):hover { color: #fff; }

/* Buttons */
.btn {
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #10b981, #059669); border-color: #059669; color: #fff; box-shadow: 0 6px 16px -6px #05966999, inset 0 1px 0 #ffffff33; }
.btn.primary:hover { background: linear-gradient(180deg, #14c48e, #059669); }
.btn.bright { background: #fff; color: #052e22; border-color: #fff; }
.btn.bright:hover { background: #d1fae5; border-color: #d1fae5; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fff1f2; border-color: #fecdd3; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--dark);
  padding: 110px max(5vw, 24px) 120px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 5vw; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 15% 0%, #10b98133, transparent 70%),
    radial-gradient(50% 50% at 90% 20%, #6366f133, transparent 70%),
    linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.hero > * { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700;
  color: var(--brand); margin-bottom: 22px;
}
.hero .eyebrow { padding: 6px 14px; border: 1px solid #10b98155; background: #10b9811a; border-radius: 99px; color: #6ee7b7; }
.hero .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px #34d39933; }
.hero h1 {
  font-size: clamp(42px, 5.6vw, 78px); line-height: 1.04; letter-spacing: -0.045em;
  font-weight: 800; max-width: 720px; margin: 0 0 24px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #6ee7b7, #34d399 40%, #818cf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: #94a3b8; max-width: 520px; font-size: 18.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.hero .btn:not(.bright) { background: #ffffff10; border-color: #ffffff2e; color: #fff; box-shadow: none; }
.hero .btn:not(.bright):hover { background: #ffffff1c; }
.hint { font-size: 14px; color: var(--muted); }
.hero .hint { color: #7c8da5; }

/* Code panel */
.codepanel {
  background: #0b1220; border: 1px solid #ffffff1f; border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px #ffffff08 inset; overflow: hidden;
}
.codehead {
  padding: 14px 20px; border-bottom: 1px solid #ffffff14; color: #94a3b8;
  font: 13px var(--mono); display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #ffffff06;
}
.codehead span:first-child::before { content: "● ● ●"; letter-spacing: 3px; margin-right: 14px; color: #475569; font-size: 10px; }
.codehead span:last-child { color: #6ee7b7; background: #10b9811a; padding: 2px 10px; border-radius: 99px; font-size: 11px; }
.codepanel pre { color: #a7f3d0; padding: 24px; font: 13.5px/1.85 var(--mono); white-space: pre-wrap; word-break: break-word; margin: 0; }
.response { padding: 16px 24px; background: #10b9811a; border-top: 1px solid #10b98133; color: #6ee7b7; font: 13px/1.7 var(--mono); }

/* Sections */
.section { padding: 96px max(5vw, 24px); max-width: 1320px; margin: auto; }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 18px; max-width: 720px; }
.section > .eyebrow { color: var(--brand-600); }
.featuregrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 44px 0 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.featuregrid .card { transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.featuregrid .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #a7f3d0; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.number {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 20px;
  font: 700 13px var(--mono); color: var(--brand-700);
  background: var(--brand-50); border: 1px solid #a7f3d0; border-radius: 11px;
}
.strip {
  position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 48px;
  background: radial-gradient(80% 140% at 100% 0%, #6366f155, transparent 60%), linear-gradient(135deg, #064e3b, #060b16);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: var(--shadow-lg);
}
.strip h3 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.03em; }
.strip p { margin: 0; color: #a7c4bb; }
.strip .btn.primary { background: #fff; color: #052e22; border-color: #fff; box-shadow: none; }
details { border-bottom: 1px solid var(--line); padding: 20px 0; max-width: 820px; }
summary { cursor: pointer; font-weight: 650; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brand-600); font-size: 22px; line-height: 1; transition: transform 0.2s; }
details[open] > summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 12px 0 0; }
footer {
  padding: 36px max(5vw, 24px); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--muted);
}

/* Auth */
.auth {
  min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 32px 24px;
  background: radial-gradient(50% 50% at 50% 0%, #10b98122, transparent 70%), var(--paper);
}
.auth .card { width: min(440px, 100%); padding: 40px; border-radius: 20px; box-shadow: var(--shadow-md); }
.auth h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 8px; }
.auth .eyebrow { margin-bottom: 14px; }
.auth .actions { margin: 24px 0 14px; }
.auth .actions .btn { width: 100%; padding: 12px; }

/* Forms */
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 18px 0 7px; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px #10b98126; }
textarea { resize: vertical; min-height: 110px; }
.error { color: var(--danger); font-size: 14px; }

/* App shell (base) */
.status {
  font-size: 12px; font-weight: 600; background: #f1f5f9; color: #475569;
  border-radius: 99px; padding: 3px 11px; display: inline-flex; align-items: center; gap: 6px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.status.connected, .status.sent, .status.delivered, .status.read, .status.played { color: #047857; background: #d1fae5; }
.status.failed, .status.unknown { color: #be123c; background: #ffe4e6; }
.status.queued, .status.connecting, .status.pending { color: #b45309; background: #fef3c7; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 60px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: #fff; }
.empty h2 { font-size: 22px; margin: 0 0 8px; letter-spacing: -0.02em; }
.empty p { color: var(--muted); }
.panel { max-width: 900px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tablewrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
td { max-width: 350px; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:hover td { background: #f8fafc; }
.qr { width: 240px; max-width: 100%; display: block; margin: 20px auto; border-radius: 14px; padding: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.key { background: var(--dark-2); color: #a7f3d0; padding: 18px 20px; border-radius: 12px; font: 13.5px/1.7 var(--mono); white-space: pre-wrap; word-break: break-all; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.tabs button { font-size: 14px; }
.tabs button.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.modal { position: fixed; inset: 0; background: #020617a6; backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal .card { width: min(460px, 100%); box-shadow: var(--shadow-lg); }
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 13px 22px; border-radius: 12px; font-size: 14.5px;
  border: 1px solid #ffffff1f; box-shadow: var(--shadow-lg); max-width: 90vw; display: none; z-index: 1000;
}
.doccode { background: #0b1220; color: #a7f3d0; border-radius: 12px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.75 var(--mono); }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.mobiletitle { display: none; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding: 80px max(5vw, 24px); gap: 48px; }
  .featuregrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  header { height: 64px; padding: 0 20px; }
  header nav > a:not(.btn) { display: none; }
  header nav { gap: 12px; }
  .hero { padding: 56px 22px 64px; }
  .hero h1 { font-size: 42px; }
  .section { padding: 60px 22px; }
  .featuregrid { grid-template-columns: 1fr; }
  .strip { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .split { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  footer { flex-direction: column; }
  .auth .card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Extended console */
.messagebody { white-space: pre-wrap; overflow-wrap: anywhere; }
.mini { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
.record { padding: 1rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.checkbox { display: flex; gap: 0.5rem; align-items: center; }
.checkbox input { width: auto; }
.record .key { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .tabs .btn { font-size: 0.8rem; }
  .record.row { align-items: flex-start; }
}

/* Landing stats */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding-top:0;padding-bottom:0;margin-top:-48px;position:relative;z-index:2;max-width:1100px}
.stats>div{background:#fff;padding:28px 24px;text-align:center;border:1px solid var(--line);margin-left:-1px;display:flex;flex-direction:column;gap:2px}
.stats>div:first-child{border-radius:16px 0 0 16px;margin-left:0}.stats>div:last-child{border-radius:0 16px 16px 0}
.stats{filter:drop-shadow(0 20px 30px #0f172a1f)}
.stats strong{font-size:30px;letter-spacing:-.04em;background:linear-gradient(90deg,#059669,#6366f1);-webkit-background-clip:text;background-clip:text;color:transparent}
.stats span{font-size:13.5px;color:var(--muted)}
.section.stats{padding-left:0;padding-right:0}
@media(max-width:700px){.stats{grid-template-columns:1fr 1fr;margin:-32px 16px 0}.stats>div{border-radius:0!important;margin:0}}
