:root {
  --bg: #ffffff;
  --bg-subtle: #f7f8fc;
  --bg-section: #f5f7fe;
  --bg-hover: #eef1fb;
  --text: #0f172a;
  --text-strong: #0b1220;
  --text-soft: #51607a;
  --muted: #93a0b8;
  --line: #e6e9f2;
  --line-strong: #d2d8e6;
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-strong: rgba(79, 70, 229, 0.16);
  --accent-bright: #6366f1;
  --accent-sky: #0ea5e9;
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #4338ca 48%, #2563eb 100%);
  --grad-bright: linear-gradient(135deg, #6366f1 0%, #3b82f6 60%, #0ea5e9 100%);
  --grad-ink: linear-gradient(140deg, #1e1b4b 0%, #312e81 45%, #1e3a8a 100%);
  --grad-hero: radial-gradient(1200px 520px at 88% -8%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(900px 460px at -6% 8%, rgba(14, 165, 233, 0.12), transparent 55%);
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.06);
  --success: #15803d;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.12);
  --shadow-accent: 0 12px 28px rgba(79, 70, 229, 0.28);
  --max-content: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

img,
svg {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-weight: 600;
  font-size: clamp(36px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin-bottom: 20px;
}

h2 {
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 14px;
}

h3 {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-strong);
  margin-bottom: 8px;
}

h4 {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-strong);
  margin-bottom: 6px;
}

p {
  margin-bottom: 14px;
  color: var(--text-soft);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- LAYOUT ---------- */

.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

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

section {
  padding: 80px 0;
}

section.tight {
  padding: 56px 0;
}

section.subtle {
  background: var(--bg-section);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- TOP NAV (public) ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 8px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text-strong);
}

.brand-logo {
  width: 144px;
  height: 50px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: transparent;
  display: block;
}

.topnav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.topnav-links a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.topnav-links a:hover {
  color: var(--text-strong);
}

.topnav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
    box-shadow 200ms ease, transform 160ms ease;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.36);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-strong);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-bright);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-strong);
  background: var(--bg-hover);
}

.btn-lg {
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  padding: 104px 0 84px;
  background: var(--grad-hero);
}

.hero h1 {
  max-width: 860px;
}

.hero .accent-text {
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 32px;
}

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

.hero-meta {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-meta span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-meta strong {
  font-size: 15px;
  color: var(--text-strong);
  font-weight: 500;
}

/* ---------- FEATURES ---------- */

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head p {
  font-size: 17px;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: background 180ms ease;
}

.feature:hover {
  background: var(--bg-section);
}

.feature-num {
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 18px;
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feature h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.feature p {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 0;
}

/* ---------- HOW IT WORKS ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-strong);
}

.step-num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--grad-bright);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.32);
}

.step h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ---------- SCENARIOS ---------- */

.scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.scenario {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.scenario:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-strong);
}

.scenario h3 {
  font-size: 18px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.scenario ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.scenario li {
  padding: 6px 0;
  color: var(--text-soft);
  font-size: 14px;
  display: flex;
  gap: 10px;
}

.scenario li::before {
  content: "—";
  color: var(--muted);
  flex-shrink: 0;
}

/* ---------- PRICING (public) ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.tariff-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.tariff-card.featured {
  border-color: var(--accent);
  background: var(--accent-soft);
  position: relative;
}

.tariff-card.featured::before {
  content: "Рекомендуем";
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.tariff-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.tariff-price {
  font-size: 40px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tariff-price-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.tariff-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.tariff-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
}

.tariff-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.tariff-card .btn {
  width: 100%;
}

/* ---------- TRUST / SECURITY BLOCK ---------- */

.trust-block {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow);
}

.trust-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trust-block li {
  padding: 10px 0;
  color: var(--text-soft);
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}

.trust-block li:last-child {
  border-bottom: 0;
}

.trust-block li::before {
  content: "→";
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* ---------- CTA SECTION ---------- */

.cta-block {
  position: relative;
  overflow: hidden;
  background: var(--grad-ink);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(620px 300px at 80% -20%, rgba(99, 102, 241, 0.5), transparent 60%),
    radial-gradient(520px 280px at 10% 120%, rgba(14, 165, 233, 0.35), transparent 60%);
  pointer-events: none;
}

.cta-block > * {
  position: relative;
}

.cta-block h2 {
  color: #fff;
  max-width: 600px;
  margin: 0 auto 16px;
}

.cta-block p {
  color: #d1d5db;
  max-width: 540px;
  margin: 0 auto 28px;
  font-size: 16px;
}

.cta-block .btn-primary {
  background: #fff;
  color: var(--text-strong);
  border-color: #fff;
}

.cta-block .btn-primary:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

/* ---------- FOOTER ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  padding: 5px 0;
}

.footer-col a {
  color: var(--text-soft);
  font-size: 14px;
}

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

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- AUTH PAGES ---------- */

.auth-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 56px 24px;
  background: var(--grad-hero), var(--bg-subtle);
}

.auth-card {
  width: 100%;
  max-width: 432px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.auth-card > p {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
  padding: 11px 12px;
  font-size: 14px;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 4px;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.field-error {
  font-size: 13px;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid rgba(185, 28, 28, 0.18);
  display: none;
}

.field-error.is-visible {
  display: block;
}

.auth-divider {
  margin: 22px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--line);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-foot {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}

.auth-foot a {
  color: var(--accent);
  font-weight: 500;
}

.auth-flag {
  display: block;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg-section);
  border: 1px solid var(--line);
}

.auth-flag.is-prototype {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: #78350f;
}

/* ---------- APP SHELL (closed area) ---------- */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.app-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-rail .brand {
  margin-bottom: 24px;
  padding: 4px;
}

.rail-section {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 12px 10px 6px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.rail-item:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

.rail-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-bright);
}

.rail-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  font-size: 13px;
}

.user-chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-bright);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

.user-chip-info {
  flex: 1;
  min-width: 0;
}

.user-chip-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-info span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.app-main {
  min-width: 0;
  padding: 32px 36px 48px;
  background: var(--bg-subtle);
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.app-topbar-actions {
  display: flex;
  gap: 10px;
}

.app-h1 {
  font-size: 28px;
  margin: 0;
}

.app-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* App view system (used in /app) */

.view {
  display: none;
  animation: viewIn 240ms ease both;
}

.view.active {
  display: block;
}

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

/* ---------- WORKSPACE INTERNALS ---------- */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  margin-bottom: 16px;
}

.product-lead,
.beta-panel,
.section-block,
.task-panel,
.chat-panel,
.result-panel,
.tariff,
.demo-strip,
.beta-hero,
.beta-form-card,
.manual-flow,
.security-note,
.referral-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.product-lead {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.product-lead h2 {
  max-width: 700px;
  margin-bottom: 14px;
}

.product-lead p {
  max-width: 600px;
  margin-bottom: 22px;
  font-size: 15px;
}

.lead-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.beta-panel {
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.metric-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.metric-line span {
  color: var(--muted);
}

.metric-line strong {
  font-size: 17px;
  color: var(--text-strong);
  font-weight: 600;
}

.trust-line,
.privacy-card {
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 14px;
}

.trust-line {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 12px;
}

.trust-line [data-icon] {
  grid-row: span 2;
  color: var(--accent);
}

.trust-line strong {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 13px;
}

.trust-line small {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 12px;
}

.section-block {
  padding: 28px;
}

.section-heading {
  margin-bottom: 20px;
}

.practice-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.practice,
.practice-tab {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
  transition: border-color 160ms ease, background 160ms ease;
  font-family: inherit;
}

.practice {
  min-height: 120px;
  padding: 16px;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 5px 12px;
}

.practice [data-icon] {
  grid-row: span 2;
  color: var(--accent);
}

.practice strong {
  font-weight: 600;
  font-size: 15px;
}

.practice small {
  color: var(--text-soft);
  line-height: 1.4;
  font-size: 12px;
}

.practice:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.practice.active,
.practice-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.practice.active small,
.practice.active strong {
  color: var(--accent);
}

.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.practice-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.demo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 16px;
}

.demo-cases {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.demo-case {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--bg);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
  font-family: inherit;
}

.demo-case:hover {
  color: var(--text-strong);
  border-color: var(--text-soft);
}

.demo-case.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.practice-tab {
  min-height: 52px;
  padding: 12px 14px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-soft);
}

.practice-tab:hover {
  color: var(--text-strong);
  border-color: var(--line-strong);
}

.work-grid {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
}

.task-panel,
.chat-panel,
.result-panel {
  min-height: calc(100vh - 240px);
}

.task-panel,
.result-panel {
  padding: 22px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.task-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.task-item {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
  padding: 12px;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 3px 10px;
  text-align: left;
  font-family: inherit;
}

.task-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.task-item [data-icon] {
  grid-row: span 2;
  color: var(--accent);
}

.task-item strong {
  font-weight: 600;
  font-size: 13px;
}

.task-item small {
  color: var(--text-soft);
  line-height: 1.35;
  font-size: 11px;
}

.task-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.task-item.active strong {
  color: var(--accent);
}

.usage {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.usage > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 12px;
  color: var(--muted);
}

.usage strong {
  color: var(--accent);
  font-weight: 600;
}

.usage-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

.usage-bar span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--accent);
}

.privacy-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 12px;
}

.privacy-card [data-icon] {
  grid-row: span 2;
  color: var(--accent);
}

.privacy-card strong {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 13px;
}

.privacy-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 12px;
}

.case-card {
  margin: 16px 22px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.case-card div {
  background: var(--bg);
  padding: 12px 14px;
  min-width: 0;
}

.case-card span,
.case-card strong {
  display: block;
}

.case-card span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.case-card strong {
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-strong);
  font-weight: 600;
}

.drop-zone {
  margin: 18px 22px;
  padding: 20px;
  gap: 14px;
  display: flex;
  align-items: center;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), var(--bg-section) 58%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.drop-zone.is-highlighted {
  animation: uploadPulse 900ms ease;
}

@keyframes uploadPulse {
  0%,
  100% {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  }
  45% {
    box-shadow: 0 0 0 6px var(--accent-soft), 0 22px 48px rgba(15, 23, 42, 0.16);
  }
}

.drop-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
}

.drop-zone div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.drop-zone strong {
  display: block;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 16px;
}

.drop-zone-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.drop-zone span {
  display: block;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.45;
  font-size: 13px;
}

.drop-zone .btn {
  flex: 0 0 auto;
}

.file-list {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.assistant-thread {
  flex: 1;
  min-height: 280px;
  padding: 4px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
  gap: 10px;
  max-width: 80%;
  animation: rise 480ms ease both;
}

.message p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 14px;
}

.message strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-strong);
}

.message > div {
  padding: 12px 14px;
  border-radius: var(--radius);
}

.message.assistant > div {
  background: var(--bg);
  border: 1px solid var(--line);
}

.message.user {
  align-self: flex-end;
}

.message.user > div {
  background: var(--grad-primary);
  border: 1px solid transparent;
}

.message.user p {
  color: #fff;
}

.message.compact {
  max-width: 70%;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 auto;
}

.composer {
  margin: auto 22px 22px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 6px 6px 6px 14px;
  gap: 8px;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.composer input {
  min-width: 0;
  flex: 1;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-strong);
  font-size: 14px;
}

.composer input::placeholder {
  color: var(--muted);
}

.case-submit-status {
  margin: -12px 22px 18px;
  min-height: 20px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.case-submit-status[data-status="pending"] {
  color: var(--accent);
}

.case-submit-status[data-status="success"] {
  color: var(--success);
}

.case-submit-status[data-status="error"] {
  color: var(--danger);
}

.primary-icon,
.ghost-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 140ms ease;
}

.primary-icon {
  background: var(--accent);
  color: #fff;
}

.primary-icon:hover {
  background: var(--accent-hover);
}

.ghost-icon {
  background: var(--bg);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.ghost-icon:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

.quality-row {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.quality-row div {
  background: var(--bg);
  padding: 12px 14px;
}

.quality-row span,
.quality-row strong {
  display: block;
}

.quality-row span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.quality-row strong {
  font-size: 22px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.version-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.version {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-soft);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.version:hover {
  color: var(--text-strong);
  border-color: var(--text-soft);
}

.version.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.document-preview {
  border-left: 3px solid var(--accent);
  padding: 4px 16px;
  line-height: 1.55;
}

.document-preview h3 {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}

.document-preview p,
.document-preview li {
  color: var(--text-soft);
  font-size: 13px;
}

.document-preview ol {
  padding-left: 20px;
}

.case-list-panel {
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.case-list-panel h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.case-list-empty {
  color: var(--muted);
  font-size: 13px;
}

.case-list {
  display: grid;
  gap: 8px;
}

.case-list-item {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 10px;
  text-align: left;
}

.case-list-item strong,
.case-list-item span,
.case-list-item small {
  display: block;
}

.case-list-item strong {
  color: var(--text-strong);
  font-size: 13px;
}

.case-list-item span {
  color: var(--text-soft);
  font-size: 11px;
  margin-top: 2px;
}

.case-list-item small {
  color: var(--accent);
  font-size: 11px;
  margin-top: 4px;
}

.agent-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
}

.agent-chat-panel,
.case-sidebar {
  min-height: calc(100vh - 140px);
}

.agent-chat-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.1), transparent 34%),
    var(--bg);
}

.clean-chat-header {
  align-items: flex-start;
}

.clean-chat-header h2 {
  margin: 2px 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.clean-chat-header p:not(.eyebrow) {
  max-width: 660px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.chat-limit {
  min-width: 145px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-section);
  padding: 10px 12px;
  text-align: right;
}

.chat-limit span,
.chat-limit strong {
  display: block;
}

.chat-limit span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.chat-limit strong {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.clean-thread {
  min-height: 360px;
  padding-top: 22px;
  overflow: auto;
}

.empty-chat {
  margin: auto;
  max-width: 460px;
  text-align: center;
  color: var(--text-soft);
  padding: 32px 18px;
}

.empty-chat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--grad-bright);
  color: #fff;
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.3);
}

.empty-chat h3 {
  color: var(--text-strong);
  margin-bottom: 8px;
  font-size: 18px;
}

.empty-chat p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.clean-composer {
  margin-top: 0;
}

.case-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.next-steps-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.next-steps-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.next-steps-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.next-steps-card li {
  padding: 4px 0;
}

.next-steps-card p {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.muted-card {
  background: var(--bg-section);
}

.result-markdown {
  white-space: pre-wrap;
  margin: 0;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.message .result-markdown {
  margin-top: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-section);
  word-break: break-word;
}

.message .result-download {
  margin-top: 10px;
}

.risk-box {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 13px 14px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid rgba(185, 28, 28, 0.18);
}

.risk-box [data-icon] {
  color: var(--danger);
  flex: 0 0 auto;
}

.risk-box strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-strong);
}

.risk-box p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-soft);
  font-size: 12px;
}

.evidence-box,
.source-citations {
  margin-top: 18px;
}

.evidence-box label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  color: var(--text-soft);
  line-height: 1.4;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.evidence-box label:last-child {
  border-bottom: 0;
}

.evidence-box input {
  accent-color: var(--accent);
  margin-top: 2px;
}

.source-citations {
  display: grid;
  gap: 6px;
}

.source-citations h3 {
  margin-bottom: 4px;
}

.source-citations button {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text-strong);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.source-citations button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.source-citations strong,
.source-citations span {
  display: block;
}

.source-citations strong {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.source-citations span {
  margin-top: 4px;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 12px;
}

.panel-heading {
  margin-bottom: 4px;
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.beta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 16px;
}

.beta-hero,
.beta-form-card,
.manual-flow,
.security-note {
  padding: 28px;
}

.beta-hero {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg);
}

.beta-hero h2 {
  max-width: 680px;
}

.beta-hero p {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: 15px;
}

.beta-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.beta-kpis div {
  padding: 14px;
  background: var(--bg);
}

.beta-kpis span,
.beta-kpis strong {
  display: block;
}

.beta-kpis span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.beta-kpis strong {
  font-size: 15px;
  color: var(--text-strong);
  font-weight: 600;
}

.beta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.beta-form label {
  display: grid;
  gap: 6px;
}

.beta-form .wide {
  grid-column: 1 / -1;
}

.beta-form span {
  color: var(--text-strong);
  font-weight: 500;
  font-size: 13px;
}

.beta-form input,
.beta-form select,
.beta-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
  padding: 10px 12px;
  outline: 0;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 140ms ease;
}

.beta-form input:focus,
.beta-form select:focus,
.beta-form textarea:focus {
  border-color: var(--accent);
}

.beta-form textarea {
  min-height: 96px;
  resize: vertical;
}

.check-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
}

.check-row input {
  width: auto;
  accent-color: var(--accent);
  margin-top: 3px;
}

.manual-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  align-items: center;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-steps span {
  display: block;
  padding: 14px;
  background: var(--bg);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.security-note {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--accent-soft);
  border: 1px solid var(--accent-strong);
}

.security-note [data-icon] {
  color: var(--accent);
  margin-top: 3px;
}

.security-note h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.security-note p:last-child {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 14px;
}

.referral-panel {
  background: var(--bg);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: center;
  margin-top: 16px;
}

.referral-panel h2 {
  max-width: 680px;
  font-size: 24px;
}

.referral-steps {
  display: grid;
  gap: 8px;
}

.referral-steps span {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-soft);
  background: var(--bg-section);
  font-size: 13px;
  font-weight: 500;
}

[data-icon] svg,
[data-icon-left] svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

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

/* ---------- DROPDOWN MENU ---------- */

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.menu-toggle:hover {
  border-color: var(--text-soft);
  background: var(--bg-hover);
}

.menu-toggle .bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.menu-toggle .bars span {
  display: block;
  height: 2px;
  background: var(--text-strong);
  border-radius: 1px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(440px, 100vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 220ms ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.menu-overlay.is-open + .menu-panel,
.menu-panel.is-open {
  transform: translateX(0);
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}

.menu-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.menu-close:hover {
  background: var(--bg-hover);
  border-color: var(--text-soft);
}

.menu-list {
  padding: 12px 0;
  list-style: none;
  margin: 0;
}

.menu-list li {
  padding: 0;
}

.menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease, color 140ms ease;
}

.menu-list a:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.menu-list a::after {
  content: "→";
  color: var(--muted);
  font-size: 16px;
  transition: color 140ms ease, transform 140ms ease;
}

.menu-list a:hover::after {
  color: var(--accent);
  transform: translateX(2px);
}

.menu-foot {
  margin-top: auto;
  padding: 22px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-foot .btn {
  width: 100%;
}

body.is-menu-open {
  overflow: hidden;
}

/* ---------- INFO PAGE ---------- */

.info-toc {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.info-toc a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.info-toc a:hover,
.info-toc a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.info-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: flex-start;
}

.info-section {
  scroll-margin-top: 96px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.info-section:last-child {
  border-bottom: 0;
}

.info-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.info-section p {
  font-size: 15px;
  line-height: 1.65;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.faq-item h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  margin: 0;
  color: var(--text-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-card h3 {
  margin-bottom: 8px;
}

.contact-card p {
  margin-bottom: 12px;
  font-size: 14px;
}

.contact-card a {
  font-weight: 500;
  font-size: 14px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 980px) {
  .features-grid,
  .scenarios,
  .pricing-grid,
  .steps,
  .hero-meta,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-block,
  .manual-flow,
  .referral-panel {
    grid-template-columns: 1fr;
  }

  .cta-block {
    padding: 40px 24px;
  }
}

@media (max-width: 760px) {
  section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .topnav-links {
    display: none;
  }

  .topnav-actions {
    gap: 8px;
  }

  .topnav-actions .btn-ghost {
    display: none;
  }

  .info-layout {
    grid-template-columns: 1fr;
  }

  .info-toc {
    position: relative;
    top: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .menu-panel {
    width: 100vw;
  }

  .features-grid,
  .scenarios,
  .pricing-grid,
  .steps,
  .hero-meta,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-rail {
    position: relative;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-rail .brand,
  .rail-section,
  .rail-foot {
    display: none;
  }

  .rail-item {
    flex-shrink: 0;
    width: auto;
    padding: 8px 14px;
  }

  .app-main {
    padding: 20px 14px 36px;
  }

  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .home-grid,
  .work-grid,
  .agent-workspace,
  .case-card,
  .beta-layout,
  .beta-form,
  .beta-kpis,
  .flow-steps {
    grid-template-columns: 1fr;
  }

  .practice-board {
    grid-template-columns: 1fr;
  }

  .practice-strip {
    grid-template-columns: repeat(6, 148px);
    overflow-x: auto;
  }

  .demo-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-cases {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .demo-case {
    width: 100%;
    border-radius: var(--radius);
  }

  .task-panel,
  .chat-panel,
  .result-panel,
  .agent-chat-panel,
  .case-sidebar {
    min-height: auto;
  }

  .clean-chat-header {
    flex-direction: column;
  }

  .chat-limit {
    width: 100%;
    text-align: left;
  }

  .drop-zone {
    flex-direction: column;
    align-items: flex-start;
  }

  .quality-row,
  .version-row {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}
