/* Product scale. Loaded in the document head, after each page's own styles.
   Scope by page; do not resize authentication fields, dialogs or touch targets. */
:root{--rf-home-display:clamp(2.5rem,5vw,4.5rem);--rf-home-headline:clamp(1.625rem,1vw + 1.1rem,2rem);--rf-ui-title:28px;--rf-ui-section:18px;--rf-ui-body:14px;--rf-ui-caption:12px;--rf-ui-radius:14px;--rf-page-glow-a:rgba(234,96,41,.13);--rf-page-glow-b:rgba(178,83,47,.075)}

/* Мягкий свет по краям даёт общей бежевой плоскости глубину без шумной
   текстуры. Засветы не фиксированы к viewport: прокрутка не создаёт отдельный
   слой композиции и остаётся дешёвой для браузера. */
html[data-product-page] body{
  background-image:radial-gradient(ellipse 38rem 30rem at -8% 18%,var(--rf-page-glow-a),transparent 68%),radial-gradient(ellipse 44rem 34rem at 106% 78%,var(--rf-page-glow-b),transparent 70%);
  background-repeat:no-repeat;
}
html[data-product-page="models"],html[data-product-page="chat"],html[data-product-page="studio"]{--rf-page-glow-a:rgba(234,96,41,.14);--rf-page-glow-b:rgba(194,94,54,.09)}
html[data-product-page="profile"],html[data-product-page="docs"],html[data-product-page="support"]{--rf-page-glow-a:rgba(197,103,67,.085);--rf-page-glow-b:rgba(234,96,41,.1)}
html[data-product-page="balance"],html[data-product-page="history"],html[data-product-page="top-up"]{--rf-page-glow-a:rgba(234,96,41,.11);--rf-page-glow-b:rgba(110,53,39,.075)}

/* Светлые поверхности сохраняют только едва заметный световой объём. */
html[data-product-page="dashboard"] :is(.dash-tool,.dash-panel,.dash-recipe,[data-assistant]),
html[data-product-page="models"] [data-modelcard],
html[data-product-page="profile"] [data-section],
html[data-product-page="top-up"] [data-checkout]>div[data-card],
html[data-product-page="balance"] :is([data-overcard]:not([data-balancecard]),[data-chartcard],[data-ledger]),
html[data-product-page="referrals"] :is([data-rules],[data-stat],[data-rewardcard]),
html[data-product-page="support"] :is([data-contactcard],[data-supportguide]),
html[data-product-page="docs"] [data-toc],
html[data-product-page="history"] [data-listview]{
  background-image:linear-gradient(135deg,rgba(255,255,255,.42),transparent 43%),radial-gradient(circle at 96% -12%,rgba(234,96,41,.085),transparent 36%)!important;
  background-size:auto,auto!important;
  box-shadow:inset 0 1px rgba(255,255,255,.48),0 7px 24px rgba(49,29,28,.035);
}

html[data-product-page="dashboard"] [data-assistant]:not([data-chat-open]) [data-assistant-form]{min-height:50px}
html[data-product-page="dashboard"] [data-assistant-input]{box-sizing:border-box}
html[data-product-page="dashboard"] .dash-tool-art:not(.wave){background-image:radial-gradient(circle at 1px 1px,rgba(185,67,25,.11) .75px,transparent .9px),linear-gradient(145deg,rgba(255,248,240,.52),transparent)!important;background-size:13px 13px,auto!important}
html[data-product-page="history"] [data-preview-fallback]{object-fit:contain!important;padding:clamp(26px,5vw,62px);background:radial-gradient(circle at 70% 25%,rgba(234,96,41,.1),transparent 58%);opacity:.34}
html[data-product-page="history"] [data-row] [data-preview-fallback]{width:80px!important;height:45px!important;padding:11px}
html[data-product-page="history"] [data-tile]:has([data-preview-fallback]) [data-over]{opacity:1!important;background:linear-gradient(to top,rgba(255,248,240,.98),rgba(255,248,240,.25) 62%,transparent);color:#311D1C}
html[data-product-page="history"] [data-tile]>img,html[data-product-page="history"] [data-row]>img{background-image:url('logo.svg'),radial-gradient(circle at 75% 20%,rgba(234,96,41,.1),transparent 62%)!important;background-position:center!important;background-size:22px auto,auto!important;background-repeat:no-repeat!important}
@media(min-width:1000px){
  html[data-product-page] [data-authtitle]{font-size:28px!important;line-height:1.15}
  header [data-headerwrap]{height:54px;min-height:54px;padding-top:7px!important;padding-bottom:7px!important;gap:8px!important}
  header [data-navlink]{font-size:13px!important;padding:7px 10px!important;border-radius:8px!important}
  header [data-homelink]>span{font-size:14px!important;letter-spacing:.025em!important}
  header [data-homelink]>:is(img,svg){width:21px!important;height:26px!important}
  html[data-product-page] main h1:not(.rf-sr-only){font-size:var(--rf-ui-title)!important;line-height:1.15!important;letter-spacing:-.035em!important}
  html[data-product-page="top-up"] main h1:not(.rf-sr-only){font-size:1.625rem!important}
  /* Гостевая главная — единственная Persuade-страница: свой токен Display (DESIGN.md, display-home). */
  html[data-product-page="home"] main h1:not(.rf-sr-only){font-size:var(--rf-home-display)!important;line-height:1.04!important;letter-spacing:-.04em!important}
  html[data-product-page="dashboard"] main h1:not(.rf-sr-only){font-size:26px!important}
  html[data-product-page="profile"] [data-pagewrap]{max-width:1080px}
  html[data-product-page="profile"] [data-profileidentity] h2{font-size:26px}
  html[data-product-page="profile"] [data-profilehead]{margin-bottom:22px;grid-template-columns:52px minmax(0,1fr);column-gap:14px}
  html[data-product-page="profile"] [data-avatar]{width:52px;height:52px;border-radius:14px;box-shadow:none}
  html[data-product-page="profile"] [data-section]{border-radius:14px}
  html[data-product-page="profile"] [data-sectionhead]{padding:18px 22px}
  html[data-product-page="profile"] [data-sectionhead] h2{font-size:18px}
  html[data-product-page="profile"] [data-setting]{padding:15px 22px;gap:14px}
  html[data-product-page="profile"] [data-settingcopy] strong{font-size:14px}
  html[data-product-page="profile"] [data-settingcopy] span{font-size:13px}
  html[data-product-page="profile"] [data-section]+[data-section]{margin-top:16px}
  html[data-product-page="referrals"] [data-invitecopy] h2{font-size:27px;line-height:1.15}
  html[data-product-page="referrals"] [data-rules]{border-radius:16px}
  html[data-product-page="referrals"] [data-rule]{padding:16px 18px}
  html[data-product-page="referrals"] [data-stat]{padding:16px 18px;border-radius:14px}
  html[data-product-page="chat"] [data-emptytitle]{font-size:30px;line-height:1.15}
  html[data-product-page="chat"] [data-emptyintro]{gap:10px}
  html[data-product-page="chat"] [data-composepanel],html[data-product-page="chat"] [data-threadinner]{max-width:780px}
  html[data-product-page="chat"] [data-composer]{border-radius:14px;box-shadow:0 4px 16px rgba(49,29,28,.06)}
  html[data-product-page="docs"] [data-sec] h2{font-size:20px}
  html[data-product-page="support"] main h1[data-supporttitle]{font-size:32px!important;max-width:24ch}
  html[data-product-page="support"] [data-supportlead]{font-size:15px;margin-top:16px}
  html[data-product-page="support"] [data-supportguide] h2{font-size:20px}
  html[data-product-page="support"] [data-supportmain]{padding:30px 0 48px}
  html[data-product-page="support"] [data-contactgrid]{margin-top:24px}
  html[data-product-page="support"] [data-contactcard]{min-height:220px;padding:20px;border-radius:14px;box-shadow:none}
  html[data-product-page="support"] [data-contactcard] h2{font-size:18px;margin-top:16px}
  html[data-product-page="support"] [data-contactcard] p{font-size:14px;margin:12px 0 16px}
  html[data-product-page="support"] [data-supportguide]{padding:22px;border-radius:14px;gap:20px}
  html[data-product-page="studio"] [data-studio]{grid-template-columns:350px minmax(0,1fr)}
  html[data-product-page="studio"] [data-in]{font-size:14px;padding:9px 11px;border-radius:9px}
  html[data-product-page="studio"] [data-sec]{gap:8px;padding-top:11px}
  html[data-product-page="privacy"] [data-legaltitle],html[data-product-page="terms"] [data-legaltitle]{font-size:32px!important}
  html[data-product-page="privacy"] [data-legalsection] h2,html[data-product-page="terms"] [data-legalsection] h2{font-size:20px}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  [data-modelcard]{transition:border-color .16s ease,background-color .16s ease,transform .16s ease,box-shadow .16s ease}
}
@media(max-width:700px){
  html[data-product-page="dashboard"] [data-assistant-prompt]{min-height:40px;font-size:12px}
  html[data-product-page="dashboard"] [data-assistant-send]{width:40px;height:40px;border-radius:9px}
  html[data-product-page="dashboard"] [data-assistant]:not([data-chat-open]) [data-assistant-suggestions]{max-height:160px}
}

/* Модель отвечает — три точки. Один компонент на весь сайт: помощник на
   главной и чат. Узел не пересоздаётся, пока ответа нет, и анимация идёт
   без перезапусков; без движения точки стоят, смысл несёт подпись. */
.rf-typing{display:inline-flex;align-items:center;gap:5px}
.rf-typing i{display:block;width:6px;height:6px;border-radius:50%;background:#FF9B71;animation:rf-typing-dot .9s ease-in-out infinite}
.rf-typing i:nth-child(2){animation-delay:.14s}
.rf-typing i:nth-child(3){animation-delay:.28s}
@keyframes rf-typing-dot{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.rf-typing i{animation:none;opacity:.6}}
