/* Product refresh. Shared palette, responsive surfaces and account controls. */
:root[data-color="light"] {
  color-scheme: light;
  --bg: #f6f7f2; --bg-elev: #eef1ea; --surface: #fff; --surface-2: #edf2ed;
  --text: #202e27; --text-muted: #56665d; --text-faint: #68756d;
  --border: #dce3db; --border-strong: #b9c8bd;
  --accent: #245746; --accent-hover: #184635; --accent-contrast: #fff;
  --accent-soft: #e6efe6; --accent-2: #3c705a; --accent-3: #607749; --link: #226044;
  --danger: #b32b30; --danger-soft: #fff0f0; --warning: #8c570e; --warning-soft: #fff4dc;
  --success: #216344; --success-soft: #e6f3e8;
  --sidebar-bg: #eef1ea; --bubble-user-bg: #e9eee6; --bubble-user-text: #202e27;
  --bubble-assistant-bg: transparent; --header-bg: #f6f7f2ed; --overlay: #15251e77;
  --focus-ring: #387457;
  --shadow-sm: 0 2px 5px #182d2010;
  --shadow-md: 0 4px 22px #182d2010;
  --shadow-lg: 0 22px 70px -22px #18332433;
}
:root[data-color="dark"] {
  color-scheme: dark;
  --bg: #111c18; --bg-elev: #17251e; --surface: #1c2b23; --surface-2: #25362b;
  --text: #edf2e9; --text-muted: #b7c4b8; --text-faint: #a0b0a3;
  --border: #35473a; --border-strong: #516955;
  --accent: #b8d9a6; --accent-hover: #cee6bf; --accent-contrast: #193522;
  --accent-soft: #293f2f; --accent-2: #a6c990; --accent-3: #c4c68b; --link: #b8d9a6;
  --danger: #ff9b9b; --danger-soft: #3d2526; --warning: #edca83; --warning-soft: #352f1e;
  --success: #b2d9a0; --success-soft: #253e2d;
  --sidebar-bg: #15221b; --bubble-user-bg: #2a3a2e; --bubble-user-text: #edf2e9;
  --bubble-assistant-bg: transparent; --header-bg: #111c18ee; --overlay: #050c09b0;
  --focus-ring: #b8d9a6;
  --shadow-sm: 0 2px 6px #0002; --shadow-md: 0 8px 24px #0003; --shadow-lg: 0 24px 70px #0005;
}
:root[data-color] {
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans); --radius-sm: 10px; --radius-md: 14px; --radius-lg: 22px;
  --heading-tracking: -.025em;
}
body { -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--accent-contrast); }
:root body .btn-primary { background: var(--accent); box-shadow: none; border-color: transparent; }
:root body .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 15px #182d2018; }
:root body .btn { min-height: 44px; font-weight: 600; border-radius: 11px; }
:root body .icon-btn { border-radius: 10px; }
:root body :is(.brand-mark, .lg-mark, .sb-logo, .demo-avatar) {
  background: var(--accent); color: var(--accent-contrast); box-shadow: none; border-radius: 10px;
}
:root body :is(.brand, .lg-brand, .sb-brand) { font-family: var(--font-sans); font-weight: 650; letter-spacing: -.04em; }
:root body .brand-mark { width: 38px; height: 38px; }
:root body .brand { font-size: 20px; }
.appearance-toggle { flex: none; }
.appearance-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; overflow: auto;
  padding: 28px; border: 1px solid var(--border); border-radius: 22px; color: var(--text); background: var(--surface); box-shadow: var(--shadow-lg); }
.appearance-dialog::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.appearance-dialog h2 { font-size: 24px; letter-spacing: -.035em; }
.appearance-dialog p { color: var(--text-muted); margin: 8px 0 20px; font-size: 14px; }
.appearance-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.appearance-choice { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 9px; background: var(--bg); color: var(--text); font-size: 12px; line-height: 1.4; }
.appearance-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.appearance-preview { display: block; height: 65px; border: 1px solid #d1dacd; border-radius: 7px; margin-bottom: 10px;
  background: linear-gradient(90deg, #dbe3d7 27%, transparent 27%), linear-gradient(#f6f7f2 25%, #fff 25%); }
.preview-dark { border-color: #455649; background: linear-gradient(90deg, #293e30 27%, transparent 27%), linear-gradient(#111c18 25%, #1c2b23 25%); }
.preview-system { background: linear-gradient(110deg, #e3eadf 50%, #243a2b 50%); }

/* The public site uses an editorial layout, a real product preview and quiet surfaces. */
:root .landing { --mark-bg: var(--accent); --mark-fg: var(--accent-contrast); --header-h: 78px; }
:root .landing .container { max-width: 1232px; }
:root .landing .site-header { border-bottom: 1px solid var(--border); }
:root .landing .nav-link { font-size: 13px; color: var(--text-muted); }
:root .landing .nav-link:hover { color: var(--text); }
:root .landing .hero { padding: 66px 0 76px; }
:root .landing .hero-bg::before { inset: 0 0 0 55%; background: var(--bg-elev); border-radius: 0 0 0 140px; filter: none; }
:root .landing .hero-bg::after { display: none; }
:root .landing .hero-grid { gap: 56px; align-items: center; }
:root .landing .hero-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 400; line-height: 1.09; letter-spacing: -.05em; margin-top: 19px; }
:root .landing .hero-title em { background: none; -webkit-text-fill-color: currentColor; color: var(--accent); font-weight: 400; font-style: italic; }
:root .landing .hero-lead { max-width: 500px; font-size: 17px; line-height: 1.7; margin-top: 23px; }
:root .landing .hero-eyebrow { margin-top: 28px; color: var(--accent); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
:root .landing .hero-switch { padding: 4px; border: 1px solid var(--border); background: var(--surface); box-shadow: none; }
:root .landing .hero-switch .seg-option { min-height: 40px; font-size: 13px; }
:root .landing .hero-ask { margin-top: 28px; }
:root .landing .hero-ask-label { font-size: 13px; }
:root .landing .hero-ask-box { border: 1px solid var(--border-strong); border-radius: 17px; box-shadow: var(--shadow-sm); }
:root .landing .hero-ask-input { font-size: 14px; line-height: 1.6; min-height: 82px; }
:root .landing .hero-ask-hint { max-width: 260px; font-size: 11px; }
:root .landing .hero-points { gap: 14px 22px; font-size: 12px; }
:root .landing .hero-lang { background: transparent; padding-left: 0; font-size: 12px; }
:root .landing .hero-art { display: none; }
:root .landing .demo { min-width: 0; margin: 0; padding: 0; }
.demo-overline { font-size: 10px; font-weight: 600; letter-spacing: .13em; color: var(--text-muted); margin: 0 0 14px 5px; }
:root .landing .demo-window { border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 28px 60px -35px #122a2460; transform: none; }
:root .landing .demo-bar { padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
:root .landing .demo-dots span { background: var(--border-strong); width: 6px; height: 6px; }
:root .landing .demo-body { padding: 20px; font-size: 13px; }
:root .landing .demo-user { background: var(--surface-2); border-radius: 12px 12px 3px 12px; padding: 13px 15px; }
:root .landing .demo-steps { background: transparent; padding-inline: 0; font-size: 11px; }
:root .landing .demo-answer { font-size: 13px; line-height: 1.65; }
:root .landing .demo-norms { background: var(--bg-elev); border-left: 2px solid var(--accent); border-radius: 0 9px 9px 0; }
:root .landing .demo-composer { border-radius: 10px; font-size: 12px; }
:root .landing .demo-caption { margin-top: 17px; font-size: 11px; text-align: left; line-height: 1.55; }
:root .landing .section { padding-block: clamp(52px, 7vw, 92px); }
:root .landing .section-alt { background: var(--bg-elev); }
:root .landing .section-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.2vw, 44px); font-weight: 400; letter-spacing: -.04em; }
:root .landing .section-lead { font-size: 16px; line-height: 1.75; }
:root .landing :is(.feature-card, .topic-card, .price-card, .step, .trust-card) { border-radius: 18px; box-shadow: none; }
:root .landing :is(.feature-card, .topic-card):hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
:root .landing .step-art { opacity: .8; }
:root .landing .section-head { max-width: 760px; }

/* Focused account page with a quiet introduction panel. */
:root .login-page .lg-glow { background: var(--bg); }
:root .login-page .lg-main { padding-bottom: 44px; }
:root .login-page .lg-card { border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: 22px; padding: 30px; }
:root .login-page .lg-intro-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 3.6vw, 46px); font-weight: 400; line-height: 1.15; letter-spacing: -.04em; }
:root .login-page .lg-intro { padding: 36px 30px; border: 1px solid var(--border); border-radius: 22px; background: var(--bg-elev); }
:root .login-page .lg-title { font-size: 26px; letter-spacing: -.04em; }
:root .login-page .lg-tabs { background: var(--bg-elev); }
:root .login-page .lg-tab[aria-selected="true"] { box-shadow: var(--shadow-sm); }
.shared-login { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 12px; cursor: pointer; }
.shared-login input { flex: none; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.shared-login small { display: block; color: var(--text-muted); margin-top: 3px; font-size: 11px; }
.lg-header-inner .appearance-toggle { margin-left: auto; }

/* Workspace: calmer navigation, a clear start and generous reading width. */
:root .chat-page { --sb-w: 286px; --thread-w: 820px; --topbar-h: 68px; }
:root .chat-page .sidebar { border-right-color: var(--border); }
:root .chat-page .sb-head { padding: 10px 14px; }
:root .chat-page .sb-brand { font-size: 19px; }
:root .chat-page .sb-actions { padding: 8px 14px 0; }
:root .chat-page .sb-new { border-radius: 11px; background: var(--accent); color: var(--accent-contrast); border: none; box-shadow: none; min-height: 46px; }
:root .chat-page .sb-kbd { color: inherit; opacity: .7; background: transparent; border-color: currentColor; }
:root .chat-page .sb-search { margin-top: 14px; background: transparent; border: 1px solid var(--border-strong); border-radius: 10px; }
.chat-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 0 6px; }
.chat-tab { min-height: 36px; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.chat-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
:root .chat-page .sb-group-title { font-size: 10px; letter-spacing: .075em; text-transform: uppercase; }
:root .chat-page .sb-item { border-radius: 9px; }
:root .chat-page .sb-item.is-current { background: var(--surface); box-shadow: var(--shadow-sm); }
:root .chat-page .sb-title { font-size: 13px; }
.pin-indicator { color: var(--accent); margin-left: auto; }
:root .chat-page .sb-quota { background: var(--surface); border-color: var(--border); border-radius: 12px; padding-block: 12px; }
:root .chat-page .sb-avatar { background: var(--accent); color: var(--accent-contrast); }
:root .chat-page .topbar { padding-inline: 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
:root .chat-page .topbar-title { font-size: 13px; font-weight: 600; }
.connection-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.connection-state > span { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.connection-state.is-offline > span { background: var(--warning); }
:root .chat-page .tier-badge { font-size: 11px; background: var(--surface); }
:root .chat-page .scroller.is-empty .thread { min-height: 100%; padding-top: 36px; padding-bottom: 26px; }
:root .chat-page .empty { text-align: left; }
.workspace-eyebrow { margin-bottom: 18px; color: var(--accent); font-size: 10px; letter-spacing: .15em; font-weight: 650; }
:root .chat-page .empty-mark { display: none; }
:root .chat-page .empty-title { max-width: 670px; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.5vw, 50px); font-weight: 400; letter-spacing: -.04em; line-height: 1.12; margin-bottom: 16px; }
:root .chat-page .empty-lead { max-width: 630px; margin: 0 0 20px; font-size: 14px; line-height: 1.65; }
:root .chat-page .empty-tpl { align-items: flex-start; margin-bottom: 20px; }
:root .chat-page .tpl-btn { border-radius: 8px; font-size: 12px; background: var(--surface); }
:root .chat-page .tpl-hint { display: none; }
.workspace-actions { margin-bottom: 26px; }
.workspace-action { display: flex; align-items: center; gap: 14px; text-align: left; min-width: 0; width: 100%;
  padding: 17px 20px; background: var(--accent-soft); color: var(--text); border: 1px solid var(--border); border-radius: 13px; }
.workspace-action > span:first-child { display: grid; place-items: center; width: 38px; height: 42px; border-radius: 8px; background: var(--surface); color: var(--accent); }
.workspace-action > span:last-child { margin-left: auto; color: var(--accent); }
.workspace-action strong { display: block; font-size: 14px; font-weight: 600; }
.workspace-action small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.workspace-action:hover { border-color: var(--accent); }
:root .chat-page .empty-label { font-size: 10px; letter-spacing: .12em; margin-bottom: 12px; }
:root .chat-page .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
:root .chat-page .chip { min-height: 115px; border-radius: 12px; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); }
:root .chat-page .chip:hover { background: var(--surface); border-color: var(--accent); transform: translateY(-2px); }
.chip-copy { display: block; min-width: 0; }
.chip-title { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 650; }
:root .chat-page .chip-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; color: var(--text-muted); line-height: 1.5; }
:root .chat-page .chip-icon { width: 19px; height: 19px; }
:root .chat-page .empty-hint { text-align: left; margin: 14px 0 0; max-width: none; font-size: 11px; line-height: 1.6; }
:root .chat-page .empty-photo-hint { display: none; }
:root .chat-page .composer { padding-top: 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
:root .chat-page .composer-box { border-radius: 16px; padding: 11px; box-shadow: var(--shadow-md); }
:root .chat-page .composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
:root .chat-page .composer-note { font-size: 10px; padding-top: 8px; }
:root .chat-page .send-btn { border-radius: 10px; }
:root .chat-page .ans-body { line-height: 1.8; }
:root .chat-page .msg-user .bubble { border-radius: 16px 16px 4px 16px; }
.search-result { display: block; width: 100%; padding: 13px 10px; text-align: left; border: none; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); }
.search-result:hover { background: var(--surface); border-radius: 9px; }
.search-title { display: block; font-size: 12px; margin-bottom: 6px; overflow-wrap: anywhere; }
.search-excerpt { display: block; color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.search-archive { display: block; color: var(--accent); font-size: 10px; margin-top: 6px; }
.search-more { margin: 14px 0; width: 100%; padding: 10px; background: var(--surface); color: var(--accent); border: 1px solid var(--border); border-radius: 9px; font-size: 12px; }
.search-highlight { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 10px; }
.attach-document { width: 142px; }
.attach-file { display: grid; grid-template-columns: 24px 1fr; gap: 5px 8px; align-content: center; width: 100%; height: 100%; padding: 10px; background: var(--surface-2); }
.attach-file strong { font-size: 11px; color: var(--accent); }
.msg-file { display: flex; align-items: center; gap: 12px; padding: 14px 18px; max-width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; text-align: left; }
.msg-file .icon { flex: none; color: var(--accent); }
.msg-file strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.msg-file small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 3px; }
.msg-file-item { max-width: 100%; }
.attach-file small { grid-column: 1 / -1; max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.privacy-dialog { max-width: 510px; }
.privacy-fact { display: flex; gap: 14px; margin: 0 0 22px; }
.privacy-fact > span { color: var(--accent); }
.privacy-fact strong { font-size: 14px; }
.privacy-fact p { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin-top: 5px; }
.privacy-choice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); background: var(--bg-elev); border-radius: 12px; margin-bottom: 20px; cursor: pointer; }
.privacy-choice input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.privacy-choice strong { display: block; font-size: 14px; }
.privacy-choice small { display: block; margin-top: 6px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.privacy-result { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin-top: 16px; }

@media (min-width: 1024px) { :root .landing .hero-grid { grid-template-columns: 1.08fr 1fr; } }
@media (max-width: 1023px) {
  :root .landing .hero-bg::before { display: none; }
  :root .landing .hero { padding-top: 36px; }
  :root .landing .hero-title { max-width: 670px; }
  :root .landing .demo { max-width: 600px; margin-inline: auto; }
  :root .chat-page { --sb-w: 260px; }
  :root .chat-page .topbar { padding-inline: 14px; gap: 8px; }
}
@media (max-width: 959px) { :root .login-page .lg-intro { padding: 24px; } }
@media (max-width: 599px) {
  :root .landing { --header-h: 66px; }
  :root .landing .brand { font-size: 18px; gap: 8px; }
  :root .landing .brand-mark { width: 32px; height: 32px; }
  :root .landing .header-actions { gap: 4px; }
  :root .landing .hero { padding: 26px 0 44px; }
  :root .landing .hero-title { font-size: clamp(36px, 10vw, 48px); line-height: 1.1; }
  :root .landing .hero-eyebrow { font-size: 9px; margin-top: 23px; }
  :root .landing .hero-lead { font-size: 15px; margin-top: 18px; }
  :root .landing .hero-grid { gap: 40px; }
  :root .landing .hero-ask-hint { max-width: none; }
  :root .landing .hero-ask-bar { flex-wrap: wrap; }
  :root .landing .hero-ask-btn { width: 100%; justify-content: center; }
  :root .landing .demo-body { padding: 15px; }
  :root .landing .demo-answer { font-size: 12px; }
  :root .landing .demo-caption { font-size: 10px; }
  :root .landing .hero-points { gap: 10px 16px; font-size: 11px; }
  :root .login-page .lg-card { padding: 22px 18px; border-radius: 16px; }
  :root .login-page .lg-intro { padding: 22px; border-radius: 16px; }
  :root .chat-page { --topbar-h: 58px; }
  :root .chat-page .topbar { padding-inline: 8px; gap: 3px; }
  .connection-state { display: none; }
  :root .chat-page .topbar-title { font-size: 12px; }
  :root .chat-page .tier-badge { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
  :root .chat-page .scroller.is-empty .thread { padding-top: 26px; }
  .workspace-eyebrow { font-size: 8px; letter-spacing: .12em; margin-bottom: 14px; }
  :root .chat-page .empty-title { font-size: 34px; max-width: 400px; }
  :root .chat-page .empty-lead { font-size: 13px; margin-bottom: 15px; }
  :root .chat-page .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  :root .chat-page .chip { min-height: 112px; padding: 12px; gap: 8px; }
  :root .chat-page .chips > li:nth-child(n+5) { display: none; }
  .workspace-action { padding: 13px; gap: 10px; }
  .workspace-actions { margin-bottom: 22px; }
  :root .chat-page .empty-tpl { margin-bottom: 15px; }
  :root .chat-page .composer-box { border-radius: 14px; padding: 8px; }
  :root .chat-page .composer { padding-inline: 10px; }
  .appearance-dialog { padding: 22px; }
}
@media (max-width: 639px) {
  .admin-page .ad-brand { gap: 8px; font-size: 16px; line-height: 1.3; }
  .admin-page .ad-brand-sep { display: none; }
  .admin-page .ad-brand-sub { display: block; font-size: 11px; }
}
@media (max-width: 359px) {
  .admin-page .ad-kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  :root body * { scroll-behavior: auto !important; }
  :root .landing :is(.feature-card, .topic-card):hover, :root .chat-page .chip:hover { transform: none; }
}
@media print {
  .appearance-toggle, .connection-state, .workspace-actions, .workspace-eyebrow { display: none !important; }
}
/* Понятный учёт: прогноз перед отправкой, доступный остаток и правила без технических единиц. */
.chat-page .composer-charge-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 9px 4px 0;
}
.chat-page .composer-charge {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  min-width: 0;
}
.chat-page .charge-help {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-page .limit-available {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}
.guest-summary { display: grid; gap: 8px; padding: 22px; margin: 24px 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.guest-summary strong { font-size: 30px; letter-spacing: -0.03em; }
.guest-summary span { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.guest-consent { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0; font-size: 13px; line-height: 1.65; }
.guest-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.guest-page a:not(.btn):not(.lg-brand), .guest-entry { text-underline-offset: 3px; }
.guest-page .lg-intro-note { display: block; }
.guest-page .lg-intro-note + .lg-intro-note { margin-top: 16px; }
.guest-benefits { gap: 20px; }
.guest-entry { margin: 18px 0; white-space: normal; text-align: center; }
.guest-page #guest-form > .lg-hint-center { margin-top: 14px; line-height: 1.6; }
.guest-page .lg-switch { margin-top: 18px; }
.guest-banner { flex: 0 0 auto; border-bottom: 1px solid var(--border); font-size: 12px; }
.guest-banner .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .guest-banner { align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .guest-banner .btn { font-size: 11px; padding-inline: 10px; }
}
.chat-page .limit-available-value { font-size: 21px; font-weight: 650; line-height: 1.4; }
.chat-page .limit-available .btn { margin-top: 12px; }
.chat-page .stat-row { flex-wrap: wrap; gap: 2px 12px; }
.chat-page .stat-value { white-space: nowrap; }
.chat-page .limit-rules { margin: 0; font-size: 14px; line-height: 1.6; }
.chat-page .limit-rules dt { margin-top: 16px; font-weight: 650; color: var(--text); }
.chat-page .limit-rules dd { margin: 4px 0 0; color: var(--text-muted); }
.chat-page .limit-processing-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.public-page .limit-guide { margin-top: 36px; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.public-page .limit-guide h3 { font-size: 24px; margin-bottom: 20px; }
.public-page .limit-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
.public-page .limit-guide h4 { font-size: 15px; font-weight: 650; margin-bottom: 6px; }
.public-page .limit-guide p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.public-page .limit-guide-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.public-page .limit-guide-wide { grid-column: 1 / -1; } /* пятый пункт — во всю ширину, без пустой клетки */
@media (max-width: 600px) {
  .chat-page .composer-charge-row { flex-wrap: wrap; gap: 0 12px; }
  .chat-page .composer-charge { flex: 1 1 220px; font-size: 11px; }
  .chat-page .charge-help { font-size: 11px; }
  .chat-page .limit-available-value { font-size: 19px; }
  .public-page .limit-guide { padding: 20px; }
  .public-page .limit-guide-grid { grid-template-columns: 1fr; }
}

/* Выбор относится к следующему вопросу; подпись ответа сохраняет уже использованную модель. */
.chat-page .model-choice { max-width: var(--thread-w); margin: 0 auto 10px; min-width: 0; } /* по колонке поля ввода */
.chat-page .model-choice-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.chat-page .model-choice label { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.chat-page .model-choice select {
  display: block; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
  text-overflow: ellipsis; cursor: pointer;
}
.chat-page .model-choice select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-page .model-choice select:disabled { opacity: .65; cursor: default; }
.chat-page .model-choice-hint { margin: 5px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.chat-page .model-choice-notice { margin: 7px 0 0; padding: 9px 11px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 12px; line-height: 1.5; }
.chat-page .answer-model { margin: 12px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  /* 16px — меньше Safari на iPhone при нажатии увеличивает страницу */
  .chat-page .model-choice select { font-size: 16px; }
  /* «Автоматически (Эксперт) — 1 вопрос» не обрезается: поле не уже 320px — на узком телефоне оно уходит под
     подпись во всю ширину, на широком остаётся в одной строке с ней */
  .chat-page .model-choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .chat-page .model-choice-row label { flex: 0 0 auto; }
  .chat-page .model-choice select { flex: 1 1 320px; width: auto; }
  /* С открытой клавиатурой место для переписки дороже: подсказка остаётся только для экранного диктора
     (aria-describedby) */
  .chat-page .model-choice-hint {
    position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .chat-page .model-choice-row { gap: 4px 8px; }
  .chat-page .model-choice label { font-size: 11px; }
}
@media print { .model-choice { display: none !important; } }
