/*
  Общие стили сайта. Разметка страниц несёт inline-стили с холста — здесь
  только то, что inline не умеет: наведение, фокус, шапка, появление блоков.
  Одна тема — тёмная, как в приложении (PRODUCT.md).
*/
:root {
  --bg: #0e0f0c; --surface: #191a17; --lifted: #1f201d; --raised: #252623;
  --text: #ffffff; --muted: #9c9c9c; --accent: #c7ff2e; --accent-hover: #d9ff70;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { text-wrap: balance; }
img { display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.nav__link { color: var(--muted); }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--text); }

.lang { display: flex; padding: 3px; border-radius: 12px; background: #131412; }
.lang a { height: 30px; padding: 0 9px; border-radius: 9px; display: flex; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.11); }

.btn { background: var(--accent); color: #000; }
.btn:hover { background: var(--accent-hover); color: #000; }

.store { height: 56px; padding: 0 20px 0 16px; border-radius: 16px; display: flex; align-items: center;
  gap: 12px; text-decoration: none; text-align: left; }
.store--apple { background: #fff; color: #000; }
.store--apple:hover { background: #e9e9e9; color: #000; }
.store--play { background: var(--raised); color: #fff; border: .5px solid rgba(255,255,255,.09); }
.store--play:hover { background: #2d2e2a; color: #fff; }
.store.is-soon { cursor: default; }
.store--apple.is-soon:hover { background: #fff; }
.store--play.is-soon:hover { background: var(--raised); }
.store__label { display: flex; flex-direction: column; gap: 1px; }
.store__top { font-size: 11px; font-weight: 500; line-height: 13px; }
.store--play .store__top { color: var(--muted); }
.store__name { font-size: 19px; font-weight: 600; line-height: 22px; letter-spacing: -.3px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores--center { justify-content: center; }

.media { flex: 0 0 auto; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
.phone { box-sizing: border-box; background: var(--lifted);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 0 48px 96px rgba(0,0,0,.55); }
.phone__screen { overflow: hidden; background: var(--bg); }
.shot { width: 390px; transform-origin: 0 0; pointer-events: none; user-select: none; }
.fragment { width: 351px; max-width: 100%; border-radius: 28px; overflow: hidden; background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 0 40px 80px rgba(0,0,0,.5); }
.caption { font-size: 12px; color: #7d7d7d; text-align: center; }

.link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 16px;
  font-weight: 600; text-decoration: none; }
.link svg { transition: transform .2s ease-out; }
.link:hover svg { transform: translateX(3px); }

/* Появление блоков: только с JS и без «Уменьшения движения». */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .link svg { transition: none; }
}

/* Форма заявки автора (/authors/): поля, плашки выбора, ловушка для ботов, итог.
   Размеры — с холста «Site-authors-new»; шрифт 16px, чтобы iOS не увеличивал страницу при вводе. */
.apply { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
legend.field__label { margin-bottom: 8px; } /* у legend нет flex-промежутка fieldset */
.field__input { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--bg);
  box-shadow: inset 0 0 0 1px #2b2c29; color: var(--text); font: inherit; font-size: 16px; line-height: 1.45; }
textarea.field__input { height: auto; min-height: 104px; padding: 14px 16px; resize: vertical; }
.field__input--mono { font-family: Menlo, 'SF Mono', ui-monospace, monospace; }
.field__input::placeholder { color: #7d7d7d; opacity: 1; }
.field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field__input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px #ff7a8c; }
.field__hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.field__error { margin: 0; font-size: 14px; line-height: 1.4; color: #ff7a8c; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span { min-height: 44px; padding: 0 16px; border-radius: 22px; display: inline-flex; align-items: center;
  background: var(--bg); box-shadow: inset 0 0 0 1px #2b2c29; color: var(--muted); font-size: 15px; font-weight: 600; }
.pill:hover span { color: var(--text); }
.pill input:checked + span { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); color: var(--text); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.apply .btn { height: 56px; border: 0; border-radius: 28px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.apply .btn:disabled { opacity: .6; cursor: default; }
.apply .btn:disabled:hover { background: var(--accent); }
.apply__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.apply__note a { color: #dddddd; text-decoration: underline; text-underline-offset: 3px; }
.apply__status { margin: 0; padding: 14px 16px; border-radius: 14px; background: rgba(255,122,140,.12); font-size: 15px; line-height: 1.45; color: #ffd0d6; }
.apply__status a { color: #ffffff; }
.apply__status:focus { outline: none; }
.apply-done { flex: 1 1 440px; min-width: 0; align-self: center; padding: 28px; border-radius: 24px; background: var(--surface);
  display: flex; align-items: flex-start; gap: 14px; outline: none; }
.apply-done svg { flex-shrink: 0; margin-top: 2px; }
.apply-done p { margin: 0; font-size: 18px; line-height: 1.45; color: var(--muted); }
.apply-done strong { color: var(--text); font-weight: 600; }
.apply-fallback { flex: 1 1 440px; min-width: 0; align-self: center; margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
/* Ловушка для ботов: человек её не видит и не доходит до неё Tab-ом; вне экрана, а не display: none,
   чтобы простые боты её всё же заполняли. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Слайдер стратегий: скрыт без данных; inline display: flex иначе перебил бы hidden */
[data-list]::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
.store:focus-visible { border-radius: 16px; }
[data-list] { padding: 6px; margin: -6px; scroll-padding-inline: 6px; }
@media (max-width: 719px) { .nav { display: none !important; } }
@media print { .js .reveal { opacity: 1; transform: none; } }

/* Страница автора (/@handle, /en/@handle): профиль по центру, под ним карточки стратегий.
   Размеры — с холста «Site-author-variants», вариант C; карточки — как в слайдере на главной
   (js/strategies.js), только за 90 дней и с «В плюс». Разметку заполняет js/author.js. */
.author { max-width: 1200px; min-height: 420px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) clamp(48px, 6vw, 80px);
  display: flex; flex-direction: column; align-items: center; gap: 30px; }
.author__head { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.author__photo { width: 120px; height: 120px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--raised);
  display: flex; align-items: center; justify-content: center; }
.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author__initials { font-size: 40px; font-weight: 700; letter-spacing: -.02em; color: #ddf1be; }
.author__name { max-width: 100%; margin: 0; font-size: clamp(32px, 5vw, 44px); line-height: 1.1; font-weight: 700;
  letter-spacing: -.025em; overflow-wrap: anywhere; }
.author__meta { max-width: 100%; margin: 0; font-size: 17px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.author__bio { max-width: 640px; margin: 0; font-size: 18px; line-height: 1.5; color: #dddddd; white-space: pre-line; overflow-wrap: anywhere; }
.author__actions { max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.author__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; }
.author__chip { max-width: 100%; min-height: 34px; padding: 6px 14px; border-radius: 17px; background: var(--surface);
  display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
a.author__chip--link { color: #ddf1be; text-decoration: none; }
a.author__chip--link:hover { color: #ffffff; background: var(--lifted); }
.author__share, .author__btn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: #232421; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.author__share:hover, .author__btn:hover { background: var(--raised); color: var(--text); }
.author__status { margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted); }
@media (pointer: coarse) {
  a.author__chip--link, .author__share, .author__btn { min-height: 44px; }
}

.author__body { width: 100%; max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.author__cards { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.author__cell { flex: 1 1 320px; min-width: 0; max-width: 442px; display: flex; }
.author__card { width: 100%; padding: 22px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.author__card:hover { background: var(--lifted); color: var(--text); }
.author__card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.author__card-title { min-width: 0; font-size: 19px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author__badge { flex-shrink: 0; height: 24px; padding: 0 9px; border-radius: 12px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; font-size: 12px; font-weight: 600; color: #dddddd; }
.author__result { display: flex; flex-direction: column; gap: 2px; }
.author__return { font-size: 30px; font-weight: 700; letter-spacing: -.6px; font-family: Menlo, 'SF Mono', ui-monospace, monospace; }
.author__return.is-up { color: #28a473; }
.author__return.is-down { color: #f63c55; }
.author__return.is-flat { color: var(--muted); }
.author__caption { font-size: 13px; color: var(--muted); }
.author__spark { display: block; }
.author__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: .5px solid #3c3e3b; }
.author__stat { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.author__stat-label { font-size: 12px; color: var(--muted); }
.author__stat-value { font-size: 15px; font-weight: 600; font-family: Menlo, 'SF Mono', ui-monospace, monospace; }
.author__young { font-size: 13px; line-height: 1.4; color: var(--muted); }
.author__cta { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); }
.author__card:hover .author__cta { color: var(--accent-hover); }
.author__empty { margin: 0; font-size: 16px; color: var(--muted); }
.author__note { max-width: 560px; margin: 0; text-align: center; font-size: 13px; line-height: 1.45; color: #7d7d7d; }
@media (max-width: 479px) {
  .author { padding-top: 20px; gap: 24px; }
  .author__photo { width: 96px; height: 96px; }
  .author__initials { font-size: 34px; }
  .author__meta { font-size: 16px; }
  .author__bio { font-size: 17px; }
  .author__card { padding: 20px; }
}
