/* ─── Tally Public Site — Shared Styles ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --red:    #e53935;
  --red-d:  #b71c1c;
  --red-l:  #ffcdd2;
  --amber:  #f59e0b;
  --navy:   #0f172a;
  --navy-m: #1e293b;
  --navy-l: #334155;
  --slate:  #64748b;
  --white:  #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-800: #1e293b;
  --green:  #10b981;

  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.18);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Nav ─────────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img { height: 60px; position: relative; top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
  text-decoration: none;
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.07); }
.nav-links a.active { color: var(--white); }

/* ─── Nav dropdowns ─────────────────────────────────────────────────────── */
.nav-item {
  position: relative;
}
.nav-item > a {
  display: flex;
  align-items: center;
  gap: 3px;
}
.nav-caret {
  font-size: 10px;
  opacity: .6;
  transition: transform .2s;
  line-height: 1;
}
.nav-item:hover .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 6px 0;
  padding-top: 12px; /* top padding creates the visual gap while keeping hover area connected */
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .15s, transform .15s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.nav-dropdown a {
  padding: 8px 18px;
  border-radius: 0;
  font-size: 13px;
  white-space: nowrap;
  background: none;
}
.nav-dropdown a:hover {
  background: rgba(255,255,255,.07);
}
.nav-dropdown a:last-child  { border-radius: 0 0 8px 8px; }

/* ─── Full-screen mobile nav overlay ───────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--navy);
  color: rgba(255,255,255,.85);
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.mobile-nav-overlay.open {
  transform: translateX(0);
}
body.mno-visible .mobile-nav-overlay {
  display: flex;
}

.mno-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.mno-logo { height: 52px; }

.mno-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  margin-right: -8px;
  transition: color .15s;
}
.mno-close:hover { color: #fff; }

/* Scrollable nav body — header and actions stay fixed */
.mno-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

/* Collapsible section label (rendered as <button>) */
.mno-section-label {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 17px;
  font-weight: 500;
  padding: 13px 28px;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.mno-section-label:hover, .mno-section-label:active {
  background: rgba(255,255,255,.06);
}

.mno-section-chevron {
  color: rgba(255,255,255,.4);
  font-size: 13px;
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.mno-section-label.open .mno-section-chevron {
  transform: rotate(180deg);
  color: var(--teal, #4ecdc4);
}
.mno-section-label.open {
  color: #fff;
}

/* Collapsible sub-link container — grid technique (reliable in all browsers) */
.mno-subnav {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
  background: rgba(0,0,0,.15);
}
.mno-subnav.open {
  grid-template-rows: 1fr;
}
/* Inner wrapper provides the overflow clip during transition */
.mno-subnav > div {
  overflow: hidden;
}

.mno-link {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: 17px;
  font-weight: 500;
  padding: 13px 28px;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.mno-link:hover, .mno-link:active {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-left-color: var(--teal, #4ecdc4);
}
.mno-link.mno-sub {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  padding: 10px 28px 10px 44px;
  border-left: none;
}
.mno-link.mno-sub:hover, .mno-link.mno-sub:active {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.05);
  border-left: none;
}

.mno-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 4px 28px;
}

/* Action buttons — always visible at bottom */
.mno-actions {
  padding: 16px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  background: var(--navy);
}
.mno-actions a {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.mno-actions a:hover { opacity: .85; }
.mno-btn-login {
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
}
.mno-btn-signup {
  background: var(--teal, #4ecdc4);
  color: #0a1628;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn-nav-login {
  display: none; /* hidden by default; shown only for admin IP via nav.js */
  color: rgba(255,255,255,.8);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.2);
  transition: all .15s;
  text-decoration: none;
}

.btn-nav-login:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.07);
  text-decoration: none;
}

.btn-nav-signup {
  background: var(--red);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  transition: background .15s;
  text-decoration: none;
}

.btn-nav-signup:hover {
  background: var(--red-d);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: all .25s;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
  line-height: 1;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-d);
  text-decoration: none;
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--navy-l);
  background: var(--gray-50);
  text-decoration: none;
  color: var(--navy);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--r-md);
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1.5px solid rgba(255,255,255,.25);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.07);
  text-decoration: none;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
section.tight { padding: 56px 0; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  background: var(--navy);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(229,57,53,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 30%, rgba(245,158,11,.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229,57,53,.15);
  border: 1px solid rgba(229,57,53,.3);
  color: #ff8a80;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--red); }

.hero-lead {
  font-size: 18px;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

/* ─── Terminal card ───────────────────────────────────────────────────────── */

.terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.terminal-dot.red   { background: #ff5f57; }
.terminal-dot.amber { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  font-family: var(--mono);
  margin-left: 6px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
}

.t-dim   { color: rgba(255,255,255,.3); }
.t-white { color: rgba(255,255,255,.85); }
.t-red   { color: #ff7b7b; }
.t-green { color: #7ec5a0; }
.t-amber { color: #ffc87a; }
.t-blue  { color: #79b8ff; }
.t-gray  { color: rgba(255,255,255,.45); }
.t-key   { color: #b58cff; }

/* ─── Sections ────────────────────────────────────────────────────────────── */

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 14px;
}

.section-lead {
  font-size: 17px;
  color: var(--slate);
  line-height: 1.65;
  max-width: 620px;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: rgba(229,57,53,.3);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.card-icon.red    { background: rgba(229,57,53,.1); }
.card-icon.amber  { background: rgba(245,158,11,.1); }
.card-icon.green  { background: rgba(16,185,129,.1); }
.card-icon.purple { background: rgba(139,92,246,.1); }
.card-icon.blue   { background: rgba(59,130,246,.1); }

.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
}

/* ─── Steps ───────────────────────────────────────────────────────────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 48px;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  position: relative;
}

.step + .step { margin-top: 40px; }

.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}

.step-num.active { background: var(--red); }

.step-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  padding-top: 10px;
}

.step-content p {
  font-size: 14.5px;
  color: var(--slate);
  line-height: 1.65;
}

/* ─── Stats strip ─────────────────────────────────────────────────────────── */

.stats-strip {
  background: var(--navy);
  padding: 56px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-val {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-val span { color: var(--red); }

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-top: 6px;
}

/* ─── CTA section ─────────────────────────────────────────────────────────── */

.cta-section {
  background: linear-gradient(135deg, var(--red-d) 0%, var(--red) 100%);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
  margin-bottom: 14px;
}

.cta-section p {
  font-size: 17px;
  color: rgba(255,255,255,.8);
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand img { height: 36px; margin-bottom: 12px; }

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
  max-width: 240px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .15s;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12.5px;
  color: rgba(255,255,255,.3);
}

.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ─── Code blocks ─────────────────────────────────────────────────────────── */

.code-block {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 20px 0;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.code-lang {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.code-copy {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--mono);
  transition: color .15s;
}

.code-copy:hover { color: rgba(255,255,255,.8); }

.code-block pre {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  color: rgba(255,255,255,.85);
}

/* ─── Badges & Tags ───────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-red    { background: rgba(229,57,53,.12); color: var(--red-d); }
.badge-green  { background: rgba(16,185,129,.12); color: #065f46; }
.badge-amber  { background: rgba(245,158,11,.12); color: #92400e; }
.badge-slate  { background: var(--gray-100); color: var(--slate); }

/* ─── Form elements ───────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}

/* ─── Auth card ───────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 48px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}

.auth-card .logo-wrap {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card .logo-wrap img {
  height: 40px;
  margin-bottom: 12px;
}

.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  letter-spacing: -.4px;
  margin-bottom: 8px;
}

.auth-card .sub {
  font-size: 14px;
  color: var(--slate);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 32px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--slate);
  font-size: 12.5px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}

.google-btn:hover {
  border-color: var(--navy-l);
  background: var(--gray-50);
  box-shadow: var(--shadow-sm);
}

.google-btn img { width: 20px; }

.auth-note {
  font-size: 12px;
  color: var(--slate);
  text-align: center;
  line-height: 1.6;
  margin-top: 20px;
}

.auth-note a { color: var(--slate); text-decoration: underline; }

/* ─── Alert ───────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: none;
}

.alert-error   { background: rgba(229,57,53,.08); border: 1px solid rgba(229,57,53,.25); color: var(--red-d); }
.alert-success { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.25); color: #065f46; }
.alert.show    { display: block; }

/* ─── Demo/Harness page ───────────────────────────────────────────────────── */

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-top: 40px;
}

.demo-feed {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 420px;
}

.demo-feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.demo-live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
}

.demo-feed-title {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

.demo-events {
  padding: 14px;
  height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-events::-webkit-scrollbar { width: 4px; }
.demo-events::-webkit-scrollbar-track { background: transparent; }
.demo-events::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.demo-event {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 6px;
  animation: slideIn .2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.demo-event:hover { background: rgba(255,255,255,.04); }

.event-time {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
  padding-top: 1px;
  min-width: 54px;
}

.event-model {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  font-weight: 600;
}

.model-haiku    { background: rgba(16,185,129,.15); color: #6ee7b7; }
.model-sonnet   { background: rgba(229,57,53,.15);  color: #fca5a5; }
.model-opus     { background: rgba(139,92,246,.15); color: #c4b5fd; }
.model-gpt4o    { background: rgba(59,130,246,.15); color: #93c5fd; }
.model-gpt4m    { background: rgba(245,158,11,.15); color: #fcd34d; }
.model-gemini   { background: rgba(6,182,212,.15);  color: #67e8f9; }

.event-scenario {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,.55);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-cost {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(245,158,11,.7);
  flex-shrink: 0;
}

.event-explore {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
}

/* Stats sidebar */
.demo-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-stat-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 20px;
}

.demo-stat-card h4 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 10px;
}

.demo-stat-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -1px;
  line-height: 1;
}

.demo-stat-sub {
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
}

.demo-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.model-dist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-bar-label {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--slate);
  min-width: 80px;
}

.model-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

.model-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

.model-bar-pct {
  font-size: 11px;
  color: var(--slate);
  min-width: 34px;
  text-align: right;
}

/* ─── Docs ────────────────────────────────────────────────────────────────── */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 100px;
}

.docs-sidebar h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 10px;
  margin-top: 24px;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-sidebar a {
  display: block;
  font-size: 13.5px;
  color: var(--slate);
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
}

.docs-sidebar a:hover { color: var(--navy); }
.docs-sidebar a.active { color: var(--red); border-color: var(--red); }

.docs-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.4px;
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.docs-content h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 10px;
}

.docs-content p {
  font-size: 15px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.docs-content ul, .docs-content ol {
  margin: 12px 0 16px 20px;
}

.docs-content li {
  font-size: 15px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 6px;
}

.docs-content code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red-d);
}

.docs-content .code-block code {
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}

/* ─── How it Works ────────────────────────────────────────────────────────── */

.hiw-phase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--gray-200);
}

.hiw-phase:first-child { border-top: none; padding-top: 0; }
.hiw-phase.reverse { direction: rtl; }
.hiw-phase.reverse > * { direction: ltr; }

.hiw-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.hiw-phase h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.4px;
  margin-bottom: 14px;
  line-height: 1.25;
}

.hiw-phase p {
  font-size: 15.5px;
  color: var(--slate);
  line-height: 1.7;
  margin-bottom: 14px;
}

.hiw-visual {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* ─── Page hero (sub pages) ───────────────────────────────────────────────── */

.page-hero {
  background: var(--navy);
  padding: 36px 0 32px;
}

.page-hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.8px;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 17px;
  color: rgba(255,255,255,.6);
  max-width: 560px;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .hero-visual { display: none; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hiw-phase { grid-template-columns: 1fr; gap: 32px; }
  .hiw-phase.reverse { direction: ltr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Nav wraps to two rows: [logo | hamburger] then [links + actions] */
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 0 20px;
    gap: 0;
  }
  .nav-logo img { height: 54px; }
  .nav-links, .nav-actions { display: none; }
  .nav-links .nav-dropdown { display: none; }
  .nav-hamburger { display: flex; margin-left: auto; }
  section { padding: 56px 0; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .auth-card { padding: 32px 24px; }
  .section-title { font-size: 26px; }
}
