:root {
  --bg: #f7f7fb;
  --bg-alt: #eef5ff;
  --card-bg: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #e0e7ff;
  --accent-strong: #312e81;
  --text-main: #111827;
  --text-sub: #4b5563;
  --border-subtle: #e5e7eb;
  --danger: #b91c1c;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top left, #eef2ff, #f9fafb 40%, #e0f2fe 80%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin: 0 auto;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #c7d2fe, #4f46e5);
  color: white;
  font-size: 0.9rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-text span {
  color: var(--accent);
}

.tagline {
  font-size: 0.74rem;
  color: var(--text-sub);
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-sub);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.nav-link:hover {
  color: var(--accent-strong);
  background: rgba(79, 70, 229, 0.06);
}

/* Hero */

.hero-section {
  padding: 2.5rem 0 2.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 2.3vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 0.9rem;
}

.hero-sub {
  margin: 0 0 1.1rem;
  color: var(--text-sub);
  font-size: 0.98rem;
}

/* NEW: Value Props */
.value-props {
  margin: 0 0 1.25rem;
}

.value-prop {
  display: flex;
  align-items: start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

.value-prop .check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

/* NEW: Usage Stat */
.usage-stat {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  color: #92400e;
}

.usage-stat strong {
  color: #78350f;
  font-size: 1.1rem;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  color: var(--text-sub);
  font-size: 0.9rem;
}

.hero-bullets li {
  margin-bottom: 0.45rem;
  padding-left: 1.1rem;
  position: relative;
}

.hero-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Cards & layout */

.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-card {
  border-radius: 22px;
  background: linear-gradient(135deg, #eef2ff, #fdf2ff);
}

.card-header h2 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.card-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* Form basics */

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
}

textarea {
  border-radius: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 1px;
  background: #ffffff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-primary {
  background: radial-gradient(circle at 0% 0%, #a5b4fc, #4f46e5);
  color: white;
  border-color: rgba(79, 70, 229, 0.9);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* NEW: Large Button Variant */
.btn-large {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.btn-ghost {
  background: rgba(255,255,255,0.3);
  color: var(--accent-strong);
  border-color: rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.5);
  border-color: rgba(148, 163, 184, 0.8);
}

.btn-outline {
  background: #ffffff;
  color: var(--accent-strong);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.6rem 0 0.5rem;
}

.status-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: rgba(249, 250, 251, 0.9);
  color: var(--text-sub);
}

.status-busy {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(219, 234, 254, 0.7);
  color: #1d4ed8;
}

.status-error {
  border-color: rgba(220, 38, 38, 0.9);
  background: rgba(254, 226, 226, 0.85);
  color: #b91c1c;
}

.status-ok {
  border-color: rgba(22, 163, 74, 0.7);
  background: rgba(220, 252, 231, 0.8);
  color: #166534;
}

.status-idle {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(241, 245, 249, 0.8);
  color: #64748b;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin: 0.35rem 0;
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 0.65rem;
}

/* Results */

.results-section {
  padding: 1.5rem 0 0;
}

.results-section.nested {
  padding-top: 1.25rem;
}

.results-container {
  padding-top: 0.5rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.results-header h2,
.results-header h3 {
  margin: 0 0 0.2rem;
}

.results-intro {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: 1.1rem;
  align-items: flex-start;
}

.results-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-card {
  padding: 0.9rem 0.9rem 1.05rem;
}

.table-caption-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.caption-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.caption-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-sub);
}

tr:nth-child(even) td {
  background: #f9fafb;
}

/* NEW: Upsell Banner */
.upsell-banner {
  margin-top: 1rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid #f59e0b;
}

.upsell-banner h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #78350f;
}

.upsell-banner p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #92400e;
}

.upsell-banner .price-list {
  margin-bottom: 0.75rem;
}

/* NEW: Testimonial Author */
.testimonial-author {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-author span:first-child {
  font-weight: 600;
  color: #374151;
}

/* Pricing & sections */

.paid-section {
  padding: 2rem 0 2.25rem;
}

.paid-section.alt-bg {
  background: linear-gradient(180deg, rgba(239,246,255,0.7), rgba(248,250,252, 0.9));
}

.pricing-intro {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.4rem;
}

.pricing-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-card h3 {
  margin: 0 0 0.2rem;
}

.price-main {
  margin: 0.1rem 0 0.25rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.price-main span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
}

.price-tagline {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  color: var(--text-sub);
}

.price-list li {
  margin-bottom: 0.35rem;
  padding-left: 1rem;
  position: relative;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.price-card.recommended {
  border-width: 2px;
  border-color: rgba(79, 70, 229, 0.85);
  position: relative;
}

.price-card .badge {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.09);
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 600;
}

/* NEW: Plan Label */
.plan-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Tabs */

.tabs {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem;
  background: #f3f4ff;
  margin-bottom: 0.8rem;
}

.tab-button {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.tab-button.active {
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.starter-demo-card {
  margin-top: 1.5rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.metric h3 {
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
}

.metric-main {
  margin: 0.2rem 0 0.2rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.metric-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.side-text {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.5;
}

.card.subtle {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.side-list {
  list-style: disc;
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* How & FAQ */

.how-section,
.faq-section {
  padding: 2rem 0 2.25rem;
}

.how-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.how-step h3,
.faq-item h3 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}

.how-step p,
.faq-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.how-note {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* Dashboard */

.dashboard-card {
  margin-top: 1.1rem;
}

#auth-panel {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

#auth-form {
  max-width: 320px;
}

#dashboard-main {
  margin-top: 0.3rem;
}

/* Footer */

.footer {
  padding: 1.2rem 0 1.4rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255,255,255,0.9);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.footer-links {
  margin: 0;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

/* Utility */

.hidden {
  display: none !important;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-card {
    order: -1;
  }
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .results-layout,
  .how-grid,
  .faq-grid,
  .metrics-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-links {
    display: none;
  }
  .header-inner {
    justify-content: space-between;
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  #auth-panel {
    flex-direction: column;
  }
  .results-actions {
    flex-direction: column;
  }
}
