:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2330;
  --border: #2a3342;
  --text: #e8ecf1;
  --muted: #9aa4b2;
  --accent: #0096ff;
  --accent-2: #38b6ff;
  --green: #3fb950;
  --amber: #e8a020;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.logo { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  font-weight: 700; font-size: 16px; border: none; cursor: pointer;
  transition: transform .1s, opacity .15s; text-align: center;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-danger { background: transparent; color: #f47067; border: 1px solid #3d2b2e; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 88px 0 64px; }
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.12; max-width: 760px; margin: 0 auto 20px; }
.hero h1 .hl { color: var(--accent); }
.hero p.sub { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 auto 36px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---- Demo widget preview ---- */
.demo { margin: 40px auto 80px; max-width: 720px; }
.demo-label { text-align: center; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }

/* ---- Testimonial cards ---- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.t-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.t-stars { color: var(--amber); font-size: 16px; letter-spacing: 2px; margin-bottom: 12px; }
.t-text { font-size: 15px; margin-bottom: 16px; color: var(--text); }
.t-who { display: flex; align-items: center; gap: 12px; }
.t-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent-2); border: 1px solid var(--border);
  overflow: hidden; flex-shrink: 0;
}
.t-avatar img { width: 100%; height: 100%; object-fit: cover; }
.t-name { font-weight: 600; font-size: 14px; }
.t-role { font-size: 12px; color: var(--muted); }

/* ---- Features ---- */
.features { padding: 40px 0 80px; }
.features h2, .pricing h2 { text-align: center; font-size: 34px; letter-spacing: -0.8px; margin-bottom: 12px; }
.features .lede, .pricing .lede { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 48px; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.f-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.f-card h3 { font-size: 17px; margin-bottom: 8px; }
.f-card p { font-size: 14px; color: var(--muted); }
.f-icon { font-size: 26px; margin-bottom: 14px; display: block; }

/* ---- Pricing ---- */
.pricing { padding: 40px 0 90px; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 720px; margin: 0 auto; }
.p-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px; text-align: center; position: relative;
}
.p-card.pro { border-color: var(--accent); box-shadow: 0 0 40px rgba(91,140,255,.12); }
.p-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 16px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px;
}
.p-card h3 { font-size: 20px; margin-bottom: 8px; }
.p-price { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 4px; }
.p-price span { font-size: 16px; color: var(--muted); font-weight: 400; }
.p-card ul { list-style: none; margin: 24px 0 28px; text-align: left; }
.p-card li { padding: 8px 0; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--border); }
.p-card li:last-child { border: none; }
.p-card li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); padding: 36px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---- App layout ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px; flex-shrink: 0;
}
.sidebar .logo { display: block; margin-bottom: 32px; padding: 0 8px; }
.side-link {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--muted);
  font-size: 14px; font-weight: 500; margin-bottom: 4px; cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  font-family: var(--font);
}
.side-link:hover, .side-link.active { background: var(--surface-2); color: var(--text); text-decoration: none; }
.main { flex: 1; padding: 32px 40px; max-width: 900px; }
.main h1 { font-size: 28px; letter-spacing: -0.5px; margin-bottom: 8px; }
.main .sub { color: var(--muted); margin-bottom: 28px; font-size: 15px; }
.view { display: none; }
.view.active { display: block; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 15px; font-family: var(--font);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.stars-input { display: flex; gap: 6px; font-size: 28px; cursor: pointer; }
.stars-input span { color: var(--border); transition: color .1s; }
.stars-input span.lit { color: var(--amber); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 600px; }

/* ---- Embed ---- */
.embed-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.embed-box h3 { margin-bottom: 12px; font-size: 16px; }
.code-block {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--accent-2); white-space: pre-wrap; word-break: break-all; margin: 12px 0 16px;
  max-height: 220px; overflow-y: auto;
}
.copy-ok { color: var(--green); font-size: 13px; margin-left: 10px; display: none; }

/* ---- Collect link ---- */
.collect-banner { background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 24px; margin-bottom: 28px; }
.collect-banner p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.collect-url { display: flex; gap: 10px; }
.collect-url input { flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 16px; display: block; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); padding: 14px 22px;
  border-radius: var(--radius); font-size: 14px; display: none; z-index: 99;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

/* ---- Collect page ---- */
.collect-page { max-width: 620px; margin: 60px auto; padding: 0 24px; }
.collect-page .form-card { max-width: none; }
.brand-line { text-align: center; margin-bottom: 28px; }
.brand-line .logo { font-size: 18px; }

@media (max-width: 720px) {
  .hero h1 { font-size: 36px; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .main { padding: 24px 20px; }
}

/* ---- ProofStack app additions (2026-10-21) ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 8px; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font);
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.err { color: #f47067; font-size: 14px; min-height: 20px; margin-top: 8px; }
.stars-picker { font-size: 30px; letter-spacing: 4px; cursor: pointer; color: var(--border); }
.stars-picker .lit { color: var(--amber); }
code.snippet { display: block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; font-size: 13px; white-space: pre-wrap; word-break: break-all; color: var(--text); }
