/* =========================================================================
   SpeakAny — design system
   Dark premium by default, light theme via [data-theme="light"].
   Fonts are self-hosted (GDPR: no Google Fonts requests).
   ========================================================================= */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --bg: #07080d;
  --bg-2: #0b0d15;
  --surface: #0f121c;
  --surface-2: #151926;
  --surface-3: #1b2030;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #eef1f8;
  --text-2: #c3c9d8;
  --muted: #8a92a8;
  --faint: #5a6276;
  --accent: #7c6cff;
  --accent-2: #22d3ee;
  --accent-ink: #ffffff;
  --accent-soft: rgba(124, 108, 255, .14);
  --cyan-soft: rgba(34, 211, 238, .12);
  --grad: linear-gradient(115deg, #22d3ee 0%, #7c6cff 52%, #c06bff 100%);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .13);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .13);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --shadow-lg: 0 40px 120px -30px rgba(0,0,0,.75);
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 26px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --brand: var(--accent);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-2: #eef0f6;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef5;
  --line: rgba(15, 20, 40, .08);
  --line-2: rgba(15, 20, 40, .15);
  --text: #0e1222;
  --text-2: #2c3247;
  --muted: #5d6478;
  --faint: #9298aa;
  --accent: #5b4cf0;
  --accent-soft: rgba(91, 76, 240, .1);
  --cyan-soft: rgba(8, 145, 178, .1);
  --shadow: 0 1px 2px rgba(15,20,40,.04), 0 12px 32px -16px rgba(15,20,40,.18);
  --shadow-lg: 0 40px 100px -30px rgba(15,20,40,.3);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124,108,255,.35); }
.ic { width: 18px; height: 18px; flex: none; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -10px rgba(124,108,255,.8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: #8a7bff; }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(124,108,255,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-grad:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: rgba(248,113,113,.25); }
.btn-danger:hover { background: rgba(248,113,113,.2); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 13px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.textarea { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a92a8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[type="color"] { padding: 4px; width: 56px; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { font-size: 12.5px; color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(17px); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- alerts / badges ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 14px; border: 1px solid; margin-bottom: 16px; }
.alert .ic { margin-top: 2px; }
.alert-ok { background: var(--ok-soft); border-color: rgba(52,211,153,.25); color: var(--ok); }
.alert-bad { background: var(--bad-soft); border-color: rgba(248,113,113,.25); color: var(--bad); }
.alert-warn { background: var(--warn-soft); border-color: rgba(251,191,36,.25); color: var(--warn); }
.alert-info { background: var(--accent-soft); border-color: rgba(124,108,255,.25); color: var(--text-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 550; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: none; }
.badge.dot::before { display: block; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-accent { background: var(--accent-soft); color: #a99fff; }
[data-theme="light"] .badge-accent { color: var(--accent); }
.pill-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 650; display: inline-grid; place-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 99px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52,211,153,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card-body { padding: 22px; }

/* =========================================================================
   PUBLIC SITE
   ========================================================================= */
.site-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(900px 500px at 15% -10%, rgba(34,211,238,.10), transparent 60%),
  radial-gradient(900px 600px at 90% 0%, rgba(124,108,255,.14), transparent 60%), var(--bg); }
[data-theme="light"] .site-bg { background: radial-gradient(900px 500px at 15% -10%, rgba(34,211,238,.12), transparent 60%), radial-gradient(900px 600px at 90% 0%, rgba(124,108,255,.12), transparent 60%), var(--bg); }
.grid-lines { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); opacity: .55; }

.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px -6px rgba(124,108,255,.8); }
.logo-mark .ic { width: 17px; height: 17px; }
.logo b { font-weight: 700; }
.logo span { font-weight: 400; color: var(--muted); }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.lang-switch a { height: 28px; padding: 0 9px; display: grid; place-items: center; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang-switch a.on { background: var(--surface-3); color: var(--text); }
.theme-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.theme-btn:hover { color: var(--text); }
.theme-btn .moon { display: none; }
[data-theme="light"] .theme-btn .sun { display: none; }
[data-theme="light"] .theme-btn .moon { display: block; }
.menu-btn { display: none; }
.mobile-menu { display: none; }

/* hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.045em; font-weight: 650; margin: 22px 0 22px; }
.hero h1 .serif { font-size: 1.08em; letter-spacing: -.02em; }
.hero .lead { font-size: 18.5px; line-height: 1.6; color: var(--muted); max-width: 540px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 13.5px; color: var(--muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ic { width: 16px; height: 16px; color: var(--ok); }

/* animated demo */
.demo { position: relative; }
.demo-glow { position: absolute; inset: -8% -6%; background: url("../img/stage.jpg") center/cover; opacity: .35; border-radius: 40px; filter: saturate(1.2) blur(2px); mask-image: radial-gradient(closest-side, #000 40%, transparent); }
[data-theme="light"] .demo-glow { opacity: .18; }
.demo-stage { position: relative; display: grid; grid-template-columns: 1fr 62px 1fr; align-items: center; }
.phone { position: relative; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line-2); border-radius: 26px; box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); overflow: hidden; height: 470px; display: flex; flex-direction: column; }
.phone-b { transform: translateY(34px); }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #fff; background: var(--grad); flex: none; }
.avatar.alt { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.phone-head b { font-size: 13.5px; display: block; line-height: 1.2; }
.phone-head small { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.phone-head small i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.phone-flag { margin-left: auto; font-size: 11px; font-family: var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.phone-body { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.phone-input { margin: 0 10px 10px; height: 40px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 6px 0 12px; font-size: 13px; color: var(--text-2); gap: 8px; }
.phone-input .typed { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.phone-input .typed:empty::before { content: attr(data-ph); color: var(--faint); }
.phone-input .caret { width: 1.5px; height: 16px; background: var(--accent); animation: blink 1s steps(1) infinite; margin-left: -6px; }
@keyframes blink { 50% { opacity: 0; } }
.phone-input .send { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.phone-input .send .ic { width: 15px; height: 15px; }
.d-msg { max-width: 86%; padding: 9px 12px; border-radius: 15px; font-size: 13px; line-height: 1.45; animation: msgIn .45s cubic-bezier(.2,.9,.3,1.2) both; }
.d-msg.in { background: var(--surface-3); border-bottom-left-radius: 5px; align-self: flex-start; }
.d-msg.out { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.d-msg small { display: block; margin-top: 4px; font-size: 10.5px; opacity: .65; font-family: var(--mono); }
.d-msg[dir="rtl"] { text-align: right; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.d-typing { align-self: flex-start; padding: 10px 13px; border-radius: 15px; background: var(--surface-3); display: flex; gap: 4px; }
.d-typing span, .typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.d-typing span:nth-child(2), .typing-dots span:nth-child(2) { animation-delay: .15s; }
.d-typing span:nth-child(3), .typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
.beam { position: relative; height: 100%; display: grid; place-items: center; }
.beam-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.beam-dot { position: absolute; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 16px 4px rgba(34,211,238,.6); opacity: 0; }
.beam.go-r .beam-dot { animation: beamR .9s ease-in-out; }
.beam.go-l .beam-dot { animation: beamL .9s ease-in-out; }
@keyframes beamR { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes beamL { 0% { left: calc(100% - 8px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }
.beam-chip { position: relative; z-index: 2; width: 46px; height: 46px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; box-shadow: var(--shadow); color: var(--accent-2); }
.beam.go-r .beam-chip, .beam.go-l .beam-chip { animation: chipPulse .9s; }
@keyframes chipPulse { 50% { box-shadow: 0 0 0 8px rgba(34,211,238,.12), 0 0 30px rgba(34,211,238,.5); color: #fff; } }
.beam-label { position: absolute; top: calc(50% + 32px); font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.demo-caption { position: relative; display: flex; justify-content: center; gap: 8px; margin-top: 54px; flex-wrap: wrap; }
.demo-caption button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.demo-caption button.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

/* marquee */
.marquee { border-block: 1px solid var(--line); padding: 20px 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin-top: 56px; }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 50s linear infinite; }
.marquee span { font-size: 22px; color: var(--faint); white-space: nowrap; letter-spacing: -.01em; }
.marquee span:nth-child(3n) { color: var(--text-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections */
.section { padding: 110px 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; display: inline-block; }
.section h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -.035em; font-weight: 650; margin: 0 0 16px; }
.section h2 .serif { font-size: 1.08em; }
.section-head p { font-size: 17px; color: var(--muted); margin: 0; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.step-visual { height: 210px; position: relative; border-bottom: 1px solid var(--line); background: radial-gradient(400px 200px at 50% 0%, var(--accent-soft), transparent), var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.step-body { padding: 22px 22px 26px; }
.step-num { font-family: var(--mono); font-size: 12px; color: var(--accent-2); margin-bottom: 10px; display: block; }
.step h3 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.mock { width: 82%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; font-size: 12px; }
.mock-field { height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; color: var(--text-2); margin-bottom: 8px; gap: 6px; }
.mock-field.sel::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
.mock-btn { height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; }
.mock-link { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); font-family: var(--mono); font-size: 11.5px; color: var(--accent-2); }
.mock-link .ic { width: 14px; height: 14px; color: var(--muted); margin-left: auto; }
.mock-share { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.mock-share span { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); }
.mock-share span:nth-child(1) { animation: hop 3s infinite; }
.mock-share span:nth-child(2) { animation: hop 3s .2s infinite; }
.mock-share span:nth-child(3) { animation: hop 3s .4s infinite; }
@keyframes hop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px); border-color: var(--accent); color: var(--accent); } }
.mock-chat { display: grid; gap: 7px; }
.mock-chat .d-msg { animation: none; max-width: 92%; font-size: 12px; }
.howto-detail { margin-top: 18px; display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 0; overflow: hidden; }
.howto-detail > div { padding: 30px; }
.howto-detail > div + div { border-left: 1px solid var(--line); }
.howto-detail h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.02em; }
.howto-detail p { color: var(--muted); margin: 0 0 14px; }
.pipeline { display: grid; gap: 0; }
.pipe { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; position: relative; }
.pipe + .pipe { border-top: 1px dashed var(--line); }
.pipe-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); }
.pipe b { display: block; font-size: 14.5px; font-weight: 600; }
.pipe span { font-size: 13px; color: var(--muted); }
.pipe em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* features bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feat { padding: 26px; position: relative; overflow: hidden; grid-column: span 2; transition: border-color .3s, transform .3s; }
.feat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feat.wide { grid-column: span 3; }
.feat-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: #a99fff; margin-bottom: 18px; border: 1px solid rgba(124,108,255,.25); }
[data-theme="light"] .feat-ic { color: var(--accent); }
.feat-ic.cyan { background: var(--cyan-soft); color: var(--accent-2); border-color: rgba(34,211,238,.25); }
.feat-ic .ic { width: 21px; height: 21px; }
.feat h3 { margin: 0 0 8px; font-size: 17.5px; letter-spacing: -.015em; font-weight: 600; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feat .tag { position: absolute; top: 22px; right: 22px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.lang-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.lang-cloud span { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.wave { display: flex; align-items: center; gap: 3px; height: 34px; margin-top: 18px; }
.wave i { width: 3px; border-radius: 3px; background: var(--grad); animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 50% { transform: scaleY(.35); } }

/* widget showcase */
.showcase { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; color: var(--text-2); }
.checklist li .ic { color: var(--ok); margin-top: 3px; }
.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; background: #05060a; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; color: #c7cbe0; overflow-x: auto; white-space: pre; }
.code .t { color: #7dd3fc; } .code .a { color: #c4b5fd; } .code .s { color: #86efac; }
.browser { border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.browser-bar { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.browser-url { margin-left: 12px; flex: 1; max-width: 300px; height: 24px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; padding: 0 10px; gap: 6px; }
.browser-url .ic { width: 12px; height: 12px; }
.browser-page { position: relative; height: 440px; padding: 28px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.fake-site h4 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.03em; }
.fake-line { height: 9px; border-radius: 5px; background: var(--surface-3); margin-bottom: 9px; }
.fake-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.fake-cards div { height: 92px; border-radius: 12px; background: var(--surface-3); opacity: .7; }
.w-panel { position: absolute; right: 22px; bottom: 88px; width: 290px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); overflow: hidden; transform-origin: bottom right; animation: panelIn 9s infinite; }
@keyframes panelIn { 0%, 6% { opacity: 0; transform: scale(.85) translateY(10px); } 12%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.85) translateY(10px); } }
.w-head { padding: 14px; display: flex; gap: 10px; align-items: center; background: var(--brand); color: #fff; }
.w-head b { font-size: 13.5px; display: block; }
.w-head small { font-size: 11px; opacity: .85; }
.w-body { padding: 12px; display: grid; gap: 7px; font-size: 12px; }
.w-body .d-msg { font-size: 12px; animation-duration: .5s; }
.w-body .d-msg:nth-child(2) { animation-delay: 2.2s; }
.w-body .d-msg:nth-child(3) { animation-delay: 4.2s; }
.w-bubble { position: absolute; right: 22px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(124,108,255,.9); }
.w-bubble .ic { width: 24px; height: 24px; }

/* use cases */
.cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.case { padding: 0; overflow: hidden; }
.case-art { height: 132px; position: relative; display: grid; place-items: center; overflow: hidden; }
.case-art::before { content: ""; position: absolute; inset: 0; background: url("../img/stage.jpg") center/cover; opacity: .45; }
.case-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface)); }
.case:nth-child(2) .case-art::before { filter: hue-rotate(60deg); }
.case:nth-child(3) .case-art::before { filter: hue-rotate(140deg); }
.case:nth-child(4) .case-art::before { filter: hue-rotate(-40deg); }
.case:nth-child(5) .case-art::before { filter: hue-rotate(200deg); }
.case:nth-child(6) .case-art::before { filter: hue-rotate(100deg) saturate(.6); }
.case:nth-child(7) .case-art::before { filter: hue-rotate(-90deg); }
.case:nth-child(8) .case-art::before { filter: hue-rotate(30deg) saturate(1.4); }
.case-art .ic { position: relative; z-index: 2; width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.case-art .bubble-pop { position: absolute; z-index: 2; top: 16px; right: 14px; font-size: 11px; padding: 4px 8px; border-radius: 10px 10px 2px 10px; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.case-art .bubble-pop.l { right: auto; left: 14px; top: auto; bottom: 34px; border-radius: 10px 10px 10px 2px; }
.case-body { padding: 4px 18px 20px; }
.case h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.case p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* security */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vault { padding: 28px; }
.vault-flow { display: grid; gap: 12px; margin-top: 18px; }
.vault-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.vault-row .ic { color: var(--accent-2); }
.vault-row code { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.vault-arrow { text-align: center; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.sec-list { display: grid; gap: 14px; }
.sec-item { display: flex; gap: 14px; padding: 18px; }
.sec-item .feat-ic { margin: 0; flex: none; width: 40px; height: 40px; }
.sec-item h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; }
.sec-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price { padding: 30px; display: flex; flex-direction: column; position: relative; }
.price.pop { border-color: rgba(124,108,255,.5); background: linear-gradient(180deg, rgba(124,108,255,.09), var(--surface) 40%); box-shadow: 0 0 0 1px rgba(124,108,255,.2), var(--shadow-lg); }
.price .badge { position: absolute; top: 24px; right: 24px; }
.price h3 { margin: 0; font-size: 17px; font-weight: 600; }
.price .desc { color: var(--muted); font-size: 14px; margin: 6px 0 22px; min-height: 42px; }
.price .amount { font-size: 50px; font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.price .amount small { font-size: 15px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 26px 0 28px; display: grid; gap: 11px; flex: 1; }
.price li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.price li .ic { color: var(--accent-2); margin-top: 2px; width: 17px; height: 17px; }
.price-note { text-align: center; margin-top: 26px; color: var(--muted); font-size: 14px; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 550; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .25s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

/* cta + footer */
.cta { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 74px 40px; text-align: center; border: 1px solid var(--line-2); background: #060812; }
.cta::before { content: ""; position: absolute; inset: 0; background: url("../img/stage.jpg") center/cover; opacity: .75; }
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 50% 120%, rgba(124,108,255,.45), transparent), linear-gradient(180deg, rgba(6,8,18,.2), rgba(6,8,18,.65)); }
.cta > * { position: relative; z-index: 2; }
.cta h2 { color: #fff; }
.cta p { color: #b8c0d6; font-size: 17px; margin: 0 auto 30px; max-width: 560px; }
.footer { border-top: 1px solid var(--line); padding: 56px 0 30px; margin-top: 110px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer h5 { margin: 0 0 14px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer li a { color: var(--muted); font-size: 14px; }
.footer li a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* legal / error pages */
.prose { max-width: 760px; margin: 0 auto; padding: 70px 24px; }
.prose h1 { font-size: 40px; letter-spacing: -.03em; margin: 0 0 24px; }
.prose h2 { font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.placeholder { padding: 14px 16px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); border: 1px dashed rgba(251,191,36,.4); font-size: 14px; }

/* =========================================================================
   AUTH
   ========================================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; background: #05060c; border-right: 1px solid var(--line); color: #eef1f8; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: url("../img/stage.jpg") center/cover; opacity: .7; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,6,12,.35), rgba(5,6,12,.75)); }
.auth-art > * { position: relative; z-index: 2; }
.auth-art .logo span { color: #8a92a8; }
.auth-art h2 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 650; }
.auth-art p { color: #a8b0c5; max-width: 420px; margin: 0; }
.auth-bubbles { display: grid; gap: 10px; max-width: 360px; margin-top: 30px; }
.auth-bubbles .d-msg { animation-duration: .6s; }
.auth-bubbles .d-msg.in { background: rgba(255,255,255,.08); color: #eef1f8; backdrop-filter: blur(8px); }
.auth-bubbles .d-msg:nth-child(2) { animation-delay: .5s; }
.auth-bubbles .d-msg:nth-child(3) { animation-delay: 1s; }
.auth-form { display: flex; flex-direction: column; padding: 32px; }
.auth-top { display: flex; justify-content: flex-end; gap: 8px; }
.auth-box { width: 100%; max-width: 410px; margin: auto; padding: 40px 0; }
.auth-box h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 650; }
.auth-box > p:not(.auth-alt) { color: var(--muted); margin: 0 0 28px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-alt a, .link { color: #a99fff; font-weight: 550; }
[data-theme="light"] .auth-alt a, [data-theme="light"] .link { color: var(--accent); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-bottom: 18px; }
.otp input { height: 58px; text-align: center; font-size: 24px; font-weight: 600; font-family: var(--mono); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); outline: none; width: 100%; }
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 2px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .3s, background .3s; }

/* =========================================================================
   DASHBOARD
   ========================================================================= */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
.side .logo { padding: 4px 8px 20px; }
.side-nav { display: grid; gap: 2px; }
.side-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 8px; }
.side-nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side-nav a.on .ic { color: var(--accent); }
.side-nav a .pill-count { margin-left: auto; }
.side-plan { margin-top: auto; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, rgba(124,108,255,.16), rgba(34,211,238,.06)); border: 1px solid rgba(124,108,255,.25); }
.side-plan .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; }
.side-plan b { font-size: 14px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }
.side-plan small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 2px; margin-top: 12px; border-top: 1px solid var(--line); }
.side-user b { font-size: 13.5px; display: block; line-height: 1.2; }
.side-user small { font-size: 12px; color: var(--muted); }
.side-user form { margin-left: auto; }
.side-backdrop { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 66px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); }
.topbar h1 { font-size: 18px; margin: 0; letter-spacing: -.02em; font-weight: 600; }
.topbar .crumb { font-size: 13px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.side-toggle { display: none; }
.page { padding: 28px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.stat-top .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); }
.stat-val { font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 180px; padding-top: 10px; }
.chart .bar { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; }
.chart .bar i { width: 100%; min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(124,108,255,.35)); transition: filter .2s; }
.chart .bar.today i { background: var(--grad); }
.chart .bar:hover i { filter: brightness(1.3); }
.chart .bar .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--line-2); padding: 5px 8px; border-radius: 7px; font-size: 11.5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 3; }
.chart .bar:hover .tip { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 8px; font-family: var(--mono); }
.plan-card { padding: 24px; border-radius: var(--r-lg); background: linear-gradient(150deg, #5b4cf0, #7c6cff 45%, #22a6c9); color: #fff; position: relative; overflow: hidden; box-shadow: 0 20px 50px -20px rgba(91,76,240,.7); }
.plan-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); }
.plan-card small { opacity: .8; font-size: 13px; }
.plan-card h3 { margin: 2px 0 16px; font-size: 28px; letter-spacing: -.03em; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; font-size: 14px; }
.plan-card li { display: flex; gap: 8px; align-items: center; }
.plan-card li .ic { width: 16px; height: 16px; }
.plan-card .meter { background: rgba(255,255,255,.22); }
.plan-card .meter i { background: #fff; }
.plan-card .meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; opacity: .9; }
.plan-card .btn { background: #fff; color: #3d2fd0; }
.plan-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); transition: background .15s; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item b { font-size: 14.5px; font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { color: var(--muted); font-size: 12.5px; }
.chat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); flex: none; font-size: 15px; }
.chat-ic.widget { color: var(--accent-2); }
.empty { padding: 50px 24px; text-align: center; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--faint); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 12px 22px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.filters .input, .filters .select { height: 36px; width: auto; min-width: 150px; }
.filters .search { flex: 1; min-width: 180px; }
.pagination { padding: 14px 22px; display: flex; gap: 6px; justify-content: flex-end; }
.pagination a, .pagination span { height: 32px; min-width: 32px; padding: 0 10px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; border: 1px solid var(--line); }
.pagination .on { background: var(--accent); color: #fff; border-color: var(--accent); }
.quickstart { display: grid; gap: 10px; }
.qs { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.qs .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--surface-3); flex: none; }
.qs.done .n { background: var(--ok); color: #05210f; }
.qs.done span { color: var(--muted); text-decoration: line-through; }
.qs a { margin-left: auto; }
.lang-pair { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.lang-pair .ic { width: 13px; height: 13px; color: var(--faint); }

/* billing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plans .price { padding: 24px; }
.plans .price .amount { font-size: 40px; }
.plans .price.current { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(52,211,153,.25); }
.topups { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.topup { position: relative; }
.topup input { position: absolute; opacity: 0; }
.topup span { display: grid; gap: 4px; padding: 16px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.topup b { font-size: 22px; letter-spacing: -.02em; }
.topup small { color: var(--muted); font-size: 12.5px; }
.topup em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ok); min-height: 16px; }
.topup input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.kv { display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv div:first-child { border-top: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 550; text-align: right; }

/* widget configurator */
.wconf { display: grid; grid-template-columns: 1fr 420px; gap: 20px; align-items: start; }
.wpreview { position: sticky; top: 86px; }
.wpreview-stage { position: relative; height: 620px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, var(--surface-2) 0 12px, var(--surface) 12px 24px); }
.wpreview-stage iframe { position: absolute; bottom: 92px; width: 360px; height: 500px; border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); background: var(--surface); }
.wpreview-stage.right iframe { right: 20px; } .wpreview-stage.left iframe { left: 20px; }
.wpreview-stage .wbtn { position: absolute; bottom: 20px; }
.wpreview-stage.right .wbtn { right: 20px; } .wpreview-stage.left .wbtn { left: 20px; }
.wbtn { height: 58px; min-width: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 29px; background: var(--wcolor, var(--accent)); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.45); }
.wbtn.round { width: 58px; padding: 0; }
.wbtn.round .lbl { display: none; }
.wbtn.square { border-radius: 16px; width: 58px; padding: 0; }
.wbtn.square .lbl { display: none; }
.wbtn .ic { width: 24px; height: 24px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(3,4,8,.6); backdrop-filter: blur(6px); }
.modal.open { display: grid; animation: fadeIn .2s; }
.modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; animation: popIn .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.toast-wrap { position: fixed; z-index: 200; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 8px; align-items: center; animation: popIn .25s; }
.toast .ic { color: var(--ok); }

/* =========================================================================
   CHAT (dashboard, guest page, widget)
   ========================================================================= */
.chat-layout { display: grid; grid-template-columns: 1fr 320px; height: calc(100vh - 66px); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.chat-aside { overflow-y: auto; padding: 18px; display: grid; gap: 16px; align-content: start; background: var(--bg-2); }
.chat-aside h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 64px; }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-head b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.status-dot.paused { background: var(--warn); }
.status-dot.ended { background: var(--faint); }
.thread { flex: 1; overflow-y: auto; padding: 22px 22px 10px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; margin-top: 10px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.cont { margin-top: 2px; }
.msg.cont .avatar { visibility: hidden; }
.msg .avatar { width: 30px; height: 30px; font-size: 11px; }
.msg.r-host:not(.mine) .avatar { background: linear-gradient(135deg, #22d3ee, #0ea5e9); }
.msg-col { display: flex; flex-direction: column; min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.mine .bubble { background: var(--brand); border-color: transparent; color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.bubble[dir="rtl"] { text-align: right; }
.bubble .voice-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; opacity: .75; margin-bottom: 3px; }
.bubble .voice-tag .ic { width: 13px; height: 13px; }
.msg-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); margin-top: 4px; padding: 0 4px; flex-wrap: wrap; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-meta b { font-weight: 550; color: var(--muted); }
.msg-alt { font-size: 12.5px; color: var(--muted); margin-top: 4px; padding: 0 4px; font-style: italic; max-width: 100%; overflow-wrap: anywhere; }
.msg-alt .lc { font-style: normal; font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: var(--surface-3); margin-right: 5px; color: var(--text-2); }
.msg-alt[dir="rtl"] { text-align: right; }
.msg-tr-btn { background: none; border: 0; color: #a99fff; font-size: 12px; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
[data-theme="light"] .msg-tr-btn { color: var(--accent); }
.msg.pending .bubble { opacity: .7; }
.msg.pending .msg-meta::after { content: attr(data-pending); font-style: italic; }
.sys { align-self: center; font-size: 12px; color: var(--muted); padding: 5px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); margin: 14px 0 4px; text-align: center; }
.typing-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 22px 6px; min-height: 22px; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots span { width: 5px; height: 5px; }
.composer { padding: 10px 16px 16px; }
.composer-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 6px 8px; }
.composer-note .ic { width: 14px; height: 14px; color: var(--accent-2); }
.composer-box { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; max-height: 140px; min-height: 24px; padding: 9px 0; line-height: 1.45; font-size: 14.5px; }
.composer .btn-icon { height: 38px; width: 38px; border-radius: 11px; }
.composer .send { background: var(--brand); color: #fff; }
.composer .send:hover { filter: brightness(1.1); }
.mic.rec { background: var(--bad); color: #fff; animation: pulseRed 1.4s infinite; }
@keyframes pulseRed { 50% { box-shadow: 0 0 0 6px rgba(248,113,113,.25); } }
.rec-time { font-family: var(--mono); font-size: 12px; color: var(--bad); align-self: center; padding: 0 4px; }
.chat-closed { margin: 10px 16px 16px; padding: 14px; border-radius: 12px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.people { display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.person .grow { flex: 1; min-width: 0; }
.person b { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); font-size: 12px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.online-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.2); }
.share-link { display: flex; gap: 6px; }
.share-link .input { font-family: var(--mono); font-size: 12px; height: 38px; }
.qr { background: #fff; border-radius: 12px; padding: 12px; display: grid; place-items: center; }
.qr img, .qr svg { width: 150px; height: 150px; }
.lang-select-sm { height: 34px; font-size: 13px; width: auto; }
.created-banner { margin: 16px 20px 0; }

/* guest page */
.guest { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.guest-top { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.guest-top .brand-logo { height: 30px; width: auto; max-width: 160px; object-fit: contain; }
.guest-top .spacer { flex: 1; }
.guest-wrap { flex: 1; display: flex; width: 100%; max-width: 920px; margin: 0 auto; min-height: 0; }
.guest-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; height: calc(100dvh - 62px); }
.guest-chat .thread { padding-top: 18px; }
.join { margin: auto; width: 100%; max-width: 440px; padding: 30px 20px; }
.join .card { padding: 28px; }
.join h1 { font-size: 26px; letter-spacing: -.03em; margin: 14px 0 6px; }
.join p { color: var(--muted); margin: 0 0 22px; }
.join .brand-logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.guest-foot { font-size: 12px; color: var(--faint); text-align: center; padding: 6px 12px 10px; }
.guest-foot a { color: var(--muted); text-decoration: underline; }
.ad-banner { display: flex; align-items: center; gap: 10px; margin: 0 16px; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; color: var(--text-2); }
.ad-banner a { margin-left: auto; font-weight: 600; color: #a99fff; white-space: nowrap; }

/* widget frame */
.wf { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.wf-head { display: flex; align-items: center; gap: 11px; padding: 14px 14px 14px 16px; background: var(--brand); color: #fff; flex: none; }
.wf-head .avatar { background: rgba(255,255,255,.2); }
.wf-head b { display: block; font-size: 14.5px; line-height: 1.2; }
.wf-head small { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.wf-head small i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.wf-head .grow { flex: 1; min-width: 0; }
.wf-head button { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.wf-start { padding: 18px; overflow-y: auto; flex: 1; }
.wf-greet { padding: 12px 14px; border-radius: 16px 16px 16px 5px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; margin-bottom: 18px; white-space: pre-wrap; }
.wf .thread { padding: 14px; }
.wf .msg { max-width: 88%; }
.wf .composer { padding: 8px 10px 10px; }
.wf .guest-foot { padding: 0 0 8px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .demo { max-width: 720px; margin: 0 auto; width: 100%; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .feat, .feat.wide { grid-column: span 1; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .wconf { grid-template-columns: 1fr; }
  .wpreview { position: static; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-main { height: calc(100dvh - 66px); border-right: 0; }
  .chat-aside { border-top: 1px solid var(--line); }
  .topups { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions .hide-m { display: none; }
  .menu-btn { display: grid; }
  .steps, .pricing, .plans { grid-template-columns: 1fr; }
  .howto-detail, .sec-grid, .grid-2e { grid-template-columns: 1fr; }
  .howto-detail > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 80; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .3s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .side-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); display: none; }
  .side-backdrop.open { display: block; }
  .side-toggle { display: grid; }
  .topbar { padding: 0 16px; }
  .page { padding: 20px 16px; }
  .section { padding: 80px 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 20px; }
  .hero .lead { font-size: 16.5px; }
  .demo-stage { grid-template-columns: 1fr; }
  .beam { height: 46px; }
  .beam-line { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, transparent, var(--line-2), transparent); }
  .beam-dot, .beam-label { display: none; }
  .phone { height: 300px; }
  .phone-b { transform: none; }
  .demo-caption { margin-top: 20px; }
  .bento, .cases { grid-template-columns: 1fr; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-val { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta { padding: 54px 20px; }
  .browser-page { height: 400px; padding: 18px; }
  .w-panel { right: 12px; left: 12px; width: auto; }
  .fake-cards { grid-template-columns: 1fr 1fr; }
  .topups { grid-template-columns: repeat(2, 1fr); }
  .msg { max-width: 90%; }
  .thread { padding: 16px 12px 8px; }
  .composer { padding: 8px 10px 12px; }
  .table th, .table td { padding: 12px 14px; }
  .card-head, .card-body, .card-pad { padding: 16px; }
  .list-item { padding: 12px 16px; }
  .wpreview-stage iframe { width: calc(100% - 40px); }
  .topbar .crumb { display: none; }
  .otp { gap: 6px; }
  .otp input { height: 52px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.footer-about { max-width: 320px; }
.auth-foot { display: flex; align-items: center; gap: 8px; color: #8a92a8; font-size: 12.5px; }
.auth-foot .ic { width: 14px; height: 14px; }
.fake-line.w60 { width: 60%; } .fake-line.w45 { width: 45%; }
.wave i.w0 { height: 30%; } .wave i.w1 { height: 70%; animation-delay: .1s; } .wave i.w2 { height: 100%; animation-delay: .2s; } .wave i.w3 { height: 55%; animation-delay: .3s; } .wave i.w4 { height: 85%; animation-delay: .4s; } .wave i.w5 { height: 40%; animation-delay: .5s; } .wave i.w6 { height: 65%; animation-delay: .6s; }
.cta h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -.035em; font-weight: 650; margin: 22px 0 16px; }
.cta h2 .serif { font-size: 1.08em; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 20px; font-size: 13.5px; flex-wrap: wrap; }
.auth-box .feat-ic { margin-bottom: 18px; }
form.auth-alt { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* width utilities (meters) */
.meter i.w-0 { width: 0%; } .meter i.w-5 { width: 5%; } .meter i.w-10 { width: 10%; } .meter i.w-15 { width: 15%; } .meter i.w-20 { width: 20%; } .meter i.w-25 { width: 25%; } .meter i.w-30 { width: 30%; } .meter i.w-35 { width: 35%; } .meter i.w-40 { width: 40%; } .meter i.w-45 { width: 45%; } .meter i.w-50 { width: 50%; } .meter i.w-55 { width: 55%; } .meter i.w-60 { width: 60%; } .meter i.w-65 { width: 65%; } .meter i.w-70 { width: 70%; } .meter i.w-75 { width: 75%; } .meter i.w-80 { width: 80%; } .meter i.w-85 { width: 85%; } .meter i.w-90 { width: 90%; } .meter i.w-95 { width: 95%; } .meter i.w-100 { width: 100%; } 
@media (max-width: 640px) { .hide-xs { display: none; } }

/* width utilities (meters, bars) — avoids inline styles */
.meter i.w-0 { width: 0; } .meter i.w-5 { width: 5%; } .meter i.w-10 { width: 10%; } .meter i.w-15 { width: 15%; } .meter i.w-20 { width: 20%; } .meter i.w-25 { width: 25%; } .meter i.w-30 { width: 30%; } .meter i.w-35 { width: 35%; } .meter i.w-40 { width: 40%; } .meter i.w-45 { width: 45%; } .meter i.w-50 { width: 50%; } .meter i.w-55 { width: 55%; } .meter i.w-60 { width: 60%; } .meter i.w-65 { width: 65%; } .meter i.w-70 { width: 70%; } .meter i.w-75 { width: 75%; } .meter i.w-80 { width: 80%; } .meter i.w-85 { width: 85%; } .meter i.w-90 { width: 90%; } .meter i.w-95 { width: 95%; } .meter i.w-100 { width: 100%; }
.side-plan { display: block; color: inherit; }
.topbar-title { min-width: 0; }
.topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .hide-xs { display: none; } }
.chart-svg { width: 100%; height: 190px; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-bar { transition: opacity .15s; }
.chart-bar:hover { opacity: .75; }
.chart-bar.zero { fill: var(--surface-3); }
.plan-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.plan-extra { margin-top: 10px; }
.cell-chat { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-chat b { display: block; font-weight: 550; }
.cell-chat small { color: var(--muted); font-size: 12.5px; }
.share-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.action-list { display: grid; gap: 8px; }
.ok-text { color: var(--ok); display: inline-flex; align-items: center; gap: 5px; }
.ok-text .ic { width: 14px; height: 14px; }
.modal-sm { max-width: 380px; }
.center { text-align: center; }
.center .qr { margin: 0 auto 14px; }
.qr-lg svg { width: 220px; height: 220px; }
@media print { body * { visibility: hidden; } #m-qr .qr, #m-qr .qr * { visibility: visible; } #m-qr .qr { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); } }
.brand-name { font-size: 16px; letter-spacing: -.01em; }
.join .feat-ic { margin-bottom: 4px; }
.join-legal { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 16px 0 0; }
.join-legal .ic { width: 14px; height: 14px; }
.guest-foot .ic { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }
.wf-body { background: var(--surface); }
.wf-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wf-btn { background: var(--brand); color: #fff; }
.wf-btn:hover { filter: brightness(1.08); }
.wf-lang { max-width: 112px; background-color: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
.wf-lang option { color: #111; }
.usage-meter { margin-bottom: 20px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.meter-lg { height: 10px; }
.usage-alert { margin: 16px 0 0; }
.billing-top { margin-bottom: 28px; }
.billing-note { margin: 16px 0 0; }
.billing-sub { margin: 0 0 16px; font-size: 14px; }
.billing-buy { margin-top: 14px; }
.section-title { font-size: 18px; margin: 0 0 14px; letter-spacing: -.02em; }
.invoices { margin-top: 28px; }
.hint.center { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; }
.hint .ic { width: 14px; height: 14px; }
.card-head h2 .ic { display: inline-block; vertical-align: -3px; margin-right: 6px; color: var(--accent-2); }
.card-head-sep { border-top: 1px solid var(--line); }
.color-row { display: flex; gap: 8px; }
.color-row .input.mono { width: 110px; }
.code-area { width: 100%; resize: none; display: block; white-space: pre-wrap; }
.steps-ol { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
fieldset.plain { border: 0; margin: 0; min-width: 0; }
fieldset.plain[disabled] { opacity: .65; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.toggle-row:last-of-type { margin-bottom: 16px; }
.toggle-row b { display: block; font-size: 14px; font-weight: 550; }
.toggle-row small { color: var(--muted); font-size: 12.5px; }
.logo-upload { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.logo-upload .grow { flex: 1; display: grid; gap: 6px; min-width: 0; }
.logo-prev { width: 120px; height: 64px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--faint); }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-head .badge .ic { width: 13px; height: 13px; }
.avatar .ic { width: 14px; height: 14px; }
.list-item form { display: contents; }

.guest-top .lang-select-sm { max-width: 150px; min-width: 0; }
.guest-top .logo span:last-child { white-space: nowrap; }
@media (max-width: 400px) { .guest-top { gap: 8px; padding: 0 12px; } .guest-top .logo span:last-child { display: none; } }
.wf-start { min-height: 0; }
.wf > .guest-foot { flex: none; }
.input[type="file"] { height: auto; padding: 8px; }
@media (min-width: 901px) { .app { background: linear-gradient(90deg, var(--bg-2) 252px, transparent 252px); } }
/* grid children may shrink below their content width (prevents horizontal scroll on phones) */
.showcase > *, .hero-grid > *, .grid-2 > *, .grid-2e > *, .wconf > *, .sec-grid > *, .howto-detail > * { min-width: 0; }
html, body { overflow-x: clip; }
.msg-alt .lbl { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-right: 6px; }
.bot-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: #a99fff; font-weight: 600; }
[data-theme="light"] .bot-tag { color: var(--accent); }
.msg.r-bot:not(.mine) .avatar { background: linear-gradient(135deg, #7c6cff, #c06bff); }
.ai-note { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; color: var(--faint); padding: 0 6px 6px; line-height: 1.4; }
.ai-note .ic { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.consent { z-index: 150; }
.consent .modal-box { max-width: 560px; }
.consent-title { font-size: 22px; letter-spacing: -.02em; margin: 14px 0 6px; }
.consent-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.consent-list li { display: flex; gap: 12px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.consent-list .ic { color: var(--accent-2); margin-top: 2px; }
.consent-list b { color: var(--text); }
.consent-check { margin: 4px 0 18px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- language dropdown (all screen sizes) ---------- */
.lang-dd { position: relative; }
.lang-dd > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); user-select: none; }
.lang-dd > summary::-webkit-details-marker { display: none; }
.lang-dd > summary:hover { color: var(--text); }
.lang-dd .flag { font-size: 15px; line-height: 1; }
.lang-dd .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.lang-dd[open] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 90; width: 210px; max-height: min(420px, 70vh); overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: popIn .18s; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--text-2); }
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.on { color: var(--text); font-weight: 600; }
.lang-menu .tick { width: 15px; height: 15px; margin-left: auto; color: var(--accent); }

/* ---------- mobile drawer (hidden on desktop) ---------- */
.drawer, .drawer-backdrop { display: none; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
@media (max-width: 900px) {
  .nav-in { gap: 12px; }
  .nav-actions { margin-left: auto; gap: 6px; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 120; background: rgba(3,4,8,.55); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
  .drawer { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 130; width: min(340px, 88vw); background: var(--bg-2); border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px -20px rgba(0,0,0,.6); transform: translateX(104%); transition: transform .38s cubic-bezier(.2,.8,.2,1); padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
  .drawer.open { transform: none; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .drawer-links { display: grid; gap: 4px; padding: 16px 0; }
  .drawer-links a { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 12px; font-size: 16px; font-weight: 550; color: var(--text); opacity: 0; transform: translateX(16px); transition: background .2s, opacity .35s, transform .35s; }
  .drawer.open .drawer-links a { opacity: 1; transform: none; }
  .drawer.open .drawer-links a:nth-child(2) { transition-delay: .03s; } .drawer.open .drawer-links a:nth-child(3) { transition-delay: .06s; }
  .drawer.open .drawer-links a:nth-child(4) { transition-delay: .09s; } .drawer.open .drawer-links a:nth-child(5) { transition-delay: .12s; } .drawer.open .drawer-links a:nth-child(6) { transition-delay: .15s; }
  .drawer-links a:hover, .drawer-links a:active { background: var(--surface-2); }
  .drawer-links a > .ic:first-child { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); }
  .drawer-links a span { flex: 1; }
  .drawer-links .chev { color: var(--faint); width: 16px; height: 16px; }
  .drawer-foot { margin-top: auto; display: grid; gap: 10px; }
  .drawer-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--faint); margin: 6px 0 0; }
  .drawer-note .ic { width: 13px; height: 13px; }

  /* dashboard: menu button on the right, sidebar slides in from the right */
  .topbar .side-toggle { order: 10; }
  .side { left: auto; right: 0; transform: translateX(104%); border-right: 0; border-left: 1px solid var(--line-2); transition: transform .38s cubic-bezier(.2,.8,.2,1); }
  .side.open { transform: none; }
  .side-backdrop.open { display: block; }
}
@media (max-width: 400px) {
  .lang-dd > summary { padding: 0 8px; }
  .lang-dd .dd-code { display: none; }
  .nav-in .logo > span:last-child { font-size: 16px; }
}
.avatar.bot { background: linear-gradient(135deg, #7c6cff, #c06bff); }
/* AI assistant + leads */
.assistant-grid { grid-template-columns: 1fr 400px; }
.scan-row { display: flex; gap: 8px; margin-bottom: 6px; }
.scan-row .input { flex: 1; min-width: 0; }
.draft-note { margin: 14px 0 0; }
.profile-field { margin: 16px 0 0; }
.profile-text { min-height: 300px; font-size: 14px; line-height: 1.55; }
.profile-text.is-draft { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13.5px; cursor: pointer; color: var(--text-2); transition: .15s; }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip input:checked + span::before { content: "✓"; margin-right: 6px; color: var(--accent); font-weight: 700; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-hint { display: flex; gap: 6px; align-items: flex-start; margin: 16px 0 0; }
.ai-hint .ic { flex: none; margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { gap: 4px; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; color: var(--muted); }
.tab span { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.lead-item { align-items: flex-start; }
.lead-item .avatar { margin-top: 2px; }
.lead-item small { display: block; }
.lead-sum { margin-top: 4px; color: var(--text-2) !important; }
.lead-meta { display: grid; justify-items: end; gap: 6px; flex: none; }
.lead-meta small { color: var(--faint); font-size: 12px; }
.lead-summary { font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.url-cell { word-break: break-all; font-weight: 450; font-size: 13px; }
.seg-block { display: flex; width: 100%; margin-bottom: 16px; }
.seg-block label { flex: 1; }
.seg-block span { width: 100%; justify-content: center; }
.lead-flags div:first-child { border-top: 0; }
@media (max-width: 1100px) { .assistant-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .scan-row { flex-direction: column; } .lead-meta { display: none; } }

/* ---------- mobile chat polish (phones only; desktop unchanged) ---------- */
@media (max-width: 900px) {
  .guest-chat { height: calc(var(--vvh, 100dvh) - 62px); }
  .chat-main { height: calc(var(--vvh, 100dvh) - 66px); }
  .wf { height: var(--vvh, 100dvh); }
}
@media (max-width: 640px) {
  /* 16px stops iOS from zooming into the page when a field is focused */
  .composer textarea, .input, .select, .textarea, .otp input { font-size: 16px; }
  .composer textarea { max-height: 96px; padding: 8px 0; }
  .composer-box { min-width: 0; }
  .composer textarea { min-width: 0; width: 100%; }
  .composer { padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
  .composer-note { display: none; }
  .ai-note { font-size: 10.5px; padding: 0 10px 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .ai-note .ic { width: 11px; height: 11px; }
  .ad-banner { margin: 0 8px 6px; padding: 6px 10px; font-size: 11.5px; }
  .ad-banner > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ad-banner .ic { width: 14px; height: 14px; flex: none; }
  .guest-foot { padding: 2px 10px 6px; font-size: 11px; }
  .guest-top { height: 56px; }
  .guest-chat { height: calc(var(--vvh, 100dvh) - 56px); }
  .typing-row { padding: 0 12px 2px; min-height: 18px; }
  .bubble { font-size: 15px; }
  .msg-alt { font-size: 12px; }
  .guest-top .lang-select-sm { max-width: 128px; font-size: 14px; }
}
/* consent wizard */
.wizard { padding: 0; }
.wizard-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.wizard-dots { display: flex; gap: 6px; }
.wizard-dots i { width: 22px; height: 5px; border-radius: 99px; background: var(--surface-3); transition: background .3s; }
.wizard-dots i.on { background: var(--grad); }
.wizard-count { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.wizard-step { display: none; padding: 24px 24px 6px; animation: fadeIn .25s; }
.wizard-step.on { display: block; }
.wizard-step h3 { font-size: 21px; letter-spacing: -.02em; margin: 6px 0 8px; }
.wizard-step .muted { margin: 0 0 18px; line-height: 1.55; }
.wizard-ic { margin-bottom: 14px; }
.wizard-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin: 0; }
.wizard .consent-check { margin: 0 0 10px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; padding: 12px 24px 22px; }
.wizard-nav [data-next] { margin-left: auto; }
.wizard-nav [hidden] { display: none; }
@media (max-width: 640px) { .wizard-step { padding: 20px 18px 4px; } .wizard-nav { padding: 10px 18px 18px; } .wizard-top { padding: 12px 16px; } .consent { align-items: end; padding: 0; } .consent .modal-box { border-radius: 20px 20px 0 0; max-height: 92vh; } }
.legal-text { min-height: 260px; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.legal-count { font-size: 22px; letter-spacing: -.02em; }
.legal-version { align-items: end; }
.hint .ic { display: inline-block; vertical-align: -2px; }
.legal-body h2 { font-size: 20px; } .legal-body ul { padding-left: 20px; } .legal-stand { color: var(--muted); font-size: 14px; margin: -14px 0 24px; }

/* ---------- page loader (slow form actions) ---------- */
.page-loader{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:16px;background:color-mix(in srgb,var(--bg) 72%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;transition:opacity .2s}
.page-loader.on{opacity:1}
.pl-box{width:min(380px,100%);display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:28px 24px;border-radius:20px;background:var(--surface);border:1px solid var(--line);box-shadow:0 30px 80px -20px rgba(0,0,0,.45)}
.pl-spin{position:relative;width:56px;height:56px;margin-bottom:6px}
.pl-spin i{position:absolute;inset:0;border-radius:50%;border:3px solid transparent;border-top-color:var(--accent);animation:pl-rot 1s linear infinite}
.pl-spin i+i{inset:9px;border-top-color:var(--accent-2);animation-duration:1.5s;animation-direction:reverse}
.pl-title{font-size:1.05rem}
.pl-step{color:var(--muted);min-height:1.4em;font-size:.92rem}
.pl-bar{width:100%;height:6px;border-radius:99px;background:var(--line);overflow:hidden;margin-top:4px}
.pl-bar i{display:block;height:100%;width:0;border-radius:inherit;background:var(--grad);transition:width .25s linear}
.pl-time{color:var(--muted);font-variant-numeric:tabular-nums}
@keyframes pl-rot{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.pl-spin i{animation-duration:3s}}

/* ---------- widget: own icon / header logo ---------- */
.upload-row{display:flex;align-items:flex-start;gap:14px}
.upload-row .grow{min-width:0;display:flex;flex-direction:column;gap:6px}
.upload-row input[type=file]{padding:8px;font-size:13px}
.upload-thumb{flex:none;width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:var(--wcolor,var(--accent));color:#fff;overflow:hidden}
.upload-thumb img{width:34px;height:34px;object-fit:contain}
.upload-thumb .ic{width:26px;height:26px}
.upload-thumb-round{border-radius:50%;background:var(--surface-3);color:var(--muted)}
.upload-thumb-round img{width:100%;height:100%;object-fit:cover}
.avatar-opt{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.avatar-opt[hidden]{display:none}
.wbtn .wbtn-img{width:28px;height:28px;object-fit:contain;border-radius:6px}
.wf-head .avatar.avatar-logo{background:#fff;padding:0;overflow:hidden}
.wf-head .avatar.avatar-logo img{width:100%;height:100%;object-fit:cover;display:block}

/* ---------- billing period toggle ---------- */
.bill-toggle-wrap { display: flex; flex-direction: column; gap: 16px; }
.bill-toggle { align-self: center; }
.bill-toggle span { display: inline-flex; align-items: center; gap: 6px; }
.save-pill { font-style: normal; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.iv-month .show-year, .iv-year .show-month { display: none !important; }
.price .amount-sub { color: var(--muted); font-size: 13px; margin-top: 8px; min-height: 1.4em; }
.save-txt { color: var(--ok); font-weight: 600; }
.renew-check { max-width: 760px; margin: 0 auto; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 13.5px; }
.renew-check.need { border-color: var(--bad); }
.renew-check.shake { animation: rc-shake .35s; }
@keyframes rc-shake { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.admin-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-plans .card-pad { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .admin-plans { grid-template-columns: 1fr; } }

/* ---------- WhatsApp share ---------- */
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb957; border-color: #1fb957; color: #fff; }
.btn-wa .ic { width: 17px; height: 17px; }
.btn-lg.btn-wa .ic { width: 20px; height: 20px; }
.created-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.chat-head .show-m { display: none; }
@media (max-width: 1100px) { .chat-head .show-m { display: inline-grid; } }

/* ---------- RTL (Arabic) — only affects dir="rtl" pages ---------- */
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
@media (min-width: 901px) { [dir="rtl"] .app { background: linear-gradient(270deg, var(--bg-2) 252px, transparent 252px); } }
[dir="rtl"] .ic-dir { transform: scaleX(-1); }

/* ---------- 2026-11 guest chat: files, welcome, account invitation (mobile first) ---------- */
.composer textarea { min-height: 42px; padding: 10px 0; line-height: 1.4; max-height: 120px; overflow-y: hidden; }
.composer-box { padding: 5px 5px 5px 6px; align-items: flex-end; }
.composer .attach { color: var(--muted); flex: none; }
.composer .attach:hover { color: var(--text); }
.composer .mic, .composer .send { flex: none; }
@media (min-width: 641px) {
  .composer textarea { min-height: 48px; padding: 13px 0; font-size: 15px; max-height: 180px; }
  .composer .btn-icon { height: 42px; width: 42px; }
}

/* file messages */
.file-card { display: flex; align-items: center; gap: 10px; width: min(300px, 72vw); padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; position: relative; overflow: hidden; }
.file-card:hover { border-color: var(--accent); }
.msg.mine .file-card { border-bottom-right-radius: 6px; }
.msg:not(.mine) .file-card { border-bottom-left-radius: 6px; }
.file-ic { flex: none; width: 40px; height: 46px; border-radius: 8px; display: grid; place-items: center; font: 700 10.5px/1 var(--mono); color: #fff; background: #64748b; letter-spacing: .02em; }
.file-ic.pdf { background: #e5484d; }
.file-ic.png, .file-ic.jpg { background: #3b82f6; }
.file-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.file-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info small { font-size: 12px; color: var(--muted); }
.file-dl { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.file-dl .ic { width: 17px; height: 17px; }
.file-warn { font-size: 11.5px; line-height: 1.35; color: var(--warn); margin-top: 5px; padding: 0 4px; max-width: min(300px, 72vw); }
.file-card.uploading { opacity: .85; }
.file-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.file-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* personal welcome for the guest who just joined */
.sys-welcome { align-self: stretch; margin: 12px 4px 6px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); text-align: left; }
.sys-welcome b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.sys-welcome p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
[dir="rtl"] .sys-welcome { text-align: right; }
@media (min-width: 641px) { .sys-welcome { align-self: center; max-width: 560px; text-align: center; } [dir="rtl"] .sys-welcome { text-align: center; } }

/* invitation to create a free account */
.signup-card { display: flex; align-items: center; gap: 10px; margin: 0 8px 8px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.signup-card.on { opacity: 1; transform: none; }
.signup-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.signup-ic .ic { width: 18px; height: 18px; }
.signup-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.signup-txt b { font-size: 13.5px; }
.signup-txt span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.signup-card .btn { flex: none; white-space: nowrap; }
.signup-x { flex: none; border: 0; background: none; color: var(--faint); padding: 4px; cursor: pointer; border-radius: 8px; }
.signup-x .ic { width: 16px; height: 16px; }
@media (max-width: 420px) {
  .signup-card { flex-wrap: wrap; }
  .signup-txt { flex-basis: calc(100% - 80px); }
  .signup-card .btn { flex: 1; order: 3; }
}
@media (min-width: 641px) { .signup-card { margin: 0 16px 10px; } }

/* join form: language hint, smooth switch */
.join .field .hint { display: block; margin-top: 6px; font-size: 12px; }
body.ui-switching .join .card { opacity: .5; pointer-events: none; transition: opacity .2s; }
/* the chat column must never grow wider than the screen (textarea default width + 3 buttons) */
.guest-chat, .chat-main, .wf { min-width: 0; }
.composer-box { min-width: 0; }
.composer textarea { flex: 1 1 0; width: 0; min-width: 0; }
[data-theme="light"] .file-warn { color: #b45309; }
@media (max-width: 640px) { .ai-note { line-height: 1.35; max-height: calc(1.35em + 4px); } }

/* ---------- privacy: guest consent (link, QR, widget, re-confirmation) ---------- */
.consent-box { display: grid; gap: 10px; margin: 4px 0 16px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: start; }
.consent-box .consent-note, .join .consent-box .consent-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.consent-note .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-2); }
.consent-line { font-size: 13.5px; line-height: 1.45; padding: 8px 0 0; border-top: 1px solid var(--line); }
.consent-line input { width: 20px; height: 20px; margin-top: 0; }
.consent-line .link { text-decoration: underline; }
[data-consent-submit]:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.reconsent h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.reconsent .muted { margin: 0 0 14px; font-size: 14px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- privacy & cookie banner ---------- */
.cookie-banner { position: fixed; z-index: 140; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); max-height: calc(100dvh - 16px); overflow: auto; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.cookie-banner.on { opacity: 1; transform: none; }
.cookie-banner[hidden], .cookie-banner [hidden] { display: none !important; }
.cb-text b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.cb-text b .ic { width: 18px; height: 18px; color: var(--accent-2); }
.cb-text p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.cb-details { margin-top: 10px; display: grid; gap: 10px; }
.cb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cb-table th, .cb-table td { text-align: start; padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.cb-table th { color: var(--muted); font-weight: 600; }
.cb-table td.mono { word-break: break-all; font-size: 11.5px; }
.cb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cb-actions .link { font-size: 13px; margin-inline-end: auto; text-decoration: underline; }
.cb-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
@media (min-width: 720px) {
  .cookie-banner { left: auto; right: 20px; bottom: 20px; width: 460px; }
  .cb-actions .btn { flex: 0 0 auto; }
}
@media (max-width: 480px) { .cb-table th:nth-child(3), .cb-table td:nth-child(3) { display: none; } }

/* ---------- settings: delete account ---------- */
.danger-card { border-color: rgba(248,113,113,.25); }
.danger-card .card-head h2 .ic { color: var(--bad); }
.danger-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.danger-details > summary { list-style: none; display: inline-flex; cursor: pointer; }
.danger-details > summary::-webkit-details-marker { display: none; }
.danger-details[open] > summary { opacity: .6; margin-bottom: 12px; }
.danger-form { padding: 14px; border-radius: 12px; border: 1px solid rgba(248,113,113,.25); background: var(--bad-soft); }
.del-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.del-opt input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--bad); }
.del-opt span { display: grid; gap: 4px; font-size: 14px; }
.del-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.del-opt:has(input:checked) { border-color: var(--bad); }
.inline-form { display: inline-block; margin-top: 8px; }
@media (max-width: 640px) { .danger-details > summary { display: flex; justify-content: center; } }

/* ---------- goodbye page ---------- */
.narrow { max-width: 560px; }
.goodbye { padding-top: 40px; padding-bottom: 40px; }
.goodbye .feat-ic { margin: 0 auto 18px; color: var(--ok); }
.goodbye h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -.03em; margin: 0 0 10px; }
.goodbye p { margin: 0 0 24px; }

/* ---------- dashboard: my QR code ---------- */
.qr-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.qr-card-preview { width: 100%; max-width: 340px; margin: 0 auto 16px; aspect-ratio: 600 / 780; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.qr-card-preview svg { display: block; width: 100%; height: 100%; }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.qr-actions .btn { flex: 1 1 0; min-width: 0; justify-content: center; }
.qr-link { max-width: 420px; margin: 0 auto; }
.qr-link .input { min-width: 0; }
.qr-regen { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.qr-regen p { margin: 4px 0 0; }
.steps-ol { margin: 0 0 12px; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
@media (min-width: 960px) {
  .qr-grid { grid-template-columns: minmax(320px, 420px) 1fr; }
  .qr-actions .btn { flex: 0 0 auto; }
}
.toast-link { color: var(--text); text-decoration: none; max-width: calc(100vw - 32px); cursor: pointer; }
.toast-link .ic { color: var(--accent-2); flex: none; }
.toast-link:hover { border-color: var(--accent); }
/* legal pages: long German headings ("Datenschutzerklärung") must fit on phones */
@media (max-width: 480px) { .prose { padding: 40px 18px; } .prose h1 { font-size: 28px; hyphens: auto; overflow-wrap: break-word; } .prose h2 { overflow-wrap: break-word; } }
