:root {
  --bg: #f6f8fb;
  --ink: #14202b;
  --muted: #5e6f7d;
  --line: #dce5ea;
  --panel: #ffffff;
  --dark: #101820;
  --cyan: #08b8c8;
  --green: #1b9c77;
  --amber: #d89a16;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
/* overflow-x: clip (not hidden) so html/body never become the scroll container
   position:sticky resolves against — hidden here silently breaks the sticky topbar. */
html { scroll-behavior: smooth; max-width: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65; max-width: 100%; overflow-x: clip; }
main { max-width: 100%; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(246, 248, 251, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 229, 234, 0.9);
}

.brand, .nav-actions, .navlinks, .lang-switcher, .actions, .footer-links, .related {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand { font-weight: 900; font-size: 1.05rem; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
}

.navlinks { justify-content: center; color: var(--muted); font-size: 0.92rem; }
.navlinks a:hover, .footer a:hover { color: var(--cyan); }

.lang-switcher a {
  min-width: 34px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}
.lang-switcher a.active { background: var(--dark); color: #fff; border-color: var(--dark); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--cyan);
  color: #061217;
  font-weight: 900;
  cursor: pointer;
}
.btn.small { min-height: 36px; padding: 8px 13px; font-size: 0.86rem; }
.btn.ghost { background: #e7eef2; color: var(--ink); }

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(50px, 7vw, 92px) clamp(18px, 5vw, 76px);
  background:
    linear-gradient(110deg, rgba(246,248,251,0.9), rgba(246,248,251,0.72)),
    url("../assets/publications/archive-answers-cover.png") center/cover;
}

.hero-copy, .page-hero, .section, .article { width: 100%; max-width: 1180px; margin: 0 auto; }
.hero h1, .page-hero h1, .article h1 {
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 980px;
  overflow-wrap: anywhere;
}
.hero p, .page-hero p, .lead { font-size: clamp(1rem, 1.6vw, 1.25rem); color: #314552; max-width: 780px; }
.eyebrow { color: var(--green); text-transform: uppercase; font-weight: 900; font-size: 0.78rem; letter-spacing: 0; }

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(16,24,32,0.15);
}
.hero-panel div { padding: 16px; border-radius: 7px; background: #f5fafb; font-weight: 800; }

.section { padding: clamp(48px, 7vw, 92px) clamp(18px, 5vw, 76px); scroll-margin-top: 84px; }
.section.tint { max-width: none; background: #eaf2f4; }
.section.tint > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 26px; }
.section h2, .page-hero h1, .article h2 { line-height: 1.08; }
.section h2, .article h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); max-width: 820px; }

.steps, .pub-grid, .chips, .roi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.step, .pub-card, .demo, form, .chart, .table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(16,24,32,0.06);
}
.step { padding: 20px; }
.step span { display: block; color: var(--cyan); font-weight: 900; margin-bottom: 8px; }

.roi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roi-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(16,24,32,0.06);
}
.roi-card strong { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; color: var(--green); }
.roi-card span { color: var(--muted); font-weight: 750; }

.chips { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.chips a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 13px 10px; text-align: center; font-weight: 800; transition: border-color 0.15s, color 0.15s; }
.chips a:hover { border-color: var(--cyan); color: #007f8c; }

.demo { padding: clamp(22px, 4vw, 42px); }
.interactive-demo { display: grid; }
.demo-window {
  display: grid;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16,24,32,0.14);
  border: 1px solid var(--line);
}
.demo-window-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--dark);
  color: #fff;
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; background: #4a5a66; }
.demo-dots i:nth-child(1) { background: #e6675c; }
.demo-dots i:nth-child(2) { background: #e8b559; }
.demo-dots i:nth-child(3) { background: #56c290; }
.demo-window-title { display: flex; align-items: center; gap: 10px; font-weight: 850; }
.demo-online { display: flex; align-items: center; gap: 6px; color: #7be0ea; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; }
.demo-online i { width: 8px; height: 8px; border-radius: 50%; background: #4fe08a; display: block; box-shadow: 0 0 0 3px rgba(79,224,138,0.25); }
.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.86rem;
  flex-shrink: 0;
}
.demo-avatar.bot { background: var(--cyan); color: #061217; }
.demo-avatar.user { background: #e7eef2; color: var(--ink); }
.demo-industries {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #eef4f6;
  border-bottom: 1px solid var(--line);
}
.demo-industries button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
}
.demo-industries button:hover { border-color: var(--cyan); color: #007f8c; }
.demo-industries button[aria-selected="true"] { background: var(--dark); color: #fff; border-color: var(--dark); }
.demo-chat {
  max-height: 480px;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px 18px;
  background: #f6f8fb;
}
.demo-message {
  max-width: 86%;
  display: grid;
  gap: 8px;
}
.demo-msg-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 900; text-transform: uppercase; }
.demo-msg-head b { color: inherit; font-weight: 900; }
.demo-message > div { padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.demo-message p { margin: 0; }
.demo-message.user { justify-self: end; }
.demo-message.user .demo-msg-head { justify-content: flex-end; color: #7be0ea; }
.demo-message.user > div { background: #10202b; color: #fff; border-color: #10202b; border-bottom-right-radius: 3px; }
.demo-message.bot { justify-self: start; }
.demo-message.bot > div { border-bottom-left-radius: 3px; }
.demo-message.system { max-width: 100%; justify-self: stretch; }
.demo-message.system > div { background: #eaf7f8; text-align: center; color: #0a5a63; font-weight: 750; }
.demo-presets { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 0 18px 16px; background: #f6f8fb; }
.demo-presets span { color: var(--muted); font-weight: 900; }
.demo-presets button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.demo-presets button:hover { border-color: var(--cyan); color: #007f8c; }
.demo-input-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; box-shadow: none; padding: 16px 18px; border: 0; border-top: 1px solid var(--line); background: #fff; border-radius: 0; }
.demo-evidence, .demo-chain { margin-top: 14px; }
.demo-evidence strong, .demo-chain strong { display: block; margin-bottom: 8px; }
.demo-message.bot .demo-evidence strong, .demo-message.bot .demo-chain strong { color: var(--ink); }
.demo-message.user .demo-evidence strong, .demo-message.user .demo-chain strong { color: #7be0ea; }
.demo-evidence ul { margin: 0; padding-inline-start: 20px; }
.demo-chain div { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-chain em {
  padding: 6px 10px;
  border-radius: 7px;
  background: #e9f7f4;
  color: #08765e;
  font-style: normal;
  font-weight: 850;
}
.question { display: inline-block; padding: 10px 14px; border-radius: 7px; background: #10202b; color: #fff; font-weight: 850; margin: 10px 0; }

.pub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-card { overflow: hidden; }
.pub-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pub-card div { padding: 18px; }
.pub-card span { color: var(--green); font-weight: 900; font-size: 0.78rem; text-transform: uppercase; }
.pub-card h2, .pub-card h3 { margin: 8px 0; line-height: 1.18; }
.pub-card p { color: var(--muted); }
.pub-card a { color: #007f8c; font-weight: 900; }

.page-hero { padding: clamp(54px, 8vw, 112px) clamp(18px, 5vw, 76px) 28px; }
.article { padding: clamp(42px, 7vw, 92px) clamp(18px, 5vw, 76px); }
.article .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin: 26px 0 34px; }
.article-body { columns: 2 340px; column-gap: 42px; color: #253845; }
.article section { margin-top: 34px; }
.back { display: inline-block; color: var(--cyan); font-weight: 900; margin-bottom: 16px; }
.related a { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 7px; color: #007f8c; font-weight: 850; }
.article-cta { margin-top: 34px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: #10202b; color: #fff; }

.chart { padding: 20px; display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 0.28fr) 1fr 48px; gap: 12px; align-items: center; }
.bar { height: 18px; background: #edf3f5; border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.bar-row b { color: var(--dark); }

.contact form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
}
label { display: grid; gap: 7px; font-weight: 850; color: #233644; }
label.wide, form .btn, .privacy { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cdd9df;
  border-radius: 7px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
.privacy { margin: 0; color: var(--muted); font-size: 0.9rem; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 76px);
  background: #101820;
  color: #f4f8fa;
}
.footer p { max-width: 620px; color: #aebcc6; margin: 8px 0 0; }
.footer-links a { color: #d7edf0; }

[dir="rtl"] .topbar, [dir="rtl"] .brand, [dir="rtl"] .nav-actions, [dir="rtl"] .navlinks,
[dir="rtl"] .lang-switcher, [dir="rtl"] .actions, [dir="rtl"] .footer-links, [dir="rtl"] .related { flex-direction: row-reverse; }
[dir="rtl"] .hero { direction: rtl; }
[dir="rtl"] .article, [dir="rtl"] .page-hero, [dir="rtl"] .section { text-align: right; unicode-bidi: plaintext; }
[dir="rtl"] .demo-window-bar, [dir="rtl"] .demo-window-title { flex-direction: row-reverse; }
[dir="rtl"] .demo-message.user { justify-self: start; }
[dir="rtl"] .demo-message.bot { justify-self: end; }
[dir="rtl"] .demo-message.user .demo-msg-head { justify-content: flex-start; }
[dir="rtl"] .demo-message.user > div { border-bottom-right-radius: 12px; border-bottom-left-radius: 3px; }
[dir="rtl"] .demo-message.bot > div { border-bottom-left-radius: 12px; border-bottom-right-radius: 3px; }
[dir="rtl"] .demo-input-row { direction: rtl; }
[dir="rtl"] .bar-row { grid-template-columns: 48px 1fr minmax(120px, 0.28fr); }
[dir="rtl"] .bar-row span { grid-column: 3; }
[dir="rtl"] .bar-row .bar { grid-column: 2; }
[dir="rtl"] .bar-row b { grid-column: 1; }

@media (max-width: 980px) {
  .topbar { align-items: flex-start; }
  .navlinks { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .steps, .pub-grid, .roi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  html[dir="rtl"] body { direction: ltr; }
  html[dir="rtl"] main, html[dir="rtl"] footer { direction: rtl; }
  .topbar, .footer { flex-direction: column; }
  .section { scroll-margin-top: 180px; }
  [dir="rtl"] .topbar, [dir="rtl"] .footer { flex-direction: column; align-items: flex-start; direction: ltr; }
  [dir="rtl"] .topbar .nav-actions, [dir="rtl"] .topbar .lang-switcher { flex-direction: row; }
  .steps, .pub-grid, .chips, .roi-grid, .contact form { grid-template-columns: 1fr; }
  .demo-message { max-width: 100%; }
  .demo-input-row { grid-template-columns: 1fr; }
  .bar-row, [dir="rtl"] .bar-row { grid-template-columns: 1fr; }
  .bar-row span, .bar-row .bar, .bar-row b, [dir="rtl"] .bar-row span, [dir="rtl"] .bar-row .bar, [dir="rtl"] .bar-row b { grid-column: auto; }
  .hero h1, .page-hero h1, .article h1 { font-size: 1.65rem; line-height: 1.14; }
  .article, .section, .page-hero { padding-left: 20px; padding-right: 20px; }
  .article-body { columns: 1; }
  [dir="rtl"] .article > *, [dir="rtl"] .page-hero > *, [dir="rtl"] .section > * { max-width: calc(100vw - 40px); }
  [dir="rtl"] .article { direction: ltr; }
  [dir="rtl"] .article > * { direction: rtl; }
  [dir="rtl"] .article, [dir="rtl"] .article h1, [dir="rtl"] .article p, [dir="rtl"] .article li { text-align: center; }
  [dir="rtl"] .article h1 {
    width: min(310px, calc(100vw - 56px));
    max-width: min(310px, calc(100vw - 56px));
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  [dir="rtl"] .article .lead {
    width: min(310px, calc(100vw - 56px));
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
  }
  [dir="rtl"] .article-body,
  [dir="rtl"] .article section,
  [dir="rtl"] .article ul,
  [dir="rtl"] .article ol {
    width: min(330px, calc(100vw - 44px));
    max-width: min(330px, calc(100vw - 44px));
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
  }
  [dir="rtl"] .cover { width: calc(100vw - 40px); }
}
