:root {
  --canvas: #fffaf7;
  --stone: #f5ebe6;
  --blush: #f1d9d6;
  --ink: #2a1d23;
  --muted: #806e75;
  --line: #ecdfd9;
  --rose: #b8476a;
  --plum: #3a1f2c;
  --sage: #dfe5d9;
  --sand: #efe1cc;
  --lilac: #e6dcec;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --gutter: clamp(16px, 3vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #1c1518; --stone: #251c20; --blush: #3a262e; --ink: #f3e9ec; --muted: #b29fa7;
    --line: #34272d; --rose: #e48aa6; --plum: #120c0f; --sage: #2c3329; --sand: #362c20; --lilac: #2f2836;
  }
}
:root[data-theme="dark"] {
  --canvas: #1c1518; --stone: #251c20; --blush: #3a262e; --ink: #f3e9ec; --muted: #b29fa7;
  --line: #34272d; --rose: #e48aa6; --plum: #120c0f; --sage: #2c3329; --sand: #362c20; --lilac: #2f2836;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

/* Общие мелочи */
.kicker { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rose); }
.label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.label a { color: var(--rose); letter-spacing: 0; text-transform: none; font-size: .8rem; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blush); color: var(--plum); font-size: .72rem; font-weight: 600; }
.title { margin: 0; font: 600 1.75rem/1.1 var(--serif); letter-spacing: -0.015em; }
.block { padding-top: 40px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }

/* Шапка */
.masthead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.masthead__row { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { font: 600 1.55rem/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; }
.brand em { color: var(--rose); font-style: italic; }
.brand--light { color: #fff; }
.search { position: relative; margin-left: auto; width: min(320px, 40vw); }
.search__input { width: 100%; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--stone); color: var(--ink); font: inherit; font-size: .85rem; transition: border-color .2s, background .2s; }
.search__input:focus { outline: none; border-color: var(--rose); background: var(--canvas); }
.search__results { position: absolute; top: 44px; right: 0; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 6px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgb(42 29 35 / .14); }
.search__results a { display: block; padding: 8px 10px; border-radius: 10px; font-size: .88rem; }
.search__results a:hover { background: var(--stone); }
.search__results small { display: block; color: var(--rose); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.search__empty { margin: 0; padding: 10px; color: var(--muted); font-size: .85rem; }
.burger { position: relative; display: none; }
.burger summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-content: center; gap: 5px; }
.burger summary::-webkit-details-marker { display: none; }
.burger summary span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .25s ease; }
.burger[open] summary span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[open] summary span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.burger__panel { position: absolute; right: 0; top: 48px; width: min(280px, calc(100vw - 32px)); padding: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgb(42 29 35 / .14); display: grid; }
.burger__panel a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; font-size: .9rem; }
.burger__panel a:hover { background: var(--stone); }
.burger__panel small { color: var(--muted); }
.rubricbar { display: flex; gap: 22px; height: 40px; align-items: center; overflow-x: auto; scrollbar-width: none; font-size: .82rem; font-weight: 500; color: var(--muted); border-top: 1px solid var(--line); }
.rubricbar::-webkit-scrollbar { display: none; }
.rubricbar__link { position: relative; white-space: nowrap; transition: color .2s; }
.rubricbar__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.rubricbar__link:hover, .rubricbar__link.is-current { color: var(--ink); }
.rubricbar__link:hover::after, .rubricbar__link.is-current::after { transform: scaleX(1); }

/* Бегущая строка */
.ticker { overflow: hidden; background: var(--plum); color: #f3e2e8; font-size: .8rem; white-space: nowrap; }
.ticker__track { display: inline-flex; gap: 18px; padding: 9px 0; animation: ticker 90s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span { color: var(--blush); opacity: .6; }
.ticker a:hover { color: #fff; text-decoration: underline; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Миниатюры */
.thumb { position: relative; display: block; flex: none; width: 88px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--blush); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.thumb--empty { display: grid; place-items: center; }
.thumb--empty b { font: italic 600 2.2rem/1 var(--serif); color: var(--plum); opacity: .35; }
.thumb--tile { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.thumb--tile.thumb--empty b { font-size: 3.4rem; }
.thumb--lead { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); margin-bottom: 14px; }
.thumb--lead.thumb--empty b { font-size: 5rem; }
a:hover .thumb img { transform: scale(1.05); }
.tone-0 { background: linear-gradient(135deg, var(--blush), var(--sand)); }
.tone-1 { background: linear-gradient(135deg, var(--sage), var(--stone)); }
.tone-2 { background: linear-gradient(135deg, var(--lilac), var(--blush)); }
.tone-3 { background: linear-gradient(135deg, var(--sand), var(--sage)); }

/* Обложка главной: главная статья + выбор редакции + секрет и гороскоп */
.cover { display: grid; grid-template-columns: 1.35fr 1fr .95fr; gap: 28px; padding-top: 28px; }
.lead-story__title { display: block; margin: 6px 0 8px; font: 600 2rem/1.08 var(--serif); letter-spacing: -0.02em; transition: color .2s; }
.lead-story:hover .lead-story__title { color: var(--rose); }
.lead-story__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .9rem; }
.cover__col { min-width: 0; }
.picks { counter-reset: n; }
.picks li + li { border-top: 1px solid var(--line); }
.picks a { display: flex; gap: 14px; padding: 11px 0; font: 600 1.12rem/1.2 var(--serif); transition: color .2s; }
.picks a:hover { color: var(--rose); }
.picks__n { flex: none; width: 26px; font: italic 600 1.6rem/1 var(--serif); color: var(--rose); }

/* Секрет дня */
.secret { padding: 18px; border-radius: var(--radius); background: var(--plum); color: #f6e9ee; }
.secret__label { margin: 0 0 8px; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blush); }
.secret__text { margin: 0 0 14px; font: italic 500 1.2rem/1.3 var(--serif); }
.secret__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; }
.secret__link { color: var(--blush); }
.secret__next { padding: 6px 12px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; transition: background .2s; }
.secret__next:hover { background: rgb(255 255 255 / .1); }

/* Гороскоп */
.zodiac { margin-top: 18px; }
.zodiac__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zodiac__grid a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--stone); font-size: .68rem; color: var(--muted); transition: background .2s, color .2s, transform .2s; }
.zodiac__grid a:hover { background: var(--blush); color: var(--ink); transform: translateY(-2px); }
.zodiac__sym { font-size: 1.25rem; line-height: 1; color: var(--rose); }

/* Подборки */
.sets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.set { padding: 18px; border-radius: var(--radius); }
.set__count { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--plum); opacity: .6; }
.set__title { margin: 4px 0 10px; font: 600 1.35rem/1.1 var(--serif); color: var(--plum); }
.set li { padding: 6px 0; border-top: 1px solid rgb(58 31 44 / .12); font-size: .84rem; line-height: 1.35; color: var(--plum); }
.set a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Плитки */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile__title { display: block; margin-top: 3px; font: 600 1.02rem/1.2 var(--serif); transition: color .2s; }
.tile:hover .tile__title { color: var(--rose); }

/* Строка-статья */
.row { display: flex; gap: 14px; align-items: flex-start; }
.row__text { min-width: 0; }
.row__title { display: block; margin: 3px 0 4px; font: 600 1.12rem/1.2 var(--serif); transition: color .2s; }
.row:hover .row__title { color: var(--rose); }
.row__lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .84rem; }
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.rows--side { grid-template-columns: 1fr; gap: 12px; }
.rows--side .thumb { width: 64px; }
.rows--side .row__title { font-size: 1rem; }

/* Рубрики на главной */
.rubrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; padding-bottom: 56px; }
.rubric { padding-top: 14px; border-top: 2px solid var(--ink); }
.rubric__title { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; font: 600 1.4rem/1.1 var(--serif); }
.rubric__title a:hover { color: var(--rose); }
.rubric__title small { font: 500 .78rem var(--sans); color: var(--muted); }
.rubric__more { margin-top: 10px; }
.rubric__more li { padding: 7px 0; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.35; }
.rubric__more a:hover { color: var(--rose); }

/* Рубрика и статья: колонка + сайдбар */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 24px; padding-bottom: 48px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--muted); }
.crumbs a:hover { color: var(--rose); }
.page-title { margin: 10px 0 6px; font: 600 2.6rem/1.05 var(--serif); letter-spacing: -0.02em; }
.page-title small { font: 500 .85rem var(--sans); color: var(--muted); letter-spacing: 0; vertical-align: middle; }
.page-lead { margin: 0 0 26px; max-width: 620px; color: var(--muted); }
.layout__side { display: grid; gap: 20px; align-content: start; }
.side-sticky { position: sticky; top: 118px; display: grid; gap: 20px; }
.side-box { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.side-list li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.side-list li:first-child { border-top: 0; }
.side-list a:hover { color: var(--rose); }
.side-list small { color: var(--muted); }

.article { max-width: 720px; }
.article__title { margin: 10px 0 12px; font: 600 clamp(2rem, 4vw, 2.9rem)/1.06 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--muted); font-size: .8rem; }
.article__cover { margin: 0 0 24px; }
.article__cover img { width: 100%; aspect-ratio: 4 / 3; max-height: 460px; object-fit: cover; border-radius: var(--radius); }
.toc { margin: 0 0 24px; padding: 14px 18px; border-radius: var(--radius); background: var(--stone); }
.toc ol { counter-reset: t; }
.toc li { counter-increment: t; padding: 4px 0; font-size: .88rem; }
.toc li::before { content: counter(t) ". "; color: var(--rose); font-weight: 600; }
.toc a:hover { color: var(--rose); }
.prose { font-size: 1rem; line-height: 1.7; }
.prose > p:first-of-type { font-size: 1.1rem; color: var(--ink); }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 1.6em 0 .5em; font: 600 1.65rem/1.15 var(--serif); letter-spacing: -0.01em; }
.prose h3 { margin: 1.4em 0 .4em; font: 600 1.3rem/1.2 var(--serif); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--rose); }
.prose a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin: 1.2em auto; border-radius: 14px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-radius: 14px; background: var(--blush); font: italic 500 1.25rem/1.35 var(--serif); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .9rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }

/* Подвал */
.footer { margin-top: 24px; background: var(--plum); color: #f3e6ea; padding: 44px 0 24px; font-size: .88rem; }
.footer__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 36px; }
.footer__note { max-width: 320px; color: #c9b3bb; margin: 12px 0 0; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 20px; }
.footer__links a { padding: 4px 0; width: fit-content; transition: opacity .2s; }
.footer__links a:hover { opacity: .55; }
.footer__bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .12); color: #a78f98; font-size: .78rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1080px) {
  .cover { grid-template-columns: 1fr 1fr; }
  .cover .lead-story { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 24px; align-items: start; }
  .cover .lead-story .thumb--lead { grid-row: span 3; margin: 0; }
  .sets { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .rubrics { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .side-sticky { position: static; }
}
@media (max-width: 720px) {
  .masthead__row { height: 54px; gap: 10px; }
  .brand { font-size: 1.3rem; }
  .search { width: auto; flex: 1; }
  .burger { display: block; }
  .rubricbar { display: none; }
  .cover, .cover .lead-story { grid-template-columns: 1fr; }
  .cover .lead-story .thumb--lead { margin-bottom: 12px; }
  .lead-story__title { font-size: 1.6rem; }
  .sets, .rubrics, .rows { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .row .thumb { width: 72px; }
  .page-title { font-size: 2rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__links { grid-template-columns: 1fr 1fr; }
  html { scroll-padding-top: 70px; }
}
