:root {
    --bg: #ffffff;
    --surface: #f6f8fa;
    --surface-strong: #edf5f2;
    --text: #1e2933;
    --muted: #5c6875;
    --line: #dfe5ec;
    --accent: #1f6f64;
    --accent-dark: #155148;
    --warm: #9a6200;
    --danger: #9d3428;
    --danger-bg: #fff1ee;
    --shadow: 0 12px 26px rgba(30, 41, 51, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

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

a:hover {
    text-decoration: underline;
}

img,
svg,
video {
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    max-width: 760px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--text);
    color: #fff;
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 16px;
}

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

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    flex: 0 0 auto;
}

.brand:hover {
    text-decoration: none;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 36px;
    padding: 0 10px;
    border: 2px solid var(--text);
    border-radius: 6px;
    font-weight: 800;
    line-height: 1;
}

.brand-tagline {
    color: var(--muted);
    font-size: 14px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
}

.site-nav a:hover,
.site-nav a.is-active {
    background: var(--surface-strong);
    color: var(--accent-dark);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.nav-toggle-lines {
    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;
}

.header-search,
.hero-search,
.page-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.header-search {
    width: 260px;
    flex: 0 0 260px;
}

input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}

input[type="search"]:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(31, 111, 100, 0.16);
}

.header-search button,
.hero-search button,
.page-search button {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.header-search button:hover,
.hero-search button:hover,
.page-search button:hover {
    background: var(--accent-dark);
}

.site-main {
    min-height: 60vh;
}

.hero {
    background: linear-gradient(180deg, #f7faf9 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 44px;
    align-items: center;
    padding: 56px 0 48px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--warm);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.16;
}

h1 {
    max-width: 860px;
    font-size: 44px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 20px;
}

p {
    margin: 0;
}

.hero-text,
.lead {
    color: var(--muted);
    font-size: 19px;
}

.hero-text {
    max-width: 760px;
    margin-top: 18px;
}

.hero-search {
    max-width: 640px;
    margin-top: 28px;
}

.hero-note {
    display: grid;
    gap: 10px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-note span {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    font-weight: 700;
}

.content-section {
    padding: 48px 0;
}

.section-muted {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-heading {
    display: grid;
    gap: 10px;
    max-width: 780px;
    margin-bottom: 24px;
}

.section-heading-wide {
    max-width: 900px;
}

.section-heading p {
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.category-tile {
    display: grid;
    gap: 10px;
    min-height: 190px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(30, 41, 51, 0.05);
}

.category-tile:hover {
    border-color: rgba(31, 111, 100, 0.45);
    text-decoration: none;
    transform: translateY(-1px);
}

.category-title {
    align-self: start;
    font-size: 15px;
    line-height: 1.3;
}

.category-description {
    color: var(--muted);
    font-size: 15px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.article-card {
    display: grid;
    gap: 12px;
    min-height: 230px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(30, 41, 51, 0.06);
}

.article-card h3 a {
    color: var(--text);
}

.article-card p {
    color: var(--muted);
}

.card-category {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--surface-strong);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
}

.read-link {
    align-self: end;
    font-weight: 800;
}

.info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 32px;
    align-items: start;
}

.steps-list,
.check-list {
    margin: 18px 0 0;
    padding-left: 22px;
}

.steps-list li,
.check-list li {
    margin: 8px 0;
}

.safety-panel,
.danger-block {
    padding: 20px;
    background: var(--danger-bg);
    border: 1px solid #f0c9c2;
    border-radius: var(--radius);
}

.safety-panel h2,
.danger-block h2 {
    color: var(--danger);
}

.breadcrumbs {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumbs li + li::before {
    content: "/";
    color: #9aa5b1;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-list a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}

.empty-state {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.article-layout {
    padding: 36px 0 52px;
}

.article-container {
    max-width: 920px;
}

.article-header {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.article-block {
    margin: 28px 0;
}

.article-block h2 {
    margin-bottom: 14px;
}

.hub-layout {
    padding: 36px 0 56px;
}

.hub-container {
    max-width: 1040px;
}

.hub-hero {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.hub-hero-main {
    display: grid;
    gap: 14px;
}

.hub-hero h1 {
    max-width: 860px;
}

.hub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.hub-summary-grid,
.hub-route-grid,
.hub-article-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hub-summary-card,
.hub-route-card,
.hub-article-group,
.hub-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.hub-summary-card,
.hub-route-card,
.hub-article-group {
    padding: 18px;
}

.hub-section {
    margin: 28px 0;
    padding: 22px;
}

.hub-section h2 {
    margin-bottom: 14px;
}

.hub-summary-card h2,
.hub-route-card h3,
.hub-article-group h3 {
    margin-bottom: 10px;
}

.hub-route-card p,
.hub-article-group p {
    color: var(--muted);
}

.hub-danger {
    border-color: #f0c9c2;
    background: var(--danger-bg);
}

.hub-compact-list,
.hub-link-list,
.hub-checklist {
    display: grid;
    gap: 10px;
    margin: 0;
}

.hub-compact-list,
.hub-link-list {
    list-style: none;
    padding-left: 0;
}

.hub-compact-list li {
    padding-left: 18px;
    position: relative;
}

.hub-compact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.hub-compact-list strong,
.hub-compact-list span {
    display: block;
}

.hub-compact-list span {
    color: var(--muted);
}

.hub-checklist {
    padding-left: 22px;
}

.hub-checklist li::marker {
    color: var(--accent);
    font-weight: 900;
}

.hub-link-list a {
    display: inline-flex;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.hub-link-list a:hover {
    text-decoration: underline;
}

.hub-related .category-grid {
    margin-top: 14px;
}

.hub-faq details:last-child {
    border-bottom: 0;
}

.cause-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cause-table th,
.cause-table td {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.cause-table th {
    background: var(--surface-strong);
    color: var(--text);
    font-size: 14px;
}

.cause-table tr:last-child td {
    border-bottom: 0;
}

.check-list {
    list-style: none;
    padding-left: 0;
}

.check-list li {
    position: relative;
    padding-left: 28px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.check-list-warn li::before {
    background: var(--danger);
}

.related-section {
    padding: 16px 0 0;
}

.related-section h2 {
    margin-bottom: 16px;
}

.faq-section details {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.faq-section summary {
    cursor: pointer;
    font-weight: 800;
}

.faq-section p {
    margin-top: 10px;
    color: var(--muted);
}

.page-search {
    max-width: 680px;
    margin: 0 0 24px;
}

.result-count {
    margin-bottom: 16px;
    color: var(--muted);
    font-weight: 800;
}

code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef1f4;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92em;
}

.site-footer {
    background: #1f2933;
    color: #dbe2ea;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 30px 0;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 800;
}

.footer-inner p {
    max-width: 680px;
    color: #b9c4cf;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #eef3f7;
}

@media (max-width: 1040px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 4;
        width: 100%;
        flex-basis: 100%;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-note {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .header-inner {
        align-items: flex-start;
    }

    .brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1 1 auto;
    }

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

    .site-nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        min-height: 42px;
    }

    .hero-inner {
        padding: 38px 0;
        gap: 24px;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 25px;
    }

    .hub-layout {
        padding: 28px 0 44px;
    }

    .hub-hero,
    .hub-section {
        padding: 18px;
    }

    .hub-summary-grid,
    .hub-route-grid,
    .hub-article-groups {
        grid-template-columns: 1fr;
    }

    .hero-text,
    .lead {
        font-size: 17px;
    }

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

    .category-grid,
    .article-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .category-tile,
    .article-card {
        min-height: auto;
    }

    .cause-table,
    .cause-table thead,
    .cause-table tbody,
    .cause-table th,
    .cause-table td,
    .cause-table tr {
        display: block;
    }

    .cause-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .cause-table {
        border: 0;
        background: transparent;
    }

    .cause-table tr {
        margin-bottom: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        overflow: hidden;
    }

    .cause-table td {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 12px;
        border-bottom: 1px solid var(--line);
    }

    .cause-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 800;
    }

    .cause-table td:last-child {
        border-bottom: 0;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .site-logo img {
        width: 132px;
    }

    .header-search,
    .hero-search,
    .page-search {
        flex-direction: column;
    }

    .header-search button,
    .hero-search button,
    .page-search button {
        width: 100%;
    }

    .hero-note {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 29px;
    }

    h2 {
        font-size: 23px;
    }

    .content-section {
        padding: 36px 0;
    }

    .article-layout {
        padding: 26px 0 40px;
    }

    .hub-layout {
        padding: 24px 0 36px;
    }

    .hub-badges {
        gap: 8px;
    }

    .hub-badge {
        max-width: 100%;
    }

    .hub-summary-card,
    .hub-route-card,
    .hub-article-group,
    .hub-section {
        padding: 16px;
    }

    .hub-link-list a {
        overflow-wrap: anywhere;
    }

    .cause-table td {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
