:root {
    --bg: #05080f;
    --surface: #0d121c;
    --surface-2: #131a26;
    --border: rgba(255, 255, 255, 0.11);
    --text: #f2f5f9;
    --muted: #a4afbf;
    --quiet: #727f92;
    --blue: #60a5fa;
    --cyan: #48d6d2;
    --max: 1120px;
    --copy: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(5, 8, 15, 0.9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-header__inner,
.site-footer__inner {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header__inner { min-height: 68px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

.brand img { width: 30px; height: 30px; border-radius: 7px; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: #fff; }
.site-nav .button { color: #05080f; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 8px;
    background: #fff;
    color: #05080f;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.guide-hero {
    position: relative;
    min-height: min(560px, 68vh);
    display: grid;
    align-items: end;
    overflow: hidden;
    background: #111826;
}

.guide-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 15, 0.12), rgba(5, 8, 15, 0.95));
    z-index: 1;
}

.guide-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.guide-hero__content {
    position: relative;
    z-index: 2;
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    padding: 88px 0 54px;
}

.breadcrumb,
.article-meta {
    color: #c0cad7;
    font-size: 14px;
}

.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

.guide-hero h1 {
    max-width: 900px;
    margin: 18px 0;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: 0;
}

.guide-hero__summary {
    max-width: 720px;
    margin: 0;
    color: #d7dee8;
    font-size: clamp(17px, 2.2vw, 21px);
    line-height: 1.55;
}

.article-shell {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, var(--copy)) 260px;
    gap: 80px;
    align-items: start;
    padding: 72px 0 104px;
}

.article-body { min-width: 0; }
.article-body > :first-child { margin-top: 0; }

.article-body h2,
.article-body h3 {
    letter-spacing: 0;
    line-height: 1.18;
    scroll-margin-top: 92px;
}

.article-body h2 { margin: 58px 0 18px; font-size: clamp(28px, 4vw, 38px); }
.article-body h3 { margin: 38px 0 14px; font-size: 23px; }
.article-body p { margin: 0 0 22px; color: #d5dce6; }
.article-body strong { color: #fff; }
.article-body a { color: #8cc8ff; text-underline-offset: 3px; }
.article-body a:hover { color: #b7dcff; }

.article-body ul,
.article-body ol { margin: 0 0 26px; padding-left: 24px; color: #d5dce6; }
.article-body li { margin: 9px 0; padding-left: 4px; }

.article-body table {
    width: 100%;
    margin: 28px 0 36px;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 15px;
    line-height: 1.45;
}

.article-body th,
.article-body td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--border);
}

.article-body th { background: var(--surface-2); color: #fff; }
.article-body em { color: var(--muted); }

.article-aside {
    position: sticky;
    top: 96px;
    padding-left: 22px;
    border-left: 1px solid var(--border);
}

.article-aside span {
    display: block;
    margin-bottom: 10px;
    color: var(--quiet);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.article-aside p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.article-aside .button { width: 100%; color: #05080f; }

.inline-shot {
    margin: 40px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}

.inline-shot img { width: 100%; max-height: 680px; object-fit: contain; }
.inline-shot figcaption { padding: 12px 16px; color: var(--quiet); font-size: 13px; }

.guides-hero {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    padding: 112px 0 64px;
}

.guides-hero h1 {
    max-width: 760px;
    margin: 0 0 20px;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: 0;
}

.guides-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 20px; }

.guide-grid {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0 0 112px;
}

.guide-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.guide-card:hover {
    border-color: rgba(96, 165, 250, 0.62);
    transform: translateY(-2px);
}

.guide-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; }
.guide-card__body { padding: 22px; }
.guide-card__body span { color: var(--cyan); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.guide-card h2 { margin: 10px 0 12px; font-size: 23px; line-height: 1.18; letter-spacing: 0; }
.guide-card p { margin: 0; color: var(--muted); font-size: 15px; }
.guide-card__link { display: inline-block; margin-top: 18px; color: #8cc8ff; font-size: 14px; }

.site-footer { border-top: 1px solid var(--border); padding: 38px 0 46px; }
.site-footer__inner { color: var(--quiet); font-size: 13px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }

@media (max-width: 900px) {
    .article-shell { grid-template-columns: 1fr; gap: 46px; }
    .article-aside { position: static; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .article-aside .button { width: auto; }
    .guide-grid { grid-template-columns: 1fr; }
    .guide-card { display: grid; grid-template-columns: minmax(180px, 0.8fr) 1fr; }
    .guide-card img { height: 100%; aspect-ratio: auto; }
}

@media (max-width: 640px) {
    .site-header__inner,
    .site-footer__inner,
    .guide-hero__content,
    .article-shell,
    .guides-hero,
    .guide-grid { width: min(100% - 28px, var(--max)); }

    .site-nav > a:not(.button) { display: none; }
    .guide-hero {
        display: block;
        min-height: 0;
        padding-top: 180px;
        background: #080d15;
    }
    .guide-hero::before { display: none; }
    .guide-hero__image {
        inset: 0 0 auto;
        height: 180px;
        object-position: center 24%;
    }
    .guide-hero__content { padding: 30px 0 42px; }
    .guide-hero h1 { margin: 14px 0 16px; font-size: 38px; line-height: 1.06; }
    .guide-hero__summary { font-size: 17px; }
    .article-meta { margin-bottom: 0; }
    .article-shell { padding-top: 48px; overflow: hidden; }
    .article-body h2 { margin-top: 48px; }
    .article-body table { display: block; overflow-x: auto; white-space: normal; }
    .article-body th, .article-body td { min-width: 150px; }
    .guide-card { display: block; }
    .guide-card img { height: auto; aspect-ratio: 16 / 10; }
}
