/* Блог «Дентики». Основа — одобренный макет 05_сайт/макет/style.css (27.09.2026),
   токены — 05_сайт/дизайн_план.md, разделы 3–4. Меняя токены здесь, макет не трогать: он — эталон согласования. */

/* Manrope — свои файлы, не Google Fonts (план дизайна, раздел 4). Лицензия SIL OFL — fonts/OFL.txt.
   latin-ext нужен ради знака ₽: в кириллице и латинице его нет */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --graphite: #303743;
  --fog: #F3F3F7;
  --sheet: #FFFFFF;
  --blue: #5683F5;
  --ink: #3A63D8;
  --haze: #EBF0FE;
  --muted: #676E7A;
  --line: #DCDDE3;

  --r-sheet: 28px;
  --r-panel: 16px;
  --r-btn: 10px;

  --gutter: 16px;
}

@media (min-width: 760px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--graphite);
  font: 400 17px/1.65 "Manrope", Arial, sans-serif;
}

@media (min-width: 760px) {
  body { font-size: 18px; }
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Полоса предпросмотра — только в 05_сайт/предпросмотр/, в боевой сборке её нет */
.preview-note {
  background: var(--graphite);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px var(--gutter);
  text-align: center;
}

/* Шапка */
.masthead {
  margin-top: 16px;
  background: var(--sheet);
  border-radius: var(--r-panel);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img { height: 20px; width: auto; }

.brand-blog {
  font-weight: 500;
  font-size: 17px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  line-height: 1.2;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 15px;
  font-weight: 500;
}

.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--blue); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); }

/* Хлебные крошки и заголовок статьи — на сером, как заголовок основного сайта */
.crumbs {
  margin: 40px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "›"; padding: 0 8px; }
.crumbs a { text-decoration-thickness: 1px; }

.headline {
  margin: 12px 0 32px;
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 17em;
  text-wrap: balance;
}

/* Статья: колонка автора и оглавления слева, белый лист справа */
.article { display: grid; grid-template-columns: minmax(0, 1fr); }

.author {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 14px;
  align-items: start;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.45;
}

.avatar {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--haze);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 17px;
  overflow: hidden;
  text-decoration: none;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-name { margin: 0; }
.author-name b { font-weight: 600; }
.author-role { margin: 0; color: var(--muted); }

.dates {
  grid-column: 2;
  margin: 6px 0 0;
  color: var(--muted);
}

.dates span { display: block; }

.sheet-top,
.sheet-body,
.toc {
  background: var(--sheet);
  padding-left: 20px;
  padding-right: 20px;
}

.sheet-top {
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding-top: 24px;
  padding-bottom: 8px;
}

.sheet-body {
  border-radius: 0 0 var(--r-sheet) var(--r-sheet);
  padding-bottom: 32px;
}

.lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}

.lead b { font-weight: 700; }

.warn {
  margin: 20px 0 0;
  background: var(--haze);
  border-radius: var(--r-panel);
  padding: 14px 18px;
  font-weight: 600;
}

.toc { padding-top: 20px; padding-bottom: 8px; font-size: 15px; line-height: 1.4; }
.toc h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.toc a { text-decoration-thickness: 1px; }

@media (min-width: 760px) {
  .sheet-top, .sheet-body { padding-left: 48px; padding-right: 48px; }
  .toc { padding-left: 48px; padding-right: 48px; }
  .sheet-top { padding-top: 40px; }
  .sheet-body { padding-bottom: 48px; }
  .lead { font-size: 21px; }
}

@media (min-width: 1024px) {
  .article {
    grid-template-columns: 250px minmax(0, 780px);
    column-gap: 40px;
    justify-content: start;
  }
  .author {
    grid-column: 1; grid-row: 1;
    grid-template-columns: 1fr;
    align-content: start;
    margin: 0;
    padding-top: 6px;
  }
  .avatar { grid-row: auto; width: 72px; height: 72px; font-size: 22px; margin-bottom: 10px; }
  .dates { grid-column: 1; margin-top: 14px; }
  .toc {
    grid-column: 1; grid-row: 2;
    align-self: start;
    position: sticky;
    top: 24px;
    background: none;
    padding: 28px 0 0;
    margin-top: 28px;
    border-top: 1px solid var(--line);
  }
  .sheet-top { grid-column: 2; grid-row: 1; padding-left: 56px; padding-right: 56px; }
  .sheet-body { grid-column: 2; grid-row: 2; padding-left: 56px; padding-right: 56px; }
}

/* Текст статьи */
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1em; }

.prose > h2 {
  margin-top: 2.2em;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose > h2:first-child { margin-top: 1.4em; }

.prose > h3 {
  margin-top: 1.6em;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose > h2 + *,
.prose > h3 + * { margin-top: 0.6em; }

@media (min-width: 760px) {
  .prose > h2 { font-size: 30px; }
}

.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }

.ref {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ref:hover { text-decoration: underline; }

/* Таблицы */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

.data th, .data td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
}

.data thead th { font-weight: 600; border-bottom-color: var(--graphite); }
.data tbody th { font-weight: 500; color: var(--muted); min-width: 8em; }

.price td:last-child,
.price th:last-child {
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}

.note { font-size: 15px; color: var(--muted); }

/* Схема в статье */
.figure { margin-top: 1.6em; }
.figure-img { width: 100%; height: auto; border-radius: var(--r-panel); background: var(--haze); }
.figure figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* Частые вопросы */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; max-width: 68ch; }

/* Плавное раскрытие ответа (просьба заказчика 28.09.2026). Работает, где браузер умеет анимировать высоту до auto:
   Chrome, Яндекс Браузер, Edge. В остальных ответ открывается сразу, как раньше */
.faq details { interpolate-size: allow-keywords; }
.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .35s ease, content-visibility .35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* Блок записи — не заголовок, одинаковый во всех статьях */
.booking {
  background: var(--haze);
  border-radius: var(--r-panel);
  padding: 24px 20px;
}

.prose > .booking { margin-top: 2.4em; }

.booking-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.35; }
.booking-place { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  background: var(--graphite);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: var(--r-btn);
}

.btn:hover { background: #454E5E; color: #fff; }

.phone { font-weight: 600; font-size: 18px; white-space: nowrap; }
.booking-warn { margin: 18px 0 0; font-size: 15px; font-weight: 600; }

@media (min-width: 760px) {
  .booking { padding: 32px 36px; }
}

/* Источники */
.sources { list-style: none; padding: 0; font-size: 16px; line-height: 1.5; }
.sources li { display: grid; grid-template-columns: 2.6em 1fr; max-width: none; }
.sources li + li { margin-top: 12px; }
.sources .num { color: var(--ink); font-weight: 600; }
.sources .src-meta { color: var(--muted); }

/* Читайте также */
.more { margin: 56px 0 0; }
.section-title {
  margin: 0 0 20px;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

/* align-content: карточка с коротким заголовком тянется до высоты соседней — лишнее место вниз, а не между картинкой и текстом */
.more-item { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: start; align-content: start; }
.more-item .cover { border-radius: 12px; aspect-ratio: 4 / 3; }
.more-item .rubric { margin: 0; font-size: 14px; color: var(--muted); }
.more-item h3 { margin: 2px 0 0; font-size: 17px; font-weight: 600; line-height: 1.35; }

@media (min-width: 760px) {
  .section-title { font-size: 30px; }
  .more-list { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .more-item { grid-template-columns: 1fr; gap: 14px; }
  .more-item .cover { border-radius: var(--r-panel); aspect-ratio: 16 / 10; }
  .more-item h3 { font-size: 19px; }
}

/* Обложка: картинка из ChatGPT, фон совпадает с дымкой */
.cover {
  background: var(--haze);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cover picture, .cover img { display: block; width: 100%; height: 100%; }
.cover img { object-fit: cover; }

/* Главная блога */
.intro { margin: 40px 0 0; }
.intro .headline { margin: 0; }
.intro p {
  margin: 16px 0 0;
  max-width: 44em;
  color: var(--muted);
  font-size: 17px;
}

.rubrics {
  list-style: none;
  margin: 28px 0 0;
  padding: 0 0 4px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  font-size: 15px;
  font-weight: 500;
}

.rubrics a {
  display: block;
  white-space: nowrap;
  text-decoration: none;
  background: var(--sheet);
  border-radius: 999px;
  padding: 8px 16px;
}

.rubrics a[aria-current="page"] { background: var(--graphite); color: #fff; }

@media (min-width: 760px) {
  .rubrics { flex-wrap: wrap; overflow: visible; }
}

.feature {
  margin-top: 24px;
  background: var(--sheet);
  border-radius: var(--r-sheet);
  padding: 16px;
  display: grid;
  gap: 20px;
}

.feature .cover { border-radius: var(--r-panel); aspect-ratio: 16 / 10; }
.feature-text { padding: 0 4px 8px; }
.feature .rubric { margin: 0; font-size: 15px; color: var(--muted); }

.feature h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.feature h2 a { text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; text-decoration-color: var(--blue); }
.feature-lead { margin: 14px 0 0; max-width: 60ch; }

.byline { margin: 16px 0 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
.byline span { display: block; }

@media (min-width: 760px) {
  .feature {
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: 40px;
    padding: 20px 40px 20px 20px;
  }
}

.list {
  list-style: none;
  margin: 16px 0 0;
  padding: 8px 16px;
  background: var(--sheet);
  border-radius: var(--r-sheet);
}

.list-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 16px 0;
  align-items: start;
}

.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item .cover { border-radius: 12px; aspect-ratio: 1 / 1; }
.list-item .rubric { margin: 0; font-size: 14px; color: var(--muted); }
.list-item :is(h2, h3) { margin: 2px 0 0; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.list-item :is(h2, h3) a { text-decoration: none; }
.list-item :is(h2, h3) a:hover { text-decoration: underline; text-decoration-color: var(--blue); }
.list-item .excerpt { display: none; margin: 6px 0 0; color: var(--muted); font-size: 16px; max-width: 64ch; }
.list-item .byline { margin-top: 6px; font-size: 14px; }

@media (min-width: 760px) {
  .list { padding: 8px 40px 8px 20px; }
  .list-item { grid-template-columns: 168px 1fr; gap: 28px; padding: 20px 0; }
  .list-item .cover { aspect-ratio: 16 / 10; border-radius: var(--r-panel); }
  .list-item :is(h2, h3) { font-size: 21px; }
  .list-item .excerpt { display: block; }
}

/* Страницы рубрики, врача, 404 — из тех же деталей, что главная и статья */
.crumbs + .intro { margin-top: 12px; }

.empty {
  margin: 24px 0 0;
  background: var(--sheet);
  border-radius: var(--r-sheet);
  padding: 24px 20px;
}

.doctor {
  background: var(--sheet);
  border-radius: var(--r-sheet);
  padding: 24px 20px 28px;
  display: grid;
  gap: 20px;
  align-items: start;
}

.doctor-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--haze);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 34px;
  overflow: hidden;
}

.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-role { margin: 0; font-weight: 600; }
.doctor-exp { margin: 4px 0 0; color: var(--muted); }
.doctor .prose { margin-top: 16px; }

.list-item .doctor-photo { width: 88px; height: 88px; font-size: 26px; }

.section { margin: 56px 0 0; }
.section .list { margin-top: 0; }

@media (min-width: 760px) {
  .empty { padding: 32px 40px; }
  .doctor { grid-template-columns: 160px minmax(0, 1fr); gap: 40px; padding: 40px 48px; }
  .doctor .doctor-photo { width: 160px; height: 160px; font-size: 44px; }
  .list-item .doctor-photo { width: 120px; height: 120px; font-size: 34px; }
  .list-doctors .list-item { grid-template-columns: 120px 1fr; align-items: center; }
}

/* Подвал */
.footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  display: grid;
  gap: 24px;
}

.footer p { margin: 0; }
.nowrap { white-space: nowrap; }
.footer .footer-warn { color: var(--graphite); font-weight: 600; }
.footer b { color: var(--graphite); font-weight: 600; }
.footer-links { display: grid; gap: 6px; align-content: start; }

@media (min-width: 1024px) {
  .footer { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .footer .footer-warn { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .faq details::details-content { transition: none; }
}

html { scroll-behavior: smooth; }
