/*
Theme Name: Ветеринар-дерматолог
Description: Иллюстрированный журнал о коже и шерсти собак и кошек.
Version: 1.0.0
Text Domain: dermajournal
*/
@font-face {
  font-family: Spectral; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/spectral-cyr.woff2") format("woff2");
  unicode-range: U+0400-052F,U+2116;
}
@font-face {
  font-family: Spectral; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/spectral-latin.woff2") format("woff2");
  unicode-range: U+0000-024F,U+2000-206F,U+20AC,U+2122,U+2190-21FF;
}
@font-face {
  font-family: Spectral; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/spectral-italic-cyr.woff2") format("woff2");
  unicode-range: U+0400-052F,U+2116;
}
@font-face {
  font-family: Spectral; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/spectral-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-024F,U+2000-206F,U+20AC,U+2122,U+2190-21FF;
}
:root {
  --paper: #faf9f4;
  --ink: #25342b;
  --forest: #304e3e;
  --leaf: #476648;
  --moss: #e7eadc;
  --clay: #eedbd0;
  --muted: #586258;
  --rule: #cdd1c4;
  --serif: Spectral, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --gutter: clamp(18px, 5vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 20px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.5 var(--sans); }
body.admin-bar { scroll-padding-top: 48px; }
button, input { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
a { color: inherit; text-underline-offset: .18em; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #92522b; outline-offset: 4px; }
::selection { color: #172a20; background: #d3ddc3; }
input { caret-color: var(--forest); }
[hidden] { display: none !important; }
.screen-reader-text, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: absolute; z-index: 20; top: 8px; left: 8px; background: white; color: var(--ink); padding: 10px 18px; }
.wrap { width: min(1240px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; line-height: 1.12; text-wrap: balance; overflow-wrap: break-word; }
.masthead { z-index: 5; position: relative; border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead-inner, .footer-top { display: flex; align-items: center; gap: clamp(16px, 3vw, 46px); }
.masthead-inner { min-height: 84px; }
.brand { display: inline-flex; gap: 11px; align-items: center; flex-shrink: 0; min-height: 44px; font: 400 clamp(22px, 2.45vw, 34px)/1 var(--serif); letter-spacing: -.04em; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.desktop-nav, .footer-top nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(10px, 2vw, 30px); margin-left: auto; }
.desktop-nav a, .footer nav a, .mobile-menu nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 15px; }
.desktop-nav a:hover, .footer a:hover, [aria-current="page"]:is(.desktop-nav a, .footer nav a, .mobile-menu nav a), .mobile-menu nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.head-tools { display: flex; align-items: center; gap: 4px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.head-disclosure > summary { display: flex; gap: 9px; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 8px; border-radius: 6px; font-size: 15px; }
.head-disclosure > summary:hover, .head-disclosure[open] > summary { background: var(--moss); }
.head-panel { position: absolute; top: 100%; inset-inline: 0; background: var(--paper); border-block: 1px solid var(--rule); box-shadow: 0 16px 24px -24px #263528a6; }
.head-panel > .wrap { padding-block: 22px; }
.head-panel .searchform { margin-left: auto; }
.mobile-menu { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 86px); padding-block: clamp(35px, 4vw, 60px); }
.hero-copy { container-type: inline-size; }
.hero-copy h1 { font-size: clamp(37px, 13cqw, 82px); line-height: 1.03; }
.hero-copy h1 em { font-weight: 400; color: var(--leaf); }
.hero-copy p { margin: 23px 0 0; max-width: 43ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: #465348; }
.hero-photo, .story-photo, .article-photo { background: var(--moss); overflow: hidden; }
.hero-photo { aspect-ratio: 1.27; border-radius: 16px; }
.hero-photo img, .story-photo img, .article-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hero-photo img { object-position: 50% 13%; }
.pet-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.pet-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 49px; padding: 8px 17px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.pet-link svg:last-child { margin-left: 4px; }
.dog-link { background: var(--forest); color: var(--paper); }
.dog-link:hover { background: #223b2e; }
.cat-link { background: var(--clay); color: #462e24; }
.cat-link:hover { background: #e3c9b9; }
.symptom-band { background: var(--moss); }
.symptoms-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px 25px; padding-block: 24px; }
.symptoms-inner h2 { font-size: clamp(26px, 2.35vw, 34px); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 6px 13px; border: 1px solid #adb8a4; border-radius: 24px; color: var(--forest); font-size: 15px; text-decoration: none; }
.topic:hover, .topic[aria-current] { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.reading-section { padding-block: clamp(48px, 5vw, 76px) clamp(65px, 8vw, 115px); }
.section-bar { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-bar h2 { font-size: clamp(38px, 4.1vw, 59px); }
.text-link { display: inline-flex; min-height: 44px; gap: 9px; align-items: center; color: var(--forest); font-weight: 600; text-decoration: none; }
.text-link:hover, .article-meta a:hover, .crumb a:hover { text-decoration: underline; }
.story-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 45px clamp(18px, 2.3vw, 34px); }
.story-link { display: block; text-decoration: none; }
.story-photo { aspect-ratio: 1.55; border-radius: 12px; }
.story-photo img { transition: transform .26s ease-out; }
@media (hover: hover) { .story-link:hover img { transform: scale(1.025); } }
.story-meta { display: block; margin: 17px 0 7px; color: var(--leaf); font: 600 13px/1.4 var(--sans); }
.story-meta:empty { margin-bottom: 0; }
.story h2, .story h3 { font-size: clamp(25px, 2.3vw, 34px); text-wrap: pretty; }
.story-link:hover :is(h2,h3), .story-link:focus-visible :is(h2,h3) { text-decoration: underline; text-decoration-thickness: 1px; }
.story p { color: var(--muted); line-height: 1.55; margin: 10px 0 0; overflow-wrap: anywhere; }
.footer { background: var(--forest); color: var(--paper); padding-block: 34px; }
.footer .brand-mark { outline: 1px solid #8a9e8d; border-radius: 10px; }
.footer p { max-width: 72ch; font-size: 14px; line-height: 1.6; color: #e0e6dc; margin: 24px 0 0; }
.crumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; padding-block: 18px 22px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.crumb a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.archive-main, .page-main, .article-main { padding-bottom: clamp(64px, 8vw, 116px); }
.archive-main { min-height: 62vh; }
.section-intro h1, .error-page h1, .page-article > h1 { font-size: clamp(43px, 5.2vw, 76px); }
.section-intro p, .error-page > p { color: var(--muted); font-size: 19px; max-width: 60ch; margin: 12px 0 0; }
.archive-topics, .archive-search { margin: 30px 0; }
.archive-grid { margin-top: 30px; }
.results-title, .no-results h2 { font-size: clamp(28px, 3vw, 41px); text-align: left; text-wrap: pretty; overflow-wrap: anywhere; }
.no-results { padding-block: 24px; }
.no-results .topics, .error-page .searchform { margin-block: 22px; }
.searchform { display: flex; max-width: 600px; gap: 8px; align-items: stretch; }
.searchform label { display: flex; align-items: center; gap: 10px; padding-inline: 13px; min-width: 0; flex: 1; background: #fffefa; border: 1px solid #94a18f; border-radius: 7px; color: var(--forest); }
.searchform label:focus-within { outline: 3px solid #92522b; outline-offset: 2px; }
.searchform input { border: 0; width: 100%; min-width: 0; min-height: 46px; background: transparent; color: inherit; outline: 0; }
.searchform input::placeholder { color: var(--muted); }
.searchform button { border: none; background: var(--forest); color: white; border-radius: 7px; padding: 10px 18px; }
.searchform button:hover { background: #223b2e; }
.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; }
.page-numbers.current, a.page-numbers:hover { background: var(--forest); color: white; }
.article-intro { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: clamp(30px,5vw,70px); align-items: center; padding-bottom: clamp(30px,4vw,60px); border-bottom: 1px solid var(--rule); }
.article-intro h1 { font-size: clamp(39px,4.45vw,67px); line-height: 1.07; }
.article-summary { color: #485549; font-size: clamp(17px,1.45vw,21px); line-height: 1.5; margin: 20px 0; }
.article-meta { color: var(--muted); font-size: 14px; }
.article-meta a { color: var(--forest); text-decoration: none; }
.article-meta span { margin-inline: 5px; }
.article-photo { aspect-ratio: 1.45; border-radius: 14px; }
.article-layout { display: grid; grid-template-columns: minmax(180px,250px) minmax(0,690px); gap: clamp(32px,6.6vw,104px); align-items: start; margin-top: clamp(32px,4.4vw,64px); }
.article-layout > .prose { grid-column: 2; }
.article-aside { position: sticky; top: 24px; }
.article-aside summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 8px; color: var(--forest); font: 400 26px/1.2 var(--serif); }
.article-aside details[open] summary svg { transform: rotate(180deg); }
.article-aside nav { display: grid; border-top: 1px solid var(--rule); }
.article-aside nav a { display: block; padding-block: 12px; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 15px; text-decoration: none; }
.article-aside nav a:hover, .article-aside nav a[aria-current] { color: var(--forest); text-decoration: underline; }
.prose { min-width: 0; max-width: 70ch; color: #28332b; font: 400 clamp(19px,1.55vw,22px)/1.62 var(--serif); letter-spacing: -.01em; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--leaf); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose h2, .prose h3 { margin: 1.4em 0 .45em; text-align: start; text-wrap: pretty; scroll-margin-top: 22px; }
.prose h2 { font-size: clamp(30px,2.7vw,39px); }
.prose h3 { font-size: clamp(25px,2.1vw,31px); }
.prose a { color: var(--forest); overflow-wrap: anywhere; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote { margin: 1.2em 0; padding: .8em 1em; background: var(--moss); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: .5em; border-bottom: 1px solid var(--rule); text-align: left; }
.prose figure { max-width: 100%; margin-inline: 0; }
.page-article { max-width: 710px; margin-inline: auto; }
.page-article h1 { margin-bottom: .48em; }
@media (max-width: 960px) {
  .symptoms-inner { align-items: start; flex-direction: column; }
  .article-layout { grid-template-columns: minmax(170px,205px) minmax(0,1fr); }
}
@media (max-width: 800px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .head-tools { margin-left: auto; }
  .masthead-inner { min-height: 67px; gap: 4px; }
  .mobile-menu nav { display: grid; gap: 2px; }
  .mobile-menu nav a { padding-inline: 4px; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .hero { gap: 24px; }
  .hero-photo { aspect-ratio: .94; }
  .story-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reading-section .story-grid > :last-child:nth-child(odd) { grid-column: 1/-1; max-width: calc(50% - 9px); }
  .article-layout { display: block; }
  .article-aside { position: static; margin-bottom: 24px; padding: 5px 14px; background: var(--moss); border-radius: 8px; }
  .article-aside summary { margin: 0; font-size: 23px; }
  .article-aside nav a { color: var(--forest); }
  .footer-top { flex-wrap: wrap; gap: 12px 24px; }
  .footer-top nav { margin-left: 0; }
}
@media (max-width: 650px) {
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 30px; }
  .hero-copy h1 { font-size: clamp(37px,13cqw,63px); }
  .hero-copy p { font-size: 17px; margin-top: 13px; }
  .hero-photo { aspect-ratio: 1.42; }
  .hero-photo img { object-position: center 12%; }
  .pet-links { margin-top: 18px; }
  .pet-link { min-height: 46px; }
  .symptoms-inner { padding-block: 21px; gap: 12px; }
  .section-bar { align-items: center; margin-bottom: 18px; }
  .section-bar h2 { font-size: clamp(31px,7.7vw,39px); }
  .text-link { font-size: 15px; }
  .story-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .reading-section .story-grid > :last-child:nth-child(odd) { max-width: none; }
  .story-meta { margin-top: 12px; }
  .story h2, .story h3 { font-size: 29px; }
  .story p { margin-top: 7px; }
  .article-intro { grid-template-columns: 1fr; gap: 23px; }
  .article-intro h1 { font-size: clamp(35px,8.5vw,49px); }
  .article-summary { margin: 13px 0; }
  .article-photo { aspect-ratio: 1.65; }
  .footer .brand { font-size: 26px; }
  .footer p { margin-top: 17px; }
}
@media (max-width: 470px) {
  .head-search summary span { display: none; }
  .masthead .brand { font-size: clamp(19px,5.2vw,24px); gap: 7px; }
  .masthead .brand-mark { width: 29px; height: 29px; }
  .masthead-inner { min-height: 60px; }
  .head-tools { gap: 0; }
  .crumb { padding-block: 9px 16px; }
  .topic { font-size: 14px; padding-inline: 11px; }
  .footer-top nav { gap: 4px 17px; }
}
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .masthead .brand { font-size: 17px; gap: 5px; }
  .masthead .brand-mark { width: 25px; height: 25px; }
  .pet-link { gap: 6px; padding-inline: 11px; }
  .pet-link svg:last-child { margin-left: 0; }
  .head-panel .searchform button { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .story-photo img { transition: none; } }
@media print {
  .masthead, .footer, .article-aside, .crumb, .pet-links { display: none; }
  body { background: white; color: black; }
  .wrap { width: 100%; }
  .article-layout, .article-intro { display: block; }
  .article-photo { width: 240px; margin-top: 16px; }
  .prose { max-width: none; font-size: 12pt; }
}
