/* NexFit by Seyon NexGen — landing page design system (complements Tailwind CDN)
   Type scale: 12 / 14 / 16 / 20 / 24 / 32 / 48 / 60 px · 8px spacing grid · Inter only */
:root {
  --canvas: #F8FAFC;
  --surface: #FFFFFF;
  --night: #0B0F17;
  --brand: #111111;
  --heading: #0F172A;
  --text: #0F172A;
  --sub: #475569;      /* slate-600 */
  --muted: #64748B;    /* slate-500 */
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --border: rgba(0, 0, 0, .08);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, .04), 0 8px 10px -6px rgba(0, 0, 0, .02);
  --success: #16A34A;
  --warning: #D97706;
  --r-card: 12px;
  --r-panel: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
::selection { background: var(--slate-200); color: var(--heading); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
img { max-width: 100%; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1248px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 639px) { .wrap { padding-left: 16px; padding-right: 16px; } }
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.pt-0 { padding-top: 0; }
@media (max-width: 767px) { .section { padding: 64px 0; } }

/* ---------- Type ---------- */
.t-display, .t-h2, .t-h3, .t-h4 { color: var(--heading); font-weight: 600; font-style: normal; }
.t-display { font-size: 60px; line-height: 1.1; letter-spacing: -.02em; }
.t-h2 { font-size: 48px; line-height: 1.1; letter-spacing: -.02em; }
.t-h3 { font-size: 24px; line-height: 1.3; letter-spacing: -.01em; }
.t-h4 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
@media (max-width: 767px) {
  .t-display { font-size: 40px; }
  .t-h2 { font-size: 32px; }
}
.t-lead { font-size: 20px; line-height: 1.6; color: var(--sub); }
@media (max-width: 639px) { .t-lead { font-size: 16px; } }
.t-body { font-size: 16px; line-height: 1.6; }
.t-small { font-size: 14px; line-height: 1.6; }
.t-xs { font-size: 12px; line-height: 1.5; }
.t-label { font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--heading); }
.t-sub { color: var(--sub); }
.t-muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--slate-300); }
.link:hover { text-decoration-color: currentColor; }
code.ic { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; background: var(--slate-100); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--heading); }

/* ---------- Surfaces ---------- */
.surface { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card { border-radius: var(--r-card); }
.panel { border-radius: var(--r-panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--border); }
@media (max-width: 639px) { .panel-head { padding: 0 16px; } }
.tile { border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; background: var(--slate-50); }
.icon-box { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--slate-100); border: 1px solid var(--border); color: var(--heading); font-size: 16px; }
.chip-icon { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--slate-100); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); font-size: 12px; font-weight: 600; color: var(--sub); }

/* ---------- Badges (one neutral style everywhere) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; color: var(--sub); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.badge-md { padding: 7px 12px; color: var(--heading); }
.badge-btn { padding: 7px 12px; color: var(--heading); cursor: pointer; transition: background-color .15s; }
.badge-btn:hover { background: var(--slate-100); }
.badge-dark { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; line-height: 1; font-weight: 500; white-space: nowrap; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease; cursor: pointer; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #2B2B2B; }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: rgba(0, 0, 0, .14); }
.btn-secondary:hover { background: var(--slate-50); border-color: rgba(0, 0, 0, .24); }
.btn-invert { background: #fff; color: var(--brand); }
.btn-invert:hover { background: var(--slate-200); }
.btn-ghost-dark { color: #fff; border-color: rgba(255, 255, 255, .24); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .08); }
.btn:disabled { opacity: .7; cursor: progress; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--heading); transition: background-color .15s; }
@media (min-width: 1024px) { #menuBtn { display: none; } }
.icon-btn:hover { background: var(--slate-100); }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--slate-100); border: 1px solid var(--border); }
.seg button { height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--sub); white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 8px; transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--heading); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--border); }
.seg-note { font-size: 12px; font-weight: 500; color: var(--muted); }
.seg-xs { padding: 2px; gap: 2px; background: rgba(255, 255, 255, .92); }
.seg-xs button { height: 28px; padding: 0 12px; font-size: 12px; }
.seg-xs button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: none; }
.hscroll { scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
@media (max-width: 400px) { .seg button { padding: 0 12px; font-size: 13px; } }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(248, 250, 252, .86); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.nav.scrolled { border-bottom-color: var(--border); background: rgba(255, 255, 255, .9); }
.nav-link { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--sub); transition: color .15s, background-color .15s; }
.nav-link:hover { color: var(--heading); background: var(--slate-100); }
.menu-link { display: block; padding: 12px 16px; border-radius: 8px; font-size: 16px; font-weight: 500; color: var(--heading); }
.menu-link:hover { background: var(--slate-100); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--heading); }
.brand-mark { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark-sm { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.brand-by { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; padding-left: 8px; border-left: 1px solid var(--slate-200); }

/* ---------- Hero ---------- */
.hero { padding: 144px 0 96px; }
@media (max-width: 767px) { .hero { padding: 104px 0 64px; } }

.frame { position: relative; overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--slate-100); box-shadow: var(--shadow); aspect-ratio: 3 / 4; }
.frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.frame-lg { aspect-ratio: auto; border-radius: var(--r-panel); }
.frame-lg > img { position: static; }
.frame-cap { position: absolute; left: 8px; bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--heading); background: rgba(255, 255, 255, .92); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.frame-lg .frame-cap { left: 16px; bottom: 16px; padding: 7px 12px; }

.tryon-grid { display: grid; grid-template-columns: minmax(0, 1fr) 208px minmax(0, 1fr); grid-template-areas: "photo garment result"; gap: 16px; padding: 24px; align-items: start; }
.tryon-photo { grid-area: photo; }
.tryon-garment { grid-area: garment; min-width: 0; }
.tryon-result { grid-area: result; }
.step-cap { display: flex; align-items: center; gap: 8px; height: 24px; margin-bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--sub); }
.step-num { width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: var(--slate-100); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }

.garment-card { border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px; background: var(--surface); }
.garment-head { display: flex; gap: 12px; align-items: flex-start; }
.swatch-img { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); transition: opacity .2s ease; }
.garment-name { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--heading); }
.meta { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 12px; line-height: 1.5; }
.meta div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; color: var(--heading); }
.swatch-btn { width: 40px; height: 40px; border-radius: 8px; padding: 2px; border: 1px solid var(--border); background: #fff; transition: border-color .15s, box-shadow .15s; }
.swatch-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.swatch-btn:hover { border-color: var(--slate-400); }
.swatch-btn[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

.status-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--sub); background: var(--slate-50); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; }
.status-pill .dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 999px; background: var(--success); }
.status-pill .dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--success); animation: ping 1.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(2.4); opacity: 0; } }

.xf { opacity: 0; transition: opacity .2s ease; }
.xf.on { opacity: 1; }
.ba { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2; box-shadow: var(--shadow); }

@media (max-width: 639px) {
  .tryon-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "photo result" "garment garment"; padding: 16px; gap: 16px 12px; }
  .ba button { padding: 0 10px; }
}

/* metrics bar */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: var(--r-panel); }
.metric { padding: 24px; border-left: 1px solid var(--border); }
.metric:first-child { border-left: 0; }
.metric-val { margin-top: 8px; font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--heading); letter-spacing: -.01em; }
@media (max-width: 1023px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 639px) { .metric { padding: 16px; } .metric-val { font-size: 16px; } }

/* ---------- Stats ---------- */
.stat { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; color: var(--heading); }
@media (max-width: 767px) { .stat { font-size: 32px; } }
.kpi { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--slate-50); padding: 16px; min-width: 0; }
.kpi-val { margin-top: 8px; font-size: 24px; line-height: 1.3; font-weight: 600; color: var(--heading); letter-spacing: -.01em; }
.bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--slate-200); }
.bar-on { background: var(--brand); }
@media (max-width: 639px) { .kpi { padding: 12px; } .kpi-val { font-size: 20px; } }

.route-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--slate-50); font-size: 14px; font-weight: 500; color: var(--heading); }
.route-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--slate-400); }
.route-arrow { padding-left: 24px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-top: 1px solid var(--border); }
.step:first-child { padding-top: 0; border-top: 0; }
.step-index { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }

.screen-body { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 24px; padding: 24px; }
.screen-list { display: flex; flex-direction: column; gap: 8px; }
.screen-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.screen-item img { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.screen-item.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.screen-steps { display: flex; gap: 4px; margin-top: auto; padding-top: 16px; }
.screen-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--slate-200); }
.screen-steps span.on { background: var(--brand); }
.screen-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 639px) {
  .screen-body { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .screen-list { order: 2; }
  .screen-steps { margin-top: 8px; padding-top: 0; }
}

/* ---------- Wardrobe ---------- */
.gcard { margin: 0; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.gcard .frame { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--border); }
.gcard figcaption { padding: 12px 16px 16px; }
.gname { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmeta { margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.gmeta span:first-child { text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.types-card { border-radius: var(--r-card); background: var(--surface); border: 1px dashed var(--slate-300); padding: 24px; display: flex; flex-direction: column; }
.types-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--heading); }
.types-list li { display: flex; align-items: center; gap: 8px; }
.types-list i { font-size: 12px; color: var(--muted); }
.types-card.wide .types-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ---------- Code panel ---------- */
.code { background: var(--night); color: #E2E8F0; border-radius: var(--r-card); border: 1px solid rgba(255, 255, 255, .06); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; color: #94A3B8; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; white-space: pre; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 500; color: #E2E8F0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 0 12px; transition: background-color .15s; }
.copy-btn:hover { background: rgba(255, 255, 255, .08); }
.hw { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--slate-50); padding: 12px; font-size: 12px; line-height: 1.4; color: var(--heading); }
.hw i { color: var(--sub); }

/* ---------- Pricing ---------- */
.plan { border-radius: var(--r-card); }
.plan.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.plan-price { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; color: var(--heading); font-variant-numeric: tabular-nums; }
.plan-feats { list-style: none; margin: 24px 0 0; padding: 24px 0 0; border-top: 1px solid var(--border); display: grid; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--sub); }
.plan-feats li { display: flex; gap: 12px; align-items: flex-start; }
.plan-feats i { font-size: 12px; margin-top: 5px; color: var(--heading); width: 12px; flex: none; text-align: center; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 32px; height: 32px; flex: none; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border); font-size: 12px; color: var(--sub); transition: transform .2s ease; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .ans { padding: 0 48px 24px 0; font-size: 16px; color: var(--sub); line-height: 1.6; }
@media (max-width: 639px) { .faq .ans { padding-right: 0; } }

/* ---------- Dark section ---------- */
.dark { background: var(--night); color: #fff; }
.dark .t-h2 { color: #fff; }
.dark .t-sub { color: #94A3B8; }
.dark .eyebrow { color: #94A3B8; }

/* ---------- Footer ---------- */
.footer { padding: 64px 0 96px; background: var(--canvas); }
@media (min-width: 640px) { .footer { padding-bottom: 48px; } }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--sub); }
.footer-list a:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .4); }
.modal .sheet { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; animation: rise .2s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.field { display: block; width: 100%; height: 44px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .14); background: #fff; padding: 0 12px; font-size: 16px; color: var(--heading); transition: border-color .15s, box-shadow .15s; }
.field::placeholder { color: var(--slate-400); }
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.label { display: block; font-size: 14px; line-height: 1.5; color: var(--heading); margin-bottom: 4px; font-weight: 500; }
.form-error { font-size: 14px; line-height: 1.5; color: #B91C1C; background: #FEF2F2; border: 1px solid #FECACA; border-radius: 8px; padding: 8px 12px; }

/* ---------- Chat ---------- */
.chat-launch { position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 56px; height: 56px; border-radius: 999px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .2), 0 8px 10px -6px rgba(0, 0, 0, .1); transition: background-color .15s; }
.chat-launch:hover { background: #2B2B2B; }
.chat-panel { position: fixed; right: 24px; bottom: 96px; z-index: 75; width: 384px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 128px); display: none; flex-direction: column; overflow: hidden; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .18), 0 8px 10px -6px rgba(0, 0, 0, .04); }
.chat-panel.open { display: flex; animation: rise .2s var(--ease); }
@media (max-width: 480px) {
  .chat-panel { right: 16px; left: 16px; width: auto; max-width: none; bottom: 88px; height: calc(100svh - 112px); max-height: none; }
  .chat-launch { right: 16px; bottom: 16px; }
}
.chat-input { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(0, 0, 0, .14); border-radius: 999px; padding: 4px 4px 4px 16px; background: #fff; }
.chat-input:focus-within { border-color: var(--brand); }
.send-btn { width: 36px; height: 36px; flex: none; border-radius: 999px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.msg.user { margin-left: auto; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--slate-100); color: var(--heading); border-bottom-left-radius: 4px; }
.msg pre { background: var(--night); color: #E2E8F0; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 12px; overflow-x: auto; white-space: pre; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s } .typing span:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Reveal (only when JS + motion allowed; content visible otherwise) ---------- */
.motion .reveal { opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); transition-delay: var(--d, 0s); }
.motion .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .status-pill .dot::after { display: none; }
}
