:root {
    color-scheme: light;
    --ink: #17221b;
    --muted: #5d6b62;
    --river: #166d5b;
    --paper: #fffdf7;
    --line: #dce5dd;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: #f2f5ef;
    font: 17px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--river); }

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

.skip-link {
    position: fixed;
    z-index: 100;
    top: .5rem;
    left: .5rem;
    padding: .65rem 1rem;
    color: white;
    background: #111;
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1rem max(1rem, calc((100vw - 1180px) / 2));
    color: white;
    background: #163f35;
}

.site-header a { color: inherit; text-decoration: none; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; padding: .28rem .55rem; border-radius: 8px; background: #fff; box-shadow: 0 1px 0 rgb(0 0 0 / 8%); }
.brand__logo { display: block; width: clamp(180px, 19vw, 240px); height: auto; }
.site-header nav { display: flex; flex: 1; flex-wrap: wrap; gap: 1.25rem; }
.site-header nav a { padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: rgb(255 255 255 / 55%); }
.nav-service { font-weight: 750; }
.site-header__actions { display: flex; flex: 0 0 auto; gap: .4rem; align-items: center; order: 1; }
.site-header__search,
.site-menu-toggle { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .45rem .65rem; border: 1px solid rgb(255 255 255 / 35%); border-radius: 7px; font: inherit; line-height: 1.3; }
.site-menu-toggle { display: none; color: inherit; background: transparent; cursor: pointer; }
.site-header :focus-visible { outline: 3px solid #ffdc83; outline-offset: 3px; }

.design-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    align-items: center;
    width: min(1180px, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding: .7rem .9rem;
    border: 1px dashed #9daf9f;
    border-radius: 10px;
    color: #3f4d43;
    background: #f8fbf5;
    font-size: .86rem;
}
.design-switcher a { padding: .25rem .55rem; border-radius: 999px; text-decoration: none; }
.design-switcher a[aria-current="page"] { color: white; background: var(--river); }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
}

.content,
.sidebar {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 0 12px 36px rgb(22 63 53 / 8%);
}

h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
h1 { margin-top: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
img { max-width: 100%; height: auto; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .3rem .55rem; margin-bottom: 1.25rem; color: var(--muted); font-size: .82rem; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.article-kicker,
.section-label { margin: 0 0 .5rem; color: var(--river); font-size: .74rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .86rem; }
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 1em 0; }
.article-body h2 { margin-top: 2.4rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.article-body h3 { margin-top: 1.8rem; font-size: 1.25rem; }
.article-body li + li { margin-top: .35rem; }
.article-body blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.2rem; border-left: 3px solid var(--river); color: #425046; }

.archive-section > h2 { margin-bottom: 1.25rem; }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.archive-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf8; }
.archive-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e6ede7; }
.archive-card__image img { width: 100%; height: 100%; object-fit: cover; }
.archive-card > div { padding: 1rem; }
.archive-card time { color: var(--muted); font-size: .76rem; }
.archive-card h3 { margin: .25rem 0 .55rem; font-size: 1.15rem; }
.archive-card h3 a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .16em; }
.archive-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.archive-pagination { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: center; margin-top: 2rem; }
.archive-pagination a,
.archive-pagination strong,
.archive-pagination span { display: inline-grid; min-width: 2.25rem; min-height: 2.25rem; padding: .35rem .55rem; place-items: center; border-radius: 6px; }
.archive-pagination a { border: 1px solid var(--line); background: white; text-decoration: none; }
.archive-pagination strong { color: white; background: var(--river); }
.category-description { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }

.legacy-caption {
    width: 100%;
    margin: 1.5rem auto;
}

.legacy-caption img { display: block; width: 100%; }
.legacy-caption figcaption { margin-top: .45rem; color: var(--muted); font-size: .92rem; }
.legacy-caption.alignleft { margin-right: auto; margin-left: 0; }
.legacy-caption.alignright { margin-right: 0; margin-left: auto; }

.legacy-info-box,
.legacy-service-notice {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    border-left: 4px solid var(--river);
    border-radius: 0 8px 8px 0;
    background: #edf6f1;
}

.legacy-video { margin: 1.8rem 0; }
.legacy-video__frame { position: relative; overflow: hidden; padding-top: 56.25%; border-radius: 10px; background: #0b1814; }
.legacy-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.legacy-video figcaption { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: space-between; margin-top: .5rem; color: var(--muted); font-size: .84rem; }

.content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    /* Старые inline-height обрезают строки при переносе текста на телефоне. */
    height: auto !important;
}

.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; }
.table-scroll table { display: table; max-width: none; }
.table-scroll table:has(.calNo) tr > :first-child:not(.calNo, .calLow, .calNormal, .calFine, .calSpawning) { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.table-scroll-hint { margin: .5rem 0 !important; color: var(--muted); font-size: .84rem; }

.content th,
.content td {
    min-width: 2.2rem;
    padding: .4rem .55rem;
    border: 1px solid var(--line);
    text-align: center;
}

.content th:first-child,
.content td:first-child { text-align: left; }

/* Значения старого календаря закодированы классами в исходном HTML. */
.content .calNo { background-color: #c8e6c9; }
.content .calLow { background-color: #92cc86; }
.content .calNormal { background-color: #4caf50; }
.content .calFine { background-color: #388e3c; }
.content .calSpawning { background-color: #ffeb3b; }

.sidebar { align-self: start; }
.sidebar > section + section,
.sidebar > section + nav,
.sidebar > nav + section,
.sidebar > nav + nav,
.sidebar > details,
.sidebar > details + section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sidebar a { display: block; margin-bottom: .75rem; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.sidebar small { margin-left: .3rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.sidebar p { color: var(--muted); }
.sidebar h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.sidebar-directory > summary { display: flex; align-items: center; justify-content: space-between; color: var(--river); cursor: pointer; font-size: 1.05rem; font-weight: 800; }
.sidebar-directory > summary small { display: inline-grid; min-width: 1.8rem; min-height: 1.8rem; margin: 0; place-items: center; border-radius: 999px; background: #edf4ed; }
.sidebar-directory nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .8rem; padding-top: 1rem; }
.sidebar-directory nav a { margin: 0; padding: .35rem 0; font-size: .86rem; font-weight: 600; }

.sidebar-poll__note { margin-top: -.35rem; font-size: .82rem; }
.sidebar-poll ol,
.poll-card ol { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.sidebar-poll li span,
.poll-card li span { display: flex; gap: .5rem; justify-content: space-between; }
.sidebar-poll li small,
.poll-card li small { margin: 0; white-space: nowrap; text-transform: none; }
.sidebar-poll li i,
.poll-card li i { display: block; height: .35rem; margin-top: .25rem; overflow: hidden; border-radius: 999px; background: #e4ebe4; }
.sidebar-poll li i::before,
.poll-card li i::before { display: block; width: var(--poll-share); height: 100%; border-radius: inherit; background: var(--river); content: ""; }
.sidebar-poll > p:last-child { margin-bottom: 0; }
.sidebar-poll > p:last-child a { margin-bottom: 0; font-size: .84rem; }

.poll-archive { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; }
.poll-archive > header { max-width: 820px; margin-bottom: 2rem; }
.poll-archive__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.poll-card { padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 8px 24px rgb(22 63 53 / 6%); }
.poll-card h2 { margin-top: 0; font-size: 1.15rem; }
.poll-card > p { color: var(--muted); font-size: .84rem; }

.article-share { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; margin-top: 2.5rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.related-content { margin-top: 3rem; }
.related-content h2 { margin: 0 0 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.related-grid a { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; padding: .9rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); text-decoration: none; }
.related-grid a:hover { border-color: #8fac99; background: #f5faf5; }
.related-grid span { color: var(--river); font-size: .72rem; font-weight: 850; }
.article-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.article-pager a { padding: 1rem; border-radius: 9px; color: var(--ink); background: #eef4ee; text-decoration: none; }
.article-pager span { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .74rem; font-weight: 750; text-transform: uppercase; }
.article-pager__next { text-align: right; }

.site-search div { display: flex; gap: .4rem; }
.sidebar .site-search div { align-items: stretch; flex-direction: column; }
.sidebar .site-search button { width: 100%; }
.site-search input { min-width: 0; width: 100%; padding: .62rem .72rem; border: 1px solid #aebbb1; border-radius: 6px; background: white; font: inherit; }
.site-search button { padding: .62rem .8rem; border: 0; border-radius: 6px; color: white; background: var(--river); font: inherit; font-weight: 750; cursor: pointer; }
.site-search--large { max-width: 760px; }
.site-search--large label { display: block; margin-bottom: .35rem; font-weight: 700; }
.site-search--large input { padding: .8rem 1rem; }

.article-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.article-comments > summary { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 9px; background: #f4f8f2; cursor: pointer; list-style-position: inside; }
.article-comments > summary::marker { color: var(--river); }
.article-comments > summary .section-label { display: block; margin-bottom: .25rem; }
.article-comments > summary strong { font-size: 1.2rem; }
.article-comments > summary small { color: var(--muted); font-size: .8em; font-weight: 500; }
.comments-toggle { flex: 0 0 auto; color: var(--river); font-size: .82rem; font-weight: 750; }
.comments-content { padding-top: 1rem; }
.article-comments ol { display: grid; gap: .85rem; padding: 0; list-style: none; }
.article-comments li { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 9px; background: #f9fbf7; }
.article-comments li.comment-reply { margin-left: clamp(1rem, 5vw, 3rem); }
.article-comments header { display: flex; gap: 1rem; justify-content: space-between; color: var(--muted); font-size: .86rem; }
.article-comments header strong { color: var(--ink); }
.article-comments li p { margin-bottom: 0; }
.comments-note, .search-summary { color: var(--muted); font-size: .9rem; }

.search-page { width: min(960px, calc(100% - 2rem)); margin: 2rem auto; padding: clamp(1rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 12px 36px rgb(22 63 53 / 8%); }
.search-results { display: grid; gap: 1rem; padding-left: 1.5rem; }
.search-results li { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.search-results a { font-size: 1.08rem; font-weight: 750; }
.search-results p { margin: .3rem 0 0; color: var(--muted); }

.site-footer { display: flex; gap: 2rem; justify-content: space-between; width: min(1180px, calc(100% - 2rem)); margin: 3rem auto 0; padding: 1.5rem 0 2.5rem; border-top: 1px solid #cfd9d0; color: var(--muted); font-size: .86rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.analytics-settings { padding: 0; border: 0; color: var(--river); background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
.analytics-settings[hidden], .analytics-consent[hidden] { display: none; }
.analytics-consent { position: fixed; z-index: 90; right: 1rem; bottom: 1rem; width: min(600px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 8px 40px rgb(0 0 0 / 20%); font-size: .9rem; }
.analytics-consent h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.analytics-consent p { margin: .4rem 0; }
.analytics-consent__status:empty { display: none; }
.analytics-consent__buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.analytics-consent__buttons button { flex: 1 1 180px; min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--river); border-radius: 7px; color: var(--river); background: white; font: inherit; font-weight: 700; cursor: pointer; }
.analytics-consent button:focus-visible, .analytics-settings:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; }

.legal-page {
    width: min(960px, calc(100% - 2rem));
    margin: 2rem auto;
}

.legal-content { max-width: none; }
.legal-content section + section { margin-top: 2.5rem; }
.legal-content h2 { margin-top: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.legal-content p { margin: .8rem 0; }
.legal-version { margin: 0; color: var(--muted); font-size: .88rem; }

.legal-draft,
.legal-stop {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border: 1px solid #d9a74a;
    border-radius: 8px;
    background: #fff8e7;
}

.legal-details { display: grid; gap: .7rem; }
.legal-details div { display: grid; grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr); gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.legal-details dt { color: var(--muted); font-weight: 700; }
.legal-details dd { margin: 0; }
.legal-table-wrap { max-width: 100%; overflow-x: auto; }
.legal-table { min-width: 760px; width: 100%; }
.legal-table th,
.legal-table td { min-width: 0; text-align: left; vertical-align: top; }

/* Вариант 1: спокойное развитие привычной двухколоночной статьи. */
.design--classic .content { max-width: 860px; }

/* Вариант 2: длинное редакционное чтение с журнальной типографикой. */
.design--editorial { --river: #8b3f2e; --ink: #231f1b; --paper: #fffdfa; --line: #e7ded3; }
.design--editorial .site-header { background: #332d28; }
.design--editorial .brand { background: #fffdf8; }
.design--editorial .layout { grid-template-columns: minmax(0, 820px) 250px; max-width: 1120px; }
.design--editorial .content { box-shadow: 0 18px 60px rgb(50 42 35 / 10%); }
.design--editorial .article-header h1,
.design--editorial .article-body { font-family: Georgia, "Times New Roman", serif; }
.design--editorial .article-body { font-size: 1.08rem; line-height: 1.76; }
.design--editorial .article-body h2 { font-weight: 500; }
.design--editorial .sidebar { border: 0; background: transparent; box-shadow: none; }

/* Вариант 3: практический полевой справочник с плотной навигацией. */
.design--field-guide { --river: #145b75; --ink: #152229; --paper: #fbfdfd; --line: #cfdee3; }
.design--field-guide .site-header { background: #123a49; }
.design--field-guide .brand { background: #fff; }
.design--field-guide .content,
.design--field-guide .sidebar { border-radius: 4px; box-shadow: 0 5px 18px rgb(18 58 73 / 8%); }
.design--field-guide .article-header { padding: 1.2rem; border-left: 6px solid var(--river); background: #edf5f7; }
.design--field-guide .article-body h2 { padding: .55rem .75rem; border-left: 4px solid var(--river); background: #edf5f7; }
.design--field-guide .related-grid a { border-radius: 3px; }

.condition-lab {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
}

.condition-lab > section {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 0 12px 36px rgb(22 63 53 / 8%);
}

.condition-lab__eyebrow {
    margin: 0 0 .5rem;
    color: var(--river);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.condition-summary {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    gap: 2rem;
}

.condition-summary__score {
    margin: 0;
    color: var(--river);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 850;
    line-height: .9;
}

.condition-summary dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.condition-summary dl div {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7faf5;
}

.condition-summary dt { color: var(--muted); font-size: .88rem; }
.condition-summary dd { margin: .25rem 0 0; font-size: 1.25rem; font-weight: 750; }

.condition-factors__table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; }
.condition-factors table { min-width: 760px; width: 100%; border-collapse: collapse; }
.condition-factors th,
.condition-factors td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.condition-factors small { color: var(--muted); }

.factor-status {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: #e5ece7;
    font-size: .78rem;
    font-weight: 750;
}

.factor-status--used { color: #155b35; background: #dff3e6; }
.factor-status--missing,
.factor-status--stale,
.factor-status--future { color: #794416; background: #fff0d9; }

.condition-lab__rules ul { margin-bottom: 0; }

.planner-lead { max-width: 860px; font-size: 1.1rem; }
.planner-section-heading { display: flex; gap: 2rem; align-items: end; justify-content: space-between; margin-bottom: 1.25rem; }
.planner-section-heading h2 { margin: 0; }
.planner-section-heading > p { max-width: 560px; margin: 0; color: var(--muted); font-size: .92rem; }

.planner-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 1rem; align-items: end; }
.planner-form label { display: grid; gap: .35rem; min-width: 0; color: var(--muted); font-size: .82rem; font-weight: 750; }
.planner-form select,
.planner-form input[type="text"],
.planner-form button { min-width: 0; min-height: 3rem; padding: .65rem .75rem; border: 1px solid #aebbb1; border-radius: 7px; background: white; color: var(--ink); font: inherit; }
.planner-form button { border-color: var(--river); color: white; background: var(--river); font-weight: 800; cursor: pointer; }
.planner-form button:hover { filter: brightness(.92); }
.planner-waterbody-search__form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 1rem; align-items: end; }
.planner-waterbody-search__form label { display: grid; gap: .35rem; color: var(--muted); font-size: .82rem; font-weight: 750; }
.planner-waterbody-search__form input,
.planner-waterbody-search__form button { min-height: 3rem; padding: .65rem .75rem; border: 1px solid #aebbb1; border-radius: 7px; background: white; color: var(--ink); font: inherit; }
.planner-waterbody-search__form button { border-color: var(--river); background: var(--river); color: white; font-weight: 800; cursor: pointer; }
.planner-waterbody-results { display: grid; gap: .65rem; margin-top: 1rem; }
.planner-waterbody-result { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: #f8faf6; }
.planner-waterbody-result div { display: grid; gap: .2rem; }
.planner-waterbody-result small { color: var(--muted); }
.planner-search-message { margin: 1rem 0 0; color: var(--muted); }
.planner-quick-locations { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; }
.planner-quick-locations a { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: white; }
.planner-quick-locations a[aria-current="true"] { border-color: var(--river); color: var(--river); font-weight: 800; }
.water-context-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 0; }
.water-context-metrics > div { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f7faf5; }
.water-context-metrics dt { color: var(--muted); font-size: .8rem; font-weight: 750; }
.water-context-metrics dd { margin: .2rem 0 0; font-size: 1.35rem; font-weight: 850; }
.water-context-metrics small { color: var(--muted); }
.planner-water-context__note { margin-bottom: 0; color: var(--muted); }

.planner-error { border-color: #d9a74a !important; background: #fff8e7 !important; }
.planner-stale-notice { width: min(1180px, calc(100% - 2rem)); margin: -.5rem auto 0; padding: .85rem 1rem; border: 1px solid #d9a74a; border-radius: 8px; background: #fff8e7; }

.weather-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 0; }
.weather-metrics > div { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f7faf5; }
.weather-metrics dt { color: var(--muted); font-size: .8rem; font-weight: 750; }
.weather-metrics dd { margin: .2rem 0 0; font-size: 1.45rem; font-weight: 850; line-height: 1.2; }
.weather-metrics small { color: var(--muted); }

.trip-choice-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .75rem; }
.trip-choice { display: grid; gap: .35rem; min-width: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #f8faf6; text-decoration: none; }
.trip-choice:hover { border-color: #8fac99; background: #f0f7f1; }
.trip-choice--selected { outline: 3px solid rgb(22 109 91 / 18%); border-color: var(--river); }
.trip-choice__date { color: var(--muted); font-size: .8rem; }
.trip-choice__score { color: var(--river); font-size: 2.2rem; font-weight: 850; line-height: 1; }
.trip-choice small { color: var(--muted); font-size: .76rem; }

.planner-boundaries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.planner-boundaries > div { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: #f7faf5; }
.planner-boundaries h3 { margin-top: 0; }
.planner-boundaries ul { padding-left: 1.2rem; }
.planner-attribution { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.planner-form--catalog { grid-template-columns: minmax(260px, 1fr) auto auto; }
.planner-checkbox { display: flex !important; flex-direction: row; gap: .55rem !important; align-items: center; min-height: 3rem; }
.planner-checkbox input { width: 1.1rem; height: 1.1rem; }
.waterbody-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.waterbody-card { padding: 1.1rem; border: 1px solid var(--line); border-radius: 10px; background: #f8faf6; }
.waterbody-card h2 { margin: .25rem 0 .5rem; font-size: 1.15rem; }
.waterbody-card p:last-child { margin-bottom: 0; color: var(--muted); }
.archive-pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.archive-pagination a,
.button-link { display: inline-block; padding: .65rem .9rem; border-radius: 7px; color: white; background: var(--river); font-weight: 750; text-decoration: none; }

.legacy-quiz { margin: 2rem 0; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 12px; background: #f7faf5; }
.legacy-quiz__title { margin: .2rem 0 .6rem; color: var(--ink); font-size: 1.45rem; font-weight: 800; }
.legacy-quiz > header p:last-child { color: var(--muted); }
.legacy-quiz form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.legacy-quiz__question { min-width: 0; margin: 0; padding: 1rem; border: 1px solid #cbd7cd; border-radius: 9px; background: white; }
.legacy-quiz__question legend { max-width: 100%; padding: 0 .35rem; font-weight: 800; }
.legacy-quiz__question legend span { color: var(--river); }
.legacy-quiz__answers { display: grid; gap: .5rem; margin-top: .65rem; }
.legacy-quiz__answers label { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem .75rem; border-radius: 7px; cursor: pointer; }
.legacy-quiz__answers label:hover { background: #eef5ef; }
.legacy-quiz__answers input { flex: 0 0 auto; margin-top: .22rem; }
.legacy-quiz form > button,
.legacy-quiz__result button { justify-self: start; min-height: 2.8rem; padding: .65rem 1rem; border: 0; border-radius: 7px; color: white; background: var(--river); font: inherit; font-weight: 800; cursor: pointer; }
.legacy-quiz__result { margin-top: 1.5rem; padding: 1.2rem; border-left: 5px solid var(--river); background: white; }
.legacy-quiz__result[hidden] { display: none; }
.legacy-quiz__result h3 { margin: .25rem 0 .65rem; font-size: 1.5rem; }
.legacy-quiz__result button { margin-top: .5rem; }

@media (max-width: 850px) {
    .site-header { align-items: center; flex-wrap: wrap; gap: .5rem; padding: .65rem .75rem; }
    .brand__logo { width: clamp(120px, 36vw, 160px); }
    .site-header__actions { margin-left: auto; order: 0; }
    .site-header nav { flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem .5rem; }
    .site-header nav a { display: flex; min-height: 44px; align-items: center; padding: .45rem .6rem; border-radius: 6px; line-height: 1.35; }
    .site-header nav .nav-service { grid-column: 1 / -1; }
    .site-header[data-navigation-ready] .site-menu-toggle { display: inline-flex; }
    .site-header[data-navigation-ready]:not([data-menu-open]) nav { display: none; }
    .layout { grid-template-columns: minmax(0, 1fr); width: calc(100% - 1rem); margin: 1rem auto; gap: 1rem; }
    .content, .sidebar { padding: 1rem; border-radius: 10px; }
    .breadcrumbs { margin-bottom: .75rem; }
    .article-header { margin-bottom: 1.25rem; padding-bottom: 1rem; }
    .archive-pagination a, .archive-pagination strong { min-width: 44px; min-height: 44px; }
    .condition-summary { grid-template-columns: 1fr; }
    .condition-summary dl { grid-template-columns: 1fr; }
    .design--editorial .layout { grid-template-columns: minmax(0, 1fr); }
    .related-grid,
    .article-pager,
    .archive-grid,
    .poll-archive__grid { grid-template-columns: 1fr; }
    .article-pager__next { text-align: left; }
    .site-footer { flex-direction: column; gap: .75rem; }
    .legal-details div { grid-template-columns: 1fr; gap: .2rem; }
    .planner-section-heading { align-items: start; flex-direction: column; gap: .5rem; }
    .planner-form { grid-template-columns: 1fr; }
    .planner-waterbody-search__form { grid-template-columns: 1fr; }
    .planner-waterbody-result { align-items: start; flex-direction: column; }
    .planner-form--catalog,
    .waterbody-grid { grid-template-columns: 1fr; }
    .weather-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .water-context-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trip-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .planner-boundaries { grid-template-columns: 1fr; }
}

@media (min-width: 851px) and (max-width: 1180px) {
    .planner-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .planner-form button { grid-column: 1 / -1; }
    .weather-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .trip-choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
