:root {
    --bg: #eaf0f4;
    --panel: #ffffff;
    --panel-soft: #f7f9fc;
    --text: #132a4a;
    --muted: #5f7392;
    --line: #d7e2ee;
    --navy: #122946;
    --navy-2: #1a385c;
    --orange: #ef9821;
    --orange-2: #f7b04f;
    --blue: #54a9ea;
    --blue-soft: #dcedfb;
    --radius: 24px;
    --shadow: 0 14px 36px rgba(18, 41, 70, 0.08);
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

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

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

.narrow-container {
    width: min(880px, calc(100% - 32px));
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 0;
    backdrop-filter: blur(14px);
    background: rgba(234, 240, 244, 0.88);
    border-bottom: 1px solid rgba(215, 226, 238, 0.9);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange), #ffe1a8 78%, var(--blue));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}


.brand-logo {
    display: inline-flex;
    align-items: center;
}

.brand-logo .custom-logo-link,
.brand-logo img {
    display: block;
}

.brand-logo img {
    max-height: 38px;
    width: auto;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 0.86rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #e98600;
}

.brand-copy small {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
}

.primary-nav {
    justify-self: center;
}

.fddl-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
}

.fddl-menu a:hover,
.footer-menu a:hover,
.site-footer a:hover,
.text-link:hover {
    color: var(--blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(18, 41, 70, 0.12);
}

.button-primary {
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
}

.button-outline {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--line);
    color: var(--text);
}

.button-dark {
    background: var(--navy);
    color: #fff;
}

.button-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--navy);
    border-radius: 999px;
}

.section-compact {
    padding: 14px 0 12px;
}

.hero-tags,
.section-heading {
    margin-bottom: 14px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff1df;
    color: #cc7a06;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(239, 152, 33, 0.18);
}

.tag-soft {
    background: var(--blue-soft);
    color: #2579c0;
    border-color: rgba(84, 169, 234, 0.18);
}

.tag-muted {
    background: #ebeff5;
    color: #486280;
    border-color: #dde5ef;
}

.tag-dark {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

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

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
    gap: 16px;
    align-items: stretch;
}

.hero-copy,
.dashboard-card,
.info-card,
.panel,
.content-article,
.faq-item,
.not-found-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 18px 18px 14px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(2.45rem, 5.3vw, 4.55rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
    font-weight: 900;
    max-width: 780px;
}

.hero-text {
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.62;
    color: var(--muted);
    margin: 0 0 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.stat-card {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.stat-card strong {
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.dashboard-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.dashboard-eyebrow {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.78rem;
}

.dashboard-card h2 {
    margin: 6px 0 14px;
    font-size: clamp(1.8rem, 3.2vw, 3.4rem);
    line-height: 0.93;
    letter-spacing: -0.05em;
}

.focus-card {
    background: linear-gradient(135deg, #ef9821, #86c5f2);
    color: #fff;
    border-radius: 22px;
    padding: 16px;
    margin-bottom: 10px;
}

.focus-card span {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.focus-card strong {
    display: block;
    font-size: clamp(1.2rem, 1.7vw, 1.7rem);
    line-height: 1.08;
    margin-bottom: 6px;
}

.focus-card p,
.mini-card p,
.dashboard-note p,
.info-card p,
.panel p,
.site-footer p,
.entry-content,
.faq-answer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.58;
}

.dashboard-mini-grid,
.card-grid,
.access-grid,
.footer-grid,
.archive-grid {
    display: grid;
    gap: 16px;
}

.dashboard-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
}

.mini-card {
    padding: 15px;
    border-radius: 18px;
    background: #f5f7fb;
}

.mini-card h3,
.info-card h3,
.panel h2,
.site-footer h3,
.entry-header h1,
.archive-grid h2 {
    margin: 0 0 8px;
    font-size: clamp(1.28rem, 1.9vw, 1.72rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.dashboard-note {
    padding: 2px 2px 0;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(1.72rem, 3vw, 2.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.section-heading p,
.entry-meta,
.archive-header .entry-content {
    color: var(--muted);
    margin: 0;
    line-height: 1.56;
    font-size: 0.98rem;
}

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

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

.info-card,
.panel,
.content-article,
.not-found-card {
    padding: 18px;
}

.info-card ul,
.site-footer ul,
.check-list {
    margin: 12px 0 14px 0;
    padding-left: 18px;
    color: var(--text);
}

.info-card li,
.site-footer li,
.check-list li {
    margin-bottom: 8px;
    line-height: 1.48;
}

.text-link {
    font-weight: 800;
    color: var(--text);
}

.panel-dark {
    color: #fff;
    background: linear-gradient(135deg, #1e344f, #122946);
    border-color: rgba(255, 255, 255, 0.08);
}

.panel-dark p,
.panel-dark h2 {
    color: #fff;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

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

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff8e8;
    color: #6cae34;
    font-weight: 900;
}

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

.faq-item {
    padding: 0;
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-size: 1.02rem;
    font-weight: 800;
    position: relative;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--blue);
}

.faq-item[open] summary::after {
    content: '–';
}

.faq-answer {
    padding: 0 20px 18px;
}

.default-page {
    min-height: 40vh;
}

.entry-header {
    margin-bottom: 12px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    padding: 16px 0 22px;
}

.site-footer .container {
    background: linear-gradient(180deg, #1d344f, #122946);
    color: #fff;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.footer-grid {
    padding: 22px;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
}

.footer-brand {
    margin-bottom: 12px;
}

.site-footer h3 {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9bb7d6;
}

.site-footer ul,
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li,
.footer-menu li {
    margin-bottom: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.84rem;
    color: #cbd9e8;
}

.footer-menu {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width: 1120px) {
    .hero-grid,
    .card-grid-3,
    .card-grid-2,
    .access-grid,
    .footer-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 10px 0 0;
    }

    .header-inner {
        grid-template-columns: auto auto;
    }

    .primary-nav,
    .header-actions {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
        justify-self: end;
    }

    .site-header.menu-open .header-inner {
        grid-template-columns: 1fr auto;
    }

    .site-header.menu-open .primary-nav,
    .site-header.menu-open .header-actions {
        display: flex;
        grid-column: 1 / -1;
        width: 100%;
    }

    .site-header.menu-open .primary-nav {
        margin-top: 8px;
    }

    .site-header.menu-open .fddl-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.95);
    }

    .site-header.menu-open .header-actions {
        gap: 12px;
        margin-top: 12px;
    }
}

@media (max-width: 780px) {
    .container,
    .narrow-container {
        width: min(100% - 20px, var(--container));
    }

    .hero-copy h1 {
        font-size: clamp(2.1rem, 12vw, 3.5rem);
    }

    .dashboard-card h2,
    .section-heading h2 {
        font-size: clamp(1.7rem, 9vw, 2.5rem);
    }

    .stats-grid,
    .dashboard-mini-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        display: grid;
    }

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

    .button {
        min-height: 40px;
    }

    .footer-grid,
    .footer-bottom,
    .dashboard-card,
    .info-card,
    .panel,
    .content-article {
        padding: 16px;
    }

    .faq-item summary,
    .faq-answer {
        padding-left: 16px;
        padding-right: 16px;
    }
}
