/* ============================================================
 *  site.css — shared design system for the marketing + app shell
 *  Palette matches the telemetry app (GitHub-dark, blue accent).
 * ============================================================ */
:root {
  --bg: #0d1117;
  --bg-2: #010409;
  --panel: #161b22;
  --panel-2: #1c2330;
  --border: #2a3140;
  --border-2: #363f4d;
  --text: #e6edf3;
  --muted: #8b949e;
  --faint: #6e7681;
  --accent: #2f81f7;
  --accent-2: #3fb950;
  --accent-glow: rgba(47, 129, 247, 0.28);
  --danger: #f85149;
  --warn: #d29922;
  --purple: #a371f7;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums lining-nums; }

/* ---- top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 16px; letter-spacing: -0.01em; }
.nav .brand:hover { text-decoration: none; }
.nav .brand svg { width: 26px; height: 26px; color: var(--accent); }
.nav .links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav .links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav .links a:hover { color: var(--text); text-decoration: none; }
.nav .links a.active { color: var(--text); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { box-shadow: 0 4px 22px var(--accent-glow); filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.lg { padding: 13px 24px; font-size: 15px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(680px 340px at 50% -8%, rgba(47,129,247,0.18), transparent 70%),
    radial-gradient(520px 300px at 82% 12%, rgba(63,185,80,0.10), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); background: rgba(47,129,247,0.10);
  border: 1px solid rgba(47,129,247,0.30); border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 60ch; margin: 18px auto 30px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .fineprint { margin-top: 16px; font-size: 13px; color: var(--faint); }

/* ---- generic section ---- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 48px; }
.section-head p { font-size: 1.05rem; }

/* ---- feature grid ---- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card .ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(47,129,247,0.12); color: var(--accent);
}
.card .ic svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 14px; }
.fmt-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.fmt-list li { position: relative; padding-left: 16px; }
.fmt-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.fmt-list .soon { color: var(--muted, #8b949e); }

/* ---- app preview frame on landing ---- */
.preview-shell {
  margin: 44px auto 0; max-width: 980px;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.preview-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.preview-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-2); }
.preview-bar .url { margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.preview-shell img { display: block; width: 100%; }
.preview-shell .ph { aspect-ratio: 16/9; display: grid; place-items: center; color: var(--faint); }

/* ---- pricing ---- */
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; margin: 0 auto; align-items: stretch; }
.tier {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; display: flex; flex-direction: column;
}
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px var(--accent-glow); }
.tier .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; padding: 4px 12px; border-radius: 999px;
}
.tier .tname { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tier .price { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.tier .price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.tier .price-note { font-size: 13px; color: var(--faint); margin-bottom: 22px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 12px; }
.tier li { display: flex; gap: 10px; font-size: 14px; color: var(--text); }
.tier li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.tier li.yes svg { color: var(--accent-2); }
.tier li.no { color: var(--faint); }
.tier li.no svg { color: var(--faint); }
.tier .btn { width: 100%; justify-content: center; margin-top: auto; }
.pricing-foot { text-align: center; color: var(--faint); font-size: 13px; margin-top: 32px; }

/* ---- account ---- */
.acct-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.stat .v { font-size: 1.4rem; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.on { background: rgba(63,185,80,0.14); color: var(--accent-2); border: 1px solid rgba(63,185,80,0.4); }
.pill.off { background: rgba(139,148,158,0.12); color: var(--muted); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.footer .brand svg { width: 22px; height: 22px; color: var(--accent); }
.footer .muted { color: var(--faint); font-size: 13px; }
.footer .flinks { margin-left: auto; display: flex; gap: 18px; }
.footer .flinks a { color: var(--muted); font-size: 13px; }

/* ---- mock license switcher (preview aid) ---- */
.mockbar {
  position: fixed; bottom: 16px; right: 16px; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--accent);
  border-radius: 999px; padding: 8px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  font-size: 12px;
}
.mockbar .lbl { color: var(--muted); font-weight: 600; }
.mockbar button {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.mockbar button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mockbar button:hover { color: var(--text); }

/* ---- modals (shared) ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(1,4,9,.72); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 26px; max-width: 440px; width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.65); }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-body { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.mock-note { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--faint); }

/* ---- legal pages (terms / privacy) ---- */
.legal { max-width: 760px; margin: 0 auto; }
.legal .updated { color: var(--faint); font-size: 13px; margin: 0 0 8px; }
.legal .intro { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal h2 { font-size: 1.15rem; margin: 40px 0 12px; padding-top: 20px; border-top: 1px solid var(--border); letter-spacing: -0.01em; }
.legal h3 { font-size: 1rem; margin: 22px 0 8px; color: var(--text); }
.legal p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal li { margin-bottom: 7px; }
.legal .callout { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; margin: 0 0 22px; }
.legal .callout p:last-child { margin-bottom: 0; }
.legal .table { margin: 4px 0 18px; }
.legal .caps { text-transform: none; }
.legal .contact { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal .contact b { color: var(--text); }
.mock-note .mock-btn { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; margin-left: 4px; font-family: var(--font); }
.mock-note .mock-btn:hover { border-color: var(--accent); }

@media (max-width: 860px) {
  .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .acct-grid { grid-template-columns: 1fr; }
  .nav .links { gap: 14px; }
  .nav .links a:not(.btn) { display: none; }
}

/* ---- FAQ (SEO + LLM answerable content) ---- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  color: var(--text);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.faq-item[open] > summary::after { transform: rotate(45deg); }
.faq-item > p { margin: 0 0 18px; color: var(--muted); }

/* ---- Formats: links in the auto-detect list + clickable format cards ---- */
.fmt-list a { color: var(--accent); text-decoration: none; }
.fmt-list a:hover { text-decoration: underline; }
a.card { display: block; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card h3 { color: var(--text); }

/* ---- Docs layout ---- */
.docs-shell { display: grid; grid-template-columns: 260px 1fr; gap: 40px; max-width: 1140px; margin: 0 auto; padding: 32px 24px 72px; align-items: start; }
.docs-side { position: sticky; top: 88px; align-self: start; }
.docs-side .grp { margin-bottom: 20px; }
.docs-side .grp-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.docs-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.92rem; border-left: 2px solid transparent; }
.docs-side a:hover { color: var(--text); background: var(--panel); }
.docs-side a.active { color: var(--text); background: var(--panel); border-left-color: var(--accent); font-weight: 600; }
.docs-main { min-width: 0; max-width: 760px; }
.docs-main h1 { margin-top: 0; }
.docs-main h2 { margin-top: 36px; font-size: 1.35rem; }
.docs-main p { color: var(--muted); line-height: 1.7; }
.docs-main ul, .docs-main ol { color: var(--muted); line-height: 1.7; padding-left: 22px; }
.docs-main li { margin-bottom: 6px; }
.docs-lead { font-size: 1.08rem; color: var(--text) !important; margin-bottom: 8px; }
.docs-steps { counter-reset: step; list-style: none; padding-left: 0; }
.docs-steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; min-height: 30px; display: flex; align-items: center; }
.docs-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #0d1117; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.docs-note { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; color: var(--muted); }
.docs-note::before { content: "Note"; display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.docs-kbd { width: 100%; border-collapse: collapse; margin: 8px 0 20px; }
.docs-kbd td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted); }
.docs-kbd td:first-child { white-space: nowrap; width: 200px; }
.docs-kbd kbd { background: var(--panel); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 2px 8px; font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--text); }
.docs-nextprev { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-nextprev a { color: var(--accent); text-decoration: none; font-weight: 600; }
.docs-nextprev a:hover { text-decoration: underline; }
.docs-nextprev .np-label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 2px; }
@media (max-width: 860px) { .docs-shell { grid-template-columns: 1fr; gap: 24px; } .docs-side { position: static; } .docs-side ul { flex-direction: row; flex-wrap: wrap; } }
