/*
Theme Name: Дианочка
Theme URI: https://dianochka.ru/
Author: Редакция «Дианочки»
Description: Тёплый личный блог Дианы: дом, вещи, дети, дача, праздники. Лента + плитки рубрик, «Что читают», сезонный блок, оглавление, блок автора, FAQPage/Article JSON-LD.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dianochka
*/

/* ---------- токены ---------- */
:root {
	--bg: #fbf6ef;
	--paper: #fffdf9;
	--ink: #2e2622;
	--muted: #75665c;
	--line: #eaded2;
	--accent: #b4533a;
	--accent-ink: #9a4430;
	--accent-soft: #f5e3d9;
	--sage: #6f8466;
	--sage-soft: #e5ecdf;
	--radius: 18px;
	--font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	/* пастель рубрик */
	--c-dom: #e7efe6;
	--c-veschi: #e4edf5;
	--c-krasota: #f7e4e6;
	--c-kuhnya: #fbe9d6;
	--c-deti: #fdf3cf;
	--c-dacha: #e1efdc;
	--c-prazdniki: #f6e0ea;
	--c-otnosheniya: #efe4f3;
	--c-stil: #ece6dc;
	--c-koshelek: #e3f0ec;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 17px/1.65 var(--font);
	overflow-x: hidden;
	overflow-wrap: break-word;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap--read { max-width: 760px; }

/* ---------- шапка ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__in {
	max-width: 1140px; margin: 0 auto; padding: 14px 16px 10px;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__mark {
	flex: none; width: 42px; height: 42px; border-radius: 50%;
	display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
	background: radial-gradient(circle at 30% 30%, #d7775b, var(--accent) 70%);
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-weight: 800; font-size: 22px; line-height: 1.1; }
.brand__tag { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsearch { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; }
.hsearch input { border: 0; background: transparent; font: inherit; font-size: 15px; width: 0; padding: 6px 0; color: var(--ink); }
.hsearch input:focus { outline: none; width: 150px; }
.hsearch button { border: 0; background: none; color: var(--accent-ink); padding: 6px; cursor: pointer; display: grid; place-items: center; }

/* рубрики: на телефоне — горизонтальная лента чипов внутри своего блока */
.rubrics { max-width: 1140px; margin: 0 auto; }
.rubrics__list {
	list-style: none; margin: 0; padding: 4px 16px 12px;
	display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.rubrics__list::-webkit-scrollbar { display: none; }
.rubrics__list a {
	display: block; white-space: nowrap; text-decoration: none; color: var(--ink);
	font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
}
.rubrics__list a:hover, .rubrics__list .current-menu-item a { background: var(--accent-soft); border-color: #ecc9b8; color: var(--accent-ink); }

/* ---------- общие ---------- */
.sec-title { font-size: 22px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.sec-title::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.chip {
	display: inline-block; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--ink);
	padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); margin-bottom: 8px;
}
.chip--dom { background: var(--c-dom); } .chip--veschi { background: var(--c-veschi); } .chip--krasota { background: var(--c-krasota); }
.chip--kuhnya { background: var(--c-kuhnya); } .chip--deti { background: var(--c-deti); } .chip--dacha { background: var(--c-dacha); }
.chip--prazdniki { background: var(--c-prazdniki); } .chip--otnosheniya { background: var(--c-otnosheniya); } .chip--stil { background: var(--c-stil); }
.chip--koshelek { background: var(--c-koshelek); }
.more { font-weight: 700; text-decoration: none; }
.more::after { content: " →"; }
.empty { color: var(--muted); padding: 24px 0; }

/* фото Дианы, круглое */
.avatar {
	flex: none; display: block; width: 36px; height: 36px; border-radius: 50%;
	object-fit: cover; background: #f0c9b3;
	box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--line);
}
.avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.avatar--md { width: 64px; height: 64px; font-size: 26px; }
.avatar--lg { width: 88px; height: 88px; font-size: 38px; }

/* заглушка без картинки */
.ph { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 3 / 2; background: var(--accent-soft); color: rgba(46,38,34,.28); font-weight: 800; font-size: 44px; }
.ph--dom { background: var(--c-dom); } .ph--veschi { background: var(--c-veschi); } .ph--krasota { background: var(--c-krasota); }
.ph--kuhnya { background: var(--c-kuhnya); } .ph--deti { background: var(--c-deti); } .ph--dacha { background: var(--c-dacha); }
.ph--prazdniki { background: var(--c-prazdniki); } .ph--otnosheniya { background: var(--c-otnosheniya); } .ph--stil { background: var(--c-stil); }
.ph--koshelek { background: var(--c-koshelek); }

/* ---------- главная ---------- */
.hello {
	display: flex; gap: 16px; align-items: flex-start;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 18px; margin: 20px 0 28px;
}
.hello .avatar--lg { width: 64px; height: 64px; font-size: 28px; }
.hello__h1 { font-size: 22px; margin-bottom: 10px; }
.hello__text p { color: var(--muted); font-size: 16px; margin-bottom: 8px; max-width: 62ch; }

.front { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.lead { background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.lead__img { text-decoration: none; display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.lead__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead__body { padding: 16px 18px 18px; }
.lead__title { font-size: 22px; margin-bottom: 8px; }
.lead__title a, .row__title a { color: var(--ink); text-decoration: none; }
.lead__title a:hover, .row__title a:hover { color: var(--accent-ink); }
.lead__ex { color: var(--muted); font-size: 16px; margin-bottom: 8px; }

.row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row__img { text-decoration: none; display: block; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; }
.row__img img, .row__img .ph { width: 100%; height: 100%; object-fit: cover; display: grid; aspect-ratio: 1; font-size: 32px; }
.row .chip { font-size: 12px; margin-bottom: 4px; padding: 2px 9px; }
.row__title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.row__meta { font-size: 13px; color: var(--muted); margin: 0; }

.popular, .season { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.popular__title, .season__title { font-size: 19px; margin-bottom: 12px; }
.popular__list { list-style: none; counter-reset: p; margin: 0; padding: 0; }
.popular__list li { counter-increment: p; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-top: 1px dashed var(--line); }
.popular__list li:first-child { border-top: 0; }
.popular__list li::before { content: counter(p); font-weight: 800; color: var(--accent); font-size: 20px; line-height: 1.2; }
.popular__list a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.4; }
.popular__list a:hover { color: var(--accent-ink); }
.season { background: var(--sage-soft); border-color: #d4dfcc; }
.season__lead { color: #55664d; font-size: 15px; }
.season__list { margin: 0; padding-left: 18px; }
.season__list li { margin: 6px 0; }
.season__list a { color: #3e5236; font-weight: 700; }

.tiles { margin: 36px 0 44px; }
.tiles__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile a {
	display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 104px;
	padding: 14px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
	background: var(--accent-soft); transition: transform .15s ease;
}
.tile a:hover { transform: translateY(-2px); }
.tile__name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.tile__desc { display: none; font-size: 14px; color: var(--muted); line-height: 1.4; }
.tile__count { margin-top: auto; font-size: 13px; color: var(--muted); }
.tile--dom a { background: var(--c-dom); } .tile--veschi a { background: var(--c-veschi); } .tile--krasota a { background: var(--c-krasota); }
.tile--kuhnya a { background: var(--c-kuhnya); } .tile--deti a { background: var(--c-deti); } .tile--dacha a { background: var(--c-dacha); }
.tile--prazdniki a { background: var(--c-prazdniki); } .tile--otnosheniya a { background: var(--c-otnosheniya); } .tile--stil a { background: var(--c-stil); }
.tile--koshelek a { background: var(--c-koshelek); }

/* ---------- статья ---------- */
.post { padding: 24px 0 8px; }
.post__head { text-align: center; margin-bottom: 22px; }
.post__title { font-size: 27px; line-height: 1.2; margin: 4px 0 14px; }
.post__meta { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 0; text-align: left; }
.post__img { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; }
.post__img img { display: block; width: 100%; height: auto; }
.post--page .post__head .avatar { margin-bottom: 12px; }

.toc-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 26px; }
.toc-box summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary::after { content: "–"; color: var(--accent); }
.toc-box:not([open]) summary::after { content: "+"; }
.toc__title { display: none; }
.toc__list { margin: 10px 0 0; padding-left: 22px; font-size: 16px; }
.toc__list li { margin: 5px 0; }
.toc__list a { color: var(--ink); text-decoration-color: var(--line); }

.entry { font-size: 18px; line-height: 1.72; }
.entry > * { max-width: 68ch; }
.entry h2 { font-size: 24px; margin: 1.8em 0 .6em; scroll-margin-top: 16px; }
.entry h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--accent); border-radius: 3px; margin-top: 8px; }
.entry h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.entry li { margin: .35em 0; }
.entry ul li::marker { color: var(--accent); }
.entry ol li::marker { color: var(--accent); font-weight: 800; }
.entry blockquote {
	margin: 1.4em 0; padding: 14px 18px; background: var(--sage-soft); border-radius: 0 var(--radius) var(--radius) 0;
	border-left: 4px solid var(--sage); font-size: 17px;
}
.entry blockquote p:last-child { margin: 0; }
.entry img { border-radius: 14px; }
.entry figure { margin: 1.4em 0; }
.entry .is-style-rounded img { border-radius: 50%; width: 200px; height: 200px; object-fit: cover; }
.entry figure.is-style-rounded { margin-top: 0; }
.entry figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 6px; }
.entry table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 16px; margin: 1.4em 0; }
.entry th, .entry td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.entry th { background: var(--accent-soft); }
.entry pre { overflow-x: auto; background: var(--paper); padding: 12px; border-radius: 12px; font-size: 14px; }
.entry hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }

.offer { background: var(--paper); border: 2px dashed #e7bca8; border-radius: var(--radius); padding: 18px; margin: 28px 0; }
.offer__label { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-bottom: 6px; }
.offer__title { font-weight: 800; font-size: 19px; margin: 0 0 6px; }
.offer__text p { margin: 0 0 8px; font-size: 16px; }
.offer__btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 999px; }
.offer__btn:hover { background: var(--accent-ink); color: #fff; }
.offer__note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.author {
	display: flex; gap: 16px; align-items: flex-start; margin: 34px 0 10px;
	background: var(--accent-soft); border-radius: var(--radius); padding: 18px;
}
.author__name { font-weight: 800; margin: 0 0 4px; }
.author p { font-size: 16px; margin-bottom: 6px; }

.related { margin: 30px 0 44px; }

/* ---------- архивы ---------- */
.arch { padding: 26px 0 8px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.arch__title { font-size: 28px; margin-bottom: 8px; }
.arch__desc { color: var(--muted); max-width: 62ch; }
.list { max-width: 760px; padding-bottom: 40px; }
.pagination { margin: 26px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 7px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.sform { display: flex; gap: 8px; margin: 14px 0; max-width: 480px; }
.sform input { flex: 1; min-width: 0; font: inherit; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.sform button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; cursor: pointer; }
.nf { text-align: center; padding: 48px 0 60px; }
.nf .avatar { margin: 0 auto 12px; }
.nf .sform { margin: 18px auto; }

/* ---------- подвал ---------- */
.foot { background: #f3e9df; border-top: 1px solid var(--line); margin-top: 20px; }
.foot__in { max-width: 1140px; margin: 0 auto; padding: 28px 16px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.foot__brand { font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.foot__about p { font-size: 15px; color: var(--muted); max-width: 44ch; }
.foot__h { font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.foot__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot__list a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot__list a:hover { color: var(--accent-ink); text-decoration: underline; }
.foot__copy { max-width: 1140px; margin: 0 auto; padding: 14px 16px 24px; font-size: 13px; color: var(--muted); border-top: 1px dashed #e2d3c5; }

/* ---------- ≥561px (планшет) ---------- */
@media (min-width: 561px) {
	body { font-size: 18px; }
	.brand__mark { width: 48px; height: 48px; font-size: 23px; }
	.brand__name { font-size: 26px; }
	.brand__tag { font-size: 14px; }
	.hsearch input { width: 150px; }
	.hello { padding: 24px; gap: 22px; }
	.hello .avatar--lg { width: 88px; height: 88px; font-size: 38px; }
	.hello__h1 { font-size: 26px; }
	.lead { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
	.lead__img { aspect-ratio: auto; min-height: 240px; }
	.lead__body { padding: 20px 22px; align-self: center; }
	.row { grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
	.row__img { width: 120px; height: 120px; }
	.row__title { font-size: 19px; }
	.tiles__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
	.tile__desc { display: block; }
	.post__title { font-size: 34px; }
	.entry h2 { font-size: 27px; }
	.foot__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
	.foot__about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.hsearch { padding-left: 4px; }
	.hsearch input:focus { width: 110px; }
	.hello { flex-direction: column; }
	.post__head { text-align: left; }
	.author { flex-direction: column; }
}

/* ---------- ≥921px (десктоп) ---------- */
@media (min-width: 921px) {
	.masthead__in { padding: 22px 16px 14px; }
	.rubrics__list { flex-wrap: wrap; overflow: visible; padding: 0 16px 16px; }
	.front { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
	.side { position: sticky; top: 20px; }
	.lead__title { font-size: 26px; }
	.tiles__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.post { padding-top: 36px; }
	.post__title { font-size: 40px; }
	.foot__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .8fr); }
	.foot__about { grid-column: auto; }
	.foot__list { flex-direction: column; }
	.foot__col:nth-of-type(1) .foot__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
