/* ===========================================================================
   Энергия дня — Слой 5. Современный минимализм, графитовый фон, один акцент.
   Единая тёмная тема (одинаково читаемо днём и ночью). Мобильный приоритет.
   =========================================================================== */

:root {
  /* Единая графитовая тема: одинаково читаемо днём и ночью.
     Один акцент на всё — янтарный. Никаких коричневых тонов. */
  --bg:        #0E1116;
  --bg-soft:   #161B22;
  --surface:   #161B22;
  --surface-2: #1B212B;
  --text:      #E8E6E1;
  --text-soft: #AEB4BE;
  --muted:     #7C828D;
  --accent:    #F0B35B;
  --accent-2:  #F4C079;
  --chip-bg:   #1B212B;
  --chip-text: #AEB4BE;
  --border:    rgba(232, 230, 225, 0.10);
  --border-2:  rgba(232, 230, 225, 0.06);
  --shadow:    rgba(0, 0, 0, 0.40);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-soft), transparent 70%),
    url('/static/pattern.svg');
  background-attachment: scroll, fixed;
  background-size: auto, 600px 600px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 44px 20px 48px;
}

/* ── Шапка ─────────────────────────────────────────────────────────────── */
.head { text-align: center; padding: 12px 0 22px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__mark { color: var(--accent); font-size: 1.1rem; opacity: 0.85; }
.brand__title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(240, 179, 91, 0.45);
}
.head__date {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

/* ── Переключатель дней ────────────────────────────────────────────────── */
.switch {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 5px;
  margin: 0 auto 26px;
  max-width: 360px;
}
.switch__btn {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}
.switch__btn:hover { color: var(--text); }
.switch__btn.is-active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px var(--shadow);
}

/* ── Общая карточка ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 2px 12px var(--shadow);
}

/* ── Спектрограмма ─────────────────────────────────────────────────────── */
.spectro { margin: 0 0 24px; }
.spectro__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 14px var(--shadow);
}
.spectro__cap {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Метка секции ──────────────────────────────────────────────────────── */
.section__label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.section__label--center { text-align: center; }

/* ── Расклад дня (свёрнутый аккордеон) ─────────────────────────────────── */
.rasklad {
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.rasklad__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease;
}
.rasklad__summary::-webkit-details-marker { display: none; }
.rasklad__summary:hover,
.rasklad__summary:active { background: var(--surface-2); }
.rasklad__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.rasklad__label {
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
}
.rasklad__count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.rasklad__chevron {
  flex: none;
  color: var(--text-soft);
  transition: transform 0.28s ease;
}
.rasklad[open] .rasklad__chevron { transform: rotate(180deg); }
.rasklad[open] .rasklad__summary { border-bottom: 1px solid var(--border-2); }

/* Мягкое раскрытие содержимого. */
.rasklad[open] .systems__list { animation: rasklad-reveal 0.28s ease; }
@keyframes rasklad-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Сухие данные систем (внутри аккордеона) ───────────────────────────── */
.systems__list { list-style: none; display: flex; flex-direction: column; gap: 1px;
  background: var(--border-2); }

.syscard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--surface);
}
.syscard__title {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.syscard__fact {
  font-size: 0.97rem;
  color: var(--text);
}
.syscard__kw {
  justify-self: end;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--chip-text);
  background: var(--chip-bg);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── Расшифровка (главный блок) ────────────────────────────────────────── */
.reading { padding: 26px 22px 28px; }
.reading__body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.16rem;
  line-height: 1.78;
  color: var(--text);
}
.reading__body p + p { margin-top: 1.05em; }

/* Последний абзац — «итог дня»: чуть крупнее, тонкая линия слева, ✦. */
.reading__body p:last-child:not(:only-child) {
  font-size: 1.08em;
  margin-top: 1.4em;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}
.reading__body p:last-child:not(:only-child)::before {
  content: "✦ ";
  color: var(--accent);
}

/* ── Тизер ─────────────────────────────────────────────────────────────── */
.teaser { padding: 28px 24px; text-align: center; }
.teaser__badge {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chip-text);
  background: var(--chip-bg);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 600;
}
.teaser__text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text);
}

/* ── Заглушка ──────────────────────────────────────────────────────────── */
.empty { padding: 44px 24px; text-align: center; }
.empty__mark { font-size: 2rem; color: var(--accent); opacity: 0.7; display: block; margin-bottom: 14px; }
.empty__text { font-size: 1.1rem; color: var(--text); margin-bottom: 6px; }
.empty__hint { color: var(--muted); font-size: 0.94rem; }

/* ── Платные продукты ──────────────────────────────────────────────────── */
.products { margin-bottom: 26px; }
.products__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 22px 20px;
}
.product__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.product__desc {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}
.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-2);
  padding-top: 16px;
  margin-top: auto;
}
.product__price {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
}
.product__btn {
  margin-left: auto;
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px var(--shadow);
  transition: background 0.18s ease, transform 0.12s ease;
}
.product__btn:hover { background: var(--accent-2); }
.product__btn:active { transform: translateY(1px); }

/* ── Подвал ────────────────────────────────────────────────────────────── */
.foot { text-align: center; padding-top: 38px; }
.foot__mark { color: var(--accent); opacity: 0.5; letter-spacing: 0.3em; font-size: 0.8rem; }
.foot__text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot__link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.18s ease;
}
.foot__link:hover { color: var(--accent-2); }

/* ── Чуть просторнее на больших экранах ────────────────────────────────── */
@media (min-width: 540px) {
  .brand__title { font-size: 1.75rem; }
}

/* ── Шрифт Lora для читаемого текста (расшифровка, данные дня, тизер) ───── */
.reading__body,
.teaser__text,
.systems__list {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
}
.reading__body { font-size: 18px; line-height: 1.7; }
.teaser__text  { font-size: 18px; line-height: 1.7; }
.syscard__fact { font-size: 17px; line-height: 1.7; }

/* Подсветка названий систем дня в тексте расшифровки. */
.term { color: #F5A623; }

/* ── Декоративный слой «газетные колонки»: поверх фона, под контентом ──── */
body::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: 0;
  pointer-events: none;
  background-image: url('/static/newspaper.svg');
  background-repeat: repeat;
  background-size: 900px auto;
  background-position: center top;
  filter: blur(6px);
  opacity: 0.07;
}

/* ── Кнопка канала Telegram (над заголовком, по центру) ────────────────── */
.tg-top { text-align: center; padding-top: 2px; margin-bottom: 12px; }
.tg-channel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.tg-channel:hover {
  border-color: rgba(245, 166, 35, 0.55);
  color: var(--text);
  background: var(--surface);
}
.tg-channel__icon { flex: none; }
