:root {
    --bg: #fafaf8;
    --text: #1a1a18;
    --text-muted: #5a5a58;
    --accent: #2e6fbd;
    --accent-bg: #e8f0fc;
    --border: #ddddd8;
    --tag-bg: #f0f0ec;
    --tag-text: #3a3a38;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141412;
        --text: #e8e8e4;
        --text-muted: #9a9a96;
        --accent: #6fa3e0;
        --accent-bg: #1a2535;
        --border: #2e2e2c;
        --tag-bg: #242422;
        --tag-text: #c8c8c4;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    padding: 2rem 1.5rem;
}

main {
    max-width: 680px;
    margin: 0 auto;
}

header {
    padding: 3.5rem 0 3rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

header p {
    color: var(--text-muted);
    font-size: 1rem;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

section p {
    margin-bottom: 0.8rem;
}

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

em {
    font-style: italic;
}

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

a:hover {
    text-decoration: underline;
}

section ul {
    list-style: none;
    margin: 0.5rem 0 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

section ul li::before {
    content: "–";
    color: var(--text-muted);
    margin-right: 0.5rem;
}

header ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 0.75rem;
}

header ul a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.callout {
    background: var(--accent-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 3rem;
}

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

.note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

section figure + figure {
    margin-top: 2rem;
}

section figcaption {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

section video {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
}

section video.native-size {
    border: 0;
    margin-inline: auto;
}

.video-link {
    display: block;
    position: relative;
    line-height: 0;
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.video-link img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48' width='68' height='48'%3E%3Cpath fill='%23f00' d='M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55C3.97 2.33 2.27 4.81 1.48 7.74.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z'/%3E%3Cpath fill='%23fff' d='M45 24 27 14v20z'/%3E%3C/svg%3E")
        center / 68px 48px no-repeat;
    background-color: rgba(0, 0, 0, 0.12);
    transition:
        background-color 0.15s ease,
        opacity 0.15s ease;
    opacity: 0.9;
}

.video-link:hover::after,
.video-link:focus-visible::after {
    background-color: rgba(0, 0, 0, 0);
    opacity: 1;
}

.video-link + p {
    margin-top: 0.5rem;
}

.video-url {
    position: absolute;
    z-index: 1;
    left: 0.6rem;
    bottom: 0.6rem;
    max-width: calc(100% - 1.2rem);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
