:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef2f3;
  --surface-3: #e5ebec;
  --ink: #122025;
  --muted: #5f6e74;
  --line: #d7e0e2;
  --brand: #087883;
  --brand-dark: #055b64;
  --brand-soft: #e4f4f2;
  --accent: #e99122;
  --danger: #b83b43;
  --success: #14775b;
  --shadow: 0 16px 38px rgba(16, 35, 41, .08);
  --radius: 8px;
  --max: 1180px;
}

[data-theme="dark"] {
  --bg: #0d1518;
  --surface: #131f23;
  --surface-2: #19282d;
  --surface-3: #22343a;
  --ink: #eff6f6;
  --muted: #adbec3;
  --line: #2b4148;
  --brand: #62d5ce;
  --brand-dark: #8ce4df;
  --brand-soft: #173b3c;
  --accent: #f2a53d;
  --danger: #ff8b91;
  --success: #70d3ae;
  --shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.product-site, body.product-app, body.auth-page {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }

.site-header {
  position: sticky; top: 0; z-index: 40; min-height: 68px; padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-logo { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.theme-toggle { flex: 0 0 38px; }
.theme-toggle [data-theme-icon]::before { content: "\263E"; font-size: 20px; line-height: 1; }
[data-theme="dark"] .theme-toggle [data-theme-icon]::before { content: "\2600"; }
.theme-toggle:hover { border-color: var(--brand); background: var(--surface-2); }

.button {
  min-height: 42px; padding: 9px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 750; cursor: pointer;
}
.button:hover { border-color: var(--brand); }
.button.primary { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
[data-theme="dark"] .button.primary { color: #071315; }
.button.secondary { background: var(--surface); }
.button.quiet { background: transparent; }
.button.large { min-height: 48px; padding-inline: 20px; }
.button.full { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }

.eyebrow {
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand); font-size: 14px; font-weight: 850; line-height: 1.25;
  text-transform: uppercase; letter-spacing: 0;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; flex: 0 0 auto; background: currentColor; border-radius: 2px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(45px, 5vw, 66px); margin-bottom: 16px; }
h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 14px; }
h3 { font-size: 18px; }

.product-hero { max-width: var(--max); margin: 0 auto; min-height: 650px; padding: 78px 24px 64px; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 48px; }
.hero-statement { max-width: 620px; margin: 0 0 12px; font-size: 24px; font-weight: 650; line-height: 1.35; }
.hero-support { max-width: 600px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.hero-facts span { display: grid; }
.hero-facts b { color: var(--ink); }
.workspace-preview { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.preview-topbar { min-height: 50px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.preview-topbar div { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.status-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; }
.preview-layout { min-height: 425px; display: grid; grid-template-columns: 124px 1fr; }
.preview-sidebar { padding: 18px 10px; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 6px; background: var(--surface-2); }
.preview-sidebar span { padding: 8px 10px; color: var(--muted); font-size: 12px; font-weight: 700; border-radius: 5px; }
.preview-sidebar .is-active { color: var(--brand); background: var(--brand-soft); }
.preview-main { padding: 18px; }
.preview-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.preview-summary div { padding: 12px; border: 1px solid var(--line); border-radius: 6px; display: grid; }
.preview-summary small, .lead-row small { color: var(--muted); }
.preview-summary strong { font-size: 25px; }
.lead-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.lead-row div { display: grid; }
.lead-row small { font-size: 12px; }
.lead-initial { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 11px; font-weight: 800; }
.lead-source { color: var(--muted); font-size: 11px; }
.lead-state { min-width: 72px; text-align: right; color: var(--brand); font-size: 11px; font-weight: 800; }
.is-priority .lead-initial { background: #fff1df; color: #8a4b00; }
[data-theme="dark"] .is-priority .lead-initial { background: #49331a; color: #ffbf69; }
.draft-box { margin-top: 16px; padding: 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); }
.draft-box small { color: var(--brand); font-weight: 800; }
.draft-box p { margin: 6px 0 0; font-size: 13px; }
.ai-note { margin-top: 16px; padding: 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); }
.ai-note > div { display: flex; align-items: center; gap: 8px; }
.ai-note span { color: var(--brand); font-size: 11px; font-weight: 800; }
.ai-note p { margin: 7px 0 12px; font-size: 13px; }
.ai-note button { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-weight: 750; }

.rocket-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(440px, 45vw, 560px);
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: crosshair;
  outline: none;
}

.rocket-hero::before,
.rocket-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.rocket-hero::before {
  inset: 15% 3% 12% 10%;
  border-top: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 50%;
  transform: rotate(-28deg);
  opacity: .58;
}

.rocket-hero::after {
  right: 8%;
  bottom: 18%;
  width: 44%;
  height: 1px;
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  transform: rotate(-42deg);
  transform-origin: right center;
}

.rocket-hero:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
}

.rocket-canvas,
.rocket-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rocket-canvas {
  display: block;
  opacity: 0;
  transition: opacity 420ms ease;
}

.rocket-hero[data-rocket-state="ready"] .rocket-canvas { opacity: 1; }
.rocket-hero[data-rocket-state="boosting"] .rocket-canvas { opacity: 1; }

.rocket-fallback {
  display: none;
  place-items: center;
}

.rocket-hero[data-rocket-state="fallback"] {
  cursor: default;
}

.rocket-hero[data-rocket-state="fallback"] .rocket-fallback { display: grid; }

.fallback-rocket {
  position: relative;
  width: 112px;
  height: 268px;
  transform: rotate(43deg);
  filter: drop-shadow(0 20px 24px rgba(4, 22, 31, .2));
}

.fallback-body,
.fallback-nose,
.fallback-engine,
.fallback-plume,
.fallback-fin {
  position: absolute;
  display: block;
}

.fallback-body {
  top: 56px;
  left: 26px;
  width: 60px;
  height: 132px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  border-radius: 30px 30px 14px 14px;
  background: var(--surface);
}

.fallback-body i {
  position: absolute;
  top: 30px;
  left: 17px;
  width: 26px;
  height: 26px;
  border: 4px solid color-mix(in srgb, var(--brand) 55%, var(--surface));
  border-radius: 50%;
  background: var(--brand-dark);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--brand) 70%, #ffffff);
}

.fallback-nose {
  top: 6px;
  left: 29px;
  width: 54px;
  height: 72px;
  border-radius: 52% 52% 20% 20%;
  background: var(--surface);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.fallback-fin {
  top: 135px;
  width: 40px;
  height: 76px;
  background: var(--brand);
}

.fallback-fin-left { left: 4px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.fallback-fin-right { right: 4px; clip-path: polygon(0 0, 100% 100%, 0 100%); }

.fallback-engine {
  top: 181px;
  left: 35px;
  width: 42px;
  height: 25px;
  background: #42545a;
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

.fallback-plume {
  top: 204px;
  left: 40px;
  width: 32px;
  height: 56px;
  background: var(--accent);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  opacity: .82;
}

@media (max-width: 900px) {
  .rocket-hero {
    width: min(720px, 100%);
    height: clamp(360px, 66vw, 510px);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .rocket-hero {
    height: clamp(330px, 94vw, 430px);
    cursor: default;
  }

  .rocket-hero::before { inset: 18% 0 15% 4%; }
}

@media (prefers-reduced-motion: reduce) {
  .rocket-canvas { transition: none; }
}

.value-strip { max-width: var(--max); margin: 0 auto; min-height: 54px; padding: 0 24px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 750; text-align: center; }

.product-section { padding: 86px max(24px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); }
.tone-section { background: color-mix(in srgb, var(--surface) 84%, transparent); }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading p:last-child { color: var(--muted); font-size: 17px; }
.workflow-shell, .workflow-tool { display: grid; grid-template-columns: 250px 1fr; align-items: start; gap: 18px; }
.source-list, .source-picker { display: grid; align-self: start; gap: 8px; align-content: start; }
.flow-source, .billing-toggle button, .demo-samples button, .auth-tabs button, .app-nav button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; cursor: pointer; font-weight: 750;
}
.flow-source { text-align: left; padding: 15px; }
.flow-source.is-selected, .billing-toggle button.is-selected, .auth-tabs button.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.workflow-preview { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lead-card > span { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.lead-card h3 { margin: 9px 0; font-size: 24px; }
.lead-card p { color: var(--muted); }
.workflow-lead > span { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.workflow-lead h3 { margin: 9px 0; font-size: 24px; }
.workflow-lead p { color: var(--muted); }
.workflow-steps { list-style: none; padding: 18px 0 0; margin: 18px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.workflow-steps li { display: grid; gap: 8px; }
.workflow-steps b, .feature-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.workflow-steps li div { display: grid; gap: 4px; }
.workflow-steps span { color: var(--muted); font-size: 13px; }

.ai-demo-shell, .ai-demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; }
.ai-demo-form, .ai-demo-output, .finder-copy, .opportunity-preview, .plan-card, .auth-card, .workspace-panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.ai-demo-form, .ai-demo-output { padding: 24px; }
.ai-demo-form, .ai-demo-output, .ai-demo > *, .workflow-tool > *, .opportunity-tool > * { min-width: 0; width: auto; max-width: 100%; }
.demo-samples, .sample-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.demo-samples button, .sample-row button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 750; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ink); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.output-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.output-heading span { color: var(--brand); font-weight: 850; }
.output-heading small { color: var(--muted); }
.ai-result-grid, .evaluation-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.ai-result-grid div, .evaluation-grid div { padding: 15px 12px; display: grid; border-right: 1px solid var(--line); }
.ai-result-grid div:last-child, .evaluation-grid div:last-child { border-right: 0; }
.ai-result-grid small, .draft-preview small { color: var(--muted); }
.draft-preview { padding: 18px; background: var(--surface-2); border-radius: 6px; }
.draft-preview p { margin-bottom: 0; }
.reasoning-note { color: var(--muted); font-size: 13px; margin-top: 18px; }

.finder-shell, .opportunity-tool { display: grid; grid-template-columns: .72fr 1.28fr; gap: 18px; }
.finder-copy, .opportunity-preview { padding: 24px; }
.finder-copy ul, .plan-card ul { padding-left: 18px; color: var(--muted); }
.finder-controls, .opportunity-controls { display: grid; gap: 8px; align-content: start; }
.market-input { display: grid; gap: 7px; margin-bottom: 2px; }
.service-combobox { position: relative; }
.service-combobox input { padding-right: 38px; }
.service-suggestions {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); box-shadow: 0 16px 36px color-mix(in srgb, var(--ink) 18%, transparent);
}
.service-suggestions[hidden] { display: none; }
.service-suggestion {
  width: 100%; min-height: 54px; padding: 9px 12px; display: grid; gap: 2px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: var(--surface); color: var(--ink); text-align: left; cursor: pointer;
}
.service-suggestion:last-child { border-bottom: 0; }
.service-suggestion:hover, .service-suggestion[aria-selected="true"] { background: var(--brand-soft); }
.service-suggestion strong { font-size: 13px; }
.service-suggestion span { color: var(--muted); font-size: 11px; font-weight: 650; }
.field-help { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.universal-market-note { margin-top: 8px; padding: 18px; display: grid; gap: 6px; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface-2); }
.universal-market-note span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.opportunity-results {
  overflow: hidden; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.opportunity-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px; border-bottom: 2px solid var(--line); background: var(--surface-2);
}
.opportunity-summary-copy { min-width: 0; display: grid; gap: 4px; }
.opportunity-summary-copy > span,
.opportunity-result-heading > span,
.opportunity-result > small {
  color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.45;
}
.opportunity-summary h3,
.opportunity-result h3 {
  margin: 0; color: var(--ink); font-size: 18px; font-weight: 750;
  line-height: 1.3; overflow-wrap: anywhere;
}
.opportunity-plan {
  flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--brand);
  border-radius: 5px; color: var(--brand); background: var(--brand-soft);
  font-size: 12px; font-weight: 750; line-height: 1.2;
}
.opportunity-result-list { display: grid; }
.opportunity-result {
  display: grid; gap: 12px; padding: 22px 24px;
  border-bottom: 2px solid var(--line);
}
.opportunity-result:last-child { border-bottom: 0; }
.opportunity-result-heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
}
.opportunity-result-heading > span { max-width: 46%; text-align: right; }
.opportunity-result > p {
  max-width: 760px; margin: 0; color: var(--muted);
  font-size: 14px; font-weight: 450; line-height: 1.6;
}
.opportunity-result > small { display: block; }
.opportunity-preview article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.opportunity-preview article:last-child { border-bottom: 0; }
.opportunity-preview article h3 { margin: 5px 0; }
.opportunity-preview article p { color: var(--muted); margin: 0 0 8px; }

.pricing-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.pricing-intro { max-width: 720px; margin: 10px 0 0; color: var(--muted); font-size: 15px !important; line-height: 1.6; }
.billing-toggle { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.billing-toggle button { border: 0; padding: 8px 12px; background: transparent; }
.billing-toggle span { font-size: 10px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.plan-card { position: relative; padding: 24px; display: flex; flex-direction: column; }
.plan-card.featured { border: 2px solid var(--brand); }
.recommended-label { position: absolute; top: 18px; right: 18px; padding: 5px 8px; border-radius: 4px; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 800; }
.plan-heading { display: grid; }
.plan-heading span { font-size: 21px; font-weight: 850; }
.plan-heading small, .plan-footnote, .plan-billing-copy, .pricing-note { color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 5px; margin: 20px 0 0; }
.plan-price strong { font-size: 36px; }
.plan-price span { color: var(--muted); }
.plan-billing-copy { min-height: 19px; margin-top: 2px; font-size: 12px; }
.plan-highlights {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.plan-highlights div { min-width: 0; padding: 14px 10px; display: grid; align-content: start; gap: 4px; border-right: 1px solid var(--line); }
.plan-highlights div:first-child { padding-left: 0; }
.plan-highlights div:last-child { padding-right: 0; border-right: 0; }
.plan-highlights strong { color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.plan-highlights span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.plan-summary { min-height: 52px; margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.plan-includes { margin: 0 0 10px; color: var(--ink); font-size: 13px; font-weight: 800; }
.plan-legend { margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 750; }
.plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
.plan-legend span::before { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 900; }
.plan-legend .is-included::before { content: "\2713"; background: var(--brand-soft); color: var(--brand); }
.plan-legend .is-unavailable::before { content: "\00D7"; background: var(--surface-2); color: var(--muted); }
.plan-legend .is-planned::before { content: "P"; border: 1px solid #b87524; color: #9a5a0b; border-radius: 4px; font-size: 9px; }
.plan-feature-list { margin: 0; padding: 0; display: grid; list-style: none; }
.plan-feature-row { position: relative; min-height: 72px; padding: 12px 0 12px 25px; display: grid; align-content: start; gap: 8px; border-top: 1px solid var(--line); color: var(--ink); }
.plan-feature-status { position: absolute; top: 15px; left: 0; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.plan-feature-status::before { content: "\2713"; font-size: 11px; font-weight: 900; line-height: 1; }
.plan-feature-copy { display: grid; gap: 2px; }
.plan-feature-copy strong { font-size: 13px; line-height: 1.35; }
.plan-feature-copy > span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.plan-feature-row.is-unavailable { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.plan-feature-row.is-unavailable .plan-feature-status { background: var(--surface-2); color: var(--muted); }
.plan-feature-row.is-unavailable .plan-feature-status::before { content: "\00D7"; font-size: 14px; }
.plan-feature-row.is-unavailable .plan-feature-copy > span { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.plan-feature-row.is-planned .plan-feature-status { border-radius: 4px; border: 1px solid #b87524; background: transparent; color: #9a5a0b; }
.plan-feature-row.is-planned .plan-feature-status::before { content: "P"; font-size: 9px; }
.planned-badge { margin-right: 5px; padding: 1px 4px; border: 1px solid #b87524; border-radius: 4px; color: #9a5a0b; font-size: 9px; text-transform: uppercase; }
[data-theme="dark"] .plan-feature-row.is-planned .plan-feature-status, [data-theme="dark"] .planned-badge, [data-theme="dark"] .plan-legend .is-planned::before { border-color: #8a5b25; color: #f1bb77; }
.plan-meter { width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.plan-meter > span { width: var(--fill); height: 100%; display: block; border-radius: inherit; background: var(--brand); }
.plan-meter-feature { min-height: 84px; }
.plan-cta { margin-top: auto; padding-top: 20px; display: grid; gap: 9px; }
.plan-footnote { text-align: center; }
.pricing-note { text-align: center; font-size: 12px; max-width: 800px; margin: 16px auto 0; }
.control-list { border-top: 1px solid var(--line); }
.control-list > div { min-height: 92px; display: grid; grid-template-columns: 50px 230px 1fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.control-list b { color: var(--brand); }
.control-list span { color: var(--muted); }

.pilot-timeline-tool { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.pilot-stage-tabs { display: grid; gap: 8px; align-content: start; }
.pilot-stage-tabs button {
  min-height: 72px; padding: 13px 15px; display: grid; align-content: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer;
}
.pilot-stage-tabs button span { color: var(--muted); font-size: 12px; font-weight: 600; }
.pilot-stage-tabs button strong { font-size: 14px; font-weight: 800; }
.pilot-stage-tabs button.is-selected { border-color: var(--brand); border-left-width: 3px; background: var(--brand-soft); }
.pilot-stage-tabs button.is-selected span { color: var(--brand); }
.pilot-stage-detail { min-height: 322px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pilot-stage-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.pilot-stage-heading > div { display: grid; gap: 5px; }
.pilot-stage-heading > div > span { color: var(--brand); font-size: 12px; font-weight: 800; }
.pilot-stage-heading h3 { margin: 0; font-size: 24px; line-height: 1.3; }
.pilot-stage-heading > strong { padding: 6px 9px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.pilot-stage-detail > p { max-width: 790px; margin: 18px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.pilot-stage-output { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--line); }
.pilot-stage-output > div { min-width: 0; padding: 18px 16px; display: grid; align-content: start; gap: 7px; border-right: 1px solid var(--line); }
.pilot-stage-output > div:first-child { padding-left: 0; }
.pilot-stage-output > div:last-child { padding-right: 0; border-right: 0; }
.pilot-stage-output span { color: var(--muted); font-size: 12px; font-weight: 650; }
.pilot-stage-output strong { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.45; }
.pilot-guardrails { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pilot-guardrails > div { min-width: 0; padding: 16px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.pilot-guardrails > div:first-child { padding-left: 0; }
.pilot-guardrails > div:last-child { padding-right: 0; border-right: 0; }
.pilot-guardrails strong { color: var(--ink); font-size: 14px; }
.pilot-guardrails span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.checkbox-row { grid-template-columns: 18px 1fr; align-items: start; margin: 15px 0; color: var(--muted); }
.checkbox-row input { margin-top: 3px; }
.honeypot { position: absolute; left: -10000px; }
.form-note { min-height: 24px; color: var(--muted); font-size: 13px; }
.form-note.error { color: var(--danger); }
.success-panel { padding: 18px; background: var(--brand-soft); border-radius: 6px; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.faq-list details { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.faq-list summary {
  min-height: 72px; padding: 18px 48px 18px 18px; position: relative; display: flex; align-items: center;
  color: var(--ink); font-size: 15px; font-weight: 800; line-height: 1.4; cursor: pointer; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; width: 26px; height: 26px; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); font-size: 18px; font-weight: 650;
}
.faq-list details[open] summary { border-bottom: 1px solid var(--line); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0; padding: 16px 18px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.faq-list p a { color: var(--brand); font-weight: 700; }

.privacy-policy-heading { padding: 58px 24px 0; }
.privacy-heading-inner { width: min(1120px, 100%); margin: 0 auto; }
.policy-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.policy-meta span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.policy-meta span:first-child { border-color: var(--brand); color: var(--brand); }
.privacy-policy-page .policy-heading h1 { max-width: 790px; margin: 0; font-size: clamp(2.45rem, 5vw, 4.3rem); line-height: 1.06; letter-spacing: 0; }
.privacy-policy-page .policy-heading > .privacy-heading-inner > p { max-width: 790px; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.privacy-principles { margin-top: 42px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.privacy-principles > div { min-width: 0; padding: 20px 22px 22px; display: grid; gap: 5px; border-right: 1px solid var(--line); }
.privacy-principles > div:first-child { padding-left: 0; }
.privacy-principles > div:last-child { padding-right: 0; border-right: 0; }
.privacy-principles strong { color: var(--ink); font-size: 14px; }
.privacy-principles span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.privacy-policy-layout { width: min(1120px, 100%); margin: 0 auto; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding: 52px 24px; }
.privacy-policy-nav { gap: 2px; }
.policy-nav-label { margin-bottom: 10px; color: var(--ink); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.privacy-policy-nav a { min-height: 38px; padding: 0 0 0 12px; border-left: 2px solid var(--line); border-radius: 0; font-size: 13px; font-weight: 650; }
.privacy-policy-nav a:hover { border-left-color: var(--brand); background: transparent; color: var(--brand); }
.privacy-policy-content { gap: 0; border-top: 1px solid var(--line); }
.privacy-policy-content section {
  padding: 30px 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
}
.policy-section-number { width: 36px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--brand); font-size: 11px; font-weight: 800; }
.privacy-policy-content h2 { margin: 0; color: var(--ink); font-size: 21px; line-height: 1.35; }
.privacy-policy-content p { max-width: 760px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.privacy-contact-panel { margin-top: 28px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface-2); }
.privacy-contact-panel > div { display: grid; gap: 4px; }
.privacy-contact-panel span { color: var(--brand); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.privacy-contact-panel strong { color: var(--ink); font-size: 18px; }
.privacy-contact-panel p { margin: 0; font-size: 13px; }
.privacy-contact-panel .button { flex: 0 0 auto; }
.product-site .closing-band { padding: 46px max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; background: rgba(18, 32, 37, .9); color: #f4f9f9; backdrop-filter: blur(10px); }
.product-site .closing-band h2 { margin-bottom: 0; color: #f4f9f9; }
.product-site .closing-band .eyebrow { color: #62d5ce; }
.product-site .closing-band .button.primary { background: #62d5ce; border-color: #62d5ce; color: #071315; }
.product-site .closing-band .button.primary:hover { background: #84e1dc; border-color: #84e1dc; }
.product-site .closing-band .button.quiet { background: transparent; border-color: #557078; color: #f4f9f9; }
.product-site .closing-band .button.quiet:hover { background: #1c3036; border-color: #8ea7ad; color: #fff; }
.closing-band > div:last-child { display: flex; gap: 8px; }
.clean-footer { padding: 34px max(24px, calc((100vw - var(--max)) / 2)); display: grid; grid-template-columns: 1fr auto; gap: 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 91%, transparent); backdrop-filter: blur(10px); }
.footer-brand { display: flex; gap: 10px; align-items: center; }
.footer-brand img { width: 38px; height: 38px; border-radius: 50%; }
.footer-brand div { display: grid; }
.footer-brand span, .clean-footer small { color: var(--muted); }
.clean-footer > div:nth-child(2) { display: flex; gap: 16px; flex-wrap: wrap; }
.clean-footer a { color: var(--muted); }
.clean-footer small { grid-column: 1 / -1; }

/* Account */
.auth-page { min-height: 100vh; }
.auth-shell { min-height: calc(100vh - 69px); max-width: 1040px; margin: 0 auto; padding: 70px 24px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; align-items: start; }
.auth-copy { padding-top: 34px; }
.auth-copy h1 { font-size: 48px; }
.auth-copy p { color: var(--muted); font-size: 17px; }
.auth-benefits { margin-top: 28px; display: grid; gap: 16px; }
.auth-benefits div { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; }
.auth-benefits b { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 5px; }
.auth-benefits span { color: var(--muted); font-size: 13px; }
.auth-card { padding: 26px; box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 24px; }
.auth-tabs button { min-height: 40px; }
.auth-security-note, .auth-terms-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-security-note { margin: -6px 0 18px; }
.auth-terms-note { margin: 18px 0 0; }
.auth-browser-help { margin-top: 16px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 65%, var(--line)); border-radius: 7px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink); }
.auth-browser-help[hidden] { display: none; }
.auth-browser-help strong { display: block; margin-bottom: 5px; }
.auth-browser-help p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
#clerkAuth { min-height: 355px; }
#clerkAuth .form-note { margin: 0; }
.auth-form { display: grid; gap: 15px; }
.auth-form[hidden] { display: none; }
.field-group { display: grid; gap: 6px; }
.password-control { position: relative; }
.password-control input { padding-right: 66px; }
.password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); border: 0; padding: 7px 8px; background: transparent; color: var(--brand); font-size: 12px; font-weight: 800; cursor: pointer; }
.password-toggle:hover { color: var(--brand-dark); }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-radius: 4px; }
.password-hint { color: var(--muted); font-size: 12px; margin: -8px 0 0; }
.other-role[hidden] { display: none; }

/* Application */
.app-frame { min-height: 100vh; display: grid; grid-template-columns: 226px 1fr; }
.app-sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.app-sidebar .brand { padding: 0 8px 20px; margin: 0; }
.app-nav { display: grid; gap: 4px; }
.app-nav button { width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; justify-content: flex-start; border-color: transparent; background: transparent; color: var(--muted); }
.app-nav button.is-active { background: var(--brand-soft); color: var(--brand); }
.app-sidebar-footer { margin-top: auto; display: grid; gap: 8px; }
.app-plan-mini { padding: 12px; border: 1px solid var(--line); border-radius: 6px; display: grid; }
.app-plan-mini span { color: var(--muted); font-size: 11px; }
.app-main { min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 20; min-height: 68px; padding: 10px 24px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
.app-top-title { display: grid; min-width: 126px; line-height: 1.15; }
.app-top-title > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.app-topbar h1 { margin: 2px 0 0; font-size: 19px; }
.app-top-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.app-top-shortcut { min-height: 38px; padding-inline: 12px; font-size: 13px; }
.app-top-shortcut:hover { background: var(--surface-2); }
.app-utility-menu { position: relative; flex: 0 0 auto; }
.app-utility-menu > summary { list-style: none; }
.app-utility-menu > summary::-webkit-details-marker { display: none; }
.app-utility-menu[open] > summary { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.app-utility-menu > summary span { font-size: 22px; line-height: 1; }
.app-utility-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: 250px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.app-menu-action { width: 100%; min-height: 48px; padding: 8px 10px; display: grid; gap: 1px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.app-menu-action:hover { background: var(--surface-2); }
.app-menu-action:focus-visible { background: var(--surface-2); outline: 2px solid var(--brand); outline-offset: -2px; }
.app-menu-action strong { font-size: 13px; }
.app-menu-action span { color: var(--muted); font-size: 11px; font-weight: 500; }
.app-menu-separator { height: 1px; margin: 5px 4px; background: var(--line); }
.app-view { padding: 28px; }
.view-section[hidden] { display: none; }
.view-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 22px; }
.view-heading h2 { font-size: 30px; margin-bottom: 5px; }
.view-heading p { color: var(--muted); margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.metric { padding: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; display: grid; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 29px; }
.workspace-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.workspace-panel { padding: 20px; min-width: 0; }
.workspace-panel h3 { margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { margin: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-pill { display: inline-flex; padding: 3px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; }
.empty-state { padding: 34px 14px; text-align: center; color: var(--muted); }
.stack-form { display: grid; gap: 14px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-workspace { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav-panel, .settings-main-panel { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.settings-nav-panel { position: sticky; top: 82px; padding: 14px; }
.settings-search-label { margin-bottom: 12px; }
.settings-category-nav { display: grid; gap: 3px; }
.settings-category-nav button { display: grid; gap: 2px; width: 100%; min-height: 58px; padding: 10px 11px; border: 0; border-left: 3px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.settings-category-nav button:hover { background: var(--surface-2); color: var(--ink); }
.settings-category-nav button.is-active { border-left-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.settings-category-nav button strong { color: inherit; font-size: 13px; }
.settings-category-nav button span { color: var(--muted); font-size: 11px; font-weight: 500; }
.settings-search-empty { margin: 12px 3px 0; color: var(--muted); font-size: 12px; }
.settings-main-panel { min-width: 0; overflow: clip; }
.settings-pane { padding: 24px; }
.settings-pane[hidden] { display: none; }
.settings-pane-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-pane-heading h3 { margin: 2px 0 5px; font-size: 22px; }
.settings-pane-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.settings-plan-summary { flex: 0 0 auto; display: grid; justify-items: end; gap: 2px; color: var(--ink); }
.settings-plan-summary span { color: var(--muted); font-size: 12px; }
.settings-pane > .settings-grid, .settings-subsection { margin-top: 20px; }
.settings-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-subsection { padding-top: 18px; border-top: 1px solid var(--line); }
.settings-subsection h4 { margin: 0 0 12px; font-size: 14px; }
.setting-list { display: grid; }
.settings-main-panel .setting-row { min-height: 78px; margin: 0; padding: 15px 0; font-weight: 500; }
.settings-main-panel .setting-row > span:first-child { display: grid; gap: 3px; color: var(--ink); }
.settings-main-panel .setting-row strong { color: var(--ink); font-size: 14px; }
.settings-main-panel .setting-row small { max-width: 590px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.settings-main-panel .setting-row > input, .settings-main-panel .setting-row > select { width: min(290px, 36vw); }
.settings-main-panel .setting-row.is-unavailable { opacity: .7; }
.setting-action { min-width: 156px; justify-content: center; }
.connection-state { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.connection-state.is-connected { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); color: var(--brand); }
.settings-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.settings-callout strong { font-size: 13px; }
.settings-callout p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.settings-inline-note { min-height: 20px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.settings-inline-note.error { color: var(--danger); }
.connection-list { display: grid; }
.connection-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 138px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.connection-row strong { font-size: 14px; }
.connection-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.connection-row .button { justify-content: center; }
.settings-save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 12px 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); }
.settings-save-bar .form-note { margin: 0; color: var(--muted); }
.settings-save-bar .button { min-width: 150px; }
.ai-workbench { display: grid; grid-template-columns: .75fr 1.25fr; gap: 14px; }
.ai-output { min-height: 360px; white-space: pre-wrap; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.workspace-ai-shell { min-height: 630px; display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 14px; }
.ai-context-panel { display: grid; align-content: start; gap: 14px; }
.ai-context-panel details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-context-panel summary { padding: 12px 0; color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.ai-context-panel .details-field { padding-bottom: 12px; }
.ai-sensitive-warning { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.workspace-ai-chat { min-height: 630px; display: grid; grid-template-rows: auto minmax(320px, 1fr) auto; }
.workspace-ai-messages { min-height: 0; max-height: 510px; padding: 8px 2px 20px; overflow-y: auto; }
.ai-empty-state { min-height: 310px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 30px; color: var(--muted); text-align: center; }
.ai-empty-state strong { color: var(--ink); }
.ai-empty-state span { max-width: 560px; }
.workspace-ai-message { padding: 16px 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; border-bottom: 1px solid var(--line); }
.workspace-ai-message:last-child { border-bottom: 0; }
.workspace-ai-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 900; }
.workspace-ai-message.assistant .workspace-ai-avatar { background: var(--brand); color: #fff; }
.workspace-ai-body { min-width: 0; }
.workspace-ai-body > strong { display: block; margin-bottom: 6px; font-size: 12px; }
.workspace-ai-copy { color: var(--ink); white-space: pre-wrap; line-height: 1.65; }
.workspace-ai-sources { margin-top: 11px; }
.workspace-ai-sources summary { color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.workspace-ai-source-links { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-ai-source-links a { max-width: 220px; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-ai-actions { margin-top: 9px; display: flex; gap: 6px; }
.workspace-ai-actions button { min-height: 27px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.workspace-ai-composer { padding-top: 14px; border-top: 1px solid var(--line); }
.workspace-ai-composer textarea { min-height: 92px; resize: vertical; }
.workspace-ai-composer > div { margin-top: 8px; display: flex; align-items: center; gap: 12px; }
.workspace-ai-composer > div > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.workspace-image-preview { padding: 8px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.workspace-image-preview[hidden] { display: none; }
.workspace-image-preview img { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; }
.workspace-image-preview > div { min-width: 0; display: grid; }
.workspace-image-preview strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-image-preview span { color: var(--muted); font-size: 9px; }
.workspace-image-preview button { border: 0; background: transparent; color: var(--brand); font-size: 10px; font-weight: 800; cursor: pointer; }
.usage-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.usage-metric-grid .metric { padding: 14px; }
.usage-metric-grid .metric strong { font-size: 24px; }
.usage-progress { height: 9px; overflow: hidden; border-radius: 5px; background: var(--surface-2); }
.usage-progress span { display: block; width: 0; height: 100%; background: var(--brand); transition: width .2s ease; }
.workspace-panel .usage-progress + p { margin: 11px 0 0; color: var(--muted); font-size: 12px; }
.usage-table-panel { margin-top: 14px; }
.credit-line { display: flex; gap: 8px; align-items: baseline; color: var(--muted); }
.credit-line strong { color: var(--ink); }
.locked-box { padding: 20px; border: 1px dashed var(--line); background: var(--surface-2); border-radius: 7px; }
.notice { padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); font-size: 13px; }
.notice.error { border-color: var(--danger); color: var(--danger); }
.plan-comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.billing-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.billing-card.current { border-color: var(--brand); }
.billing-card h3 { margin-bottom: 6px; }
.billing-card strong { font-size: 28px; }
.billing-card > small { display: block; margin: 4px 0 12px; color: var(--muted); }
.billing-card ul { padding-left: 18px; color: var(--muted); min-height: 145px; }
.credit-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4, 12, 14, .62); }
.modal[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
.mobile-menu { display: none; }

html[data-density="compact"] .app-view { padding-block: 20px; }
html[data-density="compact"] .workspace-panel, html[data-density="compact"] .settings-pane { padding: 15px; }
html[data-density="compact"] .data-table th, html[data-density="compact"] .data-table td { padding-block: 8px; }
html[data-density="compact"] .settings-main-panel .setting-row { min-height: 62px; padding-block: 10px; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }

@media (min-width: 901px) {
  html[data-sidebar="compact"] .app-frame { grid-template-columns: 76px 1fr; }
  html[data-sidebar="compact"] .app-sidebar .brand span, html[data-sidebar="compact"] .app-nav button span, html[data-sidebar="compact"] .app-plan-mini, html[data-sidebar="compact"] .app-sidebar-footer .button span { display: none; }
  html[data-sidebar="compact"] .app-sidebar .brand { justify-content: center; padding-inline: 0; }
  html[data-sidebar="compact"] .app-nav button { justify-content: center; font-size: 0; }
  html[data-sidebar="compact"] .app-nav button::before { content: attr(data-icon); font-size: 16px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-actions .quiet { display: none; }
  .product-hero, .ai-demo-shell, .ai-demo, .finder-shell, .opportunity-tool, .auth-shell { grid-template-columns: 1fr; }
  .product-hero { padding-top: 52px; gap: 34px; }
  .workflow-shell, .workflow-tool { grid-template-columns: 1fr; }
  .source-list, .source-picker { grid-template-columns: repeat(2, 1fr); }
  .plan-grid, .plan-comparison { grid-template-columns: 1fr; }
  .plan-card ul, .billing-card ul { min-height: auto; }
  .pilot-timeline-tool { grid-template-columns: 1fr; }
  .pilot-stage-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .faq-list { grid-template-columns: 1fr; }
  .privacy-policy-layout { grid-template-columns: 1fr; gap: 32px; }
  .privacy-policy-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-policy-nav .policy-nav-label { grid-column: 1 / -1; }
  .control-list > div { grid-template-columns: 44px 1fr; padding: 16px 0; }
  .control-list span { grid-column: 2; }
  .app-frame { grid-template-columns: 72px 1fr; }
  .app-sidebar .brand span, .app-nav button span, .app-plan-mini, .app-sidebar-footer .button span { display: none; }
  .app-sidebar .brand { justify-content: center; padding-inline: 0; }
  .app-nav button { justify-content: center; font-size: 0; }
  .app-nav button::before { content: attr(data-icon); font-size: 16px; }
  .workspace-grid, .ai-workbench, .workspace-ai-shell { grid-template-columns: 1fr; }
  .workspace-ai-chat { min-height: 560px; }
  .usage-metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-workspace { grid-template-columns: 1fr; }
  .settings-nav-panel { position: static; }
  .settings-category-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid-three { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-top-shortcut { display: none; }
}

@media (max-width: 620px) {
  body { overflow-x: hidden; }
  .site-header { padding-inline: 14px; gap: 10px; }
  .brand small { display: none; }
  .header-actions .install-action { display: none !important; }
  .header-actions .button { padding-inline: 11px; font-size: 13px; }
  .product-hero, .product-section { padding-left: 16px; padding-right: 16px; }
  .preview-layout { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
  .preview-summary, .workflow-steps, .ai-result-grid { grid-template-columns: 1fr; }
  .ai-result-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .source-list, .source-picker { grid-template-columns: 1fr; }
  .form-grid, .settings-grid, .credit-packs { grid-template-columns: 1fr; }
  .ai-demo-form, .ai-demo-output { width: 100%; }
  .pilot-stage-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-stage-detail { min-height: 0; padding: 18px; }
  .pilot-stage-heading { align-items: flex-start; flex-direction: column; }
  .pilot-stage-output { grid-template-columns: 1fr; }
  .pilot-stage-output > div { padding: 15px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .pilot-stage-output > div:last-child { border-bottom: 0; }
  .pilot-guardrails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-guardrails > div:nth-child(2) { border-right: 0; }
  .pilot-guardrails > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pilot-guardrails > div:nth-child(3) { padding-left: 0; }
  .privacy-policy-heading { padding: 42px 16px 0; }
  .privacy-policy-page .policy-heading h1 { font-size: 2.5rem; }
  .privacy-principles { grid-template-columns: 1fr; }
  .privacy-principles > div { padding: 15px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .privacy-principles > div:last-child { border-bottom: 0; }
  .privacy-policy-layout { padding: 36px 16px; }
  .privacy-policy-nav { grid-template-columns: 1fr; }
  .privacy-policy-content section { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .privacy-contact-panel { align-items: flex-start; flex-direction: column; }
  .opportunity-summary { align-items: flex-start; padding: 18px; }
  .opportunity-result { padding: 20px 18px; }
  .opportunity-result-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .opportunity-result-heading > span { max-width: none; text-align: left; }
  .pricing-top, .closing-band, .clean-footer, .view-heading { align-items: flex-start; flex-direction: column; display: flex; }
  .clean-footer > div:nth-child(2) { gap: 10px; }
  .app-frame { display: block; }
  .app-sidebar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; width: 100%; height: 62px; padding: 6px; border: 1px solid var(--line); }
  .app-sidebar .brand, .app-sidebar-footer { display: none; }
  .app-nav { grid-template-columns: repeat(8, 1fr); }
  .app-nav button { min-height: 48px; padding: 4px; }
  .app-view { padding: 18px 14px 82px; }
  .app-topbar { min-height: 62px; padding-inline: 14px; gap: 9px; }
  .app-top-title { min-width: 0; margin-right: auto; }
  .app-top-title > span { display: none; }
  .app-topbar h1 { margin: 0; font-size: 17px; }
  .app-top-actions { margin-left: 0; gap: 6px; }
  .app-top-actions > .button.primary { min-height: 38px; padding-inline: 11px; font-size: 13px; }
  .app-utility-popover { position: fixed; top: 68px; right: 10px; width: min(280px, calc(100vw - 20px)); }
  .metric-grid { gap: 8px; }
  .usage-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace-ai-shell { min-height: 0; }
  .workspace-ai-chat { min-height: 520px; }
  .metric { padding: 13px; }
  .metric strong { font-size: 23px; }
  .settings-category-nav { grid-template-columns: 1fr; }
  .settings-pane { padding: 18px; }
  .settings-pane-heading, .settings-callout { align-items: flex-start; flex-direction: column; }
  .settings-plan-summary { justify-items: start; }
  .settings-main-panel .setting-row, .connection-row { grid-template-columns: 1fr; gap: 10px; }
  .settings-main-panel .setting-row > input, .settings-main-panel .setting-row > select, .setting-action, .connection-row .button { width: 100%; min-width: 0; }
  .settings-main-panel .switch { width: auto; justify-self: start; }
  .connection-row { padding-block: 15px; }
  .connection-row .connection-state { justify-self: start; }
  .settings-save-bar { align-items: stretch; flex-direction: column; padding: 12px 18px; }
  .settings-save-bar .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Shared mission-control surfaces leave the animated sky visible without reducing readability. */
html.space-theme .tone-section {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(3px);
}

html.space-theme .workspace-preview,
html.space-theme .workflow-preview,
html.space-theme .ai-demo-form,
html.space-theme .ai-demo-output,
html.space-theme .opportunity-results,
html.space-theme .plan-card,
html.space-theme .auth-card,
html.space-theme .workspace-panel,
html.space-theme .metric,
html.space-theme .billing-card,
html.space-theme .settings-nav-panel,
html.space-theme .settings-main-panel {
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  backdrop-filter: blur(9px);
}

html.space-theme .workspace-preview,
html.space-theme .auth-card,
html.space-theme .plan-card.featured {
  box-shadow: 0 22px 62px rgba(4, 22, 31, 0.12);
}

html[data-theme="dark"].space-theme .workspace-preview,
html[data-theme="dark"].space-theme .auth-card,
html[data-theme="dark"].space-theme .plan-card.featured {
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.36);
}

html.space-theme .preview-topbar,
html.space-theme .preview-sidebar,
html.space-theme .opportunity-summary,
html.space-theme .draft-preview,
html.space-theme .ai-output,
html.space-theme .locked-box {
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}

html.space-theme .app-sidebar,
html.space-theme .app-topbar,
html.space-theme .clean-footer {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
}

html.space-theme .product-hero {
  position: relative;
}

html.space-theme .workspace-preview {
  position: relative;
}

html.space-theme .workspace-preview::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 14px;
  z-index: 2;
  width: 7px;
  height: 7px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  animation: workspace-telemetry 2.5s ease-in-out infinite;
  pointer-events: none;
}

html.space-theme .status-dot,
html.space-theme .ai-status-dot {
  animation: workspace-telemetry 2.5s ease-in-out infinite;
}

body.product-site {
  overflow-x: clip;
}

html.space-theme .brand-mark {
  overflow: visible;
}

html.space-theme .brand-mark img,
html.space-theme .brand-orbit-anchor .brand-logo {
  border-radius: inherit;
}

html.space-theme .brand-orbit-anchor {
  position: relative;
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
}

html.space-theme .brand-orbit-anchor .brand-logo {
  width: 100%;
  height: 100%;
}

html.space-theme .brand-mark::after,
html.space-theme .brand-orbit-anchor::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
  border-right-color: transparent;
  border-bottom-color: color-mix(in srgb, var(--accent) 52%, transparent);
  border-radius: 50%;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  animation: brand-orbit 15s linear infinite;
  pointer-events: none;
}

html.space-theme .space-launch-zone::before {
  content: "";
  position: absolute;
  top: 16%;
  right: 0;
  z-index: -1;
  width: min(710px, 60vw);
  aspect-ratio: 2.15 / 1;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-right-color: color-mix(in srgb, var(--accent) 25%, transparent);
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-11deg);
  pointer-events: none;
}

html.space-theme .space-launch-zone::after {
  content: "";
  position: absolute;
  top: 34%;
  right: 2%;
  z-index: -1;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 24%, transparent), transparent);
  transform: rotate(-11deg);
  pointer-events: none;
}

html.space-theme .workspace-preview {
  box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--brand) 8%, transparent);
}

html.space-theme .workspace-preview::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -32%;
  z-index: 5;
  width: 18%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 12%, transparent), transparent);
  transform: skewX(-13deg);
  animation: workspace-scan 9s ease-in-out infinite;
  pointer-events: none;
}

html.space-theme .value-strip {
  position: relative;
  overflow: hidden;
}

html.space-theme .value-strip::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 10%;
  left: 10%;
  border-top: 1px dashed color-mix(in srgb, var(--brand) 26%, var(--line));
  pointer-events: none;
}

html.space-theme .value-strip span {
  position: relative;
  padding-top: 12px;
}

html.space-theme .value-strip span::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 9%, transparent);
  transform: translateX(-50%);
}

html.space-theme .workflow-steps {
  position: relative;
}

html.space-theme .workflow-steps::before {
  content: "";
  position: absolute;
  top: 33px;
  right: 7%;
  left: 15px;
  border-top: 1px dashed color-mix(in srgb, var(--brand) 38%, var(--line));
  pointer-events: none;
}

html.space-theme .workflow-steps::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: workflow-flight 7s ease-in-out infinite;
  pointer-events: none;
}

html.space-theme .workflow-steps li,
html.space-theme .workflow-steps b {
  position: relative;
  z-index: 1;
}

html.space-theme .workflow-steps b {
  border: 1px solid color-mix(in srgb, var(--brand) 48%, var(--line));
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--surface) 92%, transparent);
}

html.space-theme .plan-card {
  --plan-orbit-capacity: 33%;
  overflow: hidden;
}

html.space-theme .plan-card.featured {
  --plan-orbit-capacity: 67%;
}

html.space-theme .plan-card:nth-child(3) {
  --plan-orbit-capacity: 100%;
}

html.space-theme .plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--plan-orbit-capacity);
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 13px color-mix(in srgb, var(--brand) 38%, transparent);
  pointer-events: none;
}

html.space-theme .pilot-stage-tabs {
  position: relative;
}

html.space-theme .pilot-stage-tabs::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 12px;
  z-index: 0;
  border-left: 1px dashed color-mix(in srgb, var(--brand) 32%, var(--line));
  pointer-events: none;
}

html.space-theme .pilot-stage-tabs button {
  position: relative;
  z-index: 1;
}

html.space-theme .closing-band {
  position: relative;
  overflow: hidden;
}

html.space-theme .closing-band::before {
  content: "";
  position: absolute;
  right: -7%;
  bottom: -128px;
  width: 520px;
  height: 210px;
  border: 1px solid rgba(98, 213, 206, 0.34);
  border-top-color: rgba(242, 165, 61, 0.42);
  border-radius: 50%;
  transform: rotate(-7deg);
  pointer-events: none;
}

html.space-theme .closing-band > * {
  position: relative;
  z-index: 1;
}

@keyframes brand-orbit {
  to { transform: rotate(360deg); }
}

@keyframes workspace-scan {
  0%, 18% { left: -32%; opacity: 0; }
  28% { opacity: 1; }
  56% { left: 118%; opacity: 0.7; }
  57%, 100% { left: 118%; opacity: 0; }
}

@keyframes workflow-flight {
  0%, 8% { left: 15px; opacity: 0; }
  16% { opacity: 1; }
  78% { opacity: 1; }
  90%, 100% { left: calc(93% - 7px); opacity: 0; }
}

@keyframes workspace-telemetry {
  0%, 100% { opacity: 0.42; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  html.space-theme .brand-mark::after,
  html.space-theme .brand-orbit-anchor::after,
  html.space-theme .workspace-preview::after,
  html.space-theme .workflow-steps::after {
    animation: none;
  }

  html.space-theme .workspace-preview::before,
  html.space-theme .status-dot,
  html.space-theme .ai-status-dot {
    animation: none;
  }
}

@media (max-width: 900px) {
  html.space-theme .space-launch-zone::before {
    top: 47%;
    right: 0;
    width: 92vw;
  }
}

@media (max-width: 620px) {
  html.space-theme .space-launch-zone::before,
  html.space-theme .space-launch-zone::after,
  html.space-theme .workflow-steps::before,
  html.space-theme .workflow-steps::after,
  html.space-theme .value-strip::before,
  html.space-theme .closing-band::before {
    display: none;
  }

  html.space-theme .value-strip span {
    padding-top: 0;
  }

  html.space-theme .value-strip span::before {
    display: none;
  }

  html.space-theme .pilot-stage-tabs::before {
    display: none;
  }
}

/* LiftOff AI conversation workspace */
.ai-view-section { min-width: 0; }
.ai-view-heading { margin-bottom: 14px; }
.workspace-ai-shell {
  position: relative;
  height: clamp(480px, calc(100dvh - 220px), 820px);
  min-height: 480px;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 12px;
}
.ai-conversation-sidebar {
  min-width: 0;
  height: 100%;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.ai-conversation-sidebar-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.ai-conversation-sidebar-head h3 { margin: 0; font-size: 15px; }
.ai-icon-button,
.ai-attach-button,
.ai-send-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.ai-icon-button:hover,
.ai-attach-button:hover { border-color: var(--brand); background: var(--surface-2); }
.ai-icon-button:focus-visible,
.ai-attach-button:focus-visible,
.ai-send-button:focus-visible,
.ai-control-trigger:focus-visible,
.ai-conversation-select:focus-visible,
.ai-conversation-menu summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ai-icon-button:disabled { opacity: .45; cursor: wait; }
.ai-conversation-search { position: relative; display: block; }
.ai-conversation-search > span:not(.sr-only) { position: absolute; top: 50%; left: 10px; z-index: 1; display: grid; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.ai-conversation-search input { height: 38px; padding: 8px 10px 8px 34px; font-size: 12px; }
.ai-conversation-filters { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.ai-conversation-filters button { min-height: 30px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.ai-conversation-filters button.is-active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(5, 25, 29, .08); }
.ai-conversation-status:empty { display: none; }
.ai-conversation-list { min-height: 0; display: grid; align-content: start; gap: 3px; overflow-y: auto; scrollbar-width: thin; }
.ai-conversation-group { min-width: 0; display: grid; gap: 3px; }
.ai-conversation-group + .ai-conversation-group { margin-top: 10px; }
.ai-conversation-group > h4 { margin: 0; padding: 4px 9px 2px; color: var(--muted); font-size: 9px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.ai-conversation-item { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; border-radius: 6px; }
.ai-conversation-item:hover { background: var(--surface-2); }
.ai-conversation-item.is-active { background: var(--brand-soft); }
.ai-conversation-select { min-width: 0; min-height: 48px; padding: 7px 4px 7px 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.ai-conversation-select > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.ai-conversation-select strong { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ai-conversation-select small { color: var(--muted); font-size: 9px; }
.ai-pin-mark { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ai-conversation-menu { position: relative; }
.ai-conversation-menu summary { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); font-size: 18px; line-height: 1; list-style: none; cursor: pointer; }
.ai-conversation-menu summary::-webkit-details-marker { display: none; }
.ai-conversation-menu summary:hover,
.ai-conversation-menu[open] summary { background: var(--surface); color: var(--ink); }
.ai-conversation-menu > div { position: absolute; top: 31px; right: 0; z-index: 20; width: 132px; padding: 5px; display: grid; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.ai-conversation-menu button { min-height: 32px; padding: 6px 9px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.ai-conversation-menu button:hover { background: var(--surface-2); }
.ai-conversation-menu button.is-danger { color: var(--danger); }
.ai-conversation-empty { min-height: 150px; padding: 20px 12px; display: grid; place-content: center; gap: 5px; color: var(--muted); text-align: center; }
.ai-conversation-empty strong { color: var(--ink); font-size: 12px; }
.ai-conversation-empty span { font-size: 11px; line-height: 1.45; }
.ai-conversation-empty .button { justify-self: center; margin-top: 5px; }
.ai-conversation-empty.is-error strong { color: var(--danger); }
.ai-conversation-loading { padding: 8px 4px; display: grid; gap: 7px; }
.ai-conversation-loading span { height: 40px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: ai-shimmer 1.25s linear infinite; }
.workspace-ai-chat { height: 100%; min-height: 0; padding: 0; display: grid; grid-template-rows: 62px minmax(0, 1fr) auto; overflow: visible; }
.ai-thread-header { position: relative; z-index: 10; min-width: 0; min-height: 62px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.ai-mobile-conversations { display: none; }
.ai-thread-heading { min-width: 0; margin-right: auto; display: grid; gap: 2px; }
.ai-thread-heading h3 { margin: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ai-thread-heading span { color: var(--muted); font-size: 10px; }
.ai-thread-context { min-width: 0; display: flex; align-items: center; gap: 7px; }
.ai-thread-context > span { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#workspaceAiLeadBadge { min-width: 0; max-width: 210px; padding: 3px 7px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
#workspaceAiLeadBadge:hover { border-color: var(--brand); }
#workspaceAiLeadBadge[hidden] { display: none; }
.ai-memory-button { justify-content: flex-start; gap: 8px; }
.ai-memory-button [data-ui-icon] { width: 16px; height: 16px; }
.ai-memory-modal { width: min(760px, calc(100vw - 28px)); max-height: min(840px, calc(100dvh - 28px)); overflow-y: auto; }
.ai-memory-modal .modal-head > div { display: grid; gap: 3px; }
.ai-memory-modal .modal-head h3 { margin: 0; }
.ai-memory-modal .eyebrow { margin: 0; }
.ai-memory-intro { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.ai-memory-form { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-memory-form-actions { display: flex; gap: 8px; }
.ai-memory-list { display: grid; gap: 0; }
.ai-memory-item { padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; border-bottom: 1px solid var(--line); }
.ai-memory-item:last-child { border-bottom: 0; }
.ai-memory-item > div:first-child { min-width: 0; display: grid; gap: 4px; }
.ai-memory-item span { color: var(--brand); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.ai-memory-item strong { font-size: 13px; }
.ai-memory-item p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.ai-memory-actions { display: flex; align-items: start; gap: 5px; }
.ai-memory-actions button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.ai-memory-actions button:hover { border-color: var(--brand); color: var(--ink); }
.ai-memory-actions button.is-danger:hover { border-color: var(--danger); color: var(--danger); }
.ai-memory-empty { padding: 28px 12px; display: grid; justify-items: center; gap: 5px; color: var(--muted); text-align: center; }
.ai-memory-empty strong { color: var(--ink); font-size: 13px; }
.ai-memory-empty span { max-width: 430px; font-size: 11px; line-height: 1.5; }
.ai-memory-empty.is-error strong { color: var(--danger); }
.ai-thread-tools { display: flex; align-items: center; gap: 8px; }
.ai-cost { color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.ai-controls { position: relative; }
.ai-control-trigger { min-height: 36px; padding: 7px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 11px; font-weight: 800; list-style: none; cursor: pointer; }
.ai-control-trigger::-webkit-details-marker { display: none; }
.ai-control-trigger:hover,
.ai-controls[open] .ai-control-trigger { border-color: var(--brand); background: var(--surface-2); }
.ai-controls-popover { position: absolute; top: 44px; right: 0; z-index: 30; width: min(410px, calc(100vw - 44px)); max-height: min(650px, calc(100dvh - 310px)); padding: 16px; display: grid; gap: 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.ai-controls-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-controls-heading > div { display: grid; gap: 2px; }
.ai-controls-heading strong { font-size: 13px; }
.ai-controls-heading span { color: var(--muted); font-size: 10px; }
.ai-controls-heading .ai-icon-button { width: 30px; height: 30px; }
.ai-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-controls-popover label { gap: 5px; font-size: 11px; }
.ai-controls-popover input,
.ai-controls-popover select,
.ai-controls-popover textarea { padding: 9px 10px; font-size: 11px; }
.ai-controls-divider { position: relative; height: 17px; display: grid; place-items: center; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.ai-controls-divider::before { content: ""; position: absolute; right: 0; left: 0; border-top: 1px solid var(--line); }
.ai-controls-divider span { position: relative; padding: 0 8px; background: var(--surface); }
.ai-sensitive-warning { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.workspace-ai-messages { min-height: 0; max-height: none; padding: 18px clamp(18px, 5vw, 64px) 28px; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; }
.workspace-ai-message { width: min(820px, 100%); margin: 0 auto; padding: 17px 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; border-bottom: 0; }
.workspace-ai-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 900; }
.workspace-ai-message.assistant .workspace-ai-avatar { background: var(--brand-dark); color: #fff; }
[data-theme="dark"] .workspace-ai-message.assistant .workspace-ai-avatar { color: #071315; }
.workspace-ai-body { min-width: 0; }
.workspace-ai-body > strong { display: block; margin: 1px 0 7px; font-size: 11px; }
.workspace-ai-copy { color: var(--ink); font-size: 13px; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-ai-message.user { grid-template-columns: minmax(0, 1fr); }
.workspace-ai-message.user .workspace-ai-avatar { display: none; }
.workspace-ai-message.user .workspace-ai-body { max-width: min(76%, 640px); padding: 10px 13px; justify-self: end; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.workspace-ai-message.user .workspace-ai-body > strong { display: none; }
.workspace-ai-message.is-error .workspace-ai-copy { color: var(--danger); }
.workspace-ai-message.is-loading .workspace-ai-copy { color: var(--muted); animation: ai-pulse 1.2s ease-in-out infinite; }
.workspace-ai-message-image { display: block; width: min(260px, 100%); max-height: 240px; margin: 3px 0 9px; border: 1px solid var(--line); border-radius: 6px; object-fit: cover; }
.workspace-ai-sources { margin-top: 11px; }
.workspace-ai-sources summary { color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.workspace-ai-source-links { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-ai-source-links a { max-width: 230px; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-ai-actions { min-height: 28px; margin-top: 7px; display: flex; gap: 3px; opacity: .15; transition: opacity .15s ease; }
.workspace-ai-message:hover .workspace-ai-actions,
.workspace-ai-message:focus-within .workspace-ai-actions,
.workspace-ai-message.is-error .workspace-ai-actions,
.workspace-ai-message.is-stopped .workspace-ai-actions,
.workspace-ai-message.is-loading .workspace-ai-actions { opacity: 1; }
.workspace-ai-actions button { min-height: 26px; padding: 3px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; cursor: pointer; }
.workspace-ai-actions button:hover { background: var(--surface-2); color: var(--ink); }
.workspace-ai-actions button.is-stop { color: var(--danger); }
.ai-empty-state,
.ai-thread-state { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 28px; color: var(--muted); text-align: center; }
.ai-empty-state strong,
.ai-thread-state strong { color: var(--ink); font-size: 16px; }
.ai-empty-state > span:not(.ai-empty-mark),
.ai-thread-state > span:not(.ai-thread-state-mark) { max-width: 470px; font-size: 12px; line-height: 1.5; }
.ai-empty-mark { width: 38px; height: 38px; margin-bottom: 3px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.ai-starter-grid { width: min(540px, 100%); margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ai-starter-grid button { min-height: 60px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-size: 10px; font-weight: 750; cursor: pointer; }
.ai-starter-grid button:hover { border-color: var(--brand); background: var(--surface-2); }
.ai-thread-state-mark { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: ai-spin .85s linear infinite; }
.ai-thread-state.is-error .ai-thread-state-mark { position: relative; border: 1px solid var(--danger); animation: none; }
.ai-thread-state.is-error .ai-thread-state-mark::before,
.ai-thread-state.is-error .ai-thread-state-mark::after { content: ""; position: absolute; top: 13px; left: 6px; width: 14px; border-top: 1px solid var(--danger); transform: rotate(45deg); }
.ai-thread-state.is-error .ai-thread-state-mark::after { transform: rotate(-45deg); }
.workspace-ai-composer { position: relative; padding: 10px 18px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.workspace-image-preview { width: min(820px, 100%); margin: 0 auto 8px; padding: 7px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 32px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.workspace-image-preview[hidden] { display: none; }
.workspace-image-preview img { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; }
.workspace-image-preview > div { min-width: 0; display: grid; gap: 2px; }
.workspace-image-preview strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-image-preview span { color: var(--muted); font-size: 9px; }
.workspace-image-preview .ai-icon-button { width: 30px; height: 30px; }
.ai-composer-box { width: min(820px, 100%); min-height: 52px; margin: 0 auto; padding: 6px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: end; gap: 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 8px 24px rgba(4, 20, 24, .07); }
.ai-composer-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent), 0 8px 24px rgba(4, 20, 24, .07); }
.ai-attach-button { width: 38px; height: 38px; border: 0; color: var(--muted); }
.ai-composer-box textarea { min-height: 24px; max-height: 160px; padding: 8px 4px 7px; overflow-y: auto; border: 0; border-radius: 0; background: transparent; font-size: 13px; line-height: 1.45; resize: none; box-shadow: none; }
.ai-composer-box textarea:focus { border: 0; box-shadow: none; }
.ai-send-button { width: 38px; height: 38px; border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }
[data-theme="dark"] .ai-send-button { color: #071315; }
.ai-send-button:hover { filter: brightness(.95); }
.ai-stop-mark { display: none; width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
.ai-send-button.is-stopping .ai-send-mark { display: none; }
.ai-send-button.is-stopping .ai-stop-mark { display: block; }
.ai-composer-meta { width: min(820px, 100%); min-height: 19px; margin: 5px auto 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.ai-composer-meta .form-note { margin: 0; text-align: right; }
.ai-drop-overlay { position: absolute; inset: 8px 16px; z-index: 5; display: none; place-content: center; justify-items: center; gap: 6px; border: 2px dashed var(--brand); border-radius: 7px; background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--brand); pointer-events: none; }
.workspace-ai-composer.is-dragging .ai-drop-overlay { display: grid; }
.ai-sidebar-scrim[hidden] { display: none; }

@keyframes ai-shimmer { to { background-position: -200% 0; } }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 50% { opacity: .48; } }

@media (max-width: 1100px) and (min-width: 901px) {
  .workspace-ai-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .workspace-ai-messages { padding-inline: 28px; }
}

@media (max-width: 900px) {
  .workspace-ai-shell { height: calc(100dvh - 190px); min-height: 500px; grid-template-columns: minmax(0, 1fr); }
  .workspace-ai-chat { min-height: 0; }
  .ai-mobile-conversations { display: inline-grid; }
  .ai-conversation-sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(320px, 88vw); height: 100dvh; border-radius: 0 7px 7px 0; box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s ease; }
  .ai-conversation-sidebar.is-open { transform: translateX(0); }
  .ai-sidebar-scrim { position: fixed; top: 0; right: 0; bottom: 0; left: min(320px, 88vw); z-index: 60; display: block; border: 0; background: rgba(4, 12, 14, .54); }
}

@media (max-width: 620px) {
  .ai-view-heading { min-height: 24px; margin-bottom: 8px; justify-content: flex-end; }
  .ai-view-heading > div:first-child { display: none; }
  .ai-view-heading .credit-line { font-size: 10px; }
  .workspace-ai-shell { height: calc(100dvh - 190px); min-height: 500px; }
  .workspace-ai-chat { min-height: 0; grid-template-rows: 56px minmax(0, 1fr) auto; }
  .ai-thread-header { min-height: 56px; padding: 8px 9px; }
  .ai-thread-tools { gap: 5px; }
  .ai-cost { display: none; }
  .ai-control-trigger { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
  .ai-control-trigger > span:last-child { display: none; }
  .ai-controls-popover { position: fixed; top: auto; right: 0; bottom: 62px; left: 0; width: 100%; max-height: min(76dvh, 640px); border-radius: 7px 7px 0 0; }
  .workspace-ai-messages { padding: 12px 13px 20px; }
  .workspace-ai-message { padding: 13px 0; }
  .workspace-ai-message.user .workspace-ai-body { max-width: 88%; }
  .workspace-ai-actions { opacity: 1; }
  .ai-empty-state,
  .ai-thread-state { padding: 18px 12px; }
  .ai-starter-grid { grid-template-columns: 1fr; width: min(300px, 100%); }
  .ai-starter-grid button { min-height: 40px; }
  .workspace-ai-composer { padding: 8px 9px 9px; }
  .ai-composer-meta > span { display: none; }
  .ai-composer-meta { justify-content: flex-end; }
  .ai-control-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-conversation-loading span,
  .ai-thread-state-mark,
  .workspace-ai-message.is-loading .workspace-ai-copy { animation: none; }
  .ai-conversation-sidebar { transition: none; }
  .workspace-ai-messages { scroll-behavior: auto; }
}

.workspace-ai-composer > .workspace-image-preview,
.workspace-ai-composer > .ai-composer-box { margin-top: 0; display: grid; }
.workspace-ai-composer > .ai-composer-meta { margin-top: 5px; display: flex; }
.workspace-ai-composer > .ai-drop-overlay { margin-top: 0; display: none; }
.workspace-ai-composer.is-dragging > .ai-drop-overlay { display: grid; }
.workspace-ai-composer > .workspace-image-preview[hidden] { display: none; }
