:root {
    --bg-body: #cbd8e6;
    --bg-card: #ffffff;
    --bg-soft: #f7fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #0b1220;
    --primary-strong: #111827;
    --accent: #1d4ed8;
    --accent-strong: #163bb8;
    --accent-soft: #e8f1ff;
    --accent-bright: #5eead4;
    --success: #0ea5a4;
    --border: #dfeaf6;
    --radius-md: 18px;
    --radius-sm: 12px;
    --font-display: "Georgia", "Times New Roman", serif;
    --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
    --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 22px 45px rgba(15, 23, 42, 0.12);
    --transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    --focus-ring: 0 0 0 3px #ffffff, 0 0 0 6px var(--accent);
    --measure: 68ch;
}

html { font-size: 112.5%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.09), transparent 32%),
        radial-gradient(circle at bottom right, rgba(14, 165, 164, 0.08), transparent 22%),
        var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color-scheme: light;
}

body.page-text {
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, .site-logo, .catalog-title, .super-title {
    font-family: var(--font-body);
    letter-spacing: normal;
    font-weight: 600;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

p,
li,
blockquote,
figcaption {
    max-width: 70ch;
}

.site-header {
    background: rgba(11, 18, 32, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.site-header-inner {
    max-width: 1200px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    flex-wrap: nowrap;
    position: relative;
}

.site-logo {
    color: white;
    text-decoration: none;
    font-size: 1.44rem;
    font-weight: 750;
    letter-spacing: -0.05em;
    line-height: 1.1;
    flex-shrink: 0;
}

.site-logo span {
    color: var(--accent-bright);
}

.site-logo:hover {
    color: white;
}

.site-logo:focus-visible {
    outline-color: var(--accent-bright);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-toggle:focus-visible {
    outline-color: var(--accent-bright);
}

.nav-toggle-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background-color 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.site-header.is-open .nav-toggle-icon {
    background: transparent;
}

.site-header.is-open .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.site-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.8rem;
    min-width: 0;
    flex-shrink: 1;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
    padding: 0.58rem 0.8rem;
    letter-spacing: -0.01em;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: white;
    text-decoration: none;
    background: rgba(148, 163, 184, 0.12);
}

.site-nav a.active,
.site-nav a[aria-current="page"] {
    color: #dff9f7;
    background: rgba(94, 234, 212, 0.14);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.2);
}

.site-nav a:focus-visible {
    outline-color: var(--accent-bright);
}

@media (max-width: 1100px) {
    .site-header.is-open {
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .site-header-inner {
        flex-wrap: wrap;
    }

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

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
        padding: 0.5rem 0 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        margin-top: 0.35rem;
    }

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

    .site-nav a {
        padding: 0.88rem 0.35rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav a:last-child {
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .site-header-inner {
        min-height: 48px;
        padding-inline: 0.8rem;
        gap: 0.55rem;
    }

    .site-logo {
        font-size: 1.17rem;
        letter-spacing: -0.03em;
    }

    .site-search-toggle,
    .nav-toggle {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 379px) {
    .site-header-inner {
        padding-inline: 0.7rem;
        gap: 0.45rem;
    }

    .site-logo {
        font-size: 1.08rem;
    }
}

.text-page-container {
    flex-grow: 1;
    max-width: 800px;
    margin: 3rem auto;
    padding: 2.5rem 2.75rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid var(--border);
}

.text-page-container.text-page-wide {
    max-width: 920px;
}

.comparison-wrap {
    margin: 1.5rem 0 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
}

.comparison-table th,
.comparison-table td {
    text-align: left;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.comparison-table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.comparison-table thead th:nth-child(1) { width: 28%; }
.comparison-table thead th:nth-child(2) { width: 45%; }
.comparison-table thead th:nth-child(3) { width: 27%; }

.comparison-table tbody th {
    font-weight: 600;
    color: var(--text-main);
}

.comparison-table tbody tr:nth-child(even) { background: #f8fafc; }
.comparison-table tbody tr:focus-within { background: #f0fdf4; }

.comparison-table tbody tr:last-child > * { border-bottom: none; }

.comparison-alts,
.comparison-guides {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.text-page-container .comparison-alts a,
.text-page-container .comparison-guides a {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #a7d9c4;
    border-radius: var(--radius-sm);
    background: #ecfdf5;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
    white-space: normal;
}

.text-page-container .comparison-guides a {
    border-color: var(--border);
    background: #fff;
    color: var(--text-main);
}

.text-page-container .comparison-table a:hover {
    background: #d1fae5;
    border-color: var(--accent);
    text-decoration: underline;
}

.comparison-table a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.comparison-label { display: none; }

@media (max-width: 680px) {
    .text-page-container.text-page-wide {
        margin: 1rem 0.75rem;
        padding: 1.25rem 1rem;
        min-width: 0;
    }

    .comparison-wrap { border: 0; overflow: visible; }

    .comparison-table,
    .comparison-table tbody { display: block; width: 100%; }

    /* Keep the column headers available to assistive technology. */
    .comparison-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .comparison-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        overflow: hidden;
        background: #fff;
    }

    .comparison-table tbody tr:last-child { margin-bottom: 0; }

    .comparison-table tbody tr > th,
    .comparison-table tbody tr > td {
        display: block;
        padding: 0.9rem 1rem;
        border: 0;
    }

    .comparison-table tbody tr > th {
        background: #edf5f2;
        border-bottom: 1px solid var(--border);
        font-size: 1.05rem;
    }

    .comparison-table tbody tr > td:last-child { padding-top: 0.25rem; }

    .comparison-label {
        display: block;
        margin-bottom: 0.5rem;
        color: var(--text-muted);
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.035em;
        text-transform: uppercase;
    }
}

.comparison-footer {
    font-size: 1rem;
    color: var(--text-muted);
}

.news-list {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 1.75rem;
}

.news-list li {
    margin-bottom: 0;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    font-weight: 600;
    font-size: 1.05rem;
}

.news-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.news-footer {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.community-guide {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.community-guide li {
    margin: 0;
    padding: 0.9rem 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    line-height: 1.55;
}

.community-guide strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 600;
}

.section-lead {
    margin: -0.35rem 0 1rem !important;
    color: var(--text-muted) !important;
    font-size: 1rem !important;
}

.page-updated {
    font-size: 1rem;
    color: var(--text-muted);
    margin: -0.5rem 0 1.5rem;
}

.glossary-index,
.text-page-container .toc {
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2rem 0;
}

.glossary-index p,
.text-page-container .toc p {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.glossary-count {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 1rem;
}

.glossary-index ul,
.text-page-container .toc ul {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 1.5rem;
}

.glossary-index li,
.text-page-container .toc li {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    break-inside: avoid;
}

.glossary-toolbar {
    margin: 0 0 1.25rem 0;
}

.glossary-search-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.glossary-filter {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    font: inherit;
    font-size: 1.05rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-main);
}

.glossary-filter:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.glossary-filter-status {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: var(--text-muted);
    min-height: 1.4em;
}

.glossary-list {
    margin: 0;
}

.glossary-entry {
    margin: 0 0 1.75rem;
    padding: 1.1rem 0 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 5.5rem;
}

.glossary-entry:first-of-type {
    border-top: none;
    padding-top: 0.25rem;
}

.glossary-entry:target {
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: var(--radius-sm);
}

.glossary-entry h2 {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.45rem;
    line-height: 1.3;
    max-width: none;
}

.glossary-aka {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.glossary-entry p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
}

/* Legacy dl glossary (kept if other pages reuse) */
.glossary-list dt {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    scroll-margin-top: 5.5rem;
}

.glossary-list dt:first-of-type {
    margin-top: 0.5rem;
}

.glossary-list dd {
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    font-size: 1.05rem;
    line-height: 1.65;
}

.text-page-container h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5.5rem;
}

.catalog-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
}

.text-page-container a.catalog-link {
    color: #fff;
}

.catalog-link:hover,
.text-page-container a.catalog-link:hover {
    background-color: var(--accent);
    text-decoration: none;
}

.page-intro-profiles {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.page-intro-profiles a {
    font-weight: 600;
}

.catalog-next {
    margin: 1.75rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-muted);
}

.catalog-next a {
    font-weight: 600;
}

.kit-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.kit-toc a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.kit-toc a:hover {
    border-color: var(--accent);
    color: var(--text-main);
    text-decoration: none;
}

.kit-block {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 5.5rem;
}

.kit-block:last-of-type {
    border-bottom: none;
}

.kit-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.kit-list li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

.kit-list li:last-child {
    border-bottom: none;
}

.kit-gap {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.page-faq .faq-section {
    border-top: none;
    margin-top: 0;
    padding-top: 1rem;
}

.page-faq .faq-breadcrumb {
    max-width: 800px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
}

.page-faq .faq-extra {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.page-faq .faq-header {
    margin-bottom: 2rem;
}

.page-faq .faq-header h1 {
    color: var(--text-main);
    font-size: 2rem;
    margin: 0 0 10px 0;
    letter-spacing: normal;
}

.page-faq .faq-index {
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2.5rem 0;
}

.page-faq .faq-index-label {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.page-faq .faq-index-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0 0 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.page-faq .faq-index-cats a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    text-decoration: none;
}

.page-faq .faq-index-cats a:hover {
    text-decoration: underline;
}

.page-faq .faq-index-count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
}

.page-faq .faq-index-group {
    margin-bottom: 1.25rem;
}

.page-faq .faq-index-group:last-child {
    margin-bottom: 0;
}

.page-faq .faq-index-group-title {
    margin: 0 0 0.4rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
    color: var(--text-main);
}

.page-faq .faq-index-group-title a {
    color: inherit;
    text-decoration: none;
}

.page-faq .faq-index-group-title a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.page-faq .faq-index-group ul {
    margin: 0;
    padding-left: 1.25rem;
}

.page-faq .faq-index-group li {
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.page-faq .faq-index-group a {
    color: var(--text-main);
    text-decoration: none;
}

.page-faq .faq-index-group a:hover {
    text-decoration: underline;
}

.page-faq .faq-category {
    margin-bottom: 2.5rem;
    scroll-margin-top: 5rem;
}

.page-faq .faq-category h2 {
    color: var(--text-main);
    font-size: 1.35rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.page-faq .faq-item {
    scroll-margin-top: 5rem;
}

@media (max-width: 640px) {
    .glossary-index ul,
    .text-page-container .toc ul {
        columns: 1;
    }

    .page-faq .faq-index-cats {
        flex-direction: column;
        gap: 0.4rem;
    }
}

.breadcrumb {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.breadcrumb a {
    color: var(--text-main);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.breadcrumb a:hover {
    color: var(--text-main);
}

.text-page-container h1 {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 2.15rem;
    line-height: 1.2;
    max-width: var(--measure);
}

.text-page-container h2 {
    color: var(--text-main);
    margin-top: 2.25rem;
    font-size: 1.35rem;
    line-height: 1.3;
    scroll-margin-top: 5.5rem;
}

.text-page-container p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    max-width: var(--measure);
}

.text-page-container ul {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    font-size: 1.05rem;
}

.text-page-container li {
    margin-bottom: 0.5rem;
}

.text-page-container a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.text-page-container a:hover {
    text-decoration: underline;
}

footer,
footer.footer-home,
footer.site-footer {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #cbd5e1;
    font-size: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.footer-brand-name,
footer p.footer-brand-name {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: normal;
    color: #e2e8f0;
}

.footer-brand-name strong {
    font-family: inherit;
    font-weight: inherit;
    color: inherit;
}

.footer-brand-name span {
    color: #6ee7b7;
}

.footer-tagline {
    margin: 0;
    max-width: 28rem;
    font-size: 1rem;
    line-height: 1.45;
    color: #94a3b8;
}

footer p {
    margin: 0;
}

footer p strong {
    font-family: var(--font-body);
    font-weight: 600;
    color: #e2e8f0;
}

.footer-nav {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.footer-nav-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.1rem;
    font-size: 1rem;
}

.footer-nav-group a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.15rem;
    box-sizing: border-box;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
}

.footer-nav-group a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-nav-group a:focus-visible {
    outline-color: var(--accent-bright);
}

/* Compatibilidade com markup antigo em <p class="footer-nav"> */
p.footer-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    font-size: 1rem;
}

p.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.15rem;
    box-sizing: border-box;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
}

p.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-disclaimer {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.footer-disclaimer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.2rem 0;
    box-sizing: border-box;
    color: #e2e8f0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-disclaimer a:hover {
    color: #fff;
}

.footer-copy {
    margin: 0;
    font-size: 1rem;
    color: #94a3b8;
}

@media (min-width: 640px) {
    .footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem 1.75rem;
    }

    .footer-nav-group + .footer-nav-group {
        padding-left: 1.75rem;
        border-left: 1px solid rgba(148, 163, 184, 0.28);
    }
}

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

.site-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-search-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.site-search-toggle:focus-visible {
    outline: 3px solid var(--accent-bright);
    outline-offset: 3px;
}

.site-search-close:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

body.site-search-open {
    overflow: hidden;
}

.site-search-dialog {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.site-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.site-search-panel {
    position: relative;
    z-index: 1;
    width: min(40rem, calc(100% - 1.5rem));
    max-height: min(85vh, 40rem);
    margin: 8vh auto 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.site-search-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem 0.35rem;
}

.site-search-panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-main);
}

.site-search-close {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.site-search-close:hover {
    color: var(--text-main);
    background: var(--border);
}

.site-search-input {
    margin: 0.5rem 1.15rem 0.75rem;
    width: calc(100% - 2.3rem);
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--text-main);
    background: #fff;
}

.site-search-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
}

.site-search-results {
    overflow: auto;
    padding: 0 0.65rem 1rem;
    min-height: 8rem;
}

.site-search-hint,
.site-search-empty {
    margin: 0.5rem 0.5rem 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.site-search-group {
    margin: 0.85rem 0.5rem 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.site-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-search-list a {
    display: block;
    padding: 0.7rem 0.65rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
}

.site-search-list a:hover {
    background: #ecfdf5;
}

.site-search-list strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
}

.site-search-list mark {
    background: color-mix(in srgb, var(--accent) 28%, transparent);
    color: inherit;
    font-weight: 700;
    padding: 0 0.05em;
    border-radius: 2px;
}

.site-search-list span,
.site-search-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.site-search-meta em {
    font-style: normal;
    color: var(--text-main);
    font-weight: 600;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin: 0 0 1.25rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.catalog-query-hint {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.catalog-query-hint strong {
    color: var(--text-main);
    font-weight: 600;
}

.catalog-query-clear {
    border: 0;
    background: none;
    padding: 0;
    color: var(--text-main);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.catalog-query-clear:hover {
    color: var(--text-main);
}

.filter-chip {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    border-radius: 999px;
    min-height: 44px;
    padding: 0.45rem 0.9rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.filter-chip.is-active {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: var(--text-main);
}

.catalog-empty {
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 1rem;
}

.alt-list li.search-hit {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm, 6px);
    transition: outline-color 0.3s ease;
}

.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
}

.share-bar--catalog {
    margin: 0 0 1.5rem;
}

article.post-content .share-bar {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--text-main);
    background: #ecfdf5;
}

.share-btn.is-copied {
    border-color: #6ee7b7;
    background: #ecfdf5;
    color: var(--text-main);
}

.share-btn-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .site-header-inner .site-search-toggle {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .text-page-container {
        margin: 1.5rem;
        padding: 1.5rem;
    }

    .text-page-container h1 {
        font-size: 1.8rem;
    }

    .comparison-table {
        font-size: 1rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.9rem 0.65rem;
    }

    .site-search-panel {
        margin-top: 4vh;
        max-height: 90vh;
    }
}

/* Accessibility: readability, focus, and zoom reflow. */
html { scroll-padding-top: 6rem; }
body { overflow-wrap: anywhere; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}
:where(a, button, input, select, textarea, summary, [tabindex]) {
    scroll-margin-block: 6rem 2rem;
}
.site-header :focus-visible,
footer :focus-visible {
    outline-color: #6ee7b7;
    box-shadow: 0 0 0 3px #0f172a;
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.nav-toggle { flex-shrink: 0; }
.site-logo { flex-shrink: 1; min-width: 0; }
.site-search-close { min-width: 44px; min-height: 44px; flex-shrink: 0; }
.site-search-panel-head,
.site-search-input { flex-shrink: 0; }
.site-search-panel { overflow-y: auto; }
.site-search-results { flex: 1 1 auto; min-height: 0; }
.site-search-input,
.glossary-filter { border-color: #64748b; }
.site-search-input:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
}
input::placeholder { color: var(--text-muted); opacity: 1; }
.text-page-container a { text-decoration: underline; text-underline-offset: 0.15em; }
.text-page-container .kit-toc a,
.text-page-container .kit-toc a:hover { text-decoration: none; }
.footer-tagline,
.site-search-meta,
.site-search-list span { line-height: 1.5; }
@media (max-width: 1100px) {
    .site-header { position: relative; }
    html { scroll-padding-top: 1rem; }
}
@media (max-width: 380px) {
    .text-page-container { margin: 1rem 0.5rem; padding: 1rem; min-width: 0; }
}

/* Body copy in black; metadata keeps dark gray. */
.text-page-container p,
.text-page-container ul,
.glossary-entry p,
.glossary-list dd,
.kit-list li,
.news-desc { color: var(--text-main); }
.text-page-container .page-updated,
.text-page-container .post-meta,
.text-page-container .comparison-footer,
.text-page-container .news-footer { color: var(--text-muted); }
.site-logo, .footer-brand-name, footer p.footer-brand-name,
footer p strong { font-family: var(--font-display); }
