:root {
--bg: #F2F3F5;
--card: #FFFFFF;
--ink: #0E0F12;
--muted: #4B4F5A;
--soft: #5C606B;
--line: #D5D7DD;
--line-soft: #E2E4E9;
--accent: #4A2FE0;
--accent-ink: #FFFFFF;
--accent-soft: #F4F1FF;
--ok: #0B6B4F;
--bad: #B42318;
--head: 'Space Grotesk', system-ui, sans-serif;
--body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: #3420B0; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
p { margin: 0; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* nav */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0; }
.logo { font-family: var(--head); font-weight: 700; font-size: 26px; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #3A22C4; color: var(--accent-ink); }
.btn-white { background: var(--card); color: var(--ink); }
.btn-white:hover { color: var(--ink); background: #FAFAFB; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { color: var(--ink); background: rgba(14,15,18,0.04); }
.btn-dark { background: var(--ink); color: #FFF; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
/* home */
.hero { padding: 80px 0 96px; display: flex; flex-direction: column; gap: 32px; }
.hero h1 { font-family: var(--head); font-weight: 700; font-size: clamp(48px, 9vw, 92px); line-height: .95; letter-spacing: -0.035em; max-width: 1000px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.lead { font-size: 20px; color: var(--muted); max-width: 560px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.section { padding: 72px 0; border-top: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 40px; }
.section h2 { font-family: var(--head); font-size: clamp(34px, 5vw, 44px); letter-spacing: -0.02em; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: stretch; }
.card { background: var(--card); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.step-num { font-family: var(--head); font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; }
.card h3 { font-size: 19px; }
.card p { color: var(--muted); }
.price-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.plan { background: var(--card); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.plan.dark { background: var(--ink); color: #FFF; }
.plan.dark .plan-sub, .plan.dark .plan-price-note { color: #B9BCC6; }
.plan h3 { font-size: 20px; }
.plan-sub { color: var(--muted); margin-top: 6px; }
.plan-price { font-family: var(--head); font-size: 52px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.plan-price-note { color: var(--muted); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan li::before { content: "✓ "; }
.plan .btn { margin-top: auto; }
.badge { background: var(--accent); color: #FFF; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.note { color: var(--muted); font-size: 15px; }
.cta { background: var(--accent); color: #FFF; border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.cta h2 { font-family: var(--head); font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; }
.cta p { color: #ECE8FF; font-size: 18px; margin-top: 10px; }
.footer { border-top: 1.5px solid var(--ink); padding: 28px 0 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }
/* sign in */
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.split-brand { flex: 1 1 480px; background: var(--accent); color: #FFF; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 360px; }
.split-brand .logo { color: #FFF; }
.split-brand h1 { font-family: var(--head); font-size: clamp(40px, 6vw, 56px); line-height: 1; letter-spacing: -0.03em; }
.split-brand p { color: #ECE8FF; font-size: 18px; }
.split-main { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 24px; padding: 40px; display: flex; flex-direction: column; gap: 24px; }
.signin-card h2 { font-family: var(--head); font-size: 30px; letter-spacing: -0.02em; }
.fine { color: var(--soft); font-size: 14px; }
.error { color: var(--bad); font-size: 14px; font-weight: 600; }
.ok { color: var(--ok); font-size: 14px; font-weight: 600; }
/* portal */
.topbar { background: var(--card); border-bottom: 1px solid var(--line-soft); }
.topbar .wrap { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #FFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.portal { padding: 32px 24px 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.side { flex: 1 1 340px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { background: var(--card); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-size: 18px; }
.eyebrow { font-size: 13px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .legend { font-weight: 600; font-size: 14px; }
.input, .textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); font-size: 15px; }
.textarea { resize: vertical; min-height: 96px; }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; min-width: 0; }
.plan-pick { display: flex; flex-direction: column; gap: 8px; }
.plan-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #FFF; cursor: pointer; text-align: left; }
.plan-opt[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.plan-opt small { display: block; color: var(--muted); font-size: 13px; }
.plan-opt span:last-child { font-weight: 600; white-space: nowrap; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--soft); }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #C9CCD3; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--ink); border-color: var(--ink); color: #FFF; }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now .dot { background: var(--accent); border-color: var(--accent); color: #FFF; font-weight: 700; }
/* chat */
.chat { flex: 999 1 520px; min-width: 0; background: var(--card); border-radius: 20px; display: flex; flex-direction: column; height: min(78vh, 760px); min-height: 520px; }
.chat-head { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 14px; }
.chat-head .avatar { background: var(--accent); font-family: var(--head); font-weight: 700; }
.chat-head h2 { font-size: 17px; }
.chat-head p { font-size: 13px; color: var(--ok); }
.chat-log { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 12px 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.bubble.them { align-self: flex-start; background: var(--bg); border-radius: 18px 18px 18px 6px; }
.bubble.me { align-self: flex-end; background: var(--ink); color: #FFF; border-radius: 18px 18px 6px 18px; }
.chat-form { padding: 16px 24px 24px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: flex-end; }
.chat-form .textarea { flex: 1; min-width: 0; min-height: 48px; resize: none; }
.empty { color: var(--soft); text-align: center; margin: auto; }
/* admin */
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-item { text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #FFF; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.admin-item[aria-current="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.admin-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.tag.waiting { background: #FFF1E6; color: #9A3412; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
/* plain pages */
.prose { max-width: 720px; padding: 24px 0 72px; display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-family: var(--head); font-size: 44px; letter-spacing: -0.02em; }
.prose h2 { font-size: 22px; margin-top: 16px; }
@media (max-width: 600px) {
.cta, .plan, .signin-card, .split-brand { padding: 28px; }
.bubble { max-width: 90%; }
}
/* ---------- settings ---------- */
.settings-wrap { padding: 32px 24px 120px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.settings-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.settings-nav a { padding: 10px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 500; }
.settings-nav a:hover { background: var(--card); color: var(--ink); }
.settings-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.settings-main h1 { font-family: var(--head); font-size: 36px; letter-spacing: -0.02em; }
.settings-section { scroll-margin-top: 16px; }
.settings-section > p { color: var(--muted); font-size: 14px; margin-top: -8px; }
.fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.hint { color: var(--soft); font-size: 13px; }
select.input { appearance: auto; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.toggle-row:first-of-type { border-top: none; }
.toggle-row label { font-weight: 600; font-size: 15px; cursor: pointer; }
.toggle-row small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #C9CCD3; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFF; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--field); }
.seg input { accent-color: var(--accent); }
.seg label:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }
.save-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line-soft); padding: 14px 24px; display: flex; justify-content: flex-end; align-items: center; gap: 16px; z-index: 10; }
.danger { border: 1.5px solid #F4C7C3; }
.btn-danger { background: var(--bad); color: #FFF; }
.btn-danger:hover { background: #8F1C13; color: #FFF; }
.account-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.account-row:first-of-type { border-top: none; }
.account-row p { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .settings-nav { max-width: none; flex-direction: row; flex-wrap: wrap; } }
/* ---------- user preferences: text size and dark theme ---------- */
:root { --field: #FFFFFF; }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="large"] body { font-size: 18px; }
html[data-theme="dark"] {
--bg: #0E0F12; --card: #17191F; --ink: #F2F3F5; --muted: #B4B8C2; --soft: #9CA0AB;
--line: #343844; --line-soft: #262A33; --accent: #8B78FF; --accent-ink: #0E0F12; --accent-soft: #221D3D;
--ok: #4ADE9F; --bad: #FF8A80; --field: #1F222A;
color-scheme: dark;
}
html[data-theme="dark"] a { color: var(--accent); }
html[data-theme="dark"] .input, html[data-theme="dark"] .textarea, html[data-theme="dark"] .plan-opt,
html[data-theme="dark"] .admin-item { background: var(--field); color: var(--ink); }
html[data-theme="dark"] .btn-accent { color: #0E0F12; }
html[data-theme="dark"] .btn-dark { background: #F2F3F5; color: #0E0F12; }
html[data-theme="dark"] .btn-outline { border-color: var(--ink); color: var(--ink); }
html[data-theme="dark"] .bubble.me { background: var(--accent); color: #0E0F12; }
html[data-theme="dark"] .steps li.done .dot { background: var(--ink); border-color: var(--ink); color: #0E0F12; }
html[data-theme="dark"] .avatar { background: #F2F3F5; color: #0E0F12; }
html[data-theme="dark"] .chat-head .avatar { background: var(--accent); }
html[data-theme="dark"] .tag { background: #262A33; color: var(--muted); }
html[data-theme="dark"] .danger { border-color: #5C2B28; }
html[data-theme="dark"] .btn-danger { background: #C62828; color: #FFF; }
html[data-theme="dark"] .btn-accent:hover { background: #A595FF; color: #0E0F12; }
html[data-theme="dark"] .btn-white { background: #262A33; color: var(--ink); }
/* ---------- Nitely Assistant ---------- */
.ai-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: #FFF; font-family: var(--body); }
.chat-head .avatar { font-size: 14px; }
.presence { font-size: 13px; }
.presence.on { color: var(--ok); }
.presence.away, .presence.off { color: var(--muted); }
.bubble .who { display: block; font-size: 12px; font-weight: 600; color: var(--soft); margin-bottom: 4px; }
.bubble.ai { background: var(--accent-soft); }
.bubble.eng { background: var(--bg); border: 1.5px solid var(--line); }
.bubble.pending { opacity: .7; }
.bubble.typing span:last-child { font-style: italic; color: var(--muted); }
.domain-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; white-space: normal; }
.domain-list li { display: flex; align-items: baseline; gap: 8px; }
.domain-list small { color: var(--muted); }
.dom-available span:first-child { color: var(--ok); font-weight: 700; }
.dom-taken span:first-child { color: var(--bad); font-weight: 700; }
.suggest { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; white-space: normal; }
.suggest .btn { align-self: flex-start; }
.bubble.ai-admin { background: var(--accent-soft); }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.mode-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag.human { background: #FFE4E1; color: #9F1D12; }
html[data-theme="dark"] .ai-badge { color: #0E0F12; }
html[data-theme="dark"] .tag.human { background: #3B1A17; color: #FFB4AB; }
html[data-theme="dark"] .tag.waiting { background: #3A2A12; color: #FBC57D; }
/* Google sign-in button (full-page flow) */
.google-btn{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;max-width:320px;margin:0 auto;height:44px;padding:0 20px;border:1px solid #dadce0;border-radius:999px;background:#fff;color:#1f1f1f;font:500 15px/1 Inter,system-ui,sans-serif;text-decoration:none;transition:background .15s,box-shadow .15s}
.google-btn:hover{background:#f7f8f8;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.google-btn:focus-visible{outline:2px solid #1a73e8;outline-offset:2px}