:root {
    color-scheme: light;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --bg: #f8fafc;
    --paper: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #e2e8f0;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-warm: #c2410c;
    --accent-cool: #0f766e;
    --soft: #eff6ff;
    --soft-warm: #fff7ed;
    --shadow: 0 18px 44px rgba(30, 41, 59, 0.08);
    --gradient: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: var(--site-header-height, 132px);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

p {
    margin: 0 0 14px;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-warm);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.26);
    outline-offset: 3px;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px 14px;
    display: grid;
    gap: 14px;
}

.header-top {
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(260px, 430px);
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: block;
    flex: 0 0 auto;
    filter: drop-shadow(0 12px 20px rgba(37, 99, 235, 0.2));
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.05;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.site-search,
.search-large {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.site-search input,
.search-large input {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.site-search button,
.search-large button,
.button {
    border: 0;
    border-radius: 8px;
    padding: 10px 13px;
    background: var(--gradient);
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    margin: -4px 0 0;
    padding: 4px 0 0;
    font-size: 14px;
    font-weight: 650;
}

.nav a {
    flex: 0 1 auto;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover {
    border-color: rgba(37, 99, 235, 0.18);
    background: var(--soft);
    color: var(--text);
}

.nav a.active {
    border-color: rgba(37, 99, 235, 0.2);
    background: var(--gradient);
    color: #fff;
    font-weight: 850;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.breadcrumbs {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

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

.breadcrumbs li {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.breadcrumbs li + li::before {
    content: "/";
    margin: 0 8px;
    color: #94a3b8;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a,
.breadcrumbs [aria-current="page"] {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.breadcrumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 800;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: end;
    min-height: 360px;
    padding: 48px;
    border-radius: 8px;
    background:
        linear-gradient(rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.52)),
        url("../images/hero-documents.svg") center / cover no-repeat;
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-copy {
    max-width: 700px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-cool);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow,
.hero a {
    color: #d1fae5;
}

.hero h1,
.page-title h1 {
    margin: 0 0 14px;
    color: inherit;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero .search-large {
    max-width: 620px;
    margin-top: 24px;
}

.hero-panel {
    display: grid;
    gap: 8px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-panel strong {
    font-size: 28px;
    line-height: 1.1;
}

.section {
    margin-top: 42px;
}

.section.compact {
    margin-top: 28px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-heading h2,
.content-page h2,
.guide-content h2 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.2;
}

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

.category-tile,
.guide-card a {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.category-tile:hover,
.guide-card a:hover {
    border-color: rgba(37, 99, 235, 0.34);
    color: var(--text);
    box-shadow: var(--shadow);
}

.category-tile strong,
.guide-card strong {
    font-size: 18px;
    line-height: 1.25;
}

.category-tile span,
.guide-card small {
    color: var(--muted);
}

.category-tile small {
    align-self: end;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--accent-dark);
    font-weight: 800;
}

.guide-card span {
    color: var(--accent-cool);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.page-title {
    max-width: 760px;
    margin: 4px 0 26px;
}

.page-title.narrow,
.content-page {
    max-width: 760px;
}

.page-title p {
    color: var(--muted);
    font-size: 18px;
}

.filter-box {
    max-width: 520px;
    margin-top: 18px;
}

.filter-box input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.filter-box input:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: 0;
}

.content-page,
.guide-content {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.content-page {
    padding: 26px;
}

.section.compact + .content-page {
    margin-top: 28px;
}

.content-section + .content-section {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.content-section ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.content-section li + li {
    margin-top: 6px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
    gap: 22px;
    align-items: start;
}

.contact-form {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.contact-form label {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 500;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: 0;
}

.contact-form small {
    color: #b42318;
    font-weight: 700;
}

.contact-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-message {
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 750;
}

.form-message.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.form-message.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
}

.guide-hero {
    grid-column: 1 / -1;
    padding: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
    border: 1px solid var(--line);
}

.guide-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.03;
    letter-spacing: 0;
}

.guide-hero > p {
    max-width: 780px;
    color: var(--muted);
    font-size: 18px;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
}

.quick-facts div {
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}

.quick-facts dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.quick-facts dd {
    margin: 2px 0 0;
    color: var(--text);
    font-weight: 850;
}

.guide-aside {
    order: 2;
}

.guide-aside nav {
    position: sticky;
    top: calc(var(--site-header-height, 132px) + 18px);
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.guide-aside a {
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}

.guide-aside a:hover {
    background: var(--soft);
    color: var(--text);
}

.guide-content {
    padding: 30px;
}

.guide-content section + section {
    margin-top: 30px;
}

.guide-content ul,
.guide-content ol {
    margin: 12px 0 0;
    padding-left: 22px;
}

.guide-content li + li {
    margin-top: 8px;
}

.procedure-summary {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.procedure-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.procedure-summary-grid div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.procedure-summary-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.procedure-summary-grid strong {
    display: block;
    color: var(--text);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.procedure-summary-note {
    margin-top: 14px;
    color: var(--muted);
}

.context-links {
    padding: 18px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #f8fafc;
}

.context-links p {
    color: var(--muted);
}

.context-links p + p {
    margin-top: 10px;
}

.context-links a {
    font-weight: 800;
}

.mistake-list {
    padding: 20px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7ed;
}

.mistake-items {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mistake-items article {
    padding: 14px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff;
}

.mistake-items h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.mistake-items p {
    color: #7c2d12;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #f8fafc;
}

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

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

.review-note {
    padding: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}

.review-note p {
    color: #166534;
}

.review-note p strong {
    color: #14532d;
}

.review-checklist {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.review-checklist div {
    padding: 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #fff;
}

.review-checklist dt {
    color: #14532d;
    font-weight: 850;
}

.review-checklist dd {
    margin: 4px 0 0;
    color: #166534;
}

.review-checklist a {
    font-weight: 800;
}

.notice {
    margin-top: 30px;
    padding: 14px;
    border-radius: 8px;
    background: var(--soft-warm);
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-weight: 650;
}

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

.source-list {
    display: grid;
    gap: 14px;
}

.source-item {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.source-item h2 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.2;
}

.source-item p {
    color: var(--muted);
    font-size: 14px;
}

.source-item ul {
    margin: 0;
    padding-left: 20px;
}

.source-item li + li {
    margin-top: 6px;
}

.faq-index-list {
    display: grid;
    gap: 12px;
}

.faq-index-item {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.faq-index-item h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.faq-index-item p {
    color: var(--muted);
}

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

.footer-grid {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 28px;
}

.footer-brand span {
    font-size: 20px;
    font-weight: 850;
}

.footer-grid p,
.footer-grid a,
.footer-link-button {
    color: var(--muted);
}

.footer-disclaimer {
    margin-top: 12px;
    font-size: 14px;
}

.footer-grid nav {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-grid h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 16px;
}

.footer-link-button {
    width: fit-content;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid var(--line);
}

.footer-bottom-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.cookie-banner,
.cookie-panel {
    position: fixed;
    z-index: 80;
}

.cookie-banner {
    right: 18px;
    bottom: 18px;
    left: 18px;
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.cookie-banner[hidden],
.cookie-panel[hidden] {
    display: none;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cookie-panel {
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.42);
}

.cookie-panel-inner {
    width: min(520px, 100%);
    padding: 22px;
    border-radius: 8px;
    background: #fff;
}

.cookie-choice {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cookie-choice span {
    display: grid;
}

.cookie-choice small {
    color: var(--muted);
}

@media (max-width: 840px) {
    body {
        padding-top: 86px;
    }

    .site-header-inner {
        padding: 12px 16px;
    }

    .header-top {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .site-search {
        grid-column: 1 / -1;
    }

    .menu-toggle {
        display: inline-grid;
    }

    .nav {
        display: none;
        margin-bottom: 0;
        padding-bottom: 6px;
        font-size: 15px;
    }

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

    .hero,
    .guide-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
        padding: 30px 22px;
    }

    .hero-panel {
        max-width: 320px;
    }

    .category-grid,
    .guide-grid,
    .footer-grid,
    .source-item,
    .procedure-summary-grid,
    .quick-facts {
        grid-template-columns: 1fr;
    }

    .guide-aside {
        display: none;
    }

    .guide-content,
    .guide-hero,
    .content-page {
        padding: 22px;
    }

    .cookie-banner,
    .footer-bottom-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .page {
        padding: 22px 14px 48px;
    }

    .brand-text strong {
        font-size: 19px;
    }

    .brand-text small {
        font-size: 11px;
    }

    .search-large,
    .site-search {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .hero h1,
    .page-title h1,
    .guide-hero h1 {
        font-size: 34px;
    }
}
