/* Главные страницы и первый вход (31.10.2026) */
@keyframes hfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hfade, .hk, .hc2, .th-acts li, .hh { animation: hfade .45s ease both; }
.hm { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 18px; }
.hm-hello { display: flex; align-items: center; gap: 14px; }
.hm-hi { font-size: 22px; font-weight: 800; color: var(--pt-navy, #20275F); margin-bottom: 2px; }
.hm-how { background: #F4F6FC; border: 1px solid #E3E6F3; border-radius: 14px; padding: 10px 14px; }
.hm-how summary { cursor: pointer; font-weight: 700; color: #3E4294; }
.hm-how ol { margin: 8px 0 4px 18px; padding: 0; line-height: 1.55; } .hm-how li { margin: 4px 0; }
.hload { display: flex; gap: 14px; align-items: center; }
.hload p { margin: 0; opacity: .85; }
.hspin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #9EDC12; animation: hspin 1s linear infinite; flex: none; }
@keyframes hspin { to { transform: rotate(360deg); } }
.hk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hk { background: var(--ap-card, #fff); border-radius: 18px; padding: 14px 16px; box-shadow: 0 4px 18px rgba(31,40,72,.07); border: 1px solid #ECEEF6; display: flex; flex-direction: column; gap: 6px; position: relative; }
.hk-top { display: flex; align-items: center; gap: 8px; }
.hk-i { font-size: 20px; } .hk-l { flex: 1; font-size: 13.5px; color: #4b5079; line-height: 1.3; }
.hk-v b { font-size: 34px; font-weight: 800; color: var(--pt-navy, #20275F); letter-spacing: -.02em; }
.hk-d { min-height: 18px; }
.hd { font-size: 12.5px; font-weight: 700; color: #6b7090; } .hd.up { color: #2f8a00; } .hd.down { color: #c0392b; }
.hk-bar { height: 7px; background: #EEF0F7; border-radius: 6px; overflow: hidden; }
.hk-bar i { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.hq { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #B9BEDD; background: #fff; color: #3E4294; font-weight: 800; font-size: 12px; cursor: pointer; line-height: 1; padding: 0; }
.th-ai .hq { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); margin-right: 6px; }
.hq-pop { background: #20275F; color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; margin-top: 6px; box-shadow: 0 10px 26px rgba(32,39,95,.25); animation: hfade .25s ease both; }
.th-ai .hq-pop { background: rgba(255,255,255,.12); }
.hn-note { background: #FFF9E6; border-left: 4px solid #F2C230; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0; }
.hm-sec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hm-sec h2, h2.hm-sec { margin: 0; font-size: 19px; }
.hm-tabs { display: inline-flex; background: #EEF0F7; border-radius: 12px; padding: 3px; }
.hm-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 10px; font: inherit; font-weight: 700; color: #4b5079; cursor: pointer; }
.hm-tabs button.on { background: #fff; color: #20275F; box-shadow: 0 2px 8px rgba(31,40,72,.1); }
.hc2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; margin-top: 12px; }
.hc2 { margin: 0; }
.hc2-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.hc2-h h3 { margin: 0; font-size: 15.5px; }
.hc2-cv { position: relative; margin-top: 8px; }
.hh { border-bottom: 1px solid #F0F1F6; padding: 6px 0; }
.hh summary { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(0, 1fr) 120px 92px; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.hh summary::-webkit-details-marker { display: none; }
.hh summary a { font-weight: 700; color: #20275F; }
.hh-bar { height: 8px; background: #F0F1F6; border-radius: 6px; overflow: hidden; } .hh-bar i { display: block; height: 100%; border-radius: 6px; }
.hh-n { font-size: 12px; color: #6b7090; text-align: right; }
.hh ul { margin: 6px 0 4px 18px; font-size: 13.5px; }
.hgrew { display: flex; flex-direction: column; gap: 6px; }
.hgrew h3 { margin: 0 0 4px; }
.hgrew-i { display: flex; justify-content: space-between; gap: 10px; background: #EEFBE6; border-radius: 10px; padding: 8px 12px; color: #20275F; text-decoration: none; }
.hgrew-i span { color: #2f7a00; font-weight: 700; font-size: 13px; }
@media (max-width: 640px) { .hh summary { grid-template-columns: 1fr 80px; } .hh summary .muted, .hh-n { display: none; } .hk-v b { font-size: 28px; } .hc2-grid { grid-template-columns: 1fr; } }

/* Приветствие, выбор режима подсказок, видео */
.wl-ov { position: fixed; inset: 0; background: rgba(20,22,48,.55); backdrop-filter: blur(4px); z-index: 1000; display: grid; place-items: center; padding: 16px; animation: hfade .25s ease both; }
.wl-box { background: #fff; color: #20275F; border-radius: 22px; padding: 22px; max-width: 560px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.wl-box.wide { max-width: 900px; }
.wl-box h2 { margin: 6px 0 8px; } .wl-box h3 { margin: 16px 0 8px; font-size: 16px; }
.wl-box p { line-height: 1.55; }
.wl-logo { width: 54px; height: 54px; border-radius: 50%; }
.wl-modes { display: grid; gap: 8px; }
.wl-modes button { text-align: left; border: 1.5px solid #D9DCEE; background: #F7F8FC; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: #20275F; display: flex; flex-direction: column; gap: 2px; }
.wl-modes button:hover { border-color: #3E4294; background: #EEF0FA; }
.wl-modes button.on { border-color: #3E4294; background: #3E4294; color: #fff; }
.wl-modes.small3 { grid-template-columns: repeat(3, 1fr); }
.wl-modes small { color: #6b7090; } .wl-modes button.on small { color: #dfe3ff; }
.wl-vh { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; }
.wl-x { border: 0; background: #EEF0F7; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.wl-v { width: 100%; border-radius: 14px; background: #000; margin-top: 10px; aspect-ratio: 16 / 9; }
.wl-vids { display: grid; gap: 8px; }
.wl-vb { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: linear-gradient(120deg, #20275F, #3E4294); color: #fff; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; }
.wl-vb small { display: block; opacity: .8; font-size: 12px; }
.wl-play { width: 38px; height: 38px; border-radius: 50%; background: #9EDC12; color: #20275F; display: grid; place-items: center; font-size: 16px; flex: none; }
.wl-row { display: flex; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 640px) { .wl-modes.small3 { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { .wl-box { background: #1C1C1E; color: #F2F2F7; } .wl-modes button { background: #2C2C2E; color: #F2F2F7; border-color: #3A3A3C; } .hk, .hm-how { background: #1C1C1E; border-color: #2C2C2E; } .hk-v b, .hm-hi, .hh summary a { color: #F2F2F7; } }
/* Пояснение «?» — всплывающим окном поверх, а не внутри узкой карточки */
.hk-top, .hc2-h, .th-ai-h { position: relative; }
.hq-pop { position: absolute; top: calc(100% + 6px); right: 0; width: min(340px, 86vw); z-index: 30; }
.th-ai-h .hq-pop { top: 36px; }
.hk-top .hq-pop { left: 0; right: auto; }
@media (prefers-reduced-motion: reduce) { .hfade, .hk, .hc2, .th-acts li, .hh, .wl-ov { animation: none !important; } }
/* Тёмная тема (02.11.2026): остальные светлые плашки и тёмно-синий текст главных — см. конец public/style.css */
@media (prefers-color-scheme: dark) {
  .hm-how summary, .hq { color: #B4B7FF; }
  .hq { background: #2C2C2E; }
  .hk-l { color: #A1A6C8; }
  .hk-bar, .hh-bar { background: #2C2C2E; }
  .hn-note { background: rgba(242,194,48,.13); color: #F2F2F7; }
  .hm-tabs { background: #2C2C2E; } .hm-tabs button { color: #C7C7CC; } .hm-tabs button.on { background: #3A3A3C; color: #F2F2F7; }
  .hgrew-i { background: rgba(52,199,89,.15); color: #F2F2F7; } .hgrew-i span { color: #7BD88F; }
  .wl-modes button:hover { background: #3A3A3C; } .wl-x { background: #2C2C2E; color: #F2F2F7; } .wl-play { color: #F2F2F7; }
}
