:root {
  --bg: #000000;
  --bg-soft: #232323;
  --bg-softer: #2a2a2a;
  --text: #f4f4f4;
  --muted: #9b9b9b;
  --muted-strong: #d0d0d0;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

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

button {
  color: inherit;
}

.app,
.workspace {
  min-height: 100vh;
}

.workspace {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.topbar {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 184px;
  margin-bottom: 14px;
  overflow: hidden;
  padding: 24px 32px;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.header-card {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(840px, 100%);
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: linear-gradient(112deg, rgba(19, 19, 19, 0.92), rgba(8, 8, 8, 0.72));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(9px);
}

.header-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #ff1515 0%, #ff1515 15%, rgba(255, 255, 255, 0.7) 15%, transparent 58%);
}

.header-thumbnails,
.header-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.header-thumbnails {
  z-index: -2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  opacity: 0.46;
  transform: scale(1.04) rotate(-0.4deg);
  transform-origin: center;
}

.header-thumbnail-row {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.header-thumbnail-track {
  display: flex;
  width: max-content;
  height: 100%;
  gap: 8px;
  will-change: transform;
  animation: header-thumbnails-scroll 82s linear infinite;
}

.header-thumbnail-row-2 .header-thumbnail-track {
  animation-name: header-thumbnails-scroll-reverse;
  animation-duration: 96s;
}

.header-shade {
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.9));
}

.header-thumbnail {
  height: 100%;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  filter: saturate(0.75);
}

@keyframes header-thumbnails-scroll {
  to { transform: translate3d(calc(-50% - 4px), 0, 0); }
}

@keyframes header-thumbnails-scroll-reverse {
  from { transform: translate3d(calc(-50% - 4px), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-youtube-icon {
  width: 34px;
  height: 34px;
  padding: 9px 7px;
  box-sizing: content-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
  flex: 0 0 auto;
  color: #ff0a0a;
  fill: currentColor;
}

.brand-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #c5c5c5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1;
}

.brand-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff2020;
  box-shadow: 0 0 0 4px rgba(255, 32, 32, 0.14);
}

.brand-youtube-play {
  fill: #ffffff;
}

.brand-title {
  color: var(--text);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-left: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-link {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.faq-link:hover {
  color: #ffffff;
}

.faq-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.faq-page {
  min-height: 100vh;
}

.faq-content {
  width: min(840px, calc(100% - 40px));
  margin: 38px auto 72px;
  color: var(--text);
  font: inherit;
}

.faq-back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: #d0d0d0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.faq-back-link:hover {
  color: var(--text);
}

.faq-back-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.faq-toc-panel {
  position: relative;
  overflow: hidden;
  margin: 0 0 46px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: linear-gradient(112deg, rgba(19, 19, 19, 0.92), rgba(8, 8, 8, 0.72));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(9px);
}

.faq-toc-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #ff1515 0%, #ff1515 15%, rgba(255, 255, 255, 0.7) 15%, transparent 58%);
}

.faq-toc-title {
  display: block;
  margin: 0 0 14px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.faq-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 0;
}

.faq-toc .suggested-question,
.faq-question-list .suggested-question {
  display: inline-block;
  color: #d0d0d0;
  font-size: 13px;
  text-decoration: none;
}

.faq-toc .suggested-question:link,
.faq-toc .suggested-question:visited,
.faq-toc .suggested-question:hover,
.faq-toc .suggested-question:active {
  text-decoration: none;
}

.faq-section {
  scroll-margin-top: 24px;
}

.faq-section + .faq-section {
  margin-top: 52px;
}

.faq-section h2 {
  margin: 0 0 14px;
  color: #d74d4d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

#problemes-rencontres-title {
  color: #f59e0b;
}

.faq-warning-icon {
  display: inline-block;
  margin-left: 4px;
  color: #fbbf24;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: -0.04em;
}

.faq-subsection + .faq-subsection {
  margin-top: 28px;
}

.faq-subsection h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}

.faq-question-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-question-list .suggested-question.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.faq-answers {
  min-height: var(--faq-answer-space, 0);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  overflow: visible;
}

.faq-item summary {
  display: inline-block;
  max-width: 100%;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  max-width: 720px;
  margin: 16px 0 0;
  padding: 20px 24px;
  border: 1px solid #303030;
  border-radius: 20px;
  background: #0e0e0e;
  color: var(--text);
  line-height: 1.6;
}

.faq-answer > :first-child { margin-top: 0; }
.faq-answer > :last-child { margin-bottom: 0; }

.faq-benchmark-table {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.faq-benchmark-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.faq-benchmark-table th,
.faq-benchmark-table td {
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.faq-benchmark-table th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.faq-benchmark-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.faq-benchmark-table tr > :last-child {
  border-right: 0;
}

.faq-benchmark-table tbody tr:last-child td {
  border-bottom: 0;
}

.faq-benchmark-table code {
  font-size: 0.88em;
}

.faq-llm-calls-table {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.faq-llm-calls-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.faq-llm-calls-table th,
.faq-llm-calls-table td {
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  font-size: 12px;
}

.faq-llm-calls-table thead th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.faq-llm-calls-table th:first-child {
  min-width: 235px;
  text-align: left;
  font-weight: 500;
}

.faq-llm-calls-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.faq-llm-calls-table tr > :last-child {
  border-right: 0;
}

.faq-llm-calls-table tbody tr:last-child > * {
  border-bottom: 0;
}

.faq-llm-calls-table td .llm-role {
  font-size: 18px;
}

.faq-answer .llm-role { font-weight: 600; }
.faq-answer .llm-reformulation { color: #93c5fd; }
.faq-answer .llm-planification { color: #c4b5fd; }
.faq-answer .llm-sql { color: #fcd34d; }
.faq-answer .llm-reponse { color: #6ee7b7; }
.faq-answer .llm-resume { color: #f9a8d4; }

.faq-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.faq-steps li::marker {
  color: #ff1515;
  font-weight: 700;
}

.faq-steps p {
  margin: 0;
}

.faq-detail-list {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding-left: 20px;
}

.faq-detail-list li::marker {
  color: var(--muted);
}

.faq-exception {
  display: grid;
  gap: 4px;
  margin: 12px 0 18px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 90, 90, 0.42);
  border-left: 3px solid #ff5a5a;
  border-radius: 8px;
  color: var(--muted-strong);
  background: rgba(255, 90, 90, 0.07);
  font-size: 12px;
  line-height: 1.5;
}

.faq-exception strong {
  color: #ff8b8b;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.faq-info {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.faq-info-trigger {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
  cursor: help;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.faq-info:hover .faq-info-trigger {
  border-color: rgba(255, 255, 255, 0.52);
  color: var(--text);
}

.faq-tooltip {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 8px);
  left: 50%;
  display: grid;
  gap: 10px;
  width: min(600px, 85vw);
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted-strong);
  background: #171717;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden;
}

.faq-tooltip img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: contain;
}

.faq-info:hover .faq-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

@media (max-width: 520px) {
  .faq-tooltip {
    left: auto;
    right: 0;
    transform: translate(0, 4px);
  }

  .faq-info:hover .faq-tooltip {
    transform: translate(0, 0);
  }
}

.faq-pipeline-preview {
  margin: 16px 0 0;
}

.faq-pipeline-preview a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.faq-pipeline-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.faq-pipeline-preview figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.faq-answer a {
  color: #ff5a5a;
}

.faq-provider-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.faq-provider-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.faq-provider-logo img {
  display: block;
  width: 20px;
  height: 20px;
}

.faq-provider-logo-openai img {
  filter: invert(1);
}

.faq-storage-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.faq-benchmark-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.faq-benchmark-images figure {
  min-width: 0;
  margin: 0;
}

.faq-benchmark-images img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.faq-benchmark-images figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.faq-keyword-examples {
  margin: 18px 0 0;
}

.faq-keyword-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-question-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.faq-storage-examples figure {
  min-width: 0;
  margin: 0;
}

.faq-lightbox-trigger {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: zoom-in;
}

.faq-pipeline-preview a {
  position: relative;
}

.faq-lightbox-trigger::after,
.faq-pipeline-preview a::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 160ms ease;
}

.faq-lightbox-trigger::after {
  content: "Agrandir l'image";
}

.faq-pipeline-preview a::after {
  content: "Voir l'interface";
}

.faq-lightbox-trigger:hover::after,
.faq-pipeline-preview a:hover::after {
  opacity: 1;
}

.faq-lightbox-trigger:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.faq-storage-examples img,
.faq-keyword-images img,
.faq-question-images img {
  display: block;
  width: 100%;
  height: 170px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  object-fit: cover;
  object-position: top left;
}

.faq-storage-examples figcaption,
.faq-keyword-examples figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.faq-metadata-example {
  max-width: 720px;
  margin: 18px 0 0;
}

.faq-metadata-example img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.faq-metadata-example figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.faq-pipeline-stages {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 22px;
}

.faq-pipeline-stages li::marker {
  color: #ff1515;
  font-weight: 700;
}

.faq-pipeline-example {
  max-width: 720px;
  margin: 18px 0 0;
}

.faq-pipeline-example img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.faq-pipeline-example figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.faq-integration-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
}

.faq-integration-logo img {
  display: block;
  width: 42px;
  height: 42px;
}

.faq-integration-logo figcaption {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.faq-lightbox {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 42px 24px 24px;
  background: rgba(0, 0, 0, 0.86);
}

.faq-lightbox[hidden] {
  display: none;
}

.faq-lightbox img {
  display: block;
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 66px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.56);
}

.faq-lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.faq-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.faq-metrics div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.faq-metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.faq-metrics dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.faq-metrics p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.faq-metric-route {
  display: block;
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.channel-link:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.channel-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.channel-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

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

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn-ghost,
.btn-top {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
}

.btn-top {
  padding: 8px 12px;
  font-size: 13px;
}

.btn-primary {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: var(--bg-softer);
  color: #000000;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #ffffff;
}

.btn-primary svg {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px 24px 28px;
}

.messages {
  display: grid;
  gap: 22px;
  width: min(840px, 100%);
  max-width: 840px;
  margin: 50px auto 0;
  min-height: 0;
  min-width: 0;
  align-content: start;
}

.message {
  display: block;
  min-width: 0;
}

.message-body {
  min-width: 0;
}

.message.user .message-body {
    margin-left: auto;
    width: fit-content;
    max-width: 75%;
    padding: 8px 18px;
    border-radius: 999px;
    background: #000000;
    color: #ffffff;
    border: 1px solid #2c2c2c;
}

.message.assistant .message-body {
  width: min(640px, 100%);
  max-width: 640px;
  padding-top: 4px;
}

.loading-message .message-body {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
}

.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}

.loading-dots span {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-strong);
  animation: loading-bounce 1.1s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes loading-bounce {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.message-meta {
  margin-bottom: 8px;
  color: #7d7d7d;
  font-size: 12px;
}

.message-content {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.65;
  font-size: 15px;
}

@keyframes answer-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer-enter {
  animation: answer-enter 260ms ease-out both;
}

.streaming-json .message-content {
  margin: 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.25;
  white-space: pre-wrap;
}

.stream-stage {
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.2;
}

.message-content p,
.message-content ul,
.message-content ol,
.message-content blockquote,
.message-content pre,
.message-content .markdown-table-wrap,
.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 0 0 12px;
}

.message-content p:last-child,
.message-content ul:last-child,
.message-content ol:last-child,
.message-content blockquote:last-child,
.message-content pre:last-child,
.message-content .markdown-table-wrap:last-child,
.message-content h1:last-child,
.message-content h2:last-child,
.message-content h3:last-child {
  margin-bottom: 0;
}

.message-content ul,
.message-content ol {
  padding-left: 20px;
}

.message-content li + li {
  margin-top: 4px;
}

.message-content li > ul,
.message-content li > ol {
  margin: 4px 0 0;
}

.message-content blockquote {
  padding-left: 14px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted-strong);
}

.message-content h1,
.message-content h2,
.message-content h3 {
  color: #ffffff;
  line-height: 1.28;
}

.message-content h1 {
  font-size: 22px;
}

.message-content h2 {
  font-size: 18px;
}

.message-content h3 {
  font-size: 16px;
}

.message-content code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-family: Consolas, "SFMono-Regular", Monaco, monospace;
  font-size: 0.95em;
}

.message-content pre {
  overflow-x: auto;
  overflow-wrap: normal;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0b0b;
}

.message-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  overscroll-behavior-inline: contain;
}

.message-content table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  white-space: normal;
}

.message-content th,
.message-content td {
  min-width: 120px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.message-content th {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-weight: 700;
}

.message-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.message-content tr > :last-child {
  border-right: 0;
}

.message-content tbody tr:last-child td {
  border-bottom: 0;
}

.message-content .markdown-align-left {
  text-align: left;
}

.message-content .markdown-align-center {
  text-align: center;
}

.message-content .markdown-align-right {
  text-align: right;
}

.message-content a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff4242;
  font-weight: 700;
  text-decoration: none;
}

.message-content a.external-link-generic {
  color: #4da3ff;
  font-weight: 400;
}

.message-content a.external-link-generic:hover {
  color: #80c2ff;
}

.video-carousel {
  display: flex;
  gap: 14px;
  max-width: 100%;
  margin-top: 18px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--line-strong) transparent;
}

.video-card {
  flex: 0 0 250px;
  max-width: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  scroll-snap-align: start;
}

.video-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  background: #000000;
}

.video-title {
  padding: 10px 12px 12px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.expand-search-btn {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.expand-search-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.expand-search-btn:disabled {
  cursor: progress;
  opacity: 0.6;
}

.expanded-answer {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-soft);
}

.expanded-answer-label {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.expanded-answer-label:first-child {
  margin-top: 0;
}

.expanded-answer-sources {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted-strong);
  font-size: 13px;
}

.expanded-answer-sources a {
  color: inherit;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 15px;
  opacity: 0.82;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.icon-btn[data-feedback="true"][aria-pressed="true"] {
  color: #86b58c;
  background: rgba(134, 181, 140, 0.12);
}

.icon-btn[data-feedback="false"][aria-pressed="true"] {
  color: #c98282;
  background: rgba(201, 130, 130, 0.12);
}

.composer {
  position: sticky;
  bottom: 0;
  padding: 18px 24px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.88) 26%, rgba(0, 0, 0, 0.98) 100%);
}

.composer-inner {
  max-width: 840px;
  margin: 0 auto;
}

.suggested-questions {
  margin: 0 0 13px;
}

.suggested-questions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggested-question {
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.suggested-question:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.suggested-question:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.composer-row {
  display: flex;
  align-items: center;
}

.composer-input-shell {
    position: relative;
    flex: 1 1 auto;
    height: 56px;
    border: 1px solid rgb(85 85 85);
    border-radius: 28px;
    background: #000000;
    padding: 0 64px 0 18px;
}

.composer textarea {
  width: 100%;
  height: 54px;
  border: 0;
  outline: none;
  resize: none;
  max-height: 180px;
  background: transparent;
  color: var(--text);
  padding: 15px 0 11px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: #b4b4b4;
}

.composer textarea:focus {
  border-color: rgba(255, 255, 255, 0.24);
}

.composer-input-shell > .composer-submit {
  width: 44px;
  height: 44px;
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}

.composer-input-shell > .composer-submit::before {
  width: 34px;
  height: 34px;
}

@media (max-width: 720px) {
  .topbar,
  .chat,
  .composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    padding-top: 10px;
    min-height: 148px;
  }

  .header-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px 14px;
  }

  .brand-youtube-icon {
    display: none;
  }

  .brand-inline {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-copy,
  .topbar-links {
    min-width: 0;
  }

  .topbar-links {
    align-self: flex-start;
    flex: 0 0 auto;
  }

  .channel-link {
    margin-left: 0;
    padding: 6px 9px;
    font-size: 11px;
  }

  .channel-link svg {
    width: 14px;
    height: 14px;
  }

  .topbar-links {
    gap: 8px;
  }

  .faq-content {
    width: min(840px, calc(100% - 28px));
    margin-top: 28px;
  }

  .faq-metrics {
    grid-template-columns: 1fr;
  }

  .faq-storage-examples,
  .faq-benchmark-images,
  .faq-keyword-images,
  .faq-question-images {
    grid-template-columns: 1fr;
  }

  .channel-link svg {
    width: 18px;
    height: 18px;
  }

  .brand-kicker {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .brand-title {
    font-size: 19px;
    white-space: nowrap;
  }

  .brand-subtitle {
    font-size: 12px;
    white-space: nowrap;
  }

  .suggested-question {
    width: 100%;
  }

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

@media (max-width: 360px) {
  .brand-inline {
    gap: 9px;
  }

  .brand-kicker {
    font-size: 8px;
    white-space: nowrap;
  }

}

@media (prefers-reduced-motion: reduce) {
  .header-thumbnail-track {
    animation: none;
  }
}
