/* Sign of Stars — оформление сайта. Обычный CSS без сборки (doc/plan.md §7).
   Макет: https://claude.ai/artifact/VBs4CZ4DDeAjAVmLXMUmJU (одобрен 04.10.2026).
   Цвета бота: ночной синий и золото. Сайт задуман тёмным, светлой темы нет. */

:root {
    --night: #0b1128;
    --night-deep: #080d20;
    --panel: #121a38;
    --panel-2: #141d3d;
    --panel-3: #0e1531;
    --ink: #efe9dc;
    --ink-soft: #cfd2e3;
    --text-2: #c2c6dc;
    --muted: #a3a8c6;
    --faint: #8f94b3;
    --soon: #7f84a4;
    --gold: #e3c27a;
    --gold-hi: #f3dca4;
    --on-gold: #141b38;
    --rule: rgba(227, 194, 122, .18);
    --rule-strong: rgba(227, 194, 122, .45);

    /* Marcellus — латиница; кириллицу берёт Forum, деванагари — Noto Serif Devanagari */
    --font-display: "Marcellus", "Forum", "Noto Serif Devanagari", Georgia, serif;
    --font-read: "Source Serif 4", "Noto Serif Devanagari", Georgia, serif;
    --font-ui: "Figtree", "Noto Serif Devanagari", system-ui, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.5 var(--font-ui); }
img { max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Россыпь звёзд — только на главной и в шапке, не под текстом статей */
.sky {
    background-color: var(--night);
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(239, 233, 220, .55) 50%, transparent 51%),
        radial-gradient(1px 1px at 72% 9%, rgba(239, 233, 220, .45) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 38% 62%, rgba(227, 194, 122, .6) 50%, transparent 51%),
        radial-gradient(1px 1px at 88% 44%, rgba(239, 233, 220, .4) 50%, transparent 51%),
        radial-gradient(1px 1px at 55% 30%, rgba(239, 233, 220, .35) 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 84%, rgba(239, 233, 220, .4) 50%, transparent 51%);
    background-size: 420px 420px;
}

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; text-wrap: balance; margin: 0; }
.h2 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.15; }
.lead { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.6; }

/* Кнопки */
.cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--gold); color: var(--on-gold); text-decoration: none; font-weight: 600;
    border-radius: 999px; padding: 16px 28px; font-size: 18px; min-height: 44px;
}
.cta:hover { background: var(--gold-hi); color: var(--on-gold); }
.ghost {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    color: var(--gold); text-decoration: none; font-weight: 500;
    border: 1px solid var(--rule-strong); border-radius: 999px; padding: 10px 18px;
}
.ghost:hover { border-color: var(--gold); color: var(--gold-hi); }

/* Шапка */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--gold-hi); }
.brand span { font-family: var(--font-display); font-size: 23px; letter-spacing: .06em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; font-size: 15px; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--gold-hi); }
.nav .soon { color: var(--soon); }
.badge { font-size: 11px; border: 1px solid #4a5280; border-radius: 99px; padding: 2px 7px; margin-left: 4px; }

.lang { position: relative; }
.lang summary {
    list-style: none; cursor: pointer; color: var(--ink-soft); font-size: 14px;
    border: 1px solid #39416b; border-radius: 8px; padding: 8px 12px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
    position: absolute; right: 0; z-index: 10; margin: 6px 0 0; padding: 8px 0; list-style: none; min-width: 200px;
    background: var(--panel-2); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
/* На узком экране шапка переносится и кнопка языка оказывается слева — меню
   открываем вправо, иначе оно уезжает за левый край. */
@media (max-width: 900px) { .lang ul { right: auto; left: 0; } }
.lang li a, .lang li span { display: block; padding: 8px 16px; text-decoration: none; color: var(--ink-soft); }
.lang li a:hover { background: var(--panel); color: var(--gold-hi); }
.lang .cur { color: var(--gold); }
.lang .off { opacity: .5; }

/* Главная: первый экран */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 84px 96px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero h1 { font-size: clamp(42px, 5.2vw, 68px); line-height: 1.04; }
.hero .sub { margin: 0; font-size: 20px; line-height: 1.6; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.hero-note { font-size: 15px; color: var(--muted); }
.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.hero-card { position: relative; width: 100%; max-width: 420px; }
.hero-card .stars { position: absolute; top: -40px; right: -30px; width: 120%; height: auto; opacity: .55; }
.hero-card img {
    position: relative; display: block; width: 100%; border-radius: 18px;
    border: 1px solid var(--rule-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); transform: rotate(2.5deg);
}
.hero-card .tag {
    position: absolute; left: -10px; top: 36px; background: var(--panel-2); border: 1px solid rgba(227, 194, 122, .4);
    border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

/* Как это работает */
.band { background: rgba(20, 29, 61, .72); border-block: 1px solid rgba(227, 194, 122, .14); }
.section { padding-block: 80px; display: flex; flex-direction: column; gap: 40px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: 14px; }
.step-n {
    width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 24px;
}
.steps h3 { margin: 0; font-size: 21px; font-weight: 600; }
.steps p { margin: 0; color: var(--text-2); line-height: 1.6; }

/* Темы */
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.row-head > div { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.themes li {
    border: 1px solid rgba(227, 194, 122, .28); border-radius: 14px; padding: 22px 18px; background: rgba(20, 29, 61, .6);
    display: flex; flex-direction: column; gap: 10px; min-height: 120px;
}
.themes strong { font-size: 18px; }
.themes span { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Скоро */
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding-bottom: 96px; }
.soon-card { border: 1px dashed rgba(143, 148, 179, .5); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.soon-card .eyebrow { color: var(--faint); font-size: 12px; }
.soon-card h3 { font-size: 28px; }
.soon-card p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Последний призыв */
.final { border-top: 1px solid var(--rule); }
.final .wrap { max-width: 900px; padding-block: 88px 96px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.final h2 { font-size: clamp(34px, 3.6vw, 46px); line-height: 1.1; }

/* Подвал */
.site-footer { border-top: 1px solid rgba(227, 194, 122, .12); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding-block: 28px; font-size: 14px; color: var(--faint); }
.site-footer .brand-name { font-family: var(--font-display); color: var(--ink-soft); margin-right: auto; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* --- Статьи (шаг 5, макет «Статья») --- */
.page { padding-block: 64px 96px; display: flex; flex-direction: column; gap: 40px; }
.page-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.page-head h1 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.08; }
.empty { padding-block: 40px; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.article-card {
    display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink);
    border-radius: 16px; background: var(--panel); border: 1px solid var(--rule); padding: 18px 18px 24px;
}
.article-card:hover { color: var(--gold-hi); border-color: var(--rule-strong); }
.article-card-art {
    height: 180px; border-radius: 10px; background: var(--night); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.article-card-art img { width: 100%; height: 100%; object-fit: cover; }
.article-card-meta { font-size: 13px; color: var(--faint); }
.article-card h3 { margin: 0; font-family: var(--font-read); font-size: 22px; line-height: 1.3; font-weight: 600; text-wrap: balance; }
.article-card p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }

.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 32px; display: flex; flex-direction: column; gap: 26px; }
.crumbs { font-size: 14px; }
.crumbs a { text-decoration: none; }
.article h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.article-cover { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--rule); }
.article-cover img { display: block; width: 100%; }

.prose { font-family: var(--font-read); font-size: 20px; line-height: 1.75; color: #e6e1d6; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 1.4em 0 .6em; color: var(--ink); text-wrap: balance; }
.prose h3 { font-size: 22px; line-height: 1.3; margin: 1.2em 0 .5em; color: var(--ink); }
.prose img { display: block; margin: 1.2em auto; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); }
.prose blockquote { border-left: 2px solid var(--gold); padding-left: 1em; color: var(--text-2); font-style: italic; }
.prose li { margin-bottom: .4em; }
.prose a { text-underline-offset: 3px; }

.bot-cta {
    border: 1px solid var(--rule-strong); border-radius: 18px; background: var(--panel-2); padding: 28px;
    display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
.bot-cta > div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bot-cta-title { font-family: var(--font-display); font-size: 25px; line-height: 1.2; }
.bot-cta-text { color: var(--text-2); font-size: 16px; line-height: 1.5; }
.bot-cta .cta { padding: 14px 26px; font-size: 17px; }

.related { padding-block: 40px 96px; display: flex; flex-direction: column; gap: 28px; }

/* --- Книга (шаг 7, макеты «Главная — книга» и «Глава») --- */
.book-hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.book-hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.book-hero h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
.book-annotation { font-family: var(--font-read); font-size: 19px; line-height: 1.65; color: #d8d6cf; max-width: 640px; }
.book-annotation p { margin: 0 0 .8em; }
.book-cover { flex: 0 1 300px; border-radius: 14px; border: 1px solid var(--rule-strong); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.contents { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.contents ol { list-style: none; margin: 0; padding: 0; }
.contents a, .book-block-list a {
    display: flex; gap: 16px; align-items: baseline; padding: 13px 0; text-decoration: none; color: var(--ink);
    border-bottom: 1px solid rgba(227, 194, 122, .12);
}
.contents a:hover, .book-block-list a:hover { color: var(--gold-hi); }
.contents .n, .book-block-list .n { font-family: var(--font-display); color: var(--gold); min-width: 28px; }
.contents .t, .book-block-list .t { flex: 1; min-width: 0; font-family: var(--font-read); font-size: 18px; }
.contents .d, .book-block-list .d { font-size: 13px; color: var(--faint); white-space: nowrap; }

.book-block { border: 1px solid rgba(227, 194, 122, .35); border-radius: 22px; background: var(--panel); display: flex; flex-wrap: wrap; overflow: hidden; }
.book-block-main { flex: 1 1 420px; min-width: 0; padding: clamp(28px, 3.4vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.book-block-main h2 { font-size: clamp(36px, 3.4vw, 46px); line-height: 1.1; }
.book-block-main p { margin: 0; font-family: var(--font-read); font-size: 19px; line-height: 1.65; color: #d8d6cf; }
.book-block-main .cta { padding: 13px 24px; font-size: 16px; }
.book-block-list { flex: 1 1 340px; min-width: 0; background: var(--panel-3); border-left: 1px solid var(--rule); padding: 40px 40px 36px; }
.book-block-list .label { font-size: 13px; color: var(--faint); margin-bottom: 10px; }

/* Глава: ночной режим — темнее, тише, крупнее */
body.night { background: var(--night-deep); }
.chapter { max-width: 720px; margin: 0 auto; padding: 40px 24px 96px; display: flex; flex-direction: column; gap: 36px; }
.chapter-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.chapter-tools a { color: #aeb2c9; text-decoration: none; }
.chapter-tools a:hover { color: var(--gold-hi); }
.chapter-tools .size { display: flex; gap: 6px; }
.chapter-tools button {
    background: none; border: 1px solid #2c3459; color: #aeb2c9; border-radius: 8px; min-width: 44px; min-height: 40px;
    font: inherit; cursor: pointer;
}
.chapter-tools button:hover { border-color: var(--gold); color: var(--gold-hi); }
.chapter-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.chapter-head .eyebrow { letter-spacing: .2em; }
.chapter-head h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; }
.chapter-meta { font-size: 14px; color: var(--faint); }

.book-text { font-family: var(--font-read); font-size: 21px; line-height: 1.8; color: #e9e4d8; overflow-wrap: break-word; }
.book-text p { margin: 0 0 1.2em; text-indent: 1.6em; }
.book-text > p:first-child { text-indent: 0; }
.book-text > p:first-child::first-letter {
    font-family: var(--font-display); float: left; font-size: 3.5em; line-height: .9; padding: 6px 10px 0 0; color: var(--gold);
}
.book-text h2, .book-text h3 { font-family: var(--font-display); font-weight: 400; text-align: center; color: var(--ink); margin: 1.6em 0 .8em; }
.book-text hr { border: 0; text-align: center; margin: 1.6em 0; }
.book-text hr::before { content: "✦"; color: var(--gold); }
.book-text blockquote { margin: 0 0 1.2em; padding-left: 1em; border-left: 2px solid var(--rule-strong); font-style: italic; }

.chapter-bot { margin: 0; border-top: 1px solid var(--rule); padding-top: 22px; font-size: 16px; color: var(--muted); line-height: 1.6; text-align: center; }
.chapter-pager { display: flex; flex-wrap: wrap; gap: 14px; }
.pager-card {
    display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink);
    border: 1px solid rgba(227, 194, 122, .25); border-radius: 14px; padding: 16px 20px; flex: 1 1 240px; min-width: 0;
}
a.pager-card:hover { border-color: var(--gold); color: var(--gold-hi); }
.pager-card.next { text-align: right; }
.pager-card.soon { opacity: .65; }
.pager-card .k { font-size: 13px; color: var(--faint); }
.pager-card .v { font-family: var(--font-read); font-size: 17px; }

/* --- Страницы ошибок (шаг 8) --- */
.error-page { padding-block: 96px 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 760px; }
.error-code { font-family: var(--font-display); font-size: clamp(80px, 12vw, 140px); line-height: 1; color: var(--gold); opacity: .85; }
.error-page h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }

/* --- Страница бота --- */
.get-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.get-card { border: 1px solid var(--rule); border-radius: 18px; background: var(--panel); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.get-card h3 { font-size: 28px; line-height: 1.2; }
.get-card p { margin: 0; color: var(--text-2); line-height: 1.6; }
.get-card blockquote { margin: 0; padding: 18px 20px; border-left: 2px solid var(--gold); background: var(--night);
    font-family: var(--font-read); font-style: italic; font-size: 18px; line-height: 1.6; color: #e6e1d6; border-radius: 0 12px 12px 0; }
.theme-list { margin: 0; padding-left: 1.1em; color: var(--text-2); line-height: 1.8; }
.theme-list strong { color: var(--ink); }
.tips { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tips li { border: 1px solid var(--rule); border-radius: 14px; padding: 18px 20px; color: var(--text-2); line-height: 1.55; background: rgba(20, 29, 61, .5); }
.faq details { border-bottom: 1px solid var(--rule); padding-block: 4px; max-width: 820px; }
.faq summary { cursor: pointer; padding: 16px 0; font-size: 19px; font-weight: 500; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--text-2); line-height: 1.65; font-size: 17px; }

/* --- Баннер согласия на куки аналитики --- */
.consent {
    position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50;
    max-width: 760px; margin: 0 auto; background: var(--panel-2); border: 1px solid var(--rule-strong); border-radius: 16px;
    padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
/* display: flex выше перебивает атрибут hidden — без этой строки баннер не прячется */
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; min-width: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.consent-actions { display: flex; gap: 10px; }
.consent .cta { padding: 10px 20px; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.consent .ghost { background: none; cursor: pointer; font-family: inherit; font-size: 15px; }

/* Декоративные звёзды вокруг карточки шире экрана телефона — не даём странице
   сдвигаться вбок. clip, а не hidden: не ломает прилипание шапки. */
.sky { overflow-x: clip; }
