:root {
  --bg: #f6f8fc;
  --bg-soft: #eef2f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe2ee;
  --primary: #2563eb;
  --accent: #1d4ed8;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
  min-height: 100vh;
}

.container { width: min(1160px, 92vw); margin: 0 auto; }
.section { padding: 72px 0; }
.mt-20 { margin-top: 20px; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: 8px; }

.menu-toggle { display: none; background: transparent; border: 0; padding: 0; cursor: pointer; }
.menu-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0;
}

.pill, .mini-pill {
  display: inline-block;
  border: 1px solid #cddaf7;
  background: #eff5ff;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1d4ed8;
  font-size: .77rem;
}
.mini-pill { margin-bottom: 8px; }

h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.5vw, 3.6rem); line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.2; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { color: var(--muted); line-height: 1.65; }
.lead { max-width: 760px; margin-top: 12px; }
.gradient {
  background: linear-gradient(120deg, #1d4ed8 20%, #2563eb 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; min-height: 44px; padding: 0 16px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: .24s ease;
  font-weight: 600; font-size: .9rem;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .2);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-outline {
  border-color: var(--border); color: var(--text); background: #fff;
}
.btn-outline:hover, .btn-ghost:hover { border-color: #b9cdf7; background: #eef4ff; }
.btn-ghost { color: var(--text); background: transparent; }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; align-items: center; }
.hero p { margin-top: 16px; max-width: 640px; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.card.featured {
  border-color: #a8c0f4;
  box-shadow: 0 0 0 1px #d8e4ff, 0 14px 28px rgba(37, 99, 235, .1);
}

.mockup .list { margin-top: 14px; display: grid; gap: 10px; }
.mockup .list div {
  display: flex; justify-content: space-between; gap: 10px;
  background: #f8fbff; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.mockup .list span { color: var(--muted); font-size: .87rem; }
.mockup .list strong { font-size: .77rem; color: #1e3a8a; }
.mockup .stats { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mockup .stats article { background: #f8fbff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.mockup small { color: var(--muted); display: block; margin-bottom: 4px; }

.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-preview, .pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section-head { margin-bottom: 18px; }
.section-head.row { display: flex; align-items: end; justify-content: space-between; gap: 16px; }

.pricing h4, .pricing-preview h4 { margin-top: 8px; font-size: 2rem; }
.pricing h4 small, .pricing-preview h4 small { font-size: .9rem; color: var(--muted); margin-left: 4px; }
.pricing ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); }
.pricing li { margin: 8px 0; }

.table-wrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--muted); }
th { color: var(--text); font-size: .9rem; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-single { max-width: 620px; }
.auth-side { display: flex; flex-direction: column; justify-content: space-between; min-height: 440px; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 7px; font-size: .9rem; color: var(--muted); }
input {
  min-height: 44px; border-radius: 10px; border: 1px solid var(--border);
  padding: 0 12px; background: #fff; color: var(--text);
}
input:focus { outline: 2px solid rgba(37, 99, 235, .25); border-color: rgba(37, 99, 235, .6); }
.check { display: flex !important; grid-auto-flow: column; justify-content: start; gap: 8px; align-items: center; }
.check input { width: 16px; min-height: auto; }
.link { color: #1d4ed8; text-decoration: none; font-size: .88rem; }

.strength { background: rgba(255,255,255,.08); border-radius: 999px; height: 8px; overflow: hidden; }
#strengthBar {
  height: 100%;
  width: 0;
  background: linear-gradient(100deg, #2563eb, #1d4ed8);
  transition: width .22s ease;
}

.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats .delta { color: #1d4ed8; font-size: .78rem; margin-top: 6px; display: inline-block; }
.dashboard { grid-template-columns: 1.4fr .6fr; }

.chart-placeholder {
  margin-top: 16px; min-height: 220px; display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 10px;
}
.chart-placeholder div {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(37, 99, 235, .75), rgba(147, 197, 253, .45));
}

.stack-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.stack-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px 12px;
  color: var(--muted);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; display: inline-block; margin-left: 8px; }
.empty {
  margin-top: 12px; border: 1px dashed var(--border); border-radius: 12px; padding: 18px;
  background: #f8fbff;
}

.timeline { display: grid; gap: 10px; }
.timeline article {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
  display: flex;
  gap: 14px;
}
.timeline b { color: #1d4ed8; min-width: 56px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 32px; }
.footer-wrap {
  min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.alert {
  margin: 2px 0 4px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .86rem;
}

.alert-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 980px) {
  .hero-grid, .cards, .pricing-preview, .pricing, .two, .stats, .dashboard, .auth-grid { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
}

@media (max-width: 840px) {
  .menu-toggle { display: inline-block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 10px;
    background: rgba(255, 255, 255, .98); border-bottom: 1px solid var(--border);
    padding: 14px 4vw 18px;
  }
  .nav.open { display: flex; }
  .nav-cta { margin: 8px 0 0; }
  .section-head.row { align-items: start; flex-direction: column; }
  .footer-wrap { flex-direction: column; justify-content: center; align-items: start; padding: 20px 0; }
}
