:root {
  color-scheme: dark;
  --page: #14141b;
  --surface: #1d1d26;
  --line: #34343f;
  --text: #f5f4f8;
  --copy: #d0ced8;
  --muted: #aaa8b8;
  --accent: #a895ef;
  --accent-bg: #292638;
}

html[data-landing-theme="day"] {
  color-scheme: light;
  --page: #f7f6fc;
  --surface: #fff;
  --line: #e1dfed;
  --text: #1c1b32;
  --copy: #3e3d58;
  --muted: #68677e;
  --accent: #654ac7;
  --accent-bg: #efecfa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page) url('/conversation-pattern.svg') center top / 720px 480px repeat; color: var(--text); font: 16px/1.6 Inter, "Segoe UI", Arial, sans-serif; }
html[data-landing-theme="day"] body { background-image: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:where(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.legal-wrap { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 9px 14px; border-radius: 8px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Navigation matches the chat. */
.legal-header { border-bottom: 1px solid var(--line); background: var(--page); }
.legal-header-inner { display: flex; align-items: center; min-height: 72px; gap: 32px; }
.legal-brand { display: inline-flex; align-items: center; flex: none; gap: 7px; color: var(--text); font-size: 26px; font-weight: 800; letter-spacing: -.065em; line-height: 1; white-space: nowrap; }
.legal-brand img { width: 48px; height: 48px; object-fit: contain; }
.legal-brand > span > span { color: var(--accent); }
.legal-header-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); margin-inline: auto; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.legal-header-nav a:hover, .legal-header-nav a[aria-current] { color: var(--text); }
.legal-header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.legal-theme-control { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.legal-theme-control button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 680; }
.legal-theme-control button[aria-pressed="true"] { background: var(--accent-bg); color: var(--text); }
.legal-theme-control button img { width: 16px; height: 16px; }
html[data-landing-theme="night"] .legal-theme-control button img { filter: brightness(0) invert(.82); }
.legal-chat-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; }
.legal-chat-button:hover { border-color: var(--accent); }

/* The documents remain a quiet, readable single column. */
.legal-intro-inner { padding: 42px 0 30px; text-align: center; }
.legal-intro h1 { max-width: 1000px; margin: 0 auto; font-size: clamp(34px, 4vw, 48px); font-weight: 770; letter-spacing: -.052em; line-height: 1.12; text-wrap: balance; overflow-wrap: anywhere; }
.legal-lead { max-width: 700px; margin: 12px auto 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.legal-layout { width: min(820px, calc(100% - 48px)); padding-bottom: 76px; }
.legal-sidebar { margin-bottom: 14px; }
.legal-sidebar nav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.legal-sidebar nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.legal-sidebar nav a:hover, .legal-sidebar nav a[aria-current] { background: var(--accent-bg); color: var(--text); }
.legal-article { min-width: 0; padding: 35px 42px 42px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.legal-date { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.legal-section { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }
.legal-section:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.legal-section h2 { margin: 0 0 12px; color: var(--text); font-size: clamp(19px, 2vw, 23px); font-weight: 740; letter-spacing: -.035em; line-height: 1.3; }
.legal-section p { margin: 0 0 13px; color: var(--copy); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-prohibited ol { display: grid; gap: 0; padding: 0; margin: 6px 0 0; list-style: none; counter-reset: rule; }
.legal-prohibited li { position: relative; padding: 12px 0 12px 42px; border-bottom: 1px solid var(--line); color: var(--copy); font-size: 15px; line-height: 1.55; counter-increment: rule; overflow-wrap: anywhere; }
.legal-prohibited li:last-child { border-bottom: 0; }
.legal-prohibited li::before { content: counter(rule, decimal-leading-zero); position: absolute; top: 13px; left: 0; color: var(--accent); font-size: 12px; font-weight: 760; }
.legal-contact { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }
.legal-contact > div > span { display: none; }
.legal-contact h2 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.035em; }
.legal-contact p { max-width: 55ch; margin: 0; color: var(--copy); font-size: 13px; line-height: 1.6; }
.legal-contact p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-contact > a { flex: none; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 13px; font-weight: 690; }
.legal-contact > a:hover { border-color: var(--accent); }


@media (max-width: 1000px) {
  .legal-header-nav { display: none; }
}

@media (max-width: 640px) {
  .legal-wrap, .legal-layout { width: min(100% - 32px, 520px); }
  .legal-header-inner { min-height: 66px; gap: 7px; }
  .legal-brand { gap: 5px; font-size: 21px; }
  .legal-brand img { width: 39px; height: 39px; }
  .legal-header-actions { gap: 7px; }
  .legal-theme-control button { gap: 3px; padding-inline: 6px; font-size: 11px; }
  .legal-theme-control button img { width: 14px; height: 14px; }
  .legal-chat-button { min-height: 40px; gap: 3px; padding-inline: 9px; font-size: 0; }
.legal-chat-button::before { content: attr(data-short); font-size: 12px; }
  .legal-chat-button span { font-size: 14px; }
  .legal-intro-inner { padding-block: 40px 24px; }
  .legal-intro h1 { font-size: clamp(30px, 8vw, 38px); }
  .legal-lead { margin-top: 10px; font-size: 14px; }
  .legal-layout { padding-bottom: 52px; }
  .legal-sidebar nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .legal-sidebar nav::-webkit-scrollbar { display: none; }
  .legal-sidebar nav a { flex: none; padding: 7px 10px; }
  .legal-article { padding: 25px 20px 30px; border-radius: 18px; }
  .legal-section { padding-top: 24px; margin-top: 24px; }
  .legal-section p, .legal-prohibited li { font-size: 14px; line-height: 1.7; }
  .legal-contact { display: block; }
  .legal-contact > a { display: inline-block; margin-top: 16px; }
}

@media (max-width: 370px) {
  .legal-header-inner { gap: 4px; }
  .legal-header-actions { gap: 4px; }
  .legal-brand { font-size: 19px; }
  .legal-brand img { width: 35px; height: 35px; }
  .legal-chat-button { padding-inline: 6px; }
  .legal-theme-control button { padding-inline: 5px; }
}

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

/* Shared, quiet interactions for the document pages. */
html[data-landing-theme="day"] .legal-brand img { filter: drop-shadow(0 1px 1px #48388a7a); }
.legal-header-nav a, .legal-theme-control button, .legal-chat-button,
.legal-sidebar nav a, .legal-contact > a {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
}
.legal-chat-button:hover, .legal-contact > a:hover { transform: translateY(-2px); }
.legal-chat-button:active, .legal-contact > a:active { transform: none; }
.legal-intro-inner { animation: legal-enter .48s cubic-bezier(.22, 1, .36, 1) both; }
.legal-sidebar { animation: legal-enter .48s .06s cubic-bezier(.22, 1, .36, 1) both; }
.legal-article { animation: legal-enter .5s .1s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes legal-enter { from { opacity: 0; transform: translateY(9px); } }
@media (hover: none) {
  .legal-chat-button:hover, .legal-contact > a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-intro-inner, .legal-sidebar, .legal-article { animation: none; }
  .legal-chat-button:hover, .legal-contact > a:hover { transform: none; }
}

.theme-toggle { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s; }
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-bg); }
.theme-toggle img { width: 20px; height: 20px; }
html[data-landing-theme="night"] .theme-toggle img { filter: brightness(0) invert(.88); }
html[data-landing-theme="night"] .theme-moon,
html[data-landing-theme="day"] .theme-sun { display: none; }

/* Language control follows the compact site header without crowding documents. */
.legal-language { position: relative; z-index: 12; }
.legal-language summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 650; cursor: pointer; list-style: none; white-space: nowrap; }
.legal-language summary::-webkit-details-marker { display: none; }
.legal-language summary img, .legal-language-options img { flex: none; width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.legal-language summary b { color: var(--muted); font-size: 15px; font-weight: 400; }
.legal-language-options { position: absolute; top: calc(100% + 7px); right: 0; min-width: 164px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 14px 30px #0005; }
.legal-language-options a { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 9px; border-radius: 7px; color: var(--copy); font-size: 13px; white-space: nowrap; }
.legal-language-options a:hover, .legal-language-options a[aria-current] { background: var(--accent-bg); color: var(--text); }
@media (max-width: 640px) {
  .legal-language summary { justify-content: center; width: 42px; padding: 0; }
  .legal-language summary span, .legal-language summary b { display: none; }
}
