:root {
    --bg: #f5f4f1;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --text: #151515;
    --muted: #5f5f67;
    --line: rgba(21, 21, 21, 0.1);
    --accent: #b12025;
    --accent-dark: #85161a;
    --radius: 28px;
    --shadow: 0 28px 70px rgba(27, 18, 12, 0.12);
    --mono: "JetBrains Mono", "SFMono-Regular", monospace;
    --sans: "Inter", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(177, 32, 37, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(120, 92, 48, 0.12), transparent 24%),
        linear-gradient(135deg, #f7f4ed 0%, #efe7dc 100%);
}

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

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.back-link,
.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.back-link {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(177, 32, 37, 0.18);
}

.ghost-link {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    color: var(--text);
}

.back-link:hover,
.ghost-link:hover {
    transform: translateY(-1px);
}

.hero,
.content,
.related {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero {
    padding: clamp(24px, 5vw, 42px);
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(177, 32, 37, 0.08);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(2.5rem, 6vw, 4.7rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.7;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.meta span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(21, 21, 21, 0.04);
    border: 1px solid var(--line);
    color: #4e4e56;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
}

.content {
    padding: clamp(24px, 4vw, 40px);
}

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

h2 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.1;
}

p,
li {
    color: #31313a;
    font-size: 1rem;
    line-height: 1.75;
}

ul,
ol {
    margin: 12px 0 0;
    padding-left: 20px;
}

li + li {
    margin-top: 8px;
}

.note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(177, 32, 37, 0.06);
    border: 1px solid rgba(177, 32, 37, 0.12);
}

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

.related a {
    display: block;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.related a strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.related a span {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.related a:hover {
    transform: translateY(-2px);
    color: var(--accent);
    border-color: rgba(177, 32, 37, 0.22);
}

@media (max-width: 820px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar nav {
        display: grid;
        gap: 10px;
    }

    .related {
        grid-template-columns: 1fr;
    }
}
