/*
Theme Name: dds_sonatti.ru
Author: Алексей Зотов
Description: Тёмная бруталистская тема для информационного проекта о столярном деле, деревообработке и мебельном производстве.
Version: 1.1
Text Domain: sonatti
*/

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg: #121212;
    --bg-alt: #1E1E1E;
    --bg-deep: #0A0A0A;
    --bg-side: #181818;
    --ink: #EAE8E3;
    --copper: #CD7F32;
    --amber: #E8A65D;
    --dust: #88827A;
    --line: #2A2A2A;
    --font: "Inter", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Текстура строгания — диагональные линии поверх основного фона */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: repeating-linear-gradient(45deg, #EAE8E3 0, #EAE8E3 1px, transparent 1px, transparent 9px);
}

.page-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--copper);
    text-decoration: none;
}

/* Направляющая станка — медная полоса вдоль верха страницы */
.rail {
    height: 6px;
    background: var(--copper);
}

/* =========================================================
   2. Типографика
   ========================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
    color: var(--ink);
}

h1 {
    font-size: 4.2rem;
}

h2 {
    font-size: 2.1rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin: 0 0 1.15em;
}

.entry-content h2::before,
.entry-content h3::before,
.widget-title::before {
    content: "▪";
    color: var(--copper);
    margin-right: 0.45em;
    font-size: 0.85em;
    vertical-align: 0.06em;
}

.entry-content h2 {
    margin-top: 1.8em;
}

.entry-content h3 {
    margin-top: 1.5em;
}

.entry-content a {
    border-bottom: 1px dashed var(--copper);
}

.entry-content a:hover {
    border-bottom-style: solid;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.3em;
    margin: 0 0 1.3em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    border-left: 8px solid var(--copper);
    background: var(--bg-alt);
    color: var(--ink);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content img {
    margin: 1.5em 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    border: 2px solid var(--line);
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.entry-content th {
    background: var(--bg-alt);
    font-weight: 700;
}

.entry-content code {
    background: var(--bg-alt);
    padding: 0.1em 0.35em;
    font-size: 0.92em;
}

/* Заголовок секции с медной полосой-пропилом слева */
.sec-title {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    bottom: 0.12em;
    width: 8px;
    background: var(--copper);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    white-space: nowrap;
}

/* =========================================================
   3. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border: 3px solid var(--copper);
    border-radius: 4px;
    color: var(--copper);
    background: transparent;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.btn:hover,
.btn:focus {
    background: var(--copper);
    color: #1A1A1A;
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    border-width: 2px;
    font-size: 0.82rem;
}

/* =========================================================
   4. Шапка
   ========================================================= */

.site-head {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    max-width: 620px;
}

.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    display: block;
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--ink);
    max-height: 2.7em;
    overflow: hidden;
}

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    color: var(--dust);
    font-size: 0.82rem;
    line-height: 1.5;
    max-height: 3em;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    padding: 0.55rem 1rem;
    border: 2px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
}

.main-nav[hidden] {
    display: none !important;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 4px;
    border-bottom: 3px solid transparent;
    display: inline-block;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--copper);
    border-bottom-color: var(--copper);
}

/* =========================================================
   5. Раскладки
   ========================================================= */

.site-main {
    flex: 1 0 auto;
    padding: 2.6rem 0 4rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
    gap: 2.5rem 0;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.content-area {
    min-width: 0;
}

.sidebar {
    min-width: 0;
    background: var(--bg-side);
    border: 2px solid var(--line);
    padding: 1.5rem 1.4rem;
}

/* =========================================================
   6. Хлебные крошки
   ========================================================= */

.crumbs {
    font-size: 0.85rem;
    color: var(--dust);
    margin-bottom: 1.6rem;
    letter-spacing: 0.02em;
}

.crumbs a {
    color: var(--dust);
    border-bottom: 1px dotted var(--dust);
}

.crumbs a:hover {
    color: var(--copper);
    border-bottom-color: var(--copper);
}

.crumbs-sep {
    color: var(--copper);
    margin: 0 0.35rem;
}

/* =========================================================
   7. Карточки записей
   ========================================================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 2px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--copper);
}

.card-thumb {
    display: block;
    width: 100%;
}

.card-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.card-thumb-fallback {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        repeating-linear-gradient(45deg, rgba(205, 127, 50, 0.14) 0, rgba(205, 127, 50, 0.14) 2px, transparent 2px, transparent 12px),
        #171717;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.3rem 1.5rem;
}

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
}

.card-title a {
    color: var(--ink);
}

.card:hover .card-title a {
    color: var(--copper);
}

.card-excerpt {
    color: #C7C3BB;
    font-size: 0.94rem;
    margin-bottom: 1.1rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-excerpt p:last-child {
    margin-bottom: 0;
}

.card-foot {
    margin-top: auto;
}

.meta-line {
    font-size: 0.8rem;
    color: var(--dust);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.meta-line a {
    color: var(--amber);
}

.meta-sep {
    color: var(--copper);
    margin: 0 0.3rem;
}

/* =========================================================
   8. Пагинация
   ========================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.95rem;
    border: 2px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--copper);
    color: var(--copper);
}

.pager .page-numbers.current {
    background: var(--copper);
    border-color: var(--copper);
    color: #1A1A1A;
}

.pager .page-numbers.dots {
    border-color: transparent;
    color: var(--dust);
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* =========================================================
   9. Главная страница
   ========================================================= */

.front-section {
    padding: 3.4rem 0;
    position: relative;
}

.front-section + .front-section {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}

.saw-split {
    display: block;
    width: 100%;
    height: 16px;
    margin: 0.4rem 0 0;
    opacity: 0.55;
}

/* Hero */
.fs-hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--line);
}

.fs-hero .hero-media {
    position: absolute;
    inset: 0;
}

.fs-hero .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fs-hero .hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10, 10, 10, 0.94) 0%, rgba(10, 10, 10, 0.78) 45%, rgba(18, 18, 18, 0.35) 100%);
}

.fs-hero .hero-body {
    position: relative;
    padding: 4.2rem 3rem;
    max-width: 760px;
}

.fs-hero h1 {
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.hero-cut {
    width: 130px;
    height: 8px;
    background: var(--copper);
    margin-bottom: 1.5rem;
}

.hero-lead {
    font-size: 1.12rem;
    color: #D6D2CA;
    margin-bottom: 1.9rem;
    max-width: 640px;
}

/* Шаги */
.fs-steps {
    background: var(--bg-alt);
    padding: 3.2rem 2.4rem;
}

.steps-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}

.step-row {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    min-width: 0;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.step-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.step-num {
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--copper);
    border-radius: 4px;
    color: var(--copper);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    background: #191919;
}

.step-text {
    min-width: 0;
}

.step-text h3 {
    margin-bottom: 0.4rem;
    font-size: 1.28rem;
}

.step-text p {
    margin: 0;
    color: #C7C3BB;
}

/* Последние записи */
.fs-latest .front-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Статистика */
.fs-stats {
    background: var(--bg-alt);
    padding: 3rem 2.4rem;
    position: relative;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-cell {
    min-width: 0;
    padding: 0.6rem 1.2rem;
    border-left: 1px solid var(--line);
    text-align: center;
}

.stat-cell:first-child {
    border-left: 0;
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--amber);
}

.stat-cap {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    color: #C7C3BB;
}

/* Рубрики */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.rubric {
    min-width: 0;
    display: block;
    padding: 2rem 1.7rem;
    background: var(--bg-alt);
    border: 3px solid var(--line);
    color: var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.rubric:hover {
    border-color: var(--copper);
    transform: translateY(-5px);
}

.rubric-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.1rem;
    color: var(--copper);
}

.rubric h3 {
    font-size: 1.35rem;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.rubric p {
    margin: 0;
    color: #C7C3BB;
    font-size: 0.94rem;
}

/* Водяной знак — силуэт рубанка/угольника в углу секции */
.wm {
    position: absolute;
    right: 1.4rem;
    bottom: 1.2rem;
    width: 190px;
    opacity: 0.06;
    color: var(--ink);
    pointer-events: none;
}

/* Акцентный фон «рабочей зоны» */
.zone {
    background-image: linear-gradient(135deg, #121212 0%, #1A1512 100%);
}

.zone::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.07;
    background-image: repeating-linear-gradient(45deg, #EAE8E3 0, #EAE8E3 1px, transparent 1px, transparent 9px);
}

.zone > * {
    position: relative;
    z-index: 1;
}

/* =========================================================
   10. Записи и страницы
   ========================================================= */

.entry-head {
    margin-bottom: 1.8rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.entry-title {
    font-size: 2.6rem;
    margin-bottom: 0.6rem;
}

.entry-thumb {
    margin-bottom: 1.8rem;
    border: 2px solid var(--line);
}

.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    font-size: 1.02rem;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

.post-nav a {
    color: var(--amber);
}

.page-title {
    font-size: 2.4rem;
    margin-bottom: 1.6rem;
}

.no-posts {
    padding: 2rem 1.8rem;
    border: 2px dashed var(--line);
    color: var(--dust);
}

/* =========================================================
   11. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 3rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--line);
}

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

.comment-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.6rem;
    border-left: 2px solid var(--line);
}

.comment-item {
    background: var(--bg-alt);
    border: 2px solid var(--line);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1rem;
}

.comment-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.comment-author {
    font-weight: 700;
    color: var(--amber);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--dust);
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.comment-hold {
    color: var(--dust);
    font-size: 0.88rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dust);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: #171717;
    border: 2px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus,
.search-field:focus {
    outline: none;
    border-color: var(--copper);
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form .submit {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border: 3px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--copper);
    color: #1A1A1A;
}

.comment-notes,
.comment-form .form-submit {
    color: var(--dust);
    font-size: 0.88rem;
}

/* =========================================================
   12. Форма поиска
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.search-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    background: #171717;
    border: 2px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
}

.search-submit {
    padding: 0.65rem 1.2rem;
    border: 2px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
}

.search-submit:hover {
    background: var(--copper);
    color: #1A1A1A;
}

/* =========================================================
   13. Виджеты
   ========================================================= */

.widget {
    margin-bottom: 1.8rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--line);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}

.widget li:last-child {
    border-bottom: 0;
}

/* Сайдбар: тёмный фон #181818 — светлый текст */
.sidebar .widget-title {
    color: var(--ink);
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li {
    color: #C7C3BB;
}

.sidebar .widget a {
    color: var(--amber);
}

.sidebar .widget a:hover {
    color: var(--copper);
}

.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    color: var(--dust);
    font-size: 0.8rem;
}

/* =========================================================
   14. Подвал
   ========================================================= */

.site-foot {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    padding: 3rem 0 1.6rem;
    margin-top: auto;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.foot-col {
    min-width: 0;
}

/* Подвал тёмный — текст виджетов светлый, задаётся явно */
.site-foot .widget-title {
    color: var(--ink);
    border-bottom-color: #232323;
}

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .textwidget {
    color: #BEB9B1;
    font-size: 0.93rem;
}

.site-foot .widget li {
    border-bottom-color: #232323;
}

.site-foot .widget a {
    color: var(--amber);
}

.site-foot .widget a:hover {
    color: var(--copper);
}

.foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--line);
    color: var(--dust);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* =========================================================
   15. Cookie-баннер
   ========================================================= */

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.6rem;
    background: #0D0D0D;
    border-top: 3px solid var(--copper);
    color: #C7C3BB;
    font-size: 0.9rem;
}

.cookie-banner p {
    margin: 0;
    max-width: 820px;
}

/* =========================================================
   16. 404
   ========================================================= */

.err-box {
    padding: 2.6rem 2.2rem;
    background: var(--bg-alt);
    border: 2px solid var(--line);
}

.err-code {
    font-size: 5rem;
    line-height: 1;
    color: var(--copper);
    margin-bottom: 0.6rem;
}

.err-box .search-form {
    margin: 1.6rem 0;
}

/* =========================================================
   17. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    h1 {
        font-size: 3rem;
    }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.2rem;
    }

    .layout-single {
        width: 100%;
    }

    .card-grid,
    .rubric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.4rem 0;
    }

    .stat-cell:nth-child(3) {
        border-left: 0;
    }

    .fs-hero .hero-body {
        padding: 3rem 2rem;
    }

    .foot-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-toggle {
        display: inline-block;
    }

    .main-nav {
        flex-basis: 100%;
    }

    .main-nav[hidden] {
        display: none !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--line);
        margin-top: 0.8rem;
    }

    .main-nav li {
        border-bottom: 1px solid var(--line);
    }

    .main-nav a {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 0;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 1.65rem;
    }

    .entry-title {
        font-size: 1.9rem;
    }

    .card-grid,
    .card-list,
    .rubric-grid,
    .stats-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-cell {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1rem;
    }

    .stat-cell:first-child {
        border-top: 0;
    }

    .foot-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .front-section {
        padding: 2.4rem 0;
    }

    .fs-steps,
    .fs-stats {
        padding: 2rem 1.4rem;
    }

    .fs-hero .hero-body {
        padding: 2.2rem 1.4rem;
    }

    .step-row {
        gap: 1rem;
    }

    .step-num {
        width: 64px;
        height: 64px;
        font-size: 1.9rem;
    }

    .rubric {
        padding: 1.6rem 1.3rem;
    }

    .sidebar {
        padding: 1.3rem 1.2rem;
    }

    .err-box {
        padding: 1.8rem 1.4rem;
    }

    .cookie-banner {
        padding: 1rem 1.2rem;
    }

    .wm {
        display: none;
    }

}
