/* Shared editorial layout for the public, account, legal and settings pages. */
:root { --paper:#fff; --surface:#fff; --ink:#171717; --muted:#626262; --line:#e7e7e7; --soft:#f7f7f7; --sidebar:240px; }
* { box-sizing:border-box; }
html { scroll-behavior:auto; height:auto; overflow:auto; }
body { margin:0; background:#fff; color:var(--ink); font-family:Manrope,'IBM Plex Sans Arabic',sans-serif; font-size:1rem; line-height:1.65; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-underline-offset:4px; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:2px solid #333; outline-offset:4px; }
button:disabled { cursor:not-allowed; opacity:.45; }
svg { flex-shrink:0; }
.bg-grid,.watermark-number-1,.watermark-number-2,.watermark-dot-array { display:none; }
.nav-brand,.brand-title,.footer-brand,.wordmark { font-family:'Space Grotesk',sans-serif!important; font-size:25px; font-weight:600; letter-spacing:-1.2px; text-decoration:none; color:#171717; }
.page-wrapper { width:min(1120px,calc(100% - 80px)); margin:auto; }
.navbar { display:flex; align-items:center; justify-content:space-between; gap:24px; min-height:96px; border-bottom:1px solid var(--line); }
.nav-actions,.footer-links { display:flex; align-items:center; gap:24px; }
.nav-step,.nav-exit-btn { font-size:.8rem; color:var(--muted); }
.nav-exit-btn { display:inline-flex; align-items:center; gap:8px; text-decoration:none; }
.nav-exit-btn svg { width:16px; height:16px; }
.button,.nav-btn,.google-btn,.primary-chat-btn,.agree-btn { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-height:48px; padding:12px 23px; border:1px solid var(--ink); border-radius:8px; background:var(--ink); color:#fff; text-decoration:none; font-size:.875rem; font-weight:600; cursor:pointer; }
.button:hover,.nav-btn:hover,.primary-chat-btn:hover,.agree-btn:not(:disabled):hover { background:#333; }
.button.secondary { background:#fff; color:var(--ink); border-color:#d8d8d8; }
.button.secondary:hover { background:#f7f7f7; }
.text-link { font-size:.85rem; font-weight:500; text-decoration:none; }
.text-link:hover { text-decoration:underline; }
.eyebrow,.hero-eyebrow { display:block; font-size:.72rem; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); margin-bottom:24px; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { font-weight:500; letter-spacing:-.045em; line-height:1.12; }
.landing-hero { padding:112px 0 96px; display:grid; grid-template-columns:1.1fr 1fr; gap:70px; align-items:center; }
.landing-hero h1 { font-size:clamp(44px,5.6vw,72px); margin-bottom:28px; max-width:650px; }
.landing-hero .lead { color:var(--muted); font-size:1.05rem; max-width:430px; line-height:1.8; margin-bottom:32px; }
.hero-actions { display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
.hero-note { margin:18px 0 0; font-size:.75rem; color:var(--muted); }
.product-preview { margin:0; border:1px solid #dedede; border-radius:14px; background:#fff; overflow:hidden; }
.preview-top { border-bottom:1px solid var(--line); padding:17px 22px; display:flex; justify-content:space-between; align-items:center; }
.preview-top .wordmark { font-size:18px; letter-spacing:-.8px; }
.preview-caption { font-size:.7rem; color:var(--muted); }
.preview-messages { padding:28px 24px; display:flex; flex-direction:column; gap:22px; min-height:290px; }
.example-user { background:#171717; color:#fff; border-radius:12px 12px 3px 12px; padding:14px 18px; align-self:flex-end; max-width:88%; font-size:.84rem; }
.example-agent { max-width:94%; font-size:.86rem; line-height:1.8; }
.example-agent p { margin:0 0 10px; }
.example-agent a { color:#626262; font-size:.75rem; }
.preview-composer { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; margin:0 20px 20px; border:1px solid var(--line); border-radius:9px; color:#757575; font-size:.8rem; }
.preview-composer span:last-child { font-size:20px; color:var(--ink); }
.section-intro { display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:start; margin-bottom:48px; }
.section-intro h2 { font-size:clamp(30px,3.5vw,43px); margin:0; max-width:440px; }
.section-intro p { color:var(--muted); max-width:430px; }
.capabilities { padding:76px 0; border-top:1px solid var(--line); }
.capability-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:40px; }
.capability { border-top:1px solid var(--line); padding-top:24px; }
.capability .number { font-family:'DM Mono',monospace; color:#777; font-size:.72rem; }
.capability h3 { font-size:1.2rem; margin:26px 0 14px; letter-spacing:-.03em; }
.capability p { color:var(--muted); font-size:.875rem; line-height:1.85; margin-bottom:0; }
.closing-section { border-top:1px solid var(--line); padding:72px 0; display:flex; align-items:center; justify-content:space-between; gap:30px; }
.closing-section h2 { font-size:clamp(30px,4vw,44px); margin:0 0 14px; }
.closing-section p { color:var(--muted); margin:0; font-size:.9rem; }
.landing-footer,.page-footer { border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:24px; padding:28px 0 36px; }
.footer-brand { font-size:19px; }
.footer-link,.page-footer { color:var(--muted); font-size:.75rem; }
.footer-link { text-decoration:none; }
.footer-link:hover { text-decoration:underline; }
/* Account: one clear sign-in column, no decorative background. */
.account-page .hero-section { max-width:440px; margin:88px auto 100px; }
.account-page .hero-header { text-align:left; margin-bottom:32px; }
.hero-title { font-size:clamp(32px,4vw,46px); margin-bottom:20px; }
.hero-desc { color:var(--muted); line-height:1.8; font-size:.92rem; }
.account-page .auth-card { border:1px solid var(--line); padding:28px; border-radius:12px; }
.google-btn { width:100%; background:#fff; color:var(--ink); border-color:#d0d0d0; }
.google-btn:hover { background:#f7f7f7; }
.google-icon-wrapper { display:flex; }
.connected-state { display:none; }
.account-meta,.account-info { display:flex; align-items:center; gap:14px; min-width:0; }
.account-email,.account-name { font-size:.875rem; font-weight:600; overflow-wrap:anywhere; }
.account-avatar { display:grid; place-items:center; width:42px; height:42px; flex-shrink:0; border:1px solid var(--line); border-radius:9px; background:#fff; }
.account-sub { font-size:.75rem; color:var(--muted); display:flex; align-items:center; gap:6px; margin-top:3px; }
.badge-dot { width:5px; height:5px; border-radius:50%; background:#427453; }
.connected-actions { display:flex; flex-direction:column; gap:14px; margin-top:26px; }
.switch-btn { border:0; background:none; color:var(--muted); cursor:pointer; font-size:.8rem; min-height:44px; }
.switch-btn:hover { text-decoration:underline; }
.status-msg { display:none; margin-top:16px; font-size:.8rem; overflow-wrap:anywhere; }
.status-msg.visible,.status-msg.show { display:block; }
.status-msg.error { display:block; color:#a22b2b; }
.status-msg.success { display:block; color:#316346; }
.scroll-hint.hidden { visibility:hidden; }
.loading-state { display:flex; gap:12px; align-items:center; justify-content:center; padding:16px 0; color:var(--muted); font-size:.8rem; }
.account-fineprint { color:var(--muted); font-size:.75rem; margin:24px 0 0; line-height:1.9; }
/* Legal pages use document typography, with consent controls after the text. */
.legal-page .hero-section { width:min(760px,100%); margin:64px auto 88px; }
.legal-page .hero-header { margin-bottom:36px; }
.legal-page .auth-card { background:#fff; }
.terms-doc,.policy-doc { max-height:60vh; min-height:240px; overflow-y:auto; overscroll-behavior:contain; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:28px 24px 28px 0; scrollbar-width:thin; }
.terms-effective,.policy-effective { font-size:.72rem; color:var(--muted); margin-bottom:28px; }
.terms-section,.policy-section { margin-top:30px; }
.terms-section-title,.policy-section-title { display:flex; gap:14px; font-weight:600; font-size:1rem; margin:0 0 14px; line-height:1.5; }
.terms-section-num,.policy-section-num { font-family:'DM Mono',monospace; font-size:.72rem; color:#767676; padding-top:3px; }
.terms-doc p,.policy-doc p,.terms-doc li,.policy-doc li { font-size:.875rem; line-height:1.9; color:#494949; }
.terms-doc ul,.policy-doc ul { padding-left:24px; }
.scroll-hint { margin:12px 0 24px; font-size:.72rem; color:var(--muted); }
.consent-footer { display:flex; flex-direction:column; gap:24px; }
.checkbox-label { display:flex; align-items:flex-start; gap:12px; cursor:pointer; font-size:.8rem; color:#4b4b4b; line-height:1.8; }
.checkbox-label input { accent-color:#171717; margin-top:6px; width:17px; height:17px; flex-shrink:0; }
.agree-btn { align-self:flex-start; }
.agree-btn svg,.primary-chat-btn svg { width:17px; height:17px; }
/* Settings: compact navigation and open, divided sections. */
.settings-page { overflow:auto; height:auto; }
.settings-page .settings-layout { min-height:100dvh; height:auto; max-width:1280px; width:100%; margin:auto; background:#fff; overflow:visible; }
.settings-page .settings-nav-sidebar { background:#fff; border-right:1px solid var(--line); width:240px; flex:0 0 240px; padding:30px 24px; }
.settings-page .settings-main { background:#fff; min-width:0; height:auto; overflow:visible; }
.settings-page .settings-topbar { background:#fff; height:auto; min-height:84px; padding:20px 40px; }
.settings-page .settings-content-wrapper { padding:48px 40px; max-width:880px; width:100%; }
.settings-page .panel-title { font-size:2rem; letter-spacing:-.05em; }
.settings-page .panel-desc,.settings-page .setting-card-subtitle { color:#626262; line-height:1.8; }
.settings-page .panel-header { margin-bottom:36px; }
.settings-page .setting-card { border:0; border-top:1px solid var(--line); border-radius:0; padding:28px 0; box-shadow:none; margin:0; background:#fff; }
.settings-page .setting-card-header { gap:20px; align-items:flex-start; }
.settings-page .setting-card-header > div { min-width:0; }
.settings-page .setting-card-title { font-size:1rem; letter-spacing:-.02em; }
.settings-page .setting-card-subtitle { max-width:540px; font-size:.8rem; }
.settings-page .settings-nav-item { border-radius:6px; font-size:.8rem; padding:12px; min-height:44px; }
.settings-page .settings-nav-item.active { background:#f4f4f4; color:#171717; font-weight:600; }
.settings-page .preview-container { background:#fff; border-radius:10px; box-shadow:none; }
.settings-page .preview-header { background:#fff; border-bottom:1px solid var(--line); }
.settings-page .preview-chat { background:#fff; padding:24px; }
.settings-page .preview-agent-bubble { background:#fff; }
.settings-page .back-to-chat-btn { border:0; background:#fff; padding-left:0; }
.settings-page .plugin-config-btn,.settings-page .connect-action-btn,.settings-page .preset-chip,.settings-page .step-btn { box-shadow:none; border-radius:6px; min-height:44px; }
.settings-page .status-pill { background:#fff; border:1px solid #ddd; color:#626262; font-size:.7rem; }
.settings-page .status-pill.active { color:#316346; border-color:#c4d7ca; }
.settings-page .modal-box { background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 64px #00000014; max-height:90dvh; overflow:auto; }
.settings-page .modal-title { font-size:1.4rem; letter-spacing:-.035em; }
.settings-page .modal-input { background:#fff; border-color:#d6d6d6; }
.settings-page .plugin-modal-box { border-radius:12px; max-height:90dvh; }
.settings-page .plugin-modal-footer,.settings-page .plugin-modal-status-banner,.settings-page .plugin-modal-icon { background:#fff; }
.settings-page .mobile-tab-bar { background:#fff; }
.mobile-settings-home,.settings-section-back { display:none; }
.user-monogram { display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:50%; background:#655785; color:#fff; font-size:22px; font-weight:600; flex:0 0 48px; }
.profile-monogram { width:64px; height:64px; flex-basis:64px; font-size:28px; }
#tab-account .account-avatar,#accountStatusPillWrap { display:none; }
.settings-page #tab-account .account-card-box { justify-content:flex-start; gap:18px; }
.user-profile-form { display:grid; gap:12px; max-width:480px; padding:24px 0; }
.user-profile-form label,.delete-account-dialog label { font-size:.85rem; font-weight:600; }
.user-profile-form input,.delete-account-dialog input { width:100%; min-height:48px; border:1px solid #d5d5d5; border-radius:8px; padding:10px 14px; background:#fff; color:#171717; }
.user-profile-form button { justify-self:start; }
#userProfileStatus,#deleteAccountStatus { font-size:.8rem; color:#626262; margin:0; }
.profile-danger-zone { border-top:1px solid var(--line); margin-top:30px; padding-top:28px; }
.profile-danger-zone h2 { font-size:1.15rem; }
.profile-danger-zone p { font-size:.8rem; color:#626262; max-width:520px; }
.settings-page .danger-action-btn { min-height:48px; height:auto; color:#a12c2c; text-align:left; }
.settings-page #signOutBtn { color:#171717; background:white; border-color:#ddd; }
.delete-account-dialog { background:white; color:#171717; width:min(440px,calc(100% - 32px)); padding:28px; border:1px solid #ddd; border-radius:14px; }
.delete-account-dialog::backdrop { background:#0006; }
.delete-account-dialog h2 { font-size:1.5rem; }
.delete-account-dialog p { font-size:.85rem; line-height:1.8; }
.delete-account-dialog input { margin:12px 0; }
.delete-dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; margin-top:24px; }
#confirmDeleteAccountBtn { background:#9b3030; border-color:#9b3030; }
/* No decorative entrances or animated hover states on these pages. */
body:not(.chat-page) *,body:not(.chat-page) *::before,body:not(.chat-page) *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
.fade-in { opacity:1!important; transform:none!important; }
@media(max-width:800px) {
  .settings-page .mobile-tab-bar { display:none!important; }
  .settings-page:not(.settings-section-open) .settings-content-wrapper { display:none; }
  .settings-page:not(.settings-section-open) .mobile-settings-home { display:block; padding:24px 20px; }
  .settings-page.settings-section-open .settings-section-back { display:inline-flex; align-items:center; justify-content:center; background:none; border:0; font-size:32px; width:44px; height:44px; color:#171717; cursor:pointer; }
  .settings-page.settings-section-open .topbar-back-btn { display:none; }
  .settings-page .settings-topbar { gap:10px; position:sticky; top:0; z-index:5; }
  .settings-page .settings-topbar-title { flex:1; max-width:none; font-size:1.1rem; }
  .settings-page .settings-section-back + .settings-topbar-title { text-align:left; }
  .settings-profile-row { width:100%; display:flex; align-items:center; gap:14px; border:1px solid var(--line); border-radius:12px; background:white; padding:18px 16px; text-align:left; color:#171717; cursor:pointer; }
  .settings-row-copy { display:flex; flex-direction:column; flex:1; min-width:0; }
  .settings-row-copy strong { font-size:.95rem; font-weight:600; overflow-wrap:anywhere; }
  .settings-row-copy small { font-size:.75rem; color:#626262; overflow-wrap:anywhere; }
  .settings-menu-group { margin-top:28px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
  .settings-menu-group button,.settings-menu-group a { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:58px; padding:16px; color:#171717; background:white; border:0; text-decoration:none; font-size:.9rem; cursor:pointer; }
  .settings-menu-group > * + * { border-top:1px solid var(--line); }
  .settings-home-footer { color:#777; text-align:center; font-size:.7rem; margin-top:40px; }
  .settings-page .settings-content-wrapper { padding-top:24px; }
  .page-wrapper { width:calc(100% - 40px); }
  .navbar { min-height:80px; gap:16px; }
  .nav-brand { font-size:23px; }
  .nav-actions { gap:16px; }
  .landing-hero { grid-template-columns:1fr; gap:44px; padding:64px 0; }
  .landing-hero h1 { max-width:550px; }
  .product-preview { width:100%; max-width:550px; }
  .section-intro { grid-template-columns:1fr; gap:20px; margin-bottom:32px; }
  .capability-grid { gap:24px; }
  .capabilities { padding:52px 0; }
  .closing-section { align-items:flex-start; flex-direction:column; padding:52px 0; }
  .settings-page .settings-nav-sidebar { display:none; }
  .settings-page .settings-layout { display:block; }
  .settings-page .settings-topbar { padding:20px; }
  .settings-page .settings-content-wrapper { padding:32px 20px; }
  .settings-page .mobile-tab-bar { display:flex; padding:0 20px; gap:24px; overflow-x:auto; }
  .settings-page .mobile-tab-btn { border:0; border-bottom:2px solid transparent; border-radius:0; padding:16px 0; min-height:48px; background:#fff; color:#666; flex-shrink:0; }
  .settings-page .mobile-tab-btn.active { background:#fff; color:#171717; border-bottom-color:#171717; }
  .settings-page .mobile-tab-btn svg { color:inherit; }
  .settings-page .topbar-back-btn { display:flex; }
}
@media(max-width:520px) {
  .page-wrapper { width:calc(100% - 32px); }
  .navbar { min-height:76px; }
  .nav-step { font-size:.65rem; max-width:150px; text-align:right; }
  .nav-actions .text-link { display:none; }
  .nav-btn { min-height:44px; padding:10px 14px; font-size:.8rem; }
  .landing-hero { padding:48px 0; }
  .landing-hero h1 { font-size:2.7rem; }
  .hero-actions { gap:18px; }
  .capability-grid { grid-template-columns:1fr; gap:32px; }
  .capability h3 { margin-top:16px; }
  .landing-footer,.page-footer { align-items:flex-start; flex-direction:column; gap:20px; }
  .footer-links { flex-wrap:wrap; gap:20px; }
  .account-page .hero-section { margin:48px auto 64px; }
  .account-page .auth-card { padding:22px; }
  .legal-page .hero-section { margin:40px auto 56px; }
  .terms-doc,.policy-doc { max-height:58dvh; padding-right:14px; }
  .agree-btn { width:100%; }
  .settings-page .setting-card-header { flex-direction:column; gap:14px; }
  .settings-page .setting-card-header > div:first-child { flex:0 1 auto; }
  .settings-page .preview-chat { padding:16px 0; }
  .settings-page .panel-title { font-size:1.75rem; }
  .settings-page .preset-chips { flex-wrap:wrap; }
  .settings-page .account-card-box { align-items:flex-start; flex-direction:column; gap:16px; }
  .settings-page .modal-box { padding:24px 20px; width:calc(100% - 24px); }
}
