/*
Theme Name: dds_fish-sea-products.ru
Author: Алексей Кузнецов
Description: Информационная тема-энциклопедия о рыбе и морепродуктах в холодной морской гамме.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: fishsea
*/

:root {
    --bg: #F4F8FB;
    --bg-alt: #E3EEF5;
    --head: #0B2B3C;
    --foot: #071E2B;
    --line: #C9DDE8;
    --ink: #1A2E3B;
    --wave: #00A8B5;
    --wave-dark: #007F8A;
    --sand: #F2C14E;
    --mute: #6B8A9A;
    --f-head: "Manrope", "Poppins", "Segoe UI", Arial, sans-serif;
    --f-body: "Inter", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(217, 232, 240, 0.3) 0 1px, transparent 1px 8px);
    position: relative;
}
body::after {
    content: "";
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 300px;
    height: 170px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 170'%3E%3Cg fill='none' stroke='%2300A8B5' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M20 85C60 30 140 15 205 55l45-35-10 65 10 65-45-35C140 155 60 140 20 85z'/%3E%3Ccircle cx='62' cy='78' r='6'/%3E%3Cpath d='M95 50c14 22 14 48 0 70M120 60c-8 10-8 40 0 50M150 40l10-25 30 30M150 130l15 22 22-26'/%3E%3C/g%3E%3C/svg%3E");
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: var(--head);
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }

a { color: var(--wave-dark); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--wave);
    outline-offset: 2px;
}

table { width: 100%; border-collapse: collapse; margin: 1.5em 0; border: 1px solid var(--line); }
th, td { border: 1px solid var(--line); padding: 0.6em 0.8em; text-align: left; }
th { background: var(--bg-alt); font-family: var(--f-head); }

blockquote {
    margin: 1.6em 0;
    padding: 1.2em 1.5em;
    background: #FFFFFF;
    border-left: 4px solid var(--sand);
    border-radius: 0 10px 10px 0;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ---------- Контейнер ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell.shell-front { width: 85%; max-width: 1280px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.75em 1.8em;
    border-radius: 8px;
    border: 2px solid var(--wave);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.btn-fill { background: var(--wave); color: #FFFFFF; }
.btn-fill:hover {
    background: var(--wave-dark);
    border-color: var(--wave-dark);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 168, 181, 0.25);
}
.btn-line { background: transparent; color: var(--wave-dark); }
.btn-line:hover {
    background: var(--wave-dark);
    border-color: var(--wave-dark);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 168, 181, 0.25);
}
.btn-ghost-light { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.btn-ghost-light:hover {
    background: var(--wave);
    border-color: var(--wave);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 168, 181, 0.25);
}
.btn-lg { padding: 0.9em 2.2em; font-size: 1.05rem; }

/* анимированное подчёркивание текстовых ссылок */
.entry-content a, .sidebar a, .archive-desc a, .crumbs a, .talk a {
    color: var(--ink);
    background-image: linear-gradient(var(--wave), var(--wave));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease, color .25s;
}
.entry-content a { background-size: 100% 1px; background-image: linear-gradient(var(--line), var(--line)); }
.entry-content a:hover { background-image: linear-gradient(var(--wave), var(--wave)); }
.entry-content a:hover, .sidebar a:hover, .archive-desc a:hover, .crumbs a:hover, .talk a:hover {
    color: var(--wave-dark);
    background-size: 100% 1px;
}

/* ---------- Верхняя полоса и шапка ---------- */
.tide-bar {
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--wave) 0 64px, var(--sand) 64px 96px);
}
.masthead { background: var(--head); color: #FFFFFF; }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.9rem; min-width: 0; color: #FFFFFF; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.35;
    color: #FFFFFF;
    max-width: 58ch;
}
.brand-desc { font-size: 0.85rem; line-height: 1.45; color: #9FC3D2; max-width: 70ch; margin-top: 0.25rem; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: transparent;
    color: #FFFFFF;
    font: 600 0.9rem var(--f-head);
    cursor: pointer;
}
.nav-toggle-lines, .nav-toggle-lines::before, .nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #FFFFFF;
    position: relative;
}
.nav-toggle-lines::before, .nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }

.primary-nav { border-top: 1px solid rgba(201, 221, 232, 0.14); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 2rem; }
.nav-list li { position: relative; }
.nav-list a {
    display: block;
    padding: 0.85rem 0;
    color: #DCEBF2;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.97rem;
    background-image: linear-gradient(var(--wave), var(--wave));
    background-repeat: no-repeat;
    background-position: 0 calc(100% - 0.55rem);
    background-size: 0 2px;
    transition: background-size .3s, color .25s;
}
.nav-list a:hover, .nav-list .current-menu-item > a { color: #FFFFFF; background-size: 100% 2px; }
.nav-list .sub-menu { list-style: none; margin: 0; padding: 0 0 0 1rem; }

/* ---------- Хлебные крошки ---------- */
.crumbs { padding: 1.4rem 0 0.4rem; font-size: 0.9rem; color: var(--mute); }
.crumbs-sep { color: var(--sand); margin: 0 0.25rem; }
.crumbs span:last-child { color: var(--ink); }

/* ---------- Раскладка ---------- */
.page-wrap { padding-bottom: 80px; }
.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar { display: flex; justify-content: space-between; align-items: flex-start; gap: 6%; }
.layout-with-sidebar .content-area { flex: 0 0 67%; min-width: 0; }
.layout-with-sidebar .sidebar { flex: 0 0 27%; min-width: 0; }
.content-area { min-width: 0; }

.page-title { margin-top: 0.8rem; font-size: 2.4rem; font-weight: 800; }

/* ---------- Заголовки секций ---------- */
.sec-title {
    display: inline-block;
    position: relative;
    margin: 0 0 1.6rem;
    padding: 0 0 0.9rem 1.2rem;
    font-size: 2rem;
    font-weight: 800;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sand);
}
.sec-title::after {
    content: "";
    position: absolute;
    left: 1.2rem;
    bottom: 0;
    width: 60%;
    height: 2px;
    background: var(--wave);
}
.sec-lead { max-width: 62ch; color: var(--mute); margin: -0.4rem 0 2rem; }

/* вертикальная черта у H2/H3 в тексте */
.entry-content h2, .entry-content h3, .archive-desc h2, .archive-desc h3, .talk-title {
    border-left: 4px solid var(--wave);
    padding-left: 0.8rem;
}

/* ---------- Главная: общие секции ---------- */
.front-block { padding: 80px 0; }
.block-species { background-color: var(--bg); }
.block-latest { background-color: var(--bg-alt); }
.block-facts {
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(217, 232, 240, 0.15) 0 1px, transparent 1px 8px),
        linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.block-cta { background-color: var(--bg-alt); }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--head);
    min-height: 520px;
    display: flex;
    align-items: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(11, 43, 60, 0.88) 0%, rgba(11, 43, 60, 0.6) 55%, rgba(11, 43, 60, 0.2) 100%);
    z-index: 1;
}
.hero-inner { position: relative; z-index: 2; padding: 96px 0 110px; color: #FFFFFF; }
.hero-kicker { font-family: var(--f-head); font-weight: 600; color: var(--sand); margin: 0 0 0.8rem; }
.hero-title {
    margin: 0 0 1.2rem;
    color: #FFFFFF;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.12;
    max-width: 17ch;
}
.hero-sub { max-width: 56ch; font-size: 1.15rem; color: #DCEBF2; margin-bottom: 2rem; }
.hero-line {
    position: absolute;
    left: 0;
    bottom: 34px;
    width: 26%;
    height: 4px;
    background: var(--sand);
    z-index: 2;
    border-radius: 0 4px 4px 0;
}

/* Сетка видов */
.species-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.species-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    border-top: 3px solid var(--wave);
    box-shadow: 0 4px 12px rgba(11, 43, 60, 0.08);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.species-card:hover {
    transform: translateY(-4px);
    border-top-color: var(--sand);
    box-shadow: 0 10px 22px rgba(11, 43, 60, 0.13);
}
.species-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.species-body { flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.species-meta { display: block; font-size: 0.85rem; color: var(--mute); margin-bottom: 0.2rem; }
.species-name { margin: 0 0 0.6rem; color: var(--head); font-size: 1.3rem; }
.species-body p { margin: 0; font-size: 0.98rem; }

/* Карточки записей */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.layout-with-sidebar .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(11, 43, 60, 0.08);
    position: relative;
    transition: transform .3s, box-shadow .3s;
}
.card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--wave);
    z-index: 2;
    transition: height .3s, background-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(11, 43, 60, 0.13); }
.card:hover::before { height: 5px; background: var(--sand); }
.card-thumb { overflow: hidden; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1.3rem 1.4rem 1.5rem; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--mute); margin-bottom: 0.6rem; }
.card-title { margin: 0 0 0.6rem; font-size: 1.2rem; line-height: 1.35; }
.card-title a { color: var(--head); transition: color .25s; }
.card-title a:hover { color: var(--wave-dark); }
.card-excerpt { flex: 1; font-size: 0.97rem; overflow-wrap: anywhere; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: 0.6rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.93rem;
    color: var(--wave-dark);
    background-image: linear-gradient(var(--wave), var(--wave));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size .3s;
}
.card-more:hover { background-size: 100% 2px; }

.cat-chip {
    display: inline-block;
    padding: 0.15em 0.6em;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.6;
}
.cat-chip.tone-0 { background: #008C97; }
.cat-chip.tone-1 { background: #4A6F86; }
.cat-chip.tone-2 { background: #3F4F9A; }
.cat-chip.tone-3 { background: #2F7FB8; }
.cat-chip:hover { color: #FFFFFF; filter: brightness(1.1); }

.latest-foot { margin-top: 2.4rem; }
.empty-note { color: var(--mute); }

/* Статистика */
.facts-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 1rem 0;
}
.fact {
    min-width: 0;
    padding: 0.8rem 1.6rem;
    border-left: 2px dashed var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-num {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.1;
    color: var(--sand);
    text-shadow: 0 1px 0 rgba(11, 43, 60, 0.18);
}
.fact-label { color: var(--head); font-weight: 500; line-height: 1.5; }

/* CTA */
.cta-plate {
    position: relative;
    overflow: hidden;
    background: var(--head);
    color: #FFFFFF;
    border-radius: 12px;
    padding: 4rem 3.2rem;
}
.cta-wave {
    position: absolute;
    top: -10px;
    right: -20px;
    width: 320px;
    height: 180px;
    opacity: 0.35;
    pointer-events: none;
}
.cta-title { position: relative; margin: 0 0 1rem; color: #FFFFFF; font-size: 2.2rem; font-weight: 800; max-width: 22ch; }
.cta-text { position: relative; max-width: 58ch; color: #C9DDE8; font-size: 1.1rem; margin-bottom: 2rem; }
.cta-plate .btn { position: relative; }

/* ---------- Запись и страница ---------- */
.entry-head .card-meta { margin-top: 0.8rem; }
.entry-head .page-title { margin-top: 0.3rem; }
.entry-cover { margin: 0 0 2rem; }
.entry-cover img { display: block; width: 100%; height: auto; border-radius: 12px; }
.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--wave); }
.entry-content pre { overflow-x: auto; background: #FFFFFF; border: 1px solid var(--line); padding: 1rem 1.2rem; border-radius: 8px; }
.entry-content hr { border: 0; border-top: 2px dashed var(--line); margin: 2.4em 0; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.entry-tags a { padding: 0.25em 0.7em; border: 1px solid var(--line); border-radius: 4px; color: var(--mute); font-size: 0.88rem; }
.entry-tags a:hover { color: var(--wave-dark); border-color: var(--wave); }
.archive-desc { color: var(--mute); margin-bottom: 1.6rem; }

/* ---------- Сайдбар ---------- */
.sidebar {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.6rem 1.5rem;
    margin-top: 0.8rem;
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.sidebar .widget-title { margin: 0 0 1rem; font-size: 1.1rem; color: var(--head); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.55rem 0; border-bottom: 1px solid #E8F1F6; line-height: 1.45; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { color: var(--ink); font-weight: 500; }
.sidebar .post-date { display: block; font-size: 0.82rem; color: var(--mute); margin-top: 0.2rem; }
.sidebar p { color: var(--ink); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2.6rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.9rem;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--ink);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.95rem;
    transition: border-color .25s, background-color .25s, color .25s;
}
.pager a.page-numbers:hover { border-color: var(--wave); color: var(--wave-dark); }
.pager .page-numbers.current { background: var(--wave); border-color: var(--wave); color: #FFFFFF; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.2rem; }

/* ---------- Поиск ---------- */
.find-form { display: flex; gap: 0.6rem; max-width: 520px; margin: 1.4rem 0; }
.find-field {
    flex: 1;
    min-width: 0;
    padding: 0.75em 1em;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--ink);
    font: inherit;
}
.find-field:focus { border-color: var(--wave); outline: none; }
.find-btn { flex: 0 0 auto; }

/* ---------- 404 ---------- */
.lost { padding: 2rem 0 1rem; }
.lost-code { font-family: var(--f-head); font-weight: 800; font-size: 6rem; line-height: 1; color: var(--sand); margin: 0; }

/* ---------- Комментарии ---------- */
.talk { margin-top: 3rem; padding-top: 2rem; border-top: 2px dashed var(--line); }
.talk-list { list-style: none; margin: 0; padding: 0; }
.talk-list .comment { margin: 0 0 1.2rem; }
.talk-list .comment-body { background: #FFFFFF; border-radius: 10px; padding: 1.1rem 1.3rem; box-shadow: 0 4px 12px rgba(11, 43, 60, 0.06); }
.talk-list .children { list-style: none; padding-left: 1.6rem; margin-top: 1rem; }
.talk-list .avatar { border-radius: 50%; float: left; margin-right: 0.8rem; }
.talk-list .comment-meta { font-size: 0.85rem; color: var(--mute); }
.talk-list .fn { font-style: normal; color: var(--head); }
.comment-respond label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    border: 2px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: #FFFFFF;
    color: var(--ink);
}
.comment-respond textarea:focus, .comment-respond input:focus { border-color: var(--wave); outline: none; }
.talk-note, .talk-closed { color: var(--mute); font-size: 0.9rem; }

/* ---------- Подвал ---------- */
.site-foot { background: var(--foot); color: #B7CEDA; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; padding: 64px 0 48px; }
.foot-col { min-width: 0; }
.site-foot .widget + .widget { margin-top: 1.6rem; }
.site-foot .widget-title { margin: 0 0 1rem; color: #FFFFFF; font-size: 1.1rem; }
.site-foot .widget, .site-foot p { color: #B7CEDA; font-size: 0.95rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 0.3rem 0; }
.site-foot a { color: #DCEBF2; transition: color .25s; }
.site-foot a:hover { color: var(--sand); }
.site-foot .post-date { display: block; font-size: 0.82rem; color: #8FB0C0; }
.foot-copy { border-top: 1px solid rgba(201, 221, 232, 0.12); padding: 1.2rem 0; font-size: 0.88rem; color: #8FB0C0; }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.4rem;
    background: var(--head);
    color: #DCEBF2;
    border-radius: 12px;
    border-top: 3px solid var(--sand);
    box-shadow: 0 10px 30px rgba(7, 30, 43, 0.35);
}
.cookie-text { margin: 0; font-size: 0.92rem; line-height: 1.5; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav { display: none; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; padding: 0.4rem 0 1rem; }
    .nav-list a { padding: 0.7rem 0; background-position: 0 calc(100% - 0.35rem); }
    .brand-desc { display: none; }

    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 3rem; }
    .layout-single { width: 100%; }
    .layout-with-sidebar .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .species-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
    .fact:nth-child(3) { border-left: 0; padding-left: 0; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .hero-title { font-size: 2.6rem; }
    .cta-plate { padding: 3rem 2.4rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell.shell-front { width: 92%; }
    .front-block { padding: 56px 0; }
    .brand-name { font-size: 0.85rem; }
    .brand-svg { width: 44px; height: 44px; }

    .hero { min-height: 440px; }
    .hero-inner { padding: 64px 0 84px; }
    .hero-title { font-size: 2.1rem; }
    .hero-sub { font-size: 1rem; }

    .sec-title { font-size: 1.6rem; }
    .page-title { font-size: 1.9rem; }

    .species-grid, .card-grid, .layout-with-sidebar .card-grid-list { grid-template-columns: minmax(0, 1fr); }
    .facts-row { grid-template-columns: minmax(0, 1fr); }
    .fact { border-left: 0; padding: 0.8rem 0; border-top: 2px dashed var(--line); }
    .fact:first-child { border-top: 0; }

    .cta-plate { padding: 2.2rem 1.5rem; }
    .cta-title { font-size: 1.6rem; }
    .cta-wave { width: 200px; height: 112px; }

    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .find-form { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; }
    .sidebar { padding: 1.4rem 1.2rem; }
    body::after { width: 180px; height: 100px; }
}
