/* ============================================================
   Prism — design system
   Vibe: techy & sharp. Dark canvas, hard edges, mono labels,
   a prism-spectrum gradient as the brand signature.
   ============================================================ */

:root {
  /* canvas */
  --bg: #08090d;
  --bg-raise: #0e1017;
  --panel: #12141d;
  --panel-2: #171a25;
  --line: #232634;
  --line-bright: #303546;

  /* ink */
  --ink: #f4f6fb;
  --body: #b7bECD;
  --muted: #7b8296;
  --faint: #565d70;

  /* spectrum — the prism */
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --lime: #a3e635;
  --amber: #fbbf24;

  --accent: var(--cyan);
  --accent-2: var(--violet);

  /* themeable surfaces */
  --nav-bg: rgba(8, 9, 13, 0.72);
  --primary-ink: #ffffff;
  --hero-scrim: rgba(8, 9, 13, 0.58);
  --hero-top: rgba(8, 9, 13, 0.17);
  --grad-ink: var(--spectrum);

  --spectrum: linear-gradient(
    90deg,
    var(--violet),
    var(--indigo),
    var(--blue),
    var(--cyan),
    var(--teal)
  );

  --glow: 0 0 0 1px var(--line-bright), 0 20px 60px -20px rgba(34, 211, 238, 0.25);

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-label: "Space Grotesk", system-ui, sans-serif;

  --max: 1160px;
  --radius: 4px;
}

/* light theme — same sharp system, inverted canvas */
html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-raise: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef1f7;
  --line: #e2e6ef;
  --line-bright: #cfd5e2;

  --ink: #0d1220;
  --body: #3a4255;
  --muted: #6b7385;
  --faint: #99a1b3;

  --nav-bg: rgba(246, 247, 251, 0.78);
  --primary-ink: #ffffff;
  --hero-scrim: rgba(246, 247, 251, 0.68);
  --hero-top: rgba(255, 255, 255, 0.17);
  /* deeper, saturated spectrum so the headline holds contrast on light */
  --grad-ink: linear-gradient(
    90deg,
    #6d28d9,
    #4338ca,
    #1d4ed8,
    #0e7490,
    #0f766e
  );
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* faint technical grid */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}

body::before {
  /* fade the grid out toward the bottom so it reads as texture, not noise */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    120% 80% at 50% -10%,
    transparent 0%,
    var(--bg) 70%
  );
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

/* ---------- layout ---------- */

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

section {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

/* ---------- eyebrow / mono label ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--spectrum);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
  border: none;
  color: var(--primary-ink);
  background: var(--spectrum);
  background-size: 180% 100%;
  font-weight: 600;
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: 18px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--spectrum);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--body);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  /* top ~half is clear space for the video; copy sits in the lower half */
  padding: 46vh 0 96px;
  border-top: none;
  text-align: center;
}

.hero-video {
  /* Pinned to the viewport so the page scrolls up over a static clip. */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.hero-video.is-active {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* a constant veil up top, strengthening through the lower half into the page */
  background: linear-gradient(
    to bottom,
    var(--hero-top) 0%,
    var(--hero-scrim) 58%,
    var(--bg) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  max-width: 16ch;
  margin: 22px auto 0;
}

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

.hero-sub {
  max-width: 56ch;
  margin: 22px auto 0;
  font-size: 19px;
  color: var(--body);
}

html[data-theme="light"] .hero-sub {
  color: #0b0f19;
}

html[data-theme="dark"] .hero-sub {
  color: #eef2f9;
}

.hero-sub strong {
  font-weight: 600;
  color: inherit;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- cards / grid ---------- */

.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--panel);
  padding: 28px;
  transition: background 0.18s ease;
}

.card:hover {
  background: var(--panel-2);
}

/* light mode: soften the cards to a slight gray with a barely-there hover
   so they don't read as stark white on the near-white canvas */
html[data-theme="light"] .card {
  background: #edf0f6;
}

html[data-theme="light"] .card:hover {
  background: #e7ebf3;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card-index {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 16px;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
}

/* ---------- data control tiers ---------- */

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

.tier {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

/* a spectrum hairline across the top that brightens on hover */
.tier::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--spectrum);
  opacity: 0.45;
  transition: opacity 0.18s ease;
}

.tier:hover {
  border-color: var(--line-bright);
  transform: translateY(-3px);
}

.tier:hover::before {
  opacity: 1;
}

.tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.tier-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  color: var(--accent);
}

html[data-theme="light"] .tier-icon {
  color: var(--indigo);
}

.tier-icon svg {
  width: 22px;
  height: 22px;
}

/* strictness meter: filled bars grow as the level escalates */
.tier-meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tier-meter i {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-bright);
}

.tier-meter i.on {
  background: var(--spectrum);
}

.tier-index {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

html[data-theme="light"] .tier-index {
  color: var(--indigo);
}

.tier h3 {
  font-size: 18px;
  margin: 8px 0 10px;
}

.tier p {
  color: var(--muted);
}

/* ---------- token costs ---------- */

.cost-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.cost-chart {
  display: grid;
  gap: 20px;
}

.cost-unit {
  order: 1;
  text-align: center;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.cost-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: end;
}

.cost-bars.three {
  grid-template-columns: repeat(3, 1fr);
}

.cost-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cost-val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--body);
}

.cost-bar {
  width: 100%;
  max-width: 76px;
  border-radius: 4px 4px 0 0;
  background: var(--line-bright);
}

.cost-name {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cost-col.is-us .cost-bar {
  background: linear-gradient(180deg, var(--violet), var(--blue));
}

.cost-col.is-us .cost-val,
.cost-col.is-us .cost-name {
  color: var(--ink);
  font-weight: 600;
}

.cost-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.cost-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cost-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line-bright);
  color: var(--accent);
}

html[data-theme="light"] .cost-ico {
  color: var(--indigo);
}

.cost-ico svg {
  width: 20px;
  height: 20px;
}

.cost-points h3 {
  font-size: 16px;
  margin: 2px 0 4px;
}

.cost-points p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
}

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

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--faint);
}

/* ---------- theme toggle ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--panel);
}

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.theme-toggle button:hover {
  color: var(--ink);
}

.theme-toggle button[aria-pressed="true"] {
  color: var(--primary-ink);
  background: var(--spectrum);
  font-weight: 600;
}

.theme-toggle svg {
  width: 13px;
  height: 13px;
}

/* ---------- sub-pages (legal / contact / auth) ---------- */

.page {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 80px 0 104px;
  min-height: calc(100vh - 64px);
}

/* Every block on a sub-page shares one narrow, centered reading column. */
.page .wrap {
  max-width: 720px;
}

.page-head {
  margin: 0 0 44px;
}

.page-head h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin-top: 16px;
}

.page-meta {
  margin-top: 14px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* readable legal column */
.prose {
  color: var(--body);
}

.prose h2 {
  font-size: 22px;
  margin: 40px 0 12px;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose li {
  margin: 6px 0;
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

html[data-theme="light"] .prose a {
  color: var(--indigo);
}

.prose a:hover {
  border-bottom-color: currentColor;
}

/* ---------- contact layout ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.contact-aside h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin: 16px 0 14px;
}

.contact-aside p {
  color: var(--muted);
  margin-bottom: 24px;
}

.contact-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.contact-methods li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-methods .cost-ico {
  margin-top: 2px;
}

.contact-methods h3 {
  font-size: 15px;
  margin: 2px 0 2px;
}

.contact-methods a,
.contact-methods span {
  color: var(--muted);
  font-size: 15px;
}

.contact-methods a:hover {
  color: var(--ink);
}

/* ---------- forms / auth card ---------- */

.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.auth-wrap .page-head {
  text-align: center;
  margin-bottom: 28px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.field label {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--bg-raise);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 128px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.btn.btn-primary.btn-block {
  width: 100%;
  padding: 12px 20px;
}

.form-forgot {
  margin: -6px 0 18px;
  text-align: right;
  font-size: 13px;
}

.form-forgot a {
  color: var(--accent);
}

html[data-theme="light"] .form-forgot a {
  color: var(--indigo);
}

.form-lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.form-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.form-note a {
  color: var(--accent);
}

html[data-theme="light"] .form-note a {
  color: var(--indigo);
}

/* form status message */
.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--line-bright);
  background: var(--panel-2);
  color: var(--body);
}

.form-status[hidden] {
  display: none;
}

.form-status.is-ok {
  border-color: var(--teal);
  color: var(--ink);
}

.form-status.is-error {
  border-color: var(--amber);
  color: var(--ink);
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--faint);
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- about ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  background: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- careers roles ---------- */

.roles {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.role:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.role h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

.role-meta {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.role-apply {
  flex: none;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

html[data-theme="light"] .role-apply {
  color: var(--indigo);
}

.role:hover .role-apply {
  color: var(--ink);
}

/* ---------- assistants marquee ---------- */

.marquee {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  cursor: grab;
  overscroll-behavior-x: contain;
  scrollbar-width: none; /* Firefox */
  /* fade the cards into the page at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.marquee.is-dragging {
  cursor: grabbing;
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 8px;
}

.marquee-status {
  padding: 40px 24px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.assistant-card {
  flex: none;
  width: 280px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--body);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.assistant-card:hover,
.assistant-card:focus-visible {
  border-color: var(--accent);
  background: var(--panel-2);
  transform: translateY(-3px);
  outline: none;
}

.assistant-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--spectrum);
  color: var(--primary-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.assistant-card h3 {
  font-size: 17px;
}

.assistant-role {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

html[data-theme="light"] .assistant-role {
  color: var(--indigo);
}

.assistant-desc {
  font-size: 14px;
  color: var(--muted);
  /* keep cards uniform: clamp long blurbs to three lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.assistant-cue {
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  transition: color 0.18s ease;
}

.assistant-card:hover .assistant-cue,
.assistant-card:focus-visible .assistant-cue {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- assistant chat modal ---------- */

body.chat-locked {
  overflow: hidden;
}

.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chat-modal[hidden] {
  display: none;
}

.chat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 13, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: chat-fade 0.2s ease;
}

.chat-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  height: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  overflow: hidden;
  animation: chat-rise 0.22s ease;
}

.chat-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
}

.chat-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-config {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  margin-right: 4px;
  font-family: var(--font-label);
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: right;
  color: var(--faint);
  opacity: 0.75;
}

.chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--spectrum);
  color: var(--primary-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.chat-head h3 {
  font-size: 16px;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.chat-icon-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.chat-icon-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.chat-icon-btn svg {
  width: 16px;
  height: 16px;
}

.chat-settings-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 220px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: var(--glow);
}

.chat-settings-panel[hidden] {
  display: none;
}

.chat-settings-note {
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.chat-settings-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--muted);
}

.chat-settings-panel label[hidden] {
  display: none;
}

.chat-settings-link {
  align-self: flex-start;
  padding: 2px 0;
  background: none;
  border: none;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}

.chat-settings-link:hover {
  text-decoration: underline;
}

.chat-settings-link[hidden] {
  display: none;
}

html[data-theme="light"] .chat-settings-link {
  color: var(--indigo);
}

.chat-settings-panel select {
  flex: 1;
  max-width: 130px;
  padding: 5px 8px;
  background: var(--bg-raise);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 12px;
  cursor: pointer;
}

.chat-body {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
}

.chat-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg);
}

.chat-status {
  margin: auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.chat-status-detail {
  margin-top: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--faint);
}

@keyframes chat-fade {
  from {
    opacity: 0;
  }
}

@keyframes chat-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-backdrop,
  .chat-dialog {
    animation: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
  .role {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav-links {
    display: none;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .tiers {
    grid-template-columns: 1fr;
  }
  .cost-layout {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  section {
    padding: 72px 0;
  }
}
