/* «Тиша» RU: палитра и типографика американского myteesha.com (src/styles/global.css), без Tailwind. */
:root {
  --night: #161a31;
  --night-2: #1f2443;
  --night-3: #2c3358;
  --paper: #f5efe6;
  --paper-2: #ece3d5;
  --ink: #161a31;
  --ink-soft: #5a5d70;
  --line: #ddd2c2;
  --lamp: #f0a34a;
  --lamp-deep: #e08d2c;
  --lamp-glow: #f7c98a;
  --moon: #f6e7bf;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncG type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncB type='linear' slope='2.2' intercept='-.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.grain { background-image: var(--grain); }
::selection { background: var(--lamp-glow); color: var(--night); }

.wrap { max-width: 42rem; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 64rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap, .wrap-wide { padding: 0 24px; } }
.main { padding-top: 24px; padding-bottom: 80px; }

/* Шапка */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.topbar-link { font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.topbar-link:hover { color: var(--ink); }
.topbar-link-dark { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.topbar-link-dark:hover { color: var(--lamp); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logo-dark { color: var(--paper); }
.logo-mark { width: 24px; height: 24px; }

/* Заголовки */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lamp-deep); }
.eyebrow-row { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; margin-top: 20px; }
.eyebrow-soft { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.h1 { margin-top: 8px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.12; text-wrap: balance; }
@media (min-width: 640px) { .h1 { font-size: 42px; } }
.h1-big { font-size: 40px; }
@media (min-width: 640px) { .h1-big { font-size: 52px; } }
.h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.lead { margin-top: 12px; max-width: 42rem; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.lead a { color: var(--lamp-deep); text-underline-offset: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.meta a { text-decoration: none; }
.meta a:hover { color: var(--lamp-deep); }
.banner { margin-top: 24px; width: 100%; height: auto; border-radius: 24px; }
.preview { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }

/* Оглавление */
.toc { margin-top: 32px; border-radius: 24px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); padding: 20px; }
@media (min-width: 640px) { .toc { padding: 24px; } }
.toc-label { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.toc ol { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px 24px; font-size: 15px; }
@media (min-width: 640px) { .toc ol { grid-template-columns: 1fr 1fr; } }
.toc li { display: flex; gap: 8px; }
.toc li span { color: var(--lamp-deep); font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--lamp-deep); }

/* Длинный текст: уроки и статьи */
.prose-lesson { margin-top: 32px; font-size: 17px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 92%, transparent); }
.prose-lesson > * + * { margin-top: 1em; }
.prose-lesson h2 { margin-top: 1.8em; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--ink); scroll-margin-top: 24px; }
.prose-lesson h3 { margin-top: 1.4em; font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--ink); }
.prose-lesson ul, .prose-lesson ol { padding-left: 1.4em; list-style: disc; }
.prose-lesson ol { list-style: decimal; }
.prose-lesson li + li { margin-top: 0.4em; }
.prose-lesson a { color: var(--lamp-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose-lesson hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose-lesson strong { color: var(--ink); }
.prose-lesson figure { margin: 1.8em 0; }
.prose-lesson figure img { width: 100%; height: auto; border-radius: 20px; }
.prose-lesson figcaption { margin-top: 0.6em; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.prose-lesson blockquote { margin: 1.6em 0; border-radius: 22px; background: var(--paper-2); box-shadow: inset 4px 0 0 var(--lamp); padding: 18px 22px; }
.prose-lesson blockquote p { margin: 0; }
.prose-lesson blockquote p + p { margin-top: 0.5em; }
.prose-lesson blockquote > p:first-child > strong:first-child { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.12; font-weight: 400; color: var(--lamp-deep); margin-bottom: 4px; }
.prose-lesson table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose-lesson th, .prose-lesson td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.prose-answer > p:first-child { border-radius: 24px; background: var(--paper-2); box-shadow: inset 4px 0 0 var(--lamp); padding: 20px 22px; }
.prose-answer blockquote > p:first-child > strong:first-child { font-size: 26px; line-height: 1.15; margin-bottom: 6px; }

.lesson-video { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-radius: 18px; padding: 14px 18px; font-size: 15.5px; box-shadow: inset 0 0 0 1px var(--line); background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.lesson-video-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--lamp); color: var(--night); font-size: 11px; align-self: center; }
.lesson-video a { font-weight: 600; }
.lesson-video-meta { color: var(--ink-soft); }
.lesson-tonight, .lesson-buy { margin-top: 2.2em; border-radius: 28px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); padding: 4px 22px 22px; }
.lesson-tonight > * + *, .lesson-buy > * + * { margin-top: 1em; }
.lesson-tonight > h2, .lesson-buy > h2 { margin-top: 0.9em; }
.lesson-tonight > h2::before { content: ""; display: inline-block; width: 20px; height: 10px; margin-right: 10px; border-radius: 20px 20px 0 0; background: var(--lamp); vertical-align: middle; }
.lesson-buy { background: transparent; }
.lesson-buy > h2::before { content: "🛒"; margin-right: 8px; font-size: 20px; }

.prose-sources ul { list-style: none; padding-left: 0; counter-reset: src; }
.prose-sources li { counter-increment: src; position: relative; padding-left: 2em; }
.prose-sources li::before { content: counter(src); position: absolute; left: 0; color: var(--lamp-deep); font-variant-numeric: tabular-nums; }
.sources { margin-top: 48px; font-size: 14px; color: var(--ink-soft); scroll-margin-top: 24px; }
.sources h2 { margin-top: 0; }
.sources-small h2 { font-size: 18px; }

/* Ночные блоки: CTA и ритуал */
.cta, .ritual { margin-top: 48px; border-radius: 24px; background: var(--night) var(--grain); color: var(--paper); padding: 24px; }
@media (min-width: 640px) { .cta { padding: 32px; } }
.cta-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lamp); }
.cta-title { margin-top: 8px; font-family: var(--serif); font-size: 26px; line-height: 1.3; }
.cta-text { margin-top: 12px; font-size: 16px; line-height: 1.6; color: color-mix(in srgb, var(--paper) 80%, transparent); }
.cta-note { margin-top: 12px; font-size: 14px; color: color-mix(in srgb, var(--paper) 65%, transparent); }
.ritual ul { margin-top: 12px; padding-left: 20px; }
.ritual li + li { margin-top: 6px; }
.ritual-note { margin-top: 18px; font-size: 15px; color: var(--lamp-glow); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 20px; padding: 0 24px; border-radius: 999px; background: var(--lamp); color: var(--night); font-weight: 600; font-size: 16px; text-decoration: none; transition: background .2s; }
.btn:hover { background: var(--lamp-glow); }
.btn-big { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.row { display: flex; flex-wrap: wrap; gap: 0 12px; }

/* Прогресс урока */
.progress { display: flex; gap: 4px; }
.progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.progress span.on { background: var(--lamp); }
.h1-lesson { font-size: 34px; }
@media (min-width: 640px) { .h1-lesson { font-size: 44px; } }
.support { margin-top: 32px; font-size: 14px; color: var(--ink-soft); }
.support a { color: var(--lamp-deep); }

/* Карточки статей */
.more { margin-top: 56px; }
.cards { list-style: none; padding: 0; margin-top: 20px; display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards-big, .home-cards { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 24px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .2s; }
.card:hover { box-shadow: inset 0 0 0 1px var(--lamp); }
.card img { width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; }
.card-ph { display: grid; place-items: center; aspect-ratio: 5 / 2; background: var(--night) var(--grain); }
.card-ph svg { width: 56px; height: 56px; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.card-title { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.card:hover .card-title { color: var(--lamp-deep); }
.card-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.card-meta { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--ink-soft); }
.cards-big { margin-top: 32px; gap: 20px; }

/* Главная */
.hero { background-color: var(--night); color: var(--paper); }
.hero-inner { padding-top: 40px; padding-bottom: 64px; }
@media (min-width: 640px) { .hero-inner { padding-top: 72px; padding-bottom: 96px; } }
.hero-title { margin-top: 12px; max-width: 46rem; font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.1; text-wrap: balance; }
@media (min-width: 640px) { .hero-title { font-size: 58px; } }
.hero-text { margin-top: 20px; max-width: 38rem; font-size: 18px; line-height: 1.6; color: color-mix(in srgb, var(--paper) 82%, transparent); }
.hero-note { margin-top: 16px; max-width: 34rem; font-size: 14px; line-height: 1.55; color: color-mix(in srgb, var(--paper) 65%, transparent); }
.home-grid { display: grid; gap: 40px; padding-top: 24px; }
@media (min-width: 800px) { .home-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.ticks { list-style: none; padding: 0; margin-top: 16px; font-size: 17px; line-height: 1.55; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li + li { margin-top: 10px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--lamp); color: var(--night); font-size: 12px; font-weight: 700; }
.plan { margin-top: 56px; }
.plan-grid { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 800px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan-week { border-radius: 24px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); padding: 20px 22px; }
.plan-week h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.plan-week ol { margin-top: 10px; padding-left: 1.6em; font-size: 15.5px; line-height: 1.5; }
.plan-week li::marker { color: var(--lamp-deep); font-variant-numeric: tabular-nums; }
.notfound { min-height: 50vh; }

/* Подвал */
.footer { background-color: var(--night); color: var(--paper); }
.footer .wrap-wide { padding-top: 48px; padding-bottom: 48px; }
.footer-top { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 768px) { .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.footer-note { max-width: 36rem; font-size: 13px; line-height: 1.6; color: color-mix(in srgb, var(--paper) 60%, transparent); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 32px; font-size: 14px; }
.footer-nav a { color: color-mix(in srgb, var(--paper) 85%, transparent); text-decoration: none; }
.footer-nav a:hover { color: var(--lamp); }
.footer-copy { margin-top: 28px; font-size: 13px; color: color-mix(in srgb, var(--paper) 50%, transparent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.nowrap { white-space: nowrap; }
