:root {
    --bg-dark: #161616;
    --bg-darker: #0d0d0d;
    --bg-nav: #3a3a3a;
    --bg-page: #efefef;
    --bg-card: #ffffff;
    --bg-sidebar: #f7f7f7;
    --line-dark: rgba(255, 255, 255, 0.08);
    --line-light: #d7d7d7;
    --line-form: #e3e3e3;
    --text: #2e2e2e;
    --text-soft: #6c6c6c;
    --text-light: #f3f3f3;
    --accent: #2f79b7;
    --accent-dark: #1f5e94;
    --accent-warm: #ff8c1a;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --container: 1160px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #2d2d2d 0, #1e1e1e 190px, #ececec 190px, #f4f4f4 100%);
    color: var(--text);
    font-family: Verdana, Geneva, sans-serif;
    line-height: 1.6;
}

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

a:hover,
a:focus-visible {
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
}

.header-top__inner,
.nav-bar__inner,
.page-main,
.site-footer__inner {
    width: min(calc(100% - 36px), var(--container));
    margin: 0 auto;
}

.site-header {
    background: linear-gradient(180deg, #3a3a3a 0%, #1e1e1e 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.header-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 112px;
    padding: 18px 0;
}

.brand img {
    width: auto;
    height: 74px;
    object-fit: contain;
}

.header-utility {
    min-width: 220px;
    max-width: 360px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--text-light);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-utility > :first-child {
    margin-top: 0;
}

.header-utility > :last-child {
    margin-bottom: 0;
}

.header-utility,
.header-utility p,
.header-utility a {
    color: var(--text-light);
}

.nav-bar {
    background: linear-gradient(180deg, #4a4a4a 0%, #383838 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.nav-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-light);
    border-radius: 999px;
}

.main-nav {
    width: 100%;
}

.main-nav > ul,
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav > ul {
    display: flex;
    justify-content: center;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.main-nav a,
.main-nav span,
.main-nav li.menu-current > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 46px;
    padding: 0 24px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav li.menu-current > a,
.main-nav li:hover > a,
.main-nav li:focus-within > a,
.main-nav a:hover,
.main-nav a:focus-visible {
    background: linear-gradient(180deg, #3f8cca 0%, #2d6fa7 100%);
    color: #ffffff;
}

.main-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #3b3b3b;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.main-nav li:hover > ul,
.main-nav li:focus-within > ul {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.main-nav ul ul a {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.page-main {
    padding: 24px 0 46px;
}

.page-card {
    border: 1px solid #c7c7c7;
    border-radius: 10px;
    background: #ffffff;
}

.page-card__header {
    padding: 18px 22px 16px;
    border-bottom: 1px solid #e4e4e4;
}

.page-card__eyebrow {
    margin: 0 0 4px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.page-card__title {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #2c2c2c;
}

.page-card__summary {
    margin: 16px 0 0;
    max-width: 78ch;
    color: #555555;
    font-size: 1rem;
}

.breadcrumbs {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.breadcrumbs a {
    color: var(--accent);
}

.content-stage {
    display: grid;
    gap: 0;
}

.content-stage--single {
    grid-template-columns: 1fr;
}

.content-stage--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
}

.content-panel,
.sidebar-panel {
    min-width: 0;
}

.content-panel {
    padding: 18px 22px 24px;
}

.sidebar-panel {
    padding: 18px;
    border-left: 1px solid #e4e4e4;
    background: linear-gradient(180deg, #fcfcfc 0%, #f3f3f3 100%);
}

.empty-state {
    margin: 0;
    color: var(--text-soft);
}

.content-panel > :first-child,
.sidebar-panel > :first-child {
    margin-top: 0;
}

.content-panel > :last-child,
.sidebar-panel > :last-child {
    margin-bottom: 0;
}

.content-panel h1,
.content-panel h2,
.content-panel h3,
.content-panel h4,
.content-panel h5,
.content-panel h6,
.sidebar-panel h1,
.sidebar-panel h2,
.sidebar-panel h3,
.sidebar-panel h4,
.sidebar-panel h5,
.sidebar-panel h6 {
    margin: 1.4em 0 0.45em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.1;
    color: #323232;
}

.content-panel h1,
.content-panel h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.content-panel h3 {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.content-panel p,
.content-panel ul,
.content-panel ol,
.content-panel table,
.content-panel blockquote,
.content-panel form,
.sidebar-panel p,
.sidebar-panel ul,
.sidebar-panel ol,
.sidebar-panel table,
.sidebar-panel blockquote,
.sidebar-panel form {
    margin: 1em 0;
    color: #4e4e4e;
}

.content-panel ul,
.content-panel ol,
.sidebar-panel ul,
.sidebar-panel ol {
    padding-left: 1.4em;
}

.content-panel li,
.sidebar-panel li {
    margin: 0.35em 0;
}

.content-panel hr,
.sidebar-panel hr {
    height: 1px;
    margin: 22px 0;
    border: 0;
    background: #e5e5e5;
}

.content-panel blockquote,
.sidebar-panel blockquote {
    padding: 16px 18px;
    border-left: 4px solid var(--accent);
    background: #f4f8fb;
    color: #444444;
}

.content-panel table,
.sidebar-panel table {
    width: 100%;
    border-collapse: collapse;
}

.content-panel th,
.content-panel td,
.sidebar-panel th,
.sidebar-panel td {
    padding: 11px 12px;
    border: 1px solid var(--line-form);
    vertical-align: top;
}

.content-panel th,
.sidebar-panel th {
    color: #3f3f3f;
    background: #fafafa;
    text-align: left;
}

.content-panel img,
.sidebar-panel img,
.content-panel iframe,
.sidebar-panel iframe,
.content-panel video,
.sidebar-panel video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.content-panel input,
.content-panel textarea,
.content-panel select,
.sidebar-panel input,
.sidebar-panel textarea,
.sidebar-panel select {
    width: 100%;
    max-width: 100%;
    padding: 9px 10px;
    border: 1px solid #bfc7ce;
    background: #ffffff;
    color: #2f2f2f;
    font: inherit;
}

.content-panel textarea,
.sidebar-panel textarea {
    min-height: 130px;
    resize: vertical;
}

.content-panel button,
.content-panel input[type="submit"],
.content-panel input[type="button"],
.sidebar-panel button,
.sidebar-panel input[type="submit"],
.sidebar-panel input[type="button"] {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #2b6d9f;
    border-radius: 4px;
    background: linear-gradient(180deg, #4a97d1 0%, #2f79b7 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.site-footer {
    background: linear-gradient(180deg, #2b2b2b 0%, #212121 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.site-footer__brand img {
    width: auto;
    height: 44px;
    object-fit: contain;
}

.site-footer__meta,
.site-footer__meta p,
.site-footer__meta a {
    color: #dadada;
    text-align: right;
}

.site-footer__meta > :first-child {
    margin-top: 0;
}

.site-footer__meta > :last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .content-stage--with-sidebar,
    .site-footer__inner,
    .header-top__inner {
        grid-template-columns: 1fr;
    }

    .header-top__inner,
    .site-footer__inner {
        display: grid;
        justify-content: stretch;
    }

    .header-utility,
    .site-footer__meta {
        text-align: left;
    }

    .sidebar-panel {
        border-left: 0;
        border-top: 1px solid #e4e4e4;
    }
}

@media (max-width: 780px) {
    .nav-bar__inner {
        display: block;
        padding: 0 0 12px;
    }

    .nav-toggle {
        display: inline-flex;
        margin: 12px 18px 0;
    }

    .main-nav {
        display: none;
        margin-top: 10px;
    }

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

    .main-nav > ul {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-nav > ul > li + li::before {
        display: none;
    }

    .main-nav a,
    .main-nav span,
    .main-nav li.menu-current > a {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
        padding: 0 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-nav ul ul {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        border: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.04);
    }

    .main-nav ul ul a {
        padding-left: 32px;
    }
}

@media (max-width: 640px) {
    .header-top__inner,
    .nav-bar__inner,
    .page-main,
    .site-footer__inner {
        width: min(calc(100% - 22px), var(--container));
    }

    .header-top__inner {
        min-height: 88px;
    }

    .brand img {
        height: 58px;
    }

    .page-card {
        border-radius: 8px;
    }

    .content-panel,
    .sidebar-panel {
        padding: 16px;
    }
}
