/* site.css — все кастомные стили лендинга.
   Хранится в self-hosted файле, чтобы можно было убрать 'unsafe-inline'
   из CSP style-src (всё, что нужно — это 'self'). */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --glow-blue: none;
  --glow-violet: none;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--evx-page);
  color: var(--evx-heading);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

/* Hero typography */
.text-hero {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

@media (min-width: 1024px) {
  .text-hero { font-size: clamp(3rem, 6.5vw, 5.5rem); }
}

/* Gradient text — фирменный акцент */
.gradient-text {
  background: var(--evx-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-primary {
  background: transparent;
  color: var(--evx-text);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  box-shadow: var(--evx-shadow-raised);
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--evx-shadow-raised);
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.evo-input:focus-visible,
[data-tool]:focus-visible {
  outline: 3px solid rgba(217, 119, 87, 0.95);
  outline-offset: 3px;
}
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--evx-surface-raised);
  color: var(--evx-heading);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--evx-border);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover {
  background: var(--evx-hover);
  border-color: var(--evx-border-strong);
  transform: translateY(-2px);
}

/* Cards */
.evo-card {
  background: var(--evx-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--evx-border);
  border-radius: 1rem;
  transition: all 0.4s var(--ease-out-expo);
}
.evo-card:hover {
  border-color: rgba(217, 119, 87, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}

/* Sticky navigation */
.nav-sticky {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.25s var(--ease-smooth),
              backdrop-filter 0.25s var(--ease-smooth),
              border-color 0.25s var(--ease-smooth);
}

/* Navbar scrolled state */
.navbar-scrolled {
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--evx-border);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--evx-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-link {
  color: var(--evx-heading);
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--evx-accent); }

/* Orb decorations — три фоновых шара в hero */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  will-change: transform;
}
.orb-1 { animation: orb-float 8s ease-in-out infinite; }
.orb-2 { animation: orb-float 10s ease-in-out infinite reverse; }
.orb-3 { animation: orb-float 12s ease-in-out infinite 2s; }

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* Fade-up animations для scroll reveal.
   Длинные 800ms на каждом секции выглядели "lagging"; сократили до 450ms,
   а translateY уменьшили до 16/8 px — иначе на длинных страницах накапливается
   очередь незавершённых reveals. */
.fade-up,
.fade-in {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
}
.fade-up { transform: translateY(16px); }
.fade-in { transform: translateY(8px); }
.fade-up.visible,
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Каскадные задержки для элементов в hero.
   Раньше задавались inline-стилями (style="transition-delay: ..."), теперь классами. */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Lead paragraph — увеличенный межстрочный для hero-подзаголовка */
.lead {
  line-height: 1.6;
}

/* Tool cards filter */
.tool-card-hidden {
  display: none;
}

/* Form input — основной стиль.
   Раньше класс evo-input был только в HTML, но нигде не определён,
   из-за чего typed-текст наследовал тёмный дефолтный color и был
   невидим на тёмном evo-card. */
.evo-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--evx-surface-raised);
  color: var(--evx-heading);
  border: 1px solid var(--evx-border);
  border-radius: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-family: inherit;
  caret-color: var(--evx-accent);
  transition: border-color 0.2s var(--ease-smooth),
              background-color 0.2s var(--ease-smooth),
              box-shadow 0.2s var(--ease-smooth);
  -webkit-appearance: none;
  appearance: none;
}
.evo-input::placeholder {
  color: rgba(20, 20, 19, 0.35);
  opacity: 1;
}
.evo-input:hover {
  background: var(--evx-surface-raised);
  border-color: var(--evx-border);
}
.evo-input:focus {
  outline: none;
  background: var(--evx-hover);
  border-color: rgba(217, 119, 87, 0.5);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}
.evo-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* v10: i18n language-switcher pill — visible top-right in nav row */
.lang-toggle {
  background: var(--evx-surface-raised);
  border: 1px solid var(--evx-border);
  color: var(--evx-heading);
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.lang-toggle:hover {
  background: var(--evx-hover);
  border-color: rgba(217, 119, 87, 0.40);
}
.lang-toggle:focus-visible {
  outline: none;
  border-color: rgba(217, 119, 87, 0.6);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.20);
}
.lang-toggle[aria-pressed="true"] {
  background: rgba(217, 119, 87, 0.12);
  border-color: rgba(217, 119, 87, 0.45);
  color: #ffffff;
}
.lang-toggle--mobile {
  padding: 0.75rem 1.25rem;
  min-height: 48px;
}

/* --- v11: Compare tool (PR2) ------------------------------------------ */

/* Cards that open a tool on click get a subtle lift to read as interactive. */
[data-tool] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
[data-tool]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -16px rgba(217, 119, 87, 0.25);
}
[data-tool]:active {
  transform: translateY(0);
}
[data-tool][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

/* Keep keyboard users informed when a card acts as a button. */
[data-tool]:focus-visible {
  position: relative;
  z-index: 1;
}

/* Tool panel reveal — use a fade so the long content doesn't snap in. */
#tool-panel {
  animation: panel-in 0.28s ease-out;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-tool],
  #tool-panel,
  .compare-result-fade-in {
    animation: none !important;
    transition: none !important;
  }
}

/* Compare result: numeric column gets tabular-nums for stable widths. */
#compare-result .font-mono { font-variant-numeric: tabular-nums; }

/* Pros/cons lists tighten up on small screens. */
#compare-result details > summary { list-style: none; }
#compare-result details > summary::-webkit-details-marker { display: none; }

/* Verdict card emphasis: subtle left-border highlight on hover. */
#compare-result .border-l-2 { transition: padding-left 0.2s ease; }
#compare-result .border-l-2:hover { padding-left: 1.75rem; }



/* Runtime Compare score bars: data attributes avoid inline style interpolation. */
.score-fill[data-score="0"] { width: 0%; }
.score-fill[data-score="1"] { width: 10%; }
.score-fill[data-score="2"] { width: 20%; }
.score-fill[data-score="3"] { width: 30%; }
.score-fill[data-score="4"] { width: 40%; }
.score-fill[data-score="5"] { width: 50%; }
.score-fill[data-score="6"] { width: 60%; }
.score-fill[data-score="7"] { width: 70%; }
.score-fill[data-score="8"] { width: 80%; }
.score-fill[data-score="9"] { width: 90%; }
.score-fill[data-score="10"] { width: 100%; }
.compare-loading-dot-1 { animation-delay: 0ms; }
.compare-loading-dot-2 { animation-delay: 120ms; }
.compare-loading-dot-3 { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .compare-loading-dot-1,
  .compare-loading-dot-2,
  .compare-loading-dot-3 {
    animation: none !important;
  }
}


/* State and utility classes used by runtime code. */
body.menu-open { overflow: hidden; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
.tool-cta-soon { opacity: 0.65; cursor: not-allowed; }
[data-tool] { cursor: pointer; }

.clipboard-helper {
  position: fixed;
  top: -10000px;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}


/* Safe Markdown output for the hero demo. Content is built with DOM APIs in markdown.v1.js. */
.markdown-body {
  color: #cbd5e1;
  overflow-wrap: anywhere;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body .markdown-table-wrap,
.markdown-body hr {
  margin: 0 0 0.85rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #f8fafc;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin: 1.1rem 0 0.55rem;
}

.markdown-body h1 { font-size: 1.3rem; }
.markdown-body h2 { font-size: 1.18rem; }
.markdown-body h3 { font-size: 1.08rem; }
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 { font-size: 1rem; }

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.35rem;
}

.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body li { margin: 0.28rem 0; }
.markdown-body li::marker { color: #60a5fa; }

.markdown-body .markdown-task-marker {
  color: #60a5fa;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-right: 0.35rem;
}

.markdown-body a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body a:hover {
  color: #bfdbfe;
}

.markdown-body code {
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.35rem;
  color: #bfdbfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 0.12rem 0.32rem;
}

.markdown-body pre {
  background: rgb(2 6 23 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.85rem 1rem;
}

.markdown-body pre code {
  background: transparent;
  border: 0;
  color: #e2e8f0;
  display: block;
  padding: 0;
  white-space: pre;
}

.markdown-body blockquote {
  border-left: 3px solid rgb(96 165 250 / 0.55);
  color: #94a3b8;
  padding-left: 0.9rem;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.markdown-body table {
  border-collapse: collapse;
  min-width: 100%;
  text-align: left;
  white-space: normal;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid rgb(255 255 255 / 0.1);
  min-width: 8rem;
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}

.markdown-body th {
  background: rgb(96 165 250 / 0.1);
  color: #f8fafc;
  font-weight: 600;
}

.markdown-body td {
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .markdown-body th,
  .markdown-body td {
    min-width: 7rem;
    padding: 0.45rem 0.55rem;
  }
}


/* Fixed-command CLI playground */
.cli-panel {
  scroll-margin-top: 5rem;
}

.cli-output {
  background: rgb(2 6 23 / 0.78);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.75rem;
  color: #bfdbfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 1.25rem;
  max-width: 100%;
  min-height: 8rem;
  overflow-x: auto;
  padding: 1rem;
  white-space: pre;
}

.cli-tool-card {
  border-color: rgb(77 127 255 / 0.18);
}


/* Fixed-operation JSON Lab */
.jsonlab-panel {
  scroll-margin-top: 5rem;
}

.jsonlab-tool-card {
  border-color: rgb(77 127 255 / 0.18);
}

.jsonlab-input {
  min-height: 15rem;
  resize: vertical;
}

.jsonlab-output {
  min-height: 12rem;
}

#jsonlab-fields-wrap[hidden] {
  display: none;
}


/* v14: auth, trust and legal surfaces */
.nav-auth-btn {
  background: transparent;
  border: 1px solid var(--evx-border);
  color: #dbe4ff;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth);
}
.nav-auth-btn:hover { background: rgba(217, 119, 87, 0.10); border-color: rgba(217, 119, 87, 0.45); color: #fff; }
.nav-auth-btn:focus-visible,
.auth-tab:focus-visible,
.auth-close:focus-visible,
.auth-overlay a:focus-visible,
.auth-overlay button:focus-visible,
.legal-actions a:focus-visible,
.legal-actions button:focus-visible,
.legal-card a:focus-visible { outline: 3px solid rgba(217, 119, 87, 0.95); outline-offset: 3px; }
.product-proof button { background: transparent; border: 0; cursor: pointer; font: inherit; padding: 0; }
.product-proof button:focus-visible { outline: 3px solid rgba(217, 119, 87, 0.95); outline-offset: 3px; border-radius: 0.2rem; }
.evo-input::placeholder { color: rgba(20, 20, 19, 0.55); }

.trust-card {
  background: var(--evx-surface);
  border: 1px solid var(--evx-border);
  border-radius: 1rem;
  min-height: 12rem;
  padding: 1.35rem;
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s var(--ease-out-expo), background 0.25s var(--ease-out-expo);
}
.trust-card:hover { background: var(--evx-hover); border-color: rgba(217, 119, 87, 0.34); transform: translateY(-3px); }
.trust-card-index { color: #93c5fd; display: block; font: 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; margin-bottom: 2.1rem; }
.trust-card h3 { color: var(--evx-heading); font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.55rem; }
.trust-card p { color: #cbd5e1; font-size: 0.875rem; line-height: 1.55; }

body.auth-open { overflow: hidden; }
.auth-overlay {
  align-items: center;
  background: var(--evx-surface);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 1.25rem;
  position: fixed;
  z-index: 200;
}
.auth-overlay.hidden { display: none; }
.auth-dialog {
  background: var(--evx-surface);
  border: 1px solid rgba(217, 119, 87, 0.24);
  border-radius: 1.25rem;
  box-shadow: var(--evx-shadow-raised);
  max-width: 34rem;
  padding: clamp(1.35rem, 4vw, 2.25rem);
  position: relative;
  width: 100%;
}
.auth-close { align-items: center; background: var(--evx-surface-raised); border: 1px solid transparent; border-radius: 0.65rem; color: #cbd5e1; cursor: pointer; display: flex; height: 2.75rem; justify-content: center; position: absolute; right: 1.25rem; top: 1.25rem; width: 2.75rem; }
.auth-close:hover { background: var(--evx-hover); color: #fff; }
.auth-dialog-copy { padding-right: 3.2rem; }
.auth-tabs { border-bottom: 1px solid var(--evx-border); display: flex; gap: 1rem; margin: 1.5rem 0 1.35rem; }
.auth-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: #94a3b8; cursor: pointer; font-size: 0.9rem; font-weight: 600; padding: 0.7rem 0.2rem 0.8rem; }
.auth-tab:hover { color: #fff; }
.auth-tab.active { border-color: #7da2ff; color: #fff; }
.auth-label { color: #dbe4ff; display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; margin: 1rem 0 0.45rem; text-transform: uppercase; }
.auth-captcha-wrap { border: 1px solid rgba(129,163,255,0.18); border-radius: 0.8rem; margin: 1rem 0; padding: 0.9rem; }
.auth-turnstile { min-height: 65px; }
.auth-help { color: #aebbd0; font-size: 0.75rem; line-height: 1.45; margin-top: 0.5rem; }
.auth-submit { margin-top: 1.25rem; width: 100%; }
.auth-submit:disabled { cursor: not-allowed; opacity: 0.52; }
.auth-confirmation { margin-top: 1.5rem; }
.auth-confirmation .auth-help { margin-top: 0.8rem; }
.auth-status { color: #aebbd0; font-size: 0.82rem; line-height: 1.45; min-height: 1.25rem; margin-top: 1rem; overflow-wrap: anywhere; }
.auth-status--error { color: #fca5a5; }
.auth-status--success { color: #86efac; }
.auth-status--info { color: #bfdbfe; }
.auth-account { margin-top: 1.5rem; }
.auth-account-badge { align-items: center; color: #86efac; display: flex; gap: 0.5rem; font-weight: 600; }
.auth-account-email { color: #dbe4ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; margin: 0.8rem 0; overflow-wrap: anywhere; }
.auth-legal { color: #8f9caf; font-size: 0.7rem; line-height: 1.5; margin-top: 1.2rem; }
.auth-legal a { color: #a9c5ff; text-decoration: underline; text-underline-offset: 2px; }

.legal-page { background: var(--evx-page); }
.legal-shell { margin: 0 auto; max-width: 60rem; padding: 1.5rem 1.25rem 4rem; }
.legal-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 2rem; }
.legal-brand { color: #fff; font: 600 1rem/1 'Space Grotesk', Inter, sans-serif; letter-spacing: 0.08em; text-decoration: none; }
.legal-actions { align-items: center; display: flex; gap: 1rem; }
.legal-actions a, .legal-actions button { background: transparent; border: 0; color: #a9c5ff; cursor: pointer; font: inherit; font-size: 0.85rem; text-decoration: none; }
.legal-actions a:hover, .legal-actions button:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.legal-card { background: rgba(15, 15, 20, 0.72); border: 1px solid var(--evx-border); border-radius: 1.25rem; padding: clamp(1.4rem, 4vw, 3.25rem); }
.legal-card h1 { color: #f8fafc; font-family: 'Space Grotesk', Inter, sans-serif; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 1.25rem; }
.legal-card h2 { color: #f8fafc; font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1.25rem; margin: 2rem 0 0.65rem; }
.legal-card p { color: #cbd5e1; font-size: 0.95rem; line-height: 1.75; margin: 0 0 0.95rem; }
.legal-card .legal-lead { color: #dbe4ff; font-size: 1.05rem; margin-bottom: 2rem; }
.legal-card .legal-eyebrow { color: #93c5fd; font: 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.14em; margin-bottom: 1rem; text-transform: uppercase; }
.legal-card a { color: #a9c5ff; text-decoration: underline; text-underline-offset: 3px; }
.legal-card a:hover { color: #fff; }
.legal-card .legal-note { border-left: 3px solid rgba(129,163,255,0.45); color: #aebbd0; font-size: 0.8rem; margin-top: 2rem; padding-left: 1rem; }

/* Landing demo: do not present the empty pipeline as a live AI call. */
.demo-step { display: none; opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo); }
.demo-step.active { display: block; opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .auth-dialog { border-radius: 1rem; }
  .trust-card { min-height: 0; }
  .legal-header { align-items: flex-start; gap: 1rem; }
  .legal-actions { flex-direction: column; align-items: flex-end; gap: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .trust-card, .nav-auth-btn, .auth-tab { transition: none; }
}


.onboarding-strip { background: rgba(20, 24, 38, 0.48); border: 1px solid rgba(129,163,255,0.16); border-radius: 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.25rem; }
.onboarding-strip > div { border-right: 1px solid rgba(255,255,255,0.08); padding: 0.35rem 1.25rem 0.35rem 0.5rem; }
.onboarding-strip > div:last-child { border-right: 0; }
.onboarding-strip h3 { color: var(--evx-heading); font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1rem; font-weight: 600; margin: 0 0 0.35rem; }
.onboarding-strip p { color: #cbd5e1; font-size: 0.8rem; line-height: 1.5; margin: 0; }
.infra-grid { align-items: stretch; display: grid; gap: 1rem; grid-template-columns: 1fr auto 1fr; }
.infra-card { border: 1px solid var(--evx-border); border-radius: 1rem; padding: clamp(1.25rem, 3vw, 2rem); }
.infra-card--muted { background: rgba(15,15,20,0.58); }
.infra-card--accent { background: linear-gradient(145deg, rgba(49,89,199,0.18), rgba(81,65,178,0.14)); border-color: rgba(129,163,255,0.28); }
.infra-label { color: #93c5fd; display: block; font: 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; margin-bottom: 1.5rem; }
.infra-card h3 { color: #f8fafc; font-family: 'Space Grotesk', Inter, sans-serif; font-size: clamp(1.1rem, 2.4vw, 1.45rem); line-height: 1.25; margin-bottom: 0.65rem; }
.infra-card p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.65; }
.infra-arrow { align-items: center; color: #93c5fd; display: flex; font-size: 1.75rem; justify-content: center; padding: 0 0.5rem; }
@media (max-width: 700px) {
  .onboarding-strip { grid-template-columns: 1fr; }
  .onboarding-strip > div { border-bottom: 1px solid rgba(255,255,255,0.08); border-right: 0; padding: 0.75rem 0.5rem 1rem; }
  .onboarding-strip > div:last-child { border-bottom: 0; padding-bottom: 0.5rem; }
  .infra-grid { grid-template-columns: 1fr; }
  .infra-arrow { transform: rotate(90deg); }
}


/* v15: guest trial and authenticated workspace */
.guest-trial-note { align-items: center; background: rgba(77,127,255,0.07); border: 1px solid rgba(129,163,255,0.18); border-radius: 0.7rem; color: #b8c9ed; display: flex; flex-wrap: wrap; font-size: 0.76rem; gap: 0.45rem 0.7rem; justify-content: space-between; line-height: 1.45; margin-top: 0.8rem; padding: 0.7rem 0.85rem; }
.guest-trial-note strong { color: #bfdbfe; font-weight: 600; white-space: nowrap; }
.guest-trial-note--used { border-color: rgba(251,191,36,0.24); }
.guest-trial-note--used strong { color: #fcd34d; }
.guest-captcha-wrap { border: 1px solid rgba(129,163,255,0.18); border-radius: 0.8rem; margin-top: 0.8rem; padding: 0.85rem; }

.workspace-page { background: var(--evx-page); color: var(--evx-heading); min-height: 100vh; }
.workspace-topbar { align-items: center; background: rgba(8,8,12,0.88); border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; height: 4.5rem; justify-content: space-between; padding: 0 2rem; position: sticky; top: 0; z-index: 30; }
.workspace-brand { color: #fff; font: 600 1.05rem/1 'Space Grotesk', Inter, sans-serif; letter-spacing: 0.12em; text-decoration: none; }
.workspace-topbar-actions { align-items: center; display: flex; gap: 1rem; }
.workspace-user-chip { color: #dbe4ff; font-size: 0.78rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-home-link { color: #9fb9ef; font-size: 0.78rem; text-decoration: none; }
.workspace-home-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.workspace-shell { display: grid; grid-template-columns: 18rem minmax(0, 1fr); min-height: calc(100vh - 4.5rem); }
.workspace-sidebar { background: rgba(12,13,19,0.86); border-right: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; min-height: calc(100vh - 4.5rem); padding: 1.5rem 1rem 1rem; }
.workspace-sidebar-head { align-items: flex-start; display: flex; justify-content: space-between; margin: 0 0 1.25rem; padding: 0 0.45rem; }
.workspace-eyebrow { color: #8faef1; font: 0.68rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.14em; margin: 0 0 0.6rem; text-transform: uppercase; }
.workspace-sidebar-title { color: #f8fafc; font: 600 1.25rem/1.2 'Space Grotesk', Inter, sans-serif; letter-spacing: -0.025em; margin: 0; }
.workspace-new-chat { align-items: center; display: inline-flex; gap: 0.55rem; justify-content: center; margin: 0 0.35rem 1.25rem; min-height: 2.75rem; }
.workspace-nav { display: grid; gap: 0.25rem; }
.workspace-nav-item { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 0.65rem; color: #98a5bd; cursor: pointer; display: flex; font-size: 0.82rem; gap: 0.7rem; min-height: 2.75rem; padding: 0.65rem 0.75rem; text-align: left; transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
.workspace-nav-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.workspace-nav-item.active { background: rgba(77,127,255,0.12); border-color: rgba(129,163,255,0.22); color: #dbe8ff; }
.workspace-history-label { color: #71809b; font-size: 0.68rem; letter-spacing: 0.12em; margin: 1.5rem 0 0.55rem; padding: 0 0.75rem; text-transform: uppercase; }
.workspace-chat-list { display: grid; gap: 0.2rem; max-height: min(34vh, 24rem); overflow-y: auto; }
.workspace-chat-list-item { background: transparent; border: 1px solid transparent; border-radius: 0.55rem; color: #93a0b7; cursor: pointer; font-size: 0.78rem; overflow: hidden; padding: 0.65rem 0.75rem; text-align: left; text-overflow: ellipsis; transition: background 0.18s ease, color 0.18s ease; white-space: nowrap; }
.workspace-chat-list-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.workspace-chat-list-item.active { background: rgba(255,255,255,0.055); color: #dbe4ff; }
.workspace-sidebar-foot { border-top: 1px solid rgba(255,255,255,0.07); margin-top: auto; padding: 1rem 0.45rem 0; }
.workspace-trust-note { align-items: flex-start; color: #8d9ab1; display: flex; font-size: 0.7rem; gap: 0.5rem; line-height: 1.45; }
.workspace-trust-note svg { color: #82a8ff; flex: 0 0 auto; margin-top: 0.05rem; }
.workspace-signout { background: transparent; border: 0; color: #9fb9ef; cursor: pointer; font-size: 0.78rem; margin-top: 1rem; padding: 0; }
.workspace-signout:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.workspace-content { min-width: 0; padding: clamp(1rem, 3vw, 3.2rem); }
.workspace-view { margin: 0 auto; max-width: 62rem; }
.workspace-view-title { color: #f8fafc; font: 600 clamp(1.8rem, 4vw, 3rem)/1.08 'Space Grotesk', Inter, sans-serif; letter-spacing: -0.04em; margin: 0 0 0.7rem; }
.workspace-view-lead { color: #aebbd0; font-size: 0.95rem; line-height: 1.65; margin: 0; max-width: 42rem; }
.chat-workspace-head, .workspace-view-head { border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 1.25rem; padding-bottom: 1.5rem; }
.chat-workspace-head { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.workspace-secondary-button, .workspace-danger-button { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.55rem; color: #bdc9dd; cursor: pointer; font-size: 0.76rem; min-height: 2.5rem; padding: 0.6rem 0.85rem; white-space: nowrap; }
.workspace-secondary-button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.chat-transcript { min-height: min(58vh, 42rem); max-height: min(62vh, 46rem); overflow-y: auto; padding: 0.5rem clamp(0rem, 2vw, 1.25rem) 1.5rem; scroll-behavior: smooth; }
.chat-empty { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: min(50vh, 28rem); padding: 2rem 1rem; text-align: center; }
.chat-empty[hidden] { display: none; }
.chat-empty-icon { align-items: center; background: rgba(77,127,255,0.13); border: 1px solid rgba(129,163,255,0.22); border-radius: 1rem; color: #9fb9ef; display: flex; height: 3rem; justify-content: center; margin-bottom: 1rem; width: 3rem; }
.chat-empty h3 { color: #f8fafc; font: 600 1.2rem/1.25 'Space Grotesk', Inter, sans-serif; margin: 0 0 0.55rem; }
.chat-empty p { color: #94a3b8; font-size: 0.85rem; line-height: 1.6; margin: 0; max-width: 31rem; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin-top: 1.25rem; }
.chat-suggestions button { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.1); border-radius: 999px; color: #aec2ec; cursor: pointer; font-size: 0.74rem; padding: 0.6rem 0.8rem; }
.chat-suggestions button:hover { background: rgba(77,127,255,0.11); border-color: rgba(129,163,255,0.28); color: #fff; }
.chat-message { display: grid; gap: 0.75rem; grid-template-columns: 2rem minmax(0, 1fr); margin: 0 auto 1.45rem; max-width: 52rem; }
.chat-avatar { align-items: center; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.65rem; color: #a9c5ff; display: flex; font: 600 0.74rem/1 Inter, sans-serif; height: 2rem; justify-content: center; width: 2rem; }
.chat-message--user .chat-avatar { background: rgba(77,127,255,0.18); border-color: rgba(129,163,255,0.25); color: #dbe8ff; }
.chat-message-content { min-width: 0; }
.chat-message-label { color: #7f8da6; font-size: 0.68rem; letter-spacing: 0.08em; margin: 0.1rem 0 0.35rem; text-transform: uppercase; }
.chat-bubble { color: #d7deeb; font-size: 0.92rem; line-height: 1.7; min-height: 1.5rem; }
.chat-bubble--user { background: rgba(77,127,255,0.11); border: 1px solid rgba(129,163,255,0.16); border-radius: 0.85rem; color: #e7efff; display: inline-block; max-width: 100%; padding: 0.7rem 0.9rem; white-space: pre-wrap; }
.chat-composer { background: rgba(15,15,20,0.92); border: 1px solid rgba(129,163,255,0.24); border-radius: 0.9rem; box-shadow: 0 18px 50px rgba(0,0,0,0.28); margin: 0 auto; max-width: 52rem; padding: 0.55rem 0.55rem 0.4rem; position: relative; }
.chat-input { background: transparent; border: 0; color: #f8fafc; display: block; font: inherit; line-height: 1.5; max-height: 11.25rem; min-height: 2.7rem; outline: none; overflow-y: auto; padding: 0.65rem 3.25rem 0.55rem 0.65rem; resize: none; width: 100%; }
.chat-input::placeholder { color: #77849b; }
.chat-send-button { align-items: center; background: #7da2ff; border: 0; border-radius: 0.6rem; color: #0b1020; cursor: pointer; display: flex; height: 2.35rem; justify-content: center; position: absolute; right: 0.6rem; top: 0.72rem; transition: background 0.18s ease, transform 0.18s ease; width: 2.35rem; }
.chat-send-button:hover { background: #b5c9ff; }
.chat-send-button:active { transform: scale(0.96); }
.chat-send-button:disabled { cursor: wait; opacity: 0.5; }
.chat-composer-note { color: #78859c; font-size: 0.68rem; line-height: 1.4; margin: 0.1rem 0.55rem 0.2rem; }
.chat-composer-note a { color: #9fb9ef; text-decoration: underline; text-underline-offset: 2px; }
.workspace-status { color: #8d9ab1; font-size: 0.78rem; line-height: 1.45; min-height: 1.25rem; margin: 0.7rem auto 0; max-width: 52rem; overflow-wrap: anywhere; }
.workspace-status--error { color: #fca5a5; }
.workspace-status--success { color: #86efac; }
.workspace-status--info { color: #bfdbfe; }
.workspace-card { background: rgba(15,15,20,0.68); border: 1px solid var(--evx-border); border-radius: 1rem; box-shadow: 0 18px 60px rgba(0,0,0,0.16); padding: clamp(1rem, 3vw, 2rem); }
.workspace-form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.workspace-label { color: #bdc9dd; display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; margin: 0 0 0.45rem; text-transform: uppercase; }
.workspace-account-facts { border-top: 1px solid rgba(255,255,255,0.08); display: grid; gap: 0.75rem; margin-top: 1.4rem; padding-top: 1.15rem; }
.workspace-account-facts div { align-items: center; display: flex; justify-content: space-between; gap: 1rem; }
.workspace-account-facts span { color: #8996ac; font-size: 0.78rem; }
.workspace-account-facts strong { color: #dbe4ff; font-size: 0.78rem; font-weight: 600; text-align: right; }
.workspace-account-facts strong.is-verified { color: #86efac; }
.workspace-account-facts strong.is-pending { color: #fcd34d; }
.workspace-form-submit { margin-top: 1.5rem; }
.settings-list { padding: 0; }
.settings-row { align-items: center; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; gap: 1rem; justify-content: space-between; min-height: 4.7rem; padding: 1rem 1.25rem; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > span { display: grid; gap: 0.25rem; }
.settings-row strong { color: #e5ebf7; font-size: 0.84rem; font-weight: 600; }
.settings-row small { color: #8d9ab1; font-size: 0.75rem; line-height: 1.45; }
.settings-select { background: #171a24; border: 1px solid rgba(129,163,255,0.22); border-radius: 0.5rem; color: #dbe4ff; font: inherit; font-size: 0.78rem; min-height: 2.3rem; padding: 0.45rem 0.65rem; }
.settings-checkbox { accent-color: #7da2ff; height: 1.1rem; width: 1.1rem; }
.settings-row--danger { align-items: center; }
.workspace-danger-button { border-color: rgba(248,113,113,0.25); color: #fca5a5; }
.workspace-danger-button:hover { background: rgba(248,113,113,0.1); }
.workspace-mobile-only { display: none; }
.workspace-backdrop { display: none; }
.workspace-icon-button { align-items: center; background: var(--evx-surface-raised); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.55rem; color: #cbd5e1; cursor: pointer; display: flex; height: 2.5rem; justify-content: center; width: 2.5rem; }
.workspace-mobile-toolbar { align-items: center; gap: 0.7rem; margin-bottom: 1.2rem; }
.workspace-mobile-title { color: #dbe4ff; font: 600 0.9rem/1.2 'Space Grotesk', Inter, sans-serif; }
body.workspace-compact .chat-message { margin-bottom: 0.8rem; }
body.workspace-compact .chat-bubble { font-size: 0.86rem; line-height: 1.55; }

.workspace-nav-item:focus-visible, .workspace-chat-list-item:focus-visible, .workspace-new-chat:focus-visible, .workspace-secondary-button:focus-visible, .workspace-danger-button:focus-visible, .workspace-signout:focus-visible, .chat-send-button:focus-visible, .chat-suggestions button:focus-visible, .workspace-home-link:focus-visible, .workspace-icon-button:focus-visible { outline: 3px solid rgba(129,163,255,0.95); outline-offset: 3px; }
@media (max-width: 900px) {
  .workspace-topbar { height: 4rem; padding: 0 1rem; }
  .workspace-shell { display: block; min-height: calc(100vh - 4rem); }
  .workspace-sidebar { bottom: 0; box-shadow: 20px 0 70px rgba(0,0,0,0.45); left: 0; min-height: auto; overflow-y: auto; padding-top: 1rem; position: fixed; top: 4rem; transform: translateX(-105%); transition: transform 0.22s ease; width: min(19rem, 88vw); z-index: 50; }
  .workspace-sidebar.is-open { transform: translateX(0); }
  .workspace-backdrop { background: rgba(2,6,23,0.64); inset: 4rem 0 0; position: fixed; z-index: 40; }
  .workspace-backdrop.is-visible { display: block; }
  .workspace-content { padding: 0 1rem 2rem; }
  .workspace-mobile-only { display: flex; }
  .workspace-mobile-toolbar { padding-top: 1rem; }
  .workspace-topbar .workspace-home-link { display: none; }
}
@media (max-width: 640px) {
  .workspace-topbar-actions { gap: 0.55rem; }
  .workspace-user-chip { max-width: 8rem; }
  .chat-workspace-head { flex-direction: column; }
  .workspace-secondary-button { align-self: flex-start; }
  .workspace-form-grid { grid-template-columns: 1fr; }
  .settings-row { align-items: flex-start; flex-direction: column; }
  .settings-row > :last-child { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-sidebar, .workspace-nav-item, .workspace-chat-list-item, .chat-send-button { transition: none; }
  .chat-transcript { scroll-behavior: auto; }
}


/* Theme-aware controls and editorial cards on public guide pages. */
.legal-language-toggle,
.legal-theme-toggle {
  align-items: center;
  background: var(--evx-surface-raised) !important;
  border: 1px solid var(--evx-border) !important;
  border-radius: 999px;
  color: var(--evx-heading) !important;
  display: inline-flex;
  font: 600 0.74rem/1 Inter, ui-sans-serif, system-ui, sans-serif !important;
  gap: 0.35rem;
  justify-content: center;
  min-height: 2.35rem;
  min-width: 3.1rem;
  padding: 0.35rem 0.6rem;
}
.legal-language-toggle { letter-spacing: 0.04em; }
.legal-theme-toggle { cursor: pointer; min-width: 0; }
.legal-language-toggle:hover,
.legal-theme-toggle:hover { background: var(--evx-hover) !important; border-color: var(--evx-accent-light) !important; color: var(--evx-heading) !important; }
.legal-language-toggle:focus-visible,
.legal-theme-toggle:focus-visible { outline: 3px solid var(--evx-accent-light); outline-offset: 3px; }
.legal-theme-toggle [data-theme-icon] { font-size: 0.95rem; line-height: 1; }
.legal-cta-row { align-items: center; display: flex; flex-wrap: wrap; gap: 0.65rem 0.9rem; margin: 1.35rem 0 1.8rem; }
.legal-cta-row .legal-button { align-items: center; background: #b85c43; border: 1px solid #a64d37; border-radius: 0.65rem; color: #fff !important; display: inline-flex; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 0.86rem; font-weight: 650; justify-content: center; min-height: 2.5rem; padding: 0.55rem 0.9rem; text-decoration: none; transition: transform 160ms ease, background-color 160ms ease; }
.legal-cta-row .legal-button:hover { background: #a64d37; color: #fff !important; transform: translateY(-1px); }
.legal-cta-row .legal-secondary-link { color: var(--evx-accent-active) !important; font-size: 0.84rem; text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .legal-cta-row .legal-secondary-link { color: var(--evx-accent-light) !important; }
.seo-related { border-top: 1px solid var(--evx-border); margin-top: 2rem; padding-top: 1.2rem; }
.legal-card .seo-related h2 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); margin: 0 0 0.85rem; }
.seo-related__grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.seo-related__grid li { min-width: 0; }
.legal-card .seo-related-card { align-content: start; background: var(--evx-surface-raised) !important; border: 1px solid var(--evx-border) !important; border-radius: 0.75rem; color: var(--evx-heading) !important; display: grid; gap: 0.4rem; height: 100%; min-height: 6.4rem; padding: 0.8rem; position: relative; text-decoration: none; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.legal-card .seo-related-card:hover { background: var(--evx-hover) !important; border-color: var(--evx-accent-border) !important; color: var(--evx-heading) !important; transform: translateY(-1px); }
.seo-related-card strong { color: var(--evx-heading) !important; font-size: 0.86rem; line-height: 1.4; padding-right: 1rem; }
.seo-related-card span:not(.seo-related-card__arrow) { color: var(--evx-subheading) !important; font-size: 0.8rem; line-height: 1.5; }
.seo-related-card__arrow { color: var(--evx-accent) !important; font-size: 1rem; position: absolute; right: 0.7rem; top: 0.6rem; }
@media (max-width: 700px) {
  .seo-related__grid { grid-template-columns: 1fr; }
  .legal-card .seo-related-card { min-height: 0; }
}
@media (max-width: 640px) {
  .legal-header { align-items: flex-start; flex-direction: column; gap: 0.75rem; }
  .legal-actions { align-items: center; flex-wrap: wrap; gap: 0.55rem 0.75rem; justify-content: flex-start; width: 100%; }
  .legal-language-toggle, .legal-theme-toggle { min-height: 2.3rem; }
  .legal-theme-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .seo-topic-cluster nav a, .legal-cta-row .legal-button, .legal-card .seo-related-card, .legal-theme-toggle { transition: none; }
}
