:root {
  --bg: #080c12;
  --bg-alt: #0e141d;
  --surface: #141c28;
  --surface-2: #1a2433;
  --text: #e9eef5;
  --muted: #8b9bb0;
  --accent: #4a9eff;
  --accent-2: #6ee7b7;
  --critical: #f87171;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --topbar-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
}

.skip-link:focus {
  left: 8px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 18, 0.85);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft, rgba(74, 158, 255, 0.15));
  border: 1px solid rgba(74, 158, 255, 0.35);
  color: var(--accent) !important;
}

.nav-cta:hover {
  background: rgba(74, 158, 255, 0.25);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
}

.nav-toggle-bar::before {
  transform: translateY(-5px);
}

.nav-toggle-bar::after {
  transform: translateY(3px);
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--topbar-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 20px 48px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(74, 158, 255, 0.2), transparent),
    radial-gradient(ellipse 50% 40% at 90% 50%, rgba(110, 231, 183, 0.08), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 16ch;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42em;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #041018;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.hero-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pills li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Stats */
.stats {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s;
}

.stat-card.is-visible {
  opacity: 1;
  transform: none;
}

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
  padding-left: max(20px, calc((100vw - 1100px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1100px) / 2 + 20px));
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
  max-width: 40em;
}

/* Tabs */
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.tab-list button {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-list button[aria-selected="true"] {
  background: var(--accent);
  color: #041018;
}

.tab-panels {
  padding: 24px;
}

.tab-panel[hidden] {
  display: none !important;
}

.panel-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 800px) {
  .panel-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  padding-left: 1.2em;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.feature-list strong {
  color: var(--text);
}

.panel-aside {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.preview-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.tg-keys {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tg-keys span {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.preview-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mini-stats span {
  padding: 8px;
  text-align: center;
  font-size: 0.78rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.mini-stats .tasks {
  grid-column: span 2;
  color: var(--accent-2);
}

.panel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-chips span {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.ai-flow ol {
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.92rem;
}

.ai-flow li {
  margin-bottom: 8px;
}

/* Flow */
.flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.flow-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (min-width: 560px) {
  .flow-track {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flow-step {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.flow-step.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(74, 158, 255, 0.12);
}

.flow-panel h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.flow-panel p {
  color: var(--muted);
}

.flow-panel[hidden] {
  display: none;
}

/* Report demo */
.report-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.report-demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.report-demo-date {
  color: var(--muted);
  flex: 1;
}

.report-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.report-stat {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.report-stat em {
  display: block;
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.report-stat.is-on {
  border-color: var(--accent);
  transform: scale(1.03);
}

.report-stat--tasks.is-on {
  border-color: var(--accent-2);
}

.report-filter-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.acc-item,
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg);
}

.acc-item summary,
.faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.acc-item summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
  display: none;
}

.acc-item summary::after,
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.acc-item[open] summary::after,
.faq-item[open] summary::after {
  content: "−";
}

.acc-body,
.faq-item p {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Roles */
.role-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .role-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s, transform 0.45s;
}

.role-card.is-visible {
  opacity: 1;
  transform: none;
}

.role-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.role-card ul {
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.role-card li {
  padding: 6px 0;
  padding-left: 1em;
  position: relative;
}

.role-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* FAQ */
.faq {
  max-width: 720px;
}

/* CTA */
.cta {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 40px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.15), rgba(110, 231, 183, 0.08));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
}

.cta h2 {
  margin-bottom: 8px;
}

.cta p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* Footer */
.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.copy {
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.8;
}

.foot a {
  color: var(--muted);
}
