/*
Theme Name: Тёплые слои
Theme URI: https://teplosloi.ru/
Author: Тёплые слои
Description: Лёгкая тёмная тема для практического журнала о частном доме, ремонте и инженерных системах.
Version: 1.1.0
Text Domain: teplosloi
*/

:root {
  --bg: #111214;
  --panel: #191b1e;
  --panel-2: #202328;
  --panel-3: #272b30;
  --text: #f0f0eb;
  --muted: #a3a7aa;
  --muted-2: #73787d;
  --line: #30353a;
  --accent: #d7a66b;
  --accent-2: #91a59b;
  --ice: #9eb9c2;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 24px 70px rgba(0,0,0,.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.site-wrap { overflow: hidden; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(17,18,20,.94); backdrop-filter: blur(16px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; font-size: 17px; font-weight: 800; letter-spacing: -.055em; }
.brand small { display: block; color: var(--muted); font-size: .72em; font-weight: 500; letter-spacing: -.02em; }
.brand-mark { width: 25px; height: 25px; display: inline-flex; align-items: end; gap: 3px; }
.brand-mark i { display: block; width: 6px; border-radius: 6px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 11px; opacity: .45; }.brand-mark i:nth-child(2) { height: 18px; opacity: .7; }.brand-mark i:nth-child(3) { height: 25px; }
.main-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; color: var(--muted); font-size: 13px; }
.main-nav a:hover, .footer-nav a:hover { color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.search-link, .menu-toggle { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; min-width: 38px; height: 38px; display: inline-grid; place-items: center; }
.search-link:hover, .menu-toggle:hover { color: var(--text); border-color: var(--muted-2); }
.menu-toggle { display: none; }
.header-cta, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 999px; padding: 11px 16px; font-size: 12px; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.header-cta, .button-primary { background: var(--text); color: #151619; }.header-cta:hover, .button:hover { transform: translateY(-2px); }
.button-dark { background: var(--accent); color: #1b1711; }.button-ghost { border: 1px solid var(--line); color: var(--text); }
.search-panel { border-bottom: 1px solid var(--line); background: var(--panel); padding: 14px 0; }
.search-panel form { display: flex; gap: 10px; }.search-panel input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); padding: 13px 15px; outline: none; }.search-panel input:focus { border-color: var(--accent-2); }
.hero { padding: 76px 0 72px; display: grid; grid-template-columns: 1fr .92fr; gap: 70px; align-items: center; }
.eyebrow, .section-kicker, .article-meta { text-transform: uppercase; letter-spacing: .15em; color: var(--muted-2); font-size: 10px; font-weight: 800; }.eyebrow:before, .section-kicker:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; box-shadow: 0 0 0 4px rgba(215,166,107,.12); }
.hero h1 { margin: 22px 0 22px; max-width: 670px; font-size: clamp(48px, 7vw, 86px); line-height: .94; letter-spacing: -.085em; }.hero h1 em { color: var(--accent); font-style: normal; font-weight: 400; }.hero-lead { max-width: 530px; color: var(--muted); font-size: 17px; line-height: 1.6; }.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-note { margin-top: 42px; display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 11px; }.mini-avatars { display: flex; }.mini-avatars i { display: grid; place-items: center; width: 27px; height: 27px; margin-right: -5px; border: 2px solid var(--bg); border-radius: 50%; background: var(--panel-3); color: var(--text); font-size: 9px; font-style: normal; }.mini-avatars i:nth-child(2) { background: var(--accent-2); color: #111; }.mini-avatars i:nth-child(3) { background: var(--accent); color: #21170d; }
.hero-visual { min-height: 440px; position: relative; display: grid; place-items: center; }.hero-glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(215,166,107,.18), transparent 67%); }.hero-ring { position: absolute; border: 1px solid #32383d; border-radius: 50%; }.hero-ring.one { width: 445px; height: 445px; }.hero-ring.two { width: 320px; height: 320px; border-style: dashed; opacity: .7; }.house-card { position: relative; z-index: 1; width: min(430px, 90%); padding: 22px; border: 1px solid #3c4248; border-radius: 25px; background: linear-gradient(145deg, #25292d, #17191b); box-shadow: var(--shadow); transform: rotate(2deg); }.house-top, .house-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--muted-2); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }.house-chip { border: 1px solid #41474c; border-radius: 999px; padding: 7px 9px; }.house-status { color: var(--accent-2); }.house-status:before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--accent-2); }.house-drawing { height: 220px; display: flex; flex-direction: column; justify-content: end; align-items: center; position: relative; }.roof-line { position: absolute; top: 25px; width: 220px; height: 120px; border-top: 2px solid #c8ccc9; border-left: 2px solid #c8ccc9; transform: rotate(45deg) skew(-8deg); }.house-body { z-index: 1; position: relative; width: 220px; height: 112px; display: flex; align-items: center; justify-content: space-around; border: 1px solid #737a7c; background: linear-gradient(135deg,#3b4143,#252a2d); }.house-window { width: 34px; height: 29px; border: 1px solid #bdc6c0; background: #a7c4c6; }.house-door { align-self: end; width: 34px; height: 62px; border: 1px solid #8d9994; background: #303837; }.foundation-line { width: 275px; margin-top: 11px; border-top: 2px solid #d1d4cd; }.house-bottom { margin-top: 16px; }.house-bottom strong { color: var(--text); font-size: 16px; letter-spacing: -.04em; }.visual-note { position: absolute; z-index: 2; color: var(--muted-2); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }.visual-note.one { top: 55px; right: 1%; transform: rotate(7deg); }.visual-note.two { bottom: 40px; left: 0; transform: rotate(-7deg); }
.topic-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted-2); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; }.topic-strip .container { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0; }.topic-strip b { color: var(--accent); font-weight: 500; }
.content-section { padding: 112px 0; }.section-head { display: flex; justify-content: space-between; align-items: end; gap: 35px; margin-bottom: 38px; }.section-head h2, .tools h2, .calc-copy h2 { margin: 16px 0 0; font-size: clamp(38px, 5vw, 62px); line-height: .96; letter-spacing: -.08em; }.section-head h2 span, .tools h2 span, .calc-copy h2 span { color: var(--accent); font-weight: 400; }.section-head > p { max-width: 310px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.topic-card { min-height: 290px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border: 1px solid transparent; border-radius: var(--radius-lg); transition: transform .2s ease, border-color .2s ease; }.topic-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.18); }.topic-card:nth-child(1) { background: #29333a; }.topic-card:nth-child(2) { background: #3a3028; }.topic-card:nth-child(3) { background: #2d3936; }.topic-card:nth-child(4) { background: #2d303c; }.topic-card-top { display: flex; justify-content: space-between; color: #aab1b0; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }.topic-card h3 { margin: 0; font-size: 27px; letter-spacing: -.07em; }.topic-card p { max-width: 205px; margin: 10px 0 0; color: #b2b5b5; font-size: 12px; line-height: 1.5; }.topic-arrow { position: absolute; right: 20px; bottom: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }.topic-number { position: absolute; top: 55px; right: 20px; color: rgba(255,255,255,.08); font-size: 76px; font-weight: 800; letter-spacing: -.1em; }
.feature-layout { display: grid; grid-template-columns: 1.12fr .88fr; gap: 12px; }.feature-card, .small-card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--panel); overflow: hidden; }.feature-visual { min-height: 285px; position: relative; display: grid; place-items: center; background: #252b2e; }.feature-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(#485157 1px,transparent 1px),linear-gradient(90deg,#485157 1px,transparent 1px); background-size: 34px 34px; }.diagram { position: relative; z-index: 1; width: min(315px,80%); transform: rotate(-4deg); }.diagram div { height: 37px; display: flex; align-items: center; padding: 0 14px; margin-bottom: 3px; color: #a8afb0; font-size: 9px; font-weight: 800; letter-spacing: .14em; }.diagram .top { margin-left: 6%; background: #d9d9d1; color: #303537; }.diagram .mid { height: 60px; background: #454c4e; }.diagram .bottom { margin-left: 6%; background: #9da9a4; color: #26302e; }.feature-info { padding: 23px 25px 27px; }.feature-info h3 { max-width: 560px; margin: 11px 0; font-size: 26px; line-height: 1.05; letter-spacing: -.06em; }.feature-info p, .small-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }.read-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 21px; color: var(--accent); font-size: 12px; font-weight: 700; }.small-list { display: flex; flex-direction: column; gap: 10px; }.small-card { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px; border-radius: var(--radius-lg); }.small-card h3 { margin: 9px 0; font-size: 18px; line-height: 1.1; letter-spacing: -.05em; }.small-card svg { flex: 0 0 auto; color: var(--muted-2); }.all-link { padding: 5px 2px; color: var(--muted); font-size: 12px; }
.calc-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: 65px; align-items: center; padding: 75px 62px; border-radius: 34px; background: #202428; }.calc-copy p { max-width: 280px; margin-top: 23px; color: var(--muted); font-size: 13px; line-height: 1.6; }.calc-note { display: flex; gap: 10px; margin-top: 32px; color: var(--accent-2); font-size: 11px; }.calculator { border: 1px solid #3b4247; border-radius: 22px; padding: 25px; background: #151719; }.calculator-head { display: flex; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }.calculator-head h3 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.06em; }.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 22px 0; }.calc-fields label { color: var(--muted-2); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; }.calc-fields input, .calc-fields select { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #3b4247; border-radius: 10px; outline: none; background: #202428; color: var(--text); }.calc-fields input:focus, .calc-fields select:focus { border-color: var(--accent-2); }.calc-fields .wide { grid-column: span 2; }.calc-results { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 19px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.calc-results span { display: block; min-height: 26px; color: var(--muted-2); font-size: 10px; line-height: 1.25; }.calc-results strong { font-size: 23px; font-weight: 500; letter-spacing: -.05em; }.calc-results small { color: var(--muted); font-size: 10px; }.calc-foot { margin-top: 15px; color: var(--muted-2); font-size: 10px; }
.tools { padding: 110px 0; display: grid; grid-template-columns: .65fr 1.35fr; gap: 90px; align-items: center; }.tools p { max-width: 310px; margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }.tools .button { margin-top: 27px; }.tool-list { display: flex; flex-direction: column; gap: 9px; }.tool-item { display: flex; align-items: center; gap: 15px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }.tool-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #2c3436; color: var(--accent-2); }.tool-item div { flex: 1; }.tool-item strong { display: block; font-size: 12px; }.tool-item span { color: var(--muted); font-size: 12px; }.tool-item > svg { color: var(--muted-2); }
.site-footer { border-top: 1px solid var(--line); background: #0c0d0e; padding: 58px 0 24px; }.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; }.footer-brand p { max-width: 260px; margin-top: 17px; color: var(--muted-2); font-size: 12px; line-height: 1.6; }.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }.footer-nav div { display: flex; flex-direction: column; gap: 9px; }.footer-nav strong { margin-bottom: 5px; color: var(--muted-2); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }.footer-nav a { color: var(--muted); font-size: 12px; }.footer-bottom { display: flex; justify-content: space-between; gap: 15px; margin-top: 50px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
.site-main { padding-bottom: 40px; }.content-card { margin-top: 55px; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--panel); }.article-header { max-width: 840px; margin: 60px auto 32px; }.article-header h1 { margin: 14px 0; font-size: clamp(38px, 6vw, 68px); line-height: 1; letter-spacing: -.08em; }.article-excerpt { color: var(--muted); font-size: 17px; }.entry-content { max-width: 820px; margin: 0 auto; font-size: 17px; line-height: 1.75; }.entry-content h2 { margin: 44px 0 14px; font-size: 33px; line-height: 1.1; letter-spacing: -.06em; }.entry-content h3 { margin: 32px 0 10px; font-size: 23px; }.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }.entry-content blockquote { margin: 30px 0; padding: 19px 23px; border-left: 3px solid var(--accent); border-radius: 0 14px 14px 0; background: var(--panel-2); color: var(--muted); }.entry-content table { width: 100%; border-collapse: collapse; margin: 25px 0; font-size: 14px; }.entry-content th, .entry-content td { padding: 11px; border: 1px solid var(--line); text-align: left; }.entry-content th { color: var(--accent); background: var(--panel-2); }.post-card { display: block; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }.post-card + .post-card { margin-top: 11px; }.post-card h2 { margin: 8px 0; font-size: 24px; letter-spacing: -.05em; }.post-card p { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .main-nav { gap: 15px; }.header-cta { display: none; }.hero { grid-template-columns: 1fr; padding: 62px 0; gap: 20px; }.topic-grid { grid-template-columns: repeat(2,1fr); }.calc-section { grid-template-columns: 1fr; gap: 38px; padding: 55px 30px; }.tools { grid-template-columns: 1fr; gap: 42px; }.footer-grid { gap: 35px; } }
@media (max-width: 620px) { .container { width: min(100% - 28px, 1180px); }.header-inner { min-height: 68px; gap: 12px; }.main-nav { display: none; position: absolute; left: 14px; right: 14px; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }.main-nav.is-open { display: flex; }.main-nav a { padding: 12px; }.menu-toggle { display: inline-grid; }.hero h1 { font-size: 55px; }.hero-lead { font-size: 15px; }.hero-visual { min-height: 350px; transform: scale(.91); margin: -20px -28px; }.hero-ring.one { width: 350px; height: 350px; }.hero-ring.two { width: 255px; height: 255px; }.house-card { width: 90%; }.topic-strip .container { overflow: hidden; justify-content: flex-start; white-space: nowrap; }.topic-strip .container > * { flex: 0 0 auto; }.content-section, .tools { padding: 80px 0; }.section-head { display: block; }.section-head > p { margin-top: 20px; }.topic-grid { grid-template-columns: 1fr; }.topic-card { min-height: 225px; }.feature-layout { grid-template-columns: 1fr; }.feature-visual { min-height: 235px; }.calc-section { margin: 0 -14px; border-radius: 22px; }.calc-fields { grid-template-columns: 1fr; }.calc-fields .wide { grid-column: auto; }.calc-results strong { font-size: 19px; }.footer-grid { display: block; }.footer-nav { margin-top: 36px; }.footer-bottom { display: block; line-height: 2; }.footer-bottom span { display: block; }.content-card { padding: 23px 18px; }.entry-content { font-size: 16px; } }

.calc-switches { display: flex; flex-wrap: wrap; gap: 8px; padding: 17px 0 3px; }.calc-switches label { position: relative; cursor: pointer; }.calc-switches input { position: absolute; opacity: 0; pointer-events: none; }.calc-switches span { display: block; padding: 7px 10px; border: 1px solid #3b4247; border-radius: 999px; color: var(--muted); font-size: 10px; transition: .2s ease; }.calc-switches input:checked + span { border-color: var(--accent-2); background: rgba(145,165,155,.14); color: var(--text); }.calc-switches label:hover span { border-color: var(--muted-2); }.is-hidden { display: none !important; }.calc-results { grid-template-columns: repeat(4,1fr); }.calc-cost-result strong { color: var(--accent); }
@media (max-width: 620px) { .calc-results { grid-template-columns: repeat(2,1fr); row-gap: 18px; } }

/* Шесть тематических карточек на главной */
.topic-grid { grid-template-columns: repeat(3, 1fr); }
.topic-card { min-height: 250px; }
.topic-card:nth-child(5) { background: #34302b; }
.topic-card:nth-child(6) { background: #30343b; }
@media (max-width: 900px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 225px; }
}

/* Финальная сетка 6 карточек: cache-busting через filemtime в functions.php */
.topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.topic-card:nth-child(5) { background-color: #34302b !important; }
.topic-card:nth-child(6) { background-color: #30343b !important; }
@media (max-width: 900px) { .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 620px) { .topic-grid { grid-template-columns: minmax(0, 1fr) !important; } }
