/*
Theme Name: Садовый дневник
Description: Светлая тема садового дневника с удобной навигацией и чтением заметок.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: sadovy-dnevnik
License: GNU General Public License v2 or later
*/
:root {
    --bg: oklch(1 0 0);
    --ink: oklch(.21 .008 150);
    --muted: oklch(.47 .012 150);
    --line: oklch(.91 .008 150);
    --surface: oklch(.975 .003 150);
    --green: oklch(.43 .095 150);
    --link: oklch(.46 .14 270);
    --focus: oklch(.51 .17 270);
}
* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; object-fit: cover; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input, dialog { color: var(--ink); }
[hidden] { display: none !important; }
.sd-icon { display: inline-flex; width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.15em; }
.sd-icon svg { width: 100%; height: 100%; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 32px; }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; }
.skip-link { position: fixed; top: -120px; left: 16px; z-index: 50; padding: 16px; background: var(--bg); color: var(--ink); border: 1px solid var(--ink); }
.skip-link:focus { top: 10px; }
.header { height: 80px; position: sticky; top: 0; z-index: 20; background: oklch(1 0 0 / .94); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.admin-bar .header { top: 32px; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 21px; font-weight: 680; white-space: nowrap; }
.brand span { color: var(--green); }
.nav { margin-left: auto; }
.nav .menu { display: flex; align-items: center; gap: 31px; padding: 0; margin: 0; list-style: none; font-size: 14px; font-weight: 500; }
.nav a { display: block; padding-block: 26px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; background: none; border: 0; font-size: 21px; border-radius: 6px; padding: 10px; }
.icon-button:hover { background: var(--surface); }
.mobile-menu { display: none; }
.hero { height: 484px; position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; background: var(--green); }
.hero > .hero-image { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; object-position: center 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: oklch(.13 .02 150 / .43); z-index: -1; }
.hero-inner { width: 100%; color: oklch(1 0 0); }
.eyebrow { font-size: 12px; line-height: 1.4; text-transform: uppercase; font-weight: 650; display: flex; gap: 9px; align-items: center; }
.hero .eyebrow { color: oklch(.98 .01 120); }
.hero h1 { font-size: 76px; line-height: 1.04; max-width: 760px; font-weight: 620; margin: 20px 0; }
.hero-description { font-size: 20px; line-height: 1.6; max-width: 530px; color: oklch(.99 0 0); }
.hero-link { display: inline-flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 600; margin-top: 29px; padding-bottom: 8px; border-bottom: 1px solid oklch(1 0 0 / .7); }
.hero-link .sd-icon { transition: transform .2s ease-out; }
.hero-link:hover .sd-icon { transform: translateX(4px); }
.season-line { border-bottom: 1px solid var(--line); }
.season-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 21px; font-size: 14px; }
.season-intro { display: flex; align-items: center; gap: 12px; }
.season-intro .sd-icon { font-size: 21px; color: var(--green); }
.season-intro strong { font-weight: 600; }
.season-intro > span:not(.sd-icon) { color: var(--muted); }
.text-link { color: var(--green); display: inline-flex; gap: 12px; align-items: center; font-weight: 550; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.section { padding-block: 69px 68px; }
.section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 29px; }
.section h2 { font-size: 34px; line-height: 1.2; font-weight: 620; }
.small-label { font-size: 13px; color: var(--muted); margin-bottom: 11px; }
.feature { display: grid; grid-template-columns: 1.08fr 1fr; gap: 58px; align-items: center; }
.feature-picture { display: block; overflow: hidden; border-radius: 8px; aspect-ratio: 1.72; }
.feature-picture img { width: 100%; height: 100%; transition: transform .5s ease-out; }
.feature-picture:hover img { transform: scale(1.025); }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; line-height: 1.5; }
.meta .category { color: var(--green); font-weight: 650; }
.meta a:hover { text-decoration: underline; }
.feature h3 { font-size: 34px; line-height: 1.18; font-weight: 600; margin-top: 17px; max-width: 450px; }
.feature p { margin-top: 19px; font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 450px; }
.feature .text-link { margin-top: 24px; font-size: 14px; }
.latest { border-top: 1px solid var(--line); }
.filters { display: flex; gap: 27px; flex-wrap: wrap; }
.filters button { background: none; border: 0; border-bottom: 2px solid transparent; font-size: 14px; color: var(--muted); padding: 10px 0; }
.filters button[aria-pressed="true"] { color: var(--green); border-color: var(--green); font-weight: 600; }
.articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 30px; }
.article { min-width: 0; }
.article .image-link { display: block; aspect-ratio: 1.55; overflow: hidden; border-radius: 8px; background: var(--surface); }
.article img { width: 100%; height: 100%; transition: transform .45s ease-out; }
.article:hover img { transform: scale(1.03); }
.article .meta { margin-top: 19px; }
.article h3 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 10px 0 11px; }
.article h3 a:hover { color: var(--green); }
.article p { font-size: 14px; line-height: 1.75; color: var(--muted); }
.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 70px; align-items: start; padding-block: 55px; }
.about h2 { font-size: 30px; line-height: 1.3; font-weight: 600; max-width: 330px; }
.about p { font-size: 17px; color: var(--muted); line-height: 1.8; max-width: 590px; }
.about .text-link { margin-top: 21px; font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; padding-block: 35px; }
.footer-note { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 9px; }
.footer-links { display: flex; align-items: center; gap: 28px; font-size: 13px; color: var(--muted); }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 21px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
dialog::backdrop { background: oklch(.15 .01 150 / .45); backdrop-filter: blur(3px); }
.dialog-open { overflow: hidden; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.dialog-top h2 { font-size: 24px; font-weight: 600; }
.search-form { display: flex; gap: 10px; }
.search-form input { min-width: 0; flex: 1; border: 1px solid var(--line); padding: 12px; border-radius: 6px; background: var(--surface); }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form button { display: grid; place-items: center; background: var(--green); color: oklch(1 0 0); width: 46px; border: 0; border-radius: 6px; font-size: 20px; flex: 0 0 46px; }
.menu-dialog .menu { list-style: none; padding: 0; margin: 0; }
.menu-dialog .menu a { display: block; padding: 17px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 33px; }
.breadcrumbs a:hover { color: var(--green); text-decoration: underline; }
.article-heading { padding-block: 44px 39px; max-width: 1080px; }
.article-heading h1, .archive-heading h1 { font-size: 52px; font-weight: 620; line-height: 1.12; margin: 19px 0; max-width: 930px; overflow-wrap: break-word; }
.article-lead { font-size: 21px; color: var(--muted); line-height: 1.65; max-width: 800px; }
.byline { display: flex; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 23px; }
.article-cover { max-width: 1150px; }
.article-cover img { width: 100%; max-height: 520px; aspect-ratio: 1.95; border-radius: 8px; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 740px); gap: 55px; padding-block: 49px 65px; align-items: start; max-width: 1150px; }
.toc { position: sticky; top: 115px; font-size: 13px; line-height: 1.65; }
.toc h2 { font-size: 14px; margin: 0 0 18px; font-weight: 650; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.toc a { color: var(--muted); display: inline-block; }
.toc a:hover { color: var(--green); }
.prose { font-size: 18px; line-height: 1.85; max-width: 72ch; min-width: 0; overflow-wrap: break-word; }
.prose p { margin: 0 0 23px; }
.prose h2 { font-size: 29px; line-height: 1.3; margin: 47px 0 19px; font-weight: 620; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 23px; line-height: 1.4; margin: 32px 0 16px; font-weight: 600; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 25px; }
.prose li { margin-bottom: 12px; padding-left: 4px; }
.prose li::marker { color: var(--green); }
.prose strong { font-weight: 650; }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.prose .sd-note { margin-block: 30px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 16px; }
.prose .sd-note p:last-child { margin-bottom: 0; }
.prose .sources { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 34px; }
.prose .photo-credit { font-size: 12px; color: var(--muted); }
.reading-end { margin-top: 40px; padding-top: 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.7; }
.reading-end > span { display: flex; align-items: start; gap: 10px; }
.reading-end .sd-icon { color: var(--green); margin-top: 4px; }
.reading-end .text-link { margin-top: 22px; text-decoration: none; }
.related { border-top: 1px solid var(--line); }
.page-content { max-width: 830px; padding-block: 42px 65px; }
.page-content .prose { max-width: none; }
.archive-main { padding-block: 0 70px; }
.archive-heading { padding-block: 44px 48px; }
.archive-heading h1 { margin-top: 0; }
.archive-description { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 700px; }
.archive-search { max-width: 490px; margin-top: 25px; width: 100%; }
.empty-state { padding-block: 35px 60px; max-width: 650px; }
.empty-state > .sd-icon { color: var(--green); font-size: 35px; margin-bottom: 22px; }
.empty-state h2 { font-size: 30px; margin-bottom: 17px; }
.empty-state p { color: var(--muted); font-size: 17px; line-height: 1.7; margin-bottom: 24px; }
.pagination { margin-top: 45px; }
.pagination .nav-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.page-numbers { min-width: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.page-numbers.current { background: var(--green); color: oklch(1 0 0); border-color: var(--green); }
.not-found { min-height: 65vh; padding-block: 80px; }
.not-found > .sd-icon { color: var(--green); width: 45px; height: 45px; margin-block: 20px; }
.not-found h1 { font-size: 48px; font-weight: 620; line-height: 1.2; margin-bottom: 23px; }
.not-found > p:not(.small-label) { font-size: 18px; line-height: 1.7; color: var(--muted); margin-bottom: 22px; }
@media (min-width: 1600px) { .hero { height: 540px; } .wrap { max-width: 1340px; } .article-heading { max-width: 1080px; } .article-layout, .article-cover { max-width: 1150px; } .page-content { max-width: 830px; } }
@media (max-width: 1000px) { .header-inner { gap: 20px; } .nav .menu { gap: 20px; } .article-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 35px; } }
@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .header-actions { margin-left: auto; }
    .mobile-menu { display: grid; }
    .feature { gap: 30px; }
    .feature h3 { font-size: 29px; }
    .articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-top { align-items: start; flex-direction: column; gap: 15px; }
    .about-inner { gap: 35px; }
    .hero { height: 450px; }
    .hero h1 { font-size: 64px; }
    .article-heading h1, .archive-heading h1 { font-size: 44px; }
    .article-layout { grid-template-columns: 1fr; max-width: 800px; padding-top: 30px; }
    .toc { position: static; border-block: 1px solid var(--line); padding-block: 24px; }
    .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
}
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) {
    .wrap { padding-inline: 22px; }
    .header { height: 68px; }
    .admin-bar .header { top: 0; }
    .header-inner { gap: 12px; }
    .brand { font-size: 19px; }
    .hero { height: 410px; align-items: flex-end; padding-bottom: 40px; }
    .hero > .hero-image { object-position: 58% center; }
    .hero h1 { font-size: 46px; line-height: 1.07; max-width: 350px; margin-block: 16px; }
    .hero-description { font-size: 17px; max-width: 310px; line-height: 1.55; }
    .eyebrow { font-size: 10px; }
    .hero-link { margin-top: 22px; }
    .season-inner { padding-block: 17px; }
    .season-intro { font-size: 13px; gap: 9px; }
    .season-intro > span:not(.sd-icon) { display: none; }
    .season-inner > .text-link { font-size: 12px; gap: 5px; }
    .section { padding-block: 42px; }
    .section h2 { font-size: 28px; }
    .feature { grid-template-columns: 1fr; gap: 23px; }
    .feature h3 { font-size: 29px; margin-top: 12px; }
    .feature p { font-size: 15px; margin-top: 12px; }
    .feature .text-link { margin-top: 18px; }
    .articles { grid-template-columns: 1fr; gap: 33px; }
    .article h3 { font-size: 23px; }
    .article p { font-size: 15px; }
    .article .image-link { aspect-ratio: 1.6; }
    .filters { gap: 19px; }
    .filters button { font-size: 13px; }
    .section-top { margin-bottom: 22px; }
    .about-inner { grid-template-columns: 1fr; gap: 21px; padding-block: 39px; }
    .about h2 { font-size: 28px; }
    .about p { font-size: 16px; }
    .footer-top { flex-direction: column; gap: 20px; }
    .footer-links { gap: 22px; }
    .footer-bottom { font-size: 11px; gap: 20px; line-height: 1.6; }
    .article-heading { padding-block: 29px; }
    .breadcrumbs { font-size: 12px; gap: 8px; margin-bottom: 25px; }
    .article-heading h1, .archive-heading h1 { font-size: 34px; line-height: 1.16; margin-block: 15px; }
    .article-lead { font-size: 18px; }
    .article-cover img { aspect-ratio: 1.5; }
    .article-layout { padding-block: 28px 42px; gap: 25px; }
    .toc ol { grid-template-columns: 1fr; }
    .prose { font-size: 17px; line-height: 1.85; }
    .prose h2 { font-size: 26px; margin-top: 35px; }
    .prose .sd-note { padding: 20px; }
    .page-content { padding-block: 30px 45px; }
    .archive-heading { padding-block: 30px 36px; }
    .archive-description { font-size: 17px; }
    .not-found { padding-block: 50px; }
    .not-found h1 { font-size: 33px; }
    dialog { padding: 21px; }
    .dialog-top h2 { font-size: 21px; }
}
@media (max-width: 360px) { .wrap { padding-inline: 17px; } .brand { font-size: 17px; } .header-actions { gap: 0; } .icon-button { width: 38px; height: 40px; } .hero h1 { font-size: 40px; } .season-inner { gap: 10px; } .season-intro { font-size: 12px; } .season-intro .sd-icon { font-size: 18px; } .season-inner > .text-link { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
