/* ---------- Unochat : dark default + optional light theme ---------- */
:root, html.theme-dark {
  --bg: #0a0a0b;
  --bg-soft: #111114;
  --bg-panel: #151519;
  --text: #f2f2f4;
  --text-strong: #ffffff;
  --text-muted: #8a8a93;
  --text-subtle: #5c5c65;
  --border: #23232a;
  --border-strong: #33333c;
  --brand: #ffffff;
  --brand-dark: #dcdce0;
  --brand-darker: #ffffff;
  --success: #22c55e;
  --accent-soft: #1a1a20;
  --bubble-user: #202026;
  --btn-bg: #ffffff;
  --btn-text: #0a0a0a;
  --btn-bg-hover: #f5f5f7;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.45);
  --font: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  color-scheme: dark;
}
html.theme-light {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-panel: #ffffff;
  --text: #1a1a1f;
  --text-strong: #0a0a0a;
  --text-muted: #6b6b72;
  --text-subtle: #a1a1a8;
  --border: #e5e5e8;
  --border-strong: #d1d1d6;
  --brand: #0a0a0a;
  --brand-dark: #1a1a1f;
  --brand-darker: #0a0a0a;
  --success: #22c55e;
  --accent-soft: #f0f0f2;
  --bubble-user: #ececee;
  --btn-bg: #0a0a0a;
  --btn-text: #ffffff;
  --btn-bg-hover: #1a1a1f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--brand-darker);
}
.brand img { width: 36px; height: 36px; }
.brand-text { line-height: 1; }
.brand-text .b1 { font-weight: 800; letter-spacing: .06em; font-size: 14px; color: var(--text-strong); }
.brand-text .b2 { font-weight: 500; color: var(--text-muted); font-size: 11px; margin-top: 3px; }
nav.primary { display: flex; align-items: center; gap: 28px; }
nav.primary a { font-weight: 500; color: var(--text); font-size: 14px; opacity: .9; }
nav.primary a:hover { color: var(--brand-darker); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.launch-link {
  color: var(--text-strong); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.launch-link:hover { background: var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, color .15s ease, border-color .15s;
  white-space: nowrap;
  position: relative;
}
.btn:active { transform: translateY(1px); }
/* Unochat primary — white glossy on dark */
.btn.primary {
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%);
  color: #0a0a0a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -1px 0 rgba(0, 0, 0, .1),
    0 6px 20px rgba(0, 0, 0, .35);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eaeaee 100%);
}
.btn.secondary {
  background: var(--bg-panel); color: var(--text-strong);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { border-color: var(--border-strong); background: var(--accent-soft); }
.btn.ghost { color: var(--text-strong); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.lg { padding: 14px 28px; font-size: 16px; }
.btn.xl { padding: 18px 34px; font-size: 17px; border-radius: 999px; }
.lang-switch { position: relative; }
.lang-switch button.trigger {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-panel);
  color: var(--text); font-size: 13px; display: inline-flex; gap: 6px; align-items: center;
}
.lang-switch button.trigger:hover { border-color: var(--brand); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px; box-shadow: var(--shadow-md); min-width: 180px; display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; color: var(--text);
}
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button.active { color: var(--brand-darker); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 40px 0 80px; text-align: center;
  min-height: calc(100vh - 66px); display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hero-logo {
  display: block; margin: 0 auto 28px; width: 140px; height: auto;
}
.hero h1 {
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.02; font-weight: 800; letter-spacing: -0.04em;
  color: var(--text-strong); margin: 0 0 30px;
}
.hero-access { max-width: 820px; margin: 0 auto 34px; }
.hero-prefix, .hero-suffix {
  font-size: clamp(18px, 1.9vw, 22px); color: var(--text);
  margin: 0 0 16px; font-weight: 500;
}
.hero-suffix { margin-top: 16px; }
.hero .chips-row {
  display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  margin-bottom: 10px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-panel); font-size: 14.5px; font-weight: 500; color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .06); }
.chip img { width: 18px; height: 18px; object-fit: contain; }
.hero .cta-row { display: inline-flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section h2 {
  font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.035em;
  margin: 0 0 14px; color: var(--text-strong); text-align: center;
}
.section .section-subtitle { color: var(--text-muted); font-size: 18px; margin-bottom: 56px; text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Models grid + funnel ---------- */
.models-funnel { position: relative; padding-bottom: 80px; }
.models-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  align-items: start;
}
.model-group.panel {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px;
  box-shadow: var(--shadow-sm);
}
.model-group h3 {
  font-size: 11px; letter-spacing: .16em; color: var(--text-muted);
  font-weight: 700; margin: 0 0 14px; text-transform: uppercase; text-align: center;
}
.model-group-stack { display: flex; flex-direction: column; gap: 18px; }
.model-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.model-card:last-child { margin-bottom: 0; }
.model-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.model-card .left { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--text-strong); }
.model-card .left img { width: 22px; height: 22px; object-fit: contain; }
.model-card .price { color: var(--text-muted); font-size: 13px; font-weight: 500; }

/* Funnel SVG between groups and Plume aggregator */
.funnel {
  width: 100%; height: 120px; color: var(--brand-darker);
  margin: 22px 0 -10px;
}
.uno-card {
  max-width: 360px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 26px; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.uno-card:hover { transform: translateY(-2px); box-shadow: 0 28px 60px rgba(0, 0, 0, .10), 0 4px 10px rgba(0, 0, 0, .06); }
.uno-card img { width: 44px; height: 44px; }
.uno-card .mm-name { font-size: 16px; font-weight: 900; letter-spacing: .08em; color: var(--brand-darker); }
.uno-card .mm-price { font-size: 14px; color: var(--success); font-weight: 600; }

@media (max-width: 980px) { .models-grid { grid-template-columns: 1fr 1fr; } .funnel { display:none; } .uno-card { margin-top: 24px; } }
@media (max-width: 620px) { .models-grid { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature h4 { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--brand-darker); font-weight: 700; }
.feature p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.feature img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; background: var(--bg-soft); }
@media (max-width: 820px) { .features-list { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.privacy-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.privacy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.privacy-card h4 { margin: 0 0 10px; color: var(--text-strong); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.privacy-card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .privacy-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.tm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tm {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tm:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tm .who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tm .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #1a1a1f, #0a0a0a);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.tm .name { font-weight: 700; font-size: 14.5px; color: var(--text-strong); letter-spacing: -0.005em; }
.tm .role { font-size: 12px; color: var(--text-muted); }
.tm .quote { font-size: 14px; line-height: 1.65; color: var(--text); }
@media (max-width: 900px) { .tm-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tm-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(180deg, #1a1a1f 0%, #0a0a0a 100%);
  color: #fff; border-radius: 28px; padding: 72px 32px; text-align: center;
  margin: 56px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 80px rgba(0,0,0,.20);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none;
}
.cta-band img { margin: 0 auto 18px; width: 64px; height: 64px; position: relative; filter: brightness(0) invert(1); }
.cta-band h3 { margin: 0 0 26px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; position: relative; }
.cta-band .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
/* In light theme, CTA white button stays white on dark band */
.cta-band .btn.primary {
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e8 100%);
  color: #0a0a0a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.25);
}
.cta-band .btn.primary:hover { background: linear-gradient(180deg, #ffffff 0%, #f1f1f5 100%); }
.cta-band .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }
.cta-band .btn.secondary:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; margin-bottom: 10px;
}
.faq details {
  border-radius: 16px;
  transition: border-color .15s;
}
.faq details:hover { border-color: var(--border-strong); }
.faq summary {
  list-style: none; padding: 20px 22px; font-weight: 600; cursor: pointer; font-size: 15.5px;
  display: flex; justify-content: space-between; gap: 10px; color: var(--text-strong);
  letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 20px; color: var(--text-muted); }
.faq details[open] summary::after { content: '−'; }
.faq p { padding: 0 20px 20px; margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 52px 0 36px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h5 { font-size: 11px; letter-spacing: .16em; color: var(--text-strong); text-transform: uppercase; font-weight: 700; margin: 0 0 16px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: var(--brand-darker); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; display: flex; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--text-strong) 55%, transparent); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-panel); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 460px; width: 100%;
  padding: 32px; position: relative;
}
.modal.wide { max-width: 1100px; }
.modal .close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-muted); background: transparent;
}
.modal .close:hover { background: var(--accent-soft); color: var(--brand-darker); }
.modal h3 { margin: 0 0 6px; font-size: 22px; color: var(--brand-darker); font-weight: 800; }
.modal .modal-sub { color: var(--text-muted); margin: 0 0 22px; font-size: 14px; }
.modal .field {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  outline: none; background: var(--bg-panel); transition: border-color .15s;
}
.modal .field:focus { border-color: var(--brand); }
.modal .btn { width: 100%; margin-top: 12px; }
.modal .divider { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.modal .divider::before, .modal .divider::after { content:''; flex:1; height:1px; background: var(--border); }
.modal .gbtn {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 11px 14px; border-radius: 999px; border: 1px solid var(--border); width: 100%; background: var(--bg-panel); font-weight: 600;
}
.modal .gbtn:hover { background: var(--accent-soft); }
.modal .gbtn svg { width: 18px; height: 18px; }
.modal .terms { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }

/* ---------- Pricing modal ---------- */
.pricing-head { text-align: center; margin-bottom: 22px; }
.pricing-head h3 { font-size: 28px; }
.billing-toggle {
  display: inline-flex; background: var(--accent-soft); border-radius: 999px;
  padding: 4px; gap: 2px; margin-top: 14px;
}
.billing-toggle button {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.billing-toggle button.active { background: var(--bg-panel); color: var(--brand-darker); box-shadow: var(--shadow-sm); }
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard {
  border: 1px solid var(--border); background: var(--bg-panel); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; position: relative;
}
.pcard.featured { border-color: var(--brand-darker); box-shadow: var(--shadow-md); }
.pcard .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-darker); color: var(--btn-text); padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
}
.pcard { background: var(--bg-panel); border-color: var(--border); }
.pcard.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-md); }
.pcard .pname { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--brand); font-weight: 700; }
.pcard .ptag { font-size: 18px; font-weight: 700; color: var(--brand-darker); }
.pcard .pprice { font-size: 32px; font-weight: 800; color: var(--brand-darker); line-height: 1; }
.pcard .pprice small { font-size: 13px; font-weight: 500; color: var(--text-muted); display: block; margin-top: 4px; }
.pcard ul { padding-left: 18px; margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.pcard ul li { margin-bottom: 6px; }
.pcard .pcta { margin-top: auto; }
@media (max-width: 900px) { .pricing-cards { grid-template-columns: 1fr; } }

/* ---------- Fullscreen modal (pricing, etc.) ---------- */
.modal.fullscreen {
  max-width: none !important; width: 100vw; height: 100vh; padding: 0 !important;
  border-radius: 0; background: var(--bg);
  overflow: auto; position: fixed; inset: 0;
}
.modal-backdrop:has(.modal.fullscreen) { padding: 0 !important; background: transparent !important; backdrop-filter: none !important; }
.modal.fullscreen .fs-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(8px);
  border-bottom: 1px solid var(--border);
}
.modal.fullscreen .fs-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 999px; color: var(--text); font-weight: 500; font-size: 14px;
  background: var(--bg-panel); border: 1px solid var(--border);
}
.modal.fullscreen .fs-back:hover { color: var(--brand-darker); border-color: var(--brand); }
.modal.fullscreen .fs-right { display: flex; align-items: center; gap: 8px; }
.modal.fullscreen .fs-body {
  max-width: 1100px; margin: 0 auto; padding: 48px 28px 72px;
}
.modal.fullscreen .fs-title {
  text-align: center; font-size: clamp(28px, 3.6vw, 42px);
  color: var(--text-strong); font-weight: 800; margin: 0 0 28px; letter-spacing: -0.02em;
}
.modal.fullscreen .fs-toggles {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 36px;
}

/* ---------- Pricing modal overrides (Individual/Team) ---------- */
.pricing-modal .pricing-head { text-align: center; margin-bottom: 18px; }
.pricing-modal .pricing-head h3 { font-size: 28px; color: var(--text-strong); font-weight: 800; margin-bottom: 16px; }
.audience-toggle, .billing-toggle {
  display: inline-flex; background: var(--accent-soft); border-radius: 999px;
  padding: 4px; gap: 2px; margin: 6px 4px;
}
.audience-toggle button, .billing-toggle button {
  padding: 8px 26px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-muted); background: transparent;
}
.audience-toggle button.active, .billing-toggle button.active { background: var(--bg-panel); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.pricing-modal .pricing-footer { text-align: center; margin-top: 18px; }
.pricing-modal .pricing-footer a { color: var(--text-muted); font-size: 13px; }
.pricing-modal .pricing-footer a:hover { color: var(--brand-darker); }

.pricing-team { grid-template-columns: 1fr 1fr !important; max-width: 820px; margin: 0 auto; }
.team-card {
  background: var(--bg-panel) !important; border: 1px solid var(--border); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.team-card .team-picker {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.team-card .team-picker-label { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.team-rows { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; gap: 8px; align-items: center; }
.team-row select, .team-row input {
  padding: 8px 10px; border-radius: 8px; background: var(--bg-panel); border: 1px solid var(--border); color: var(--text); font-size: 13px;
}
.team-row select { flex: 1; }
.team-row input { width: 64px; }
.team-row .team-del { width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); }
.team-row .team-del:hover { color: var(--brand-darker); background: var(--accent-soft); }
.team-add { margin-top: 10px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.team-add:hover { color: var(--brand-darker); }
.team-total-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 15px; }
.team-total-row .t-left { font-weight: 700; color: var(--text-strong); }
.team-total-row .t-right { text-align: right; }
.team-total-row #team-total { font-size: 28px; font-weight: 800; color: var(--text-strong); }
.team-total-row .per { font-size: 13px; color: var(--text-muted); margin-left: 4px; }
.team-total-row small { color: var(--text-muted); display: block; }
.team-checks { list-style: none; padding: 0; margin: 6px 0 0; }
.team-checks li { padding: 4px 0 4px 24px; position: relative; font-size: 13.5px; color: var(--text); }
.team-checks li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

@media (max-width: 720px) { .pricing-team { grid-template-columns: 1fr !important; } }

/* ---------- App shell ---------- */
html, body { height: 100%; }
.app-shell {
  display: grid; grid-template-columns: 272px 1fr;
  height: 100vh; height: 100dvh;
  background: var(--bg); overflow: hidden;
}
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
  height: 100%;
}
.sidebar .side-top { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.sidebar .brand { padding: 2px 4px 6px; }
.sidebar .new-chat {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-darker); color: var(--btn-text);
  border-radius: 12px; font-weight: 600; font-size: 14px;
}
.sidebar .new-chat:hover { background: var(--brand-dark); }
.sidebar .side-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px;
  color: var(--text); text-align: left; cursor: pointer; background: transparent;
}
.sidebar .side-row:hover { background: var(--bg-panel); color: var(--brand-darker); }
.sidebar .side-row svg { flex: 0 0 16px; color: var(--text-muted); }
.sidebar .side-row:hover svg { color: var(--brand-darker); }
.sidebar .scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 10px 10px; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.sidebar .scroll::-webkit-scrollbar { width: 8px; }
.sidebar .scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; }
.sidebar .scroll:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }
.sidebar .group-title {
  padding: 12px 12px 6px; font-size: 11px; letter-spacing: .14em; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar .group-title button.add {
  width: 22px; height: 22px; border-radius: 50%; color: var(--text-muted);
  display: grid; place-items: center;
}
.sidebar .group-title button.add:hover { background: var(--bg-panel); color: var(--brand-darker); }
.sidebar .item {
  padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.sidebar .item svg { flex: 0 0 16px; color: var(--text-muted); }
.sidebar .item:hover { background: var(--bg-panel); }
.sidebar .item:hover svg { color: var(--brand-darker); }
.sidebar .item.active { background: var(--bg-panel); font-weight: 600; color: var(--brand-darker); }
.sidebar .item .actions { margin-left: auto; display: none; gap: 2px; }
.sidebar .item:hover .actions { display: flex; }
.sidebar .item .actions button {
  width: 22px; height: 22px; border-radius: 6px; color: var(--text-muted);
}
.sidebar .item .actions button:hover { background: var(--accent-soft); color: var(--brand-darker); }
.sidebar .side-search {
  display: flex; align-items: center; gap: 8px; background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 10px; margin: 4px 10px 0;
}
.sidebar .side-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.sidebar .side-search svg { color: var(--text-muted); flex: 0 0 14px; }
.sidebar .upgrade {
  margin: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, #311a17, #9f6c45); color: #fff; border-radius: 14px;
  padding: 14px; font-size: 13px;
}
.sidebar .upgrade strong { display: block; margin-bottom: 4px; }
.sidebar .upgrade button { background: #fff; color: #311a17; padding: 6px 12px; border-radius: 999px; font-size: 12px; margin-top: 10px; font-weight: 700; }
.sidebar .bottom { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.sidebar .bottom button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--text); text-align: left; }
.sidebar .bottom button:hover { background: var(--bg-panel); color: var(--brand-darker); }

.main-col {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  height: 100%; position: relative;
}
.app-header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.3) blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.model-picker {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-panel);
  font-size: 14px; font-weight: 600; color: var(--brand-darker); cursor: pointer;
  transition: border-color .15s;
}
.model-picker:hover { border-color: var(--brand); }
.model-picker img { width: 20px; height: 20px; }
.model-picker .chev { opacity: .5; }
.model-picker.top {
  padding: 10px 20px; font-size: 15px; letter-spacing: .05em;
  background: var(--bg-panel); border: 1px solid var(--border);
}
.model-picker.top img { width: 22px; height: 22px; }
.model-picker.top:hover { border-color: var(--brand); color: var(--brand-darker); }
.model-picker.empty {
  padding: 10px 20px; font-size: 15px; letter-spacing: .05em;
  background: var(--bg-panel); margin: 0 auto 28px;
  display: none;
}
.model-picker.empty img { width: 22px; height: 22px; }
.model-picker.empty:hover { border-color: var(--brand); color: var(--brand-darker); }
.main-col.empty .model-picker.empty { display: inline-flex; }
.main-col.empty .model-picker.top { visibility: hidden; }

.model-menu {
  position: fixed; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; width: 340px; max-height: 440px; overflow: auto; z-index: 40;
  display: none;
}
.model-menu.open { display: block; }
.model-menu .mm-group { padding: 6px 8px 4px; font-size: 10px; letter-spacing: .16em; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.model-menu .mm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.model-menu .mm-item:hover { background: var(--accent-soft); }
.model-menu .mm-item img { width: 20px; height: 20px; object-fit: contain; }
.model-menu .mm-item.active { background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }

.chat-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 22px;
  scroll-behavior: smooth;
}
.chat-empty { max-width: 720px; margin: 80px auto; text-align: center; color: var(--text-muted); }
.chat-empty h2 { color: var(--brand-darker); margin-bottom: 10px; font-size: 28px; font-weight: 800; }
.msg { max-width: 820px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 6px; }
/* User: right-aligned gray pill */
.msg.user { align-items: flex-end; }
.msg.user .bubble {
  background: var(--accent-soft); color: var(--text); padding: 10px 16px;
  border-radius: 20px; max-width: 78%; font-size: 15px; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.user .bubble img.attach { max-width: 280px; border-radius: 12px; margin-top: 6px; }
/* Assistant: plain text left, no bubble */
.msg.assistant { align-items: stretch; }
.msg.assistant .bubble {
  color: var(--text); font-size: 15.5px; line-height: 1.7;
  max-width: 100%; background: transparent; padding: 0;
}
.msg.assistant .bubble p { margin: 0 0 12px; }
.msg.assistant .bubble p:last-child { margin-bottom: 0; }
.msg.assistant .bubble h1, .msg.assistant .bubble h2, .msg.assistant .bubble h3 {
  color: var(--brand-darker); margin: 18px 0 10px; font-weight: 700; letter-spacing: -0.01em;
}
.msg.assistant .bubble h1 { font-size: 24px; }
.msg.assistant .bubble h2 { font-size: 20px; }
.msg.assistant .bubble h3 { font-size: 17px; }
.msg.assistant .bubble h1:first-child, .msg.assistant .bubble h2:first-child, .msg.assistant .bubble h3:first-child { margin-top: 0; }
.msg.assistant .bubble ul, .msg.assistant .bubble ol { margin: 6px 0 12px; padding-left: 24px; }
.msg.assistant .bubble li { margin: 3px 0; }
.msg.assistant .bubble a { color: var(--brand-dark); text-decoration: underline; }
.msg.assistant .bubble strong { font-weight: 700; color: var(--brand-darker); }
.msg.assistant .bubble pre {
  background: #1a1a1e; color: #f5f5f6;                /* inside dark code block */ padding: 14px 16px; border-radius: 12px;
  overflow-x: auto; font-size: 13px; margin: 10px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.msg.assistant .bubble code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: 13.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.msg.assistant .bubble pre code { background: transparent; padding: 0; }
.msg.assistant .bubble blockquote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--text-muted); margin: 10px 0; }
.msg.assistant .bubble hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.msg .actions {
  display: flex; gap: 2px; margin-top: 2px; opacity: 0; transition: opacity .15s;
}
.msg:hover .actions, .msg:focus-within .actions { opacity: 1; }
.msg .actions button {
  width: 30px; height: 30px; border-radius: 8px; color: var(--text-muted); background: transparent;
  display: grid; place-items: center;
}
.msg .actions button:hover { color: var(--brand-darker); background: var(--accent-soft); }
.msg .actions button svg { width: 15px; height: 15px; }

.composer-wrap { flex: 0 0 auto; padding: 10px 20px 18px; background: var(--bg); }
.composer {
  max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 18px; padding: 10px 10px 10px 16px;
  box-shadow: var(--shadow-sm); transition: border-color .15s;
}
.composer:focus-within { border-color: var(--brand); }
.composer textarea {
  flex: 1; border: 0; outline: 0; resize: none; background: transparent;
  padding: 8px 0; max-height: 200px; min-height: 24px; font-size: 15px; line-height: 1.5;
}
.composer .tools { display: flex; gap: 4px; align-items: center; }
.composer .tool {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-muted); background: transparent;
}
.composer .tool:hover { color: var(--brand-darker); background: var(--accent-soft); }
.composer .tool.active { color: var(--brand-darker); background: var(--accent-soft); }
.composer .send {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-darker); color: var(--btn-text);
  display: grid; place-items: center;
}
.composer .send:hover { background: var(--brand-dark); }
.composer .send:disabled { background: #c8c3be; cursor: not-allowed; }

.composer-hint { max-width: 820px; margin: 8px auto 0; font-size: 12px; color: var(--text-muted); text-align: center; }

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; inset: 0; z-index: 40; }
  .model-menu { left: 16px; right: 16px; width: auto; }
}

/* ---------- Toasts ---------- */
.toast-layer { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--brand-darker); color: var(--btn-text); padding: 10px 16px; border-radius: 999px;
  box-shadow: var(--shadow-md); font-size: 14px; font-weight: 500;
  animation: slide-in .18s ease-out;
}

/* ---------- Sidebar retract ---------- */
.sidebar-toggle {
  position: fixed; top: 14px; left: 14px; z-index: 30;
  width: 36px; height: 36px; border-radius: 10px; display: none;
  align-items: center; justify-content: center; background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.sidebar-toggle:hover { color: var(--brand-darker); border-color: var(--brand); }
.app-shell.sidebar-closed { grid-template-columns: 0 1fr !important; }
.app-shell.sidebar-closed .sidebar { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.app-shell.sidebar-closed .sidebar-toggle { display: flex; }
/* When sidebar is retracted, make room in the header for the floating hamburger */
.app-shell.sidebar-closed .app-header { padding-left: 64px; }
.app-shell .sidebar { transition: transform .22s ease, opacity .2s ease; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-muted); background: transparent;
}
.icon-btn:hover { color: var(--brand-darker); background: var(--accent-soft); }

/* ---------- Language modal: grouped, searchable, flags ---------- */
.lang-modal { max-width: 640px !important; padding: 24px 22px !important; }
.lang-modal .search {
  width: 100%; padding: 12px 14px; border-radius: 12px; outline: none;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; margin: 10px 0 6px;
}
.lang-modal .search:focus { border-color: var(--brand); }
.lang-modal .scroll { max-height: 58vh; overflow-y: auto; padding: 4px 2px 2px; }
.lang-modal .group-title {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 4px 6px; display: flex; align-items: center; gap: 6px; font-weight: 700;
}
.lang-modal .lang-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px;
}
.lang-modal .lang-grid button {
  padding: 10px 12px; border-radius: 12px; font-size: 13.5px; text-align: left;
  color: var(--text); background: transparent; border: 1px solid transparent;
  transition: border-color .15s, background .15s;
  display: flex; align-items: center; gap: 10px;
}
.lang-modal .lang-grid button:hover { border-color: var(--border); background: var(--accent-soft); }
.lang-modal .lang-grid button.active { border-color: var(--brand); background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
.lang-modal .lang-grid .flag { font-size: 22px; line-height: 1; }
.lang-modal .lang-grid .names { display: flex; flex-direction: column; gap: 1px; overflow: hidden; min-width: 0; }
.lang-modal .lang-grid .nat { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-modal .lang-grid .eng { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.lang-modal .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lang-modal .chip-btn {
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--text-muted); border: 1px solid transparent;
}
.lang-modal .chip-btn:hover { color: var(--brand-darker); border-color: var(--border); }
.lang-modal .chip-btn.active { color: var(--brand-darker); border-color: var(--brand); background: var(--bg-panel); }
.lang-modal .empty-hit { color: var(--text-muted); padding: 20px; text-align: center; font-size: 13px; }

/* ---------- Composer overrides (Auto model + centered empty) ---------- */
.composer {
  flex-direction: column !important; align-items: stretch !important; padding: 10px 14px !important;
  gap: 6px !important;
}
.composer textarea { padding: 6px 4px !important; }
.composer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%;
}
.composer-bar .left, .composer-bar .right { display: flex; align-items: center; gap: 4px; }
.composer .send {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-darker); color: var(--btn-text);
  display: grid; place-items: center; flex: 0 0 auto;
}
.composer .send:disabled { background: var(--border-strong); color: var(--text-subtle); cursor: not-allowed; }
.composer .model-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
}
.composer .model-pill:hover { border-color: var(--brand); color: var(--brand-darker); }
.composer .model-pill img { width: 16px; height: 16px; object-fit: contain; }
.composer .model-pill svg.chev { opacity: .5; }

.main-col.empty { justify-content: center; }
.main-col.empty .app-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; border-bottom: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.main-col.empty .chat-body { flex: 0 0 auto; overflow: visible; padding-bottom: 0; padding-top: 0; }
.main-col.empty .chat-empty { margin: 0 auto; }
.main-col.empty .composer-wrap { padding-top: 4px; }
.main-col.empty .composer-hint { display: none; }
.main-col { position: relative; }

/* ---------- Drag & drop sidebar ---------- */
.sidebar .item[draggable="true"] { cursor: grab; }
.sidebar .item.dragging { opacity: .45; }
.sidebar .item.drop-target { background: var(--accent-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  padding: 8px 12px; border-radius: 999px; background: var(--bg-panel);
  border: 1px solid var(--border); color: var(--text); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand-darker); }

/* ---------- Language picker modal ---------- */
.lang-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px;
}
.lang-grid button {
  padding: 10px 14px; border-radius: 10px; font-size: 14px; text-align: left;
  color: var(--text); background: var(--bg-panel); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.lang-grid button:hover { border-color: var(--brand); }
.lang-grid button.active { border-color: var(--brand-darker); background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
.lang-grid button .code { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lang-grid button.active .code { color: var(--brand); }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Spinner ---------- */
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand-darker); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Typing indicator ---------- */
.typing { display: inline-flex; gap: 4px; align-items: center; color: var(--text-muted); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: bob 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%,60%,100%{ transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ===================================================================
   Responsive rules
   =================================================================== */

/* Tablet (<= 1024px): tighten chip/container padding */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  nav.primary { gap: 18px; }
  .app-shell { grid-template-columns: 240px 1fr; }
}

/* Small tablet / large phone (<= 820px) */
@media (max-width: 820px) {
  /* Landing: stack funnel columns, chips wrap */
  .models-grid { grid-template-columns: 1fr 1fr; }
  .funnel { display: none; }
  .uno-card { margin-top: 28px; }
  .hero h1 { font-size: clamp(32px, 7vw, 44px); }
  .hero-prefix, .hero-suffix { font-size: clamp(16px, 4vw, 18px); }
  .chip { padding: 8px 14px; font-size: 14px; }
  .chip img { width: 16px; height: 16px; }
  nav.primary a:nth-child(3), nav.primary a:nth-child(4) { display: none; } /* hide API/Contact */

  /* App: sidebar collapses, floating toggle visible */
  .app-shell { grid-template-columns: 0 1fr; }
  .sidebar { transform: translateX(-100%); opacity: 0; pointer-events: none; }
  .app-shell:not(.sidebar-open) .sidebar { transform: translateX(-100%); }
  .app-shell.sidebar-open { grid-template-columns: 280px 1fr; }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); opacity: 1; pointer-events: auto; position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 45; box-shadow: var(--shadow-lg); }
  .app-shell.sidebar-open::after { content: ''; position: fixed; inset: 0 0 0 280px; background: rgba(0,0,0,.35); z-index: 44; }
  .sidebar-toggle { display: flex !important; }
  /* Always leave room for the floating hamburger in mobile header */
  .app-header { padding-left: 64px !important; }

  /* Pricing modal on mobile */
  .modal.fullscreen .fs-body { padding: 28px 18px 48px; }
  .modal.fullscreen .fs-title { font-size: clamp(24px, 6vw, 32px); margin-bottom: 22px; }
  .pricing-cards { grid-template-columns: 1fr !important; }
  .pricing-team { grid-template-columns: 1fr !important; }

  /* App header: hide Upgrade text, keep icon-only actions */
  .app-header .btn.secondary { display: none; }
  .model-picker.top { padding: 8px 14px; font-size: 14px; }
  .model-picker.top img { width: 18px; height: 18px; }

  /* Language modal: wider grid cells on small screens */
  .lang-modal { max-width: 96vw !important; }
  .lang-modal .lang-grid { grid-template-columns: 1fr; }

  /* Composer: full width on mobile */
  .composer { border-radius: 16px; }
  .composer-wrap { padding: 10px 12px 14px; }
  .composer .tool { width: 34px; height: 34px; }
  .composer .send { width: 32px; height: 32px; }
}

/* Phone (<= 600px) */
@media (max-width: 600px) {
  .site-header .inner { height: 56px; }
  .brand img { width: 30px; height: 30px; }
  .brand-text .b1 { font-size: 13px; }
  .brand-text .b2 { font-size: 10px; }
  .launch-link { font-size: 13px; padding: 4px 10px; }

  /* Landing hero */
  .hero { padding: 24px 0 56px; min-height: auto; }
  .hero-logo { width: 110px; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(28px, 9vw, 36px); margin-bottom: 20px; }
  .hero-access { margin-bottom: 24px; }
  .hero .chips-row { gap: 8px; }
  .chip { padding: 6px 12px; font-size: 13px; }
  .chip img { width: 14px; height: 14px; }
  .btn.xl { padding: 14px 22px; font-size: 15px; }

  /* Section padding */
  .section { padding: 44px 0; }
  .section h2 { font-size: clamp(24px, 7vw, 32px); }
  .models-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .tm-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* App */
  .msg.user .bubble { max-width: 86%; font-size: 14.5px; }
  .msg.assistant .bubble { font-size: 15px; line-height: 1.65; }
  .chat-body { padding: 16px 14px 10px; }
  .msg { max-width: 100%; gap: 8px; }

  /* Header model pill — shrink label on phone */
  .model-picker.top { padding: 7px 12px; font-size: 13px; letter-spacing: .03em; }
  .model-picker.top span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Composer */
  .composer { padding: 8px 10px !important; }
  .composer textarea { font-size: 16px; /* prevent iOS zoom */ }
  .composer-hint { display: none; }

  /* Model menu — full-width sheet anchored at bottom */
  .model-menu {
    position: fixed !important;
    left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important;
    width: auto !important; max-width: none !important;
    max-height: 72vh !important;
  }

  /* Modals */
  .modal { padding: 22px 18px !important; max-width: 94vw !important; }
  .modal h3 { font-size: 20px; }

  /* Pricing fullscreen on phone */
  .modal.fullscreen .fs-top { padding: 10px 14px; }
  .modal.fullscreen .fs-body { padding: 24px 14px 40px; }
  .audience-toggle button, .billing-toggle button { padding: 8px 16px; font-size: 13px; }
  .pcard { padding: 20px 18px; }
  .team-card { padding: 20px 18px; }

  /* Toasts */
  .toast-layer { bottom: 90px; right: 14px; left: 14px; }
  .toast { text-align: center; }
}

/* Tiny phone (<= 380px) */
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
  nav.primary { gap: 10px; }
  nav.primary a { font-size: 12px; }
  .hero h1 { font-size: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* (The old "Plume v2 glassy composer" override block was removed
   in favor of the Unochat pill composer defined lower in this file.) */

/* Hero input (landing core CTA) */
.hero-input {
  width: 100%; max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 22px; padding: 18px 18px 12px;
  transition: box-shadow .2s ease, border-color .15s ease, transform .2s ease;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--text-strong) 3%, transparent),
    0 30px 80px rgba(0, 0, 0, .08),
    0 3px 8px rgba(0, 0, 0, .04);
}
.hero-input:hover { transform: translateY(-1px); }
.hero-input:focus-within {
  border-color: var(--text-strong);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--text-strong) 7%, transparent),
    0 36px 100px rgba(0, 0, 0, .12),
    0 4px 10px rgba(0, 0, 0, .06);
}
.hero-input textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-family: inherit; font-size: 17px; line-height: 1.45; color: var(--text-strong);
  padding: 4px 2px; max-height: 240px; min-height: 28px;
}
.hero-input textarea::placeholder { color: var(--text-muted); }
.hero-input-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-input-bar .left, .hero-input-bar .right { display: flex; align-items: center; gap: 8px; }
.hero-input-bar .icon-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--text-muted); background: transparent;
  transition: background .15s, color .15s;
}
.hero-input-bar .icon-btn:hover { color: var(--text-strong); background: var(--accent-soft); }
.hero-auto-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text-strong); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
}
.hero-input-bar .send {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%); color: #0a0a0a;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 14px rgba(0,0,0,.28);
  transition: transform .1s ease, box-shadow .15s ease;
}
.hero-input-bar .send:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 20px rgba(0,0,0,.35); }

.hero-suggestions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 22px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.hero-suggestions .sug {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-panel); color: var(--text-strong); font-size: 13.5px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hero-suggestions .sug:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: 0 4px 10px rgba(0,0,0,.06); }

/* ---------- Unochat landing typography (dark-only) ---------- */
.hero h1 { color: var(--text-strong); letter-spacing: -0.04em; font-size: clamp(42px, 6.5vw, 76px); line-height: 1.02; }
.section h2 { color: var(--text-strong); letter-spacing: -0.035em; font-size: clamp(32px, 4vw, 48px); text-align: center; }
.section .section-subtitle { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.brand-text .b1 { color: var(--text-strong); letter-spacing: .06em; }
.brand-text .b2 { color: var(--text-muted); }
.launch-link { color: var(--text-strong); font-size: 14px; }

/* ---------- Chat page: "Ready when you are." + pill composer ---------- */
.chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px 20px;
}
.chat-empty .ready {
  color: var(--text-strong); font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.02em;
  margin: 0 0 32px; line-height: 1.1;
}

/* When the chat is empty, center the heading + composer together as a hero group */
.main-col.empty .composer-wrap { padding: 0 24px 40px; background: transparent; }
.main-col.empty .composer-hint { display: none; }

/* Dark pill composer — matches the screenshot: rounded pill, white send button */
.composer-wrap {
  position: sticky; bottom: 0;
  padding: 16px 24px 24px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 40%);
  z-index: 5;
}
.composer {
  max-width: 820px; margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px 12px 10px 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 36px rgba(0,0,0,.28);
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within {
  border-color: color-mix(in srgb, var(--text-strong) 28%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-strong) 6%, transparent), 0 10px 36px rgba(0,0,0,.32);
}
.composer textarea {
  flex: 1; min-height: 28px; max-height: 200px;
  background: transparent; border: 0; outline: none; resize: none;
  color: var(--text); font-size: 15.5px;
  padding: 8px 4px; line-height: 1.4;
}
.composer textarea::placeholder { color: var(--text-subtle); }
.composer-bar {
  display: flex; align-items: center; gap: 6px; padding: 0;
  width: 100%; justify-content: space-between;
}
.composer-bar .left, .composer-bar .right { display: flex; align-items: center; gap: 4px; }
.composer-bar .tool {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
  background: transparent; border: 0;
  transition: background .15s, color .15s;
}
.composer-bar .tool:hover { background: var(--accent-soft); color: var(--text-strong); }
/* Screenshot shows only attach + voice + send — hide web and model pill */
.composer-bar #tool-web, .composer-bar .model-pill { display: none; }
.composer-bar .send {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%); color: #0a0a0a;
  border: 0; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 10px rgba(0,0,0,.35);
  transition: box-shadow .15s, transform .1s;
}
.composer-bar .send:hover:not(:disabled) { transform: scale(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 14px rgba(0,0,0,.45); }
.composer-bar .send:disabled { background: var(--accent-soft); color: var(--text-subtle); cursor: not-allowed; box-shadow: none; }

/* Hide the full-composer attach previews row inside the pill shape — they stack above */
#attach-previews:empty { display: none; }

/* Dashboard / Plume-app artefacts removed — if markup leaks through we hide it */
.dash-main, .word-preview, .app-redirect-modal, .empty-app-badge { display: none !important; }

/* ---------- Light-theme overrides ---------- */
html.theme-light body { background: #ffffff; color: #1a1a1f; }
html.theme-light .hero h1 { color: #0a0a0a; }
html.theme-light .section h2 { color: #0a0a0a; }
html.theme-light .brand-text .b1 { color: #0a0a0a; }
html.theme-light .brand-text .b2 { color: #6b6b72; }
html.theme-light .launch-link { color: #0a0a0a; }
/* Flip the white-glossy buttons to dark-glossy on light bg */
html.theme-light .btn.primary {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.12);
}
html.theme-light .btn.primary:hover { background: linear-gradient(180deg, #3a3a40 0%, #151518 100%); }
html.theme-light .composer-bar .send {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%); color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 10px rgba(0,0,0,.2);
}
html.theme-light .composer-bar .send:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 14px rgba(0,0,0,.28); }
html.theme-light .composer-bar .send:disabled { background: var(--accent-soft); color: var(--text-subtle); box-shadow: none; }
html.theme-light .hero-input-bar .send {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%); color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 4px 14px rgba(0,0,0,.2);
}
html.theme-light .hero-input-bar .send:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 20px rgba(0,0,0,.28); }
html.theme-light .composer:focus-within {
  border-color: #0a0a0a;
  box-shadow: 0 0 0 4px rgba(0,0,0,.06), 0 10px 36px rgba(0,0,0,.08);
}
