/*
 * Mellow visual system
 * Fuwari-inspired layout, content hierarchy and motion for Typecho.
 */

:root {
    --hue: 160;
    --color-primary: oklch(0.70 0.14 var(--hue));
    --color-primary-strong: color-mix(in oklch, var(--color-primary) 82%, black);
    --color-primary-soft: oklch(0.95 0.025 var(--hue));
    --color-primary-faint: oklch(0.98 0.008 var(--hue));
    --color-background: oklch(0.95 0.01 var(--hue));
    --color-surface: #ffffff;
    --color-text: oklch(0.25 0.02 var(--hue));
    --color-muted: oklch(0.55 0.018 var(--hue));
    --color-border: rgba(0, 0, 0, 0.08);
    /* Solid theme-color surfaces always use a stable light foreground. */
    --color-on-primary: #ffffff;
    --color-button-content: var(--color-primary-strong);
    --color-button-bg: oklch(0.95 0.025 var(--hue));
    --color-button-bg-hover: oklch(0.90 0.05 var(--hue));
    --color-button-bg-active: oklch(0.85 0.08 var(--hue));
    --color-plain-hover: oklch(0.95 0.025 var(--hue));
    --color-plain-active: oklch(0.98 0.01 var(--hue));
    --color-card-hover: oklch(0.98 0.005 var(--hue));
    --color-card-active: oklch(0.90 0.03 var(--hue));
    --color-float-surface: #ffffff;
    --color-text-strong: rgba(0, 0, 0, 0.90);
    --color-text-normal: rgba(0, 0, 0, 0.75);
    --color-text-muted: rgba(0, 0, 0, 0.50);
    --color-text-faint: rgba(0, 0, 0, 0.30);
    --color-divider: rgba(0, 0, 0, 0.08);
    --color-meta-divider: rgba(0, 0, 0, 0.20);
    --color-enter-bg: var(--color-button-bg);
    --color-enter-bg-hover: var(--color-button-bg-hover);
    --color-enter-bg-active: var(--color-button-bg-active);
    --primary: var(--color-primary);
    --page-bg: var(--color-background);
    --card-bg: var(--color-surface);
    --btn-content: var(--color-button-content);
    --btn-regular-bg: var(--color-button-bg);
    --btn-regular-bg-hover: var(--color-button-bg-hover);
    --btn-regular-bg-active: var(--color-button-bg-active);
    --enter-btn-bg: var(--color-enter-bg);
    --enter-btn-bg-hover: var(--color-enter-bg-hover);
    --enter-btn-bg-active: var(--color-enter-bg-active);
    --link-underline: color-mix(in oklch, var(--color-primary) 24%, white);
    --link-hover: color-mix(in oklch, var(--color-primary) 14%, white);
    --link-active: color-mix(in oklch, var(--color-primary) 24%, white);
    --codeblock-bg: #1e1e1e;
    --codeblock-text: #d4d4d4;
    --license-block-bg: color-mix(in oklch, var(--color-primary) 3%, white);
    --license-mark: rgba(128, 128, 128, 0.16);
    --color-selection-bar: linear-gradient(to right, oklch(0.80 0.10 0), oklch(0.80 0.10 30), oklch(0.80 0.10 60), oklch(0.80 0.10 90), oklch(0.80 0.10 120), oklch(0.80 0.10 150), oklch(0.80 0.10 180), oklch(0.80 0.10 210), oklch(0.80 0.10 240), oklch(0.80 0.10 270), oklch(0.80 0.10 300), oklch(0.80 0.10 330), oklch(0.80 0.10 360));
    --hero-wave-color: var(--color-background);
    --color-dark-background: oklch(0.16 0.014 var(--hue));
    --color-dark-surface: oklch(0.23 0.015 var(--hue));
    --color-dark-primary-soft: oklch(0.33 0.035 var(--hue));
    --color-dark-border: oklch(0.35 0.03 var(--hue));
    --shape-corner-extra-small: 4px;
    --shape-corner-small: 8px;
    --shape-corner-medium: 12px;
    --shape-corner-large: 16px;
    --shape-corner-extra-large: 20px;
    --shape-corner-full: 999px;
    --radius: var(--shape-corner-large);
    --accent-bar-width: 3px;
    --accent-bar-radius: var(--shape-corner-extra-small);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.015);
    --shadow-float: 0 18px 46px rgba(0, 0, 0, 0.14);
    --shadow-header-layer: 0 2px 10px rgba(82, 90, 88, 0.10), 0 1px 2px rgba(82, 90, 88, 0.06);
    --shadow-attached-menu: 0 16px 28px -12px rgba(82, 90, 88, 0.16), 0 7px 12px -7px rgba(82, 90, 88, 0.10);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --content-width: 1200px;
}

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

/*
 * Optional continuous-corner enhancement. Standard-mode radius tokens remain
 * untouched; enabled mode remaps them to a larger continuous-corner scale.
 * Unsupported browsers retain standard geometry, while circles stay round.
 */
@supports (corner-shape: superellipse(2)) {
    body.mellow-corners-g3 {
        --shape-corner-extra-small: 6px;
        --shape-corner-small: 12px;
        --shape-corner-medium: 18px;
        --shape-corner-large: 26px;
        --shape-corner-extra-large: 32px;
        --radius: var(--shape-corner-large);
    }

    body.mellow-corners-g3 * {
        corner-shape: superellipse(2);
    }

    body.mellow-corners-g3 .tag-cloud a {
        border-radius: var(--shape-corner-medium);
    }

    body.mellow-corners-g3 :where(
        .post-card__arrow,
        .mellow-lightbox__counter,
        .mellow-lightbox__loader,
        .mellow-lightbox__nav,
        .comments__title small,
        .comment-card__header img,
        .sidebar-profile__line,
        .mobile-toc-panel__close
    ) {
        corner-shape: round;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: 104px;
    color: var(--color-text);
    background: var(--color-background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: var(--color-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

::selection {
    color: var(--color-text-strong);
    background: oklch(0.90 0.05 var(--hue));
}

.is-dark ::selection {
    color: var(--color-text-strong);
    background: oklch(0.40 0.08 var(--hue));
}

button,
input,
textarea {
    font: inherit;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: var(--shape-corner-small);
    color: var(--color-on-primary);
    background: var(--color-primary);
    cursor: pointer;
    text-decoration: none;
}

input,
textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    background: var(--color-surface);
}

textarea {
    resize: vertical;
}

:focus-visible {
    outline: 3px solid color-mix(in oklch, var(--color-primary) 32%, transparent);
    outline-offset: 3px;
}

/* PJAX 会临时聚焦主内容以通知辅助技术；避免 WebKit 将其绘制成整页焦点框。 */
#main-content[tabindex="-1"]:focus {
    outline: none;
}

.site-container {
    width: min(calc(100% - 2rem), var(--content-width));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem 0.8rem;
    transform: translateY(-150%);
    color: var(--color-on-primary);
    background: var(--color-primary);
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.top-bar {
    position: fixed;
    z-index: 90;
    top: 16px;
    right: 0;
    left: 0;
    padding-inline: 1rem;
    pointer-events: none;
}

.top-bar__inner {
    --mellow-header-surface: var(--color-surface);
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: min(calc(100% - 1rem), 1320px);
    min-height: 70px;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: var(--shape-corner-large);
    background: var(--mellow-header-surface);
    box-shadow: var(--shadow-header-layer);
    pointer-events: auto;
}

/*
 * Optional glass title bar. Keep the solid surface above as the fallback so
 * browsers without backdrop-filter retain the original title-bar treatment.
 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.mellow-header-glass {
        --mellow-header-glass-surface: color-mix(in srgb, var(--color-surface) 78%, transparent);
        /* Attached panels sit over denser page content than the title bar.
           A stronger tint gives them the same perceived translucency. */
        --mellow-header-glass-panel-surface: color-mix(in srgb, var(--color-surface) 90%, transparent);
        --mellow-header-glass-filter: blur(20px) saturate(1.28);
    }

    body.mellow-header-glass .top-bar__inner {
        --mellow-header-surface: var(--mellow-header-glass-surface);
        background: var(--mellow-header-glass-surface);
        -webkit-backdrop-filter: var(--mellow-header-glass-filter);
        backdrop-filter: var(--mellow-header-glass-filter);
    }
}

.site-brand {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0.4rem 0.7rem;
    border-radius: 13px;
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--mellow-motion-fast) ease, background-color var(--mellow-motion-fast) ease, transform var(--mellow-motion-fast) ease;
}

.site-brand:hover,
.site-brand:focus-visible {
    color: var(--color-primary);
    background-color: transparent;
    text-decoration: none;
}

.site-brand:active {
    background: var(--color-plain-active);
    transform: scale(0.98);
}

.site-brand__mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.site-brand__mark i {
    font-size: 1.25rem;
}

.site-brand__mark--home {
    width: 30px;
    border-radius: 0;
    background: transparent;
}

.site-brand__mark--image {
    background: transparent;
}

.site-brand__mark--home iconify-icon {
    font-size: 1.55rem;
}

.site-brand__mark img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: auto;
}

@media (min-width: 901px) {
    .top-bar__inner {
        --theme-mode-expand-shift: 94px;
    }

    .site-nav {
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 50%;
        margin: 0;
        transform: translate(-50%, -50%);
        transition: transform 220ms var(--mellow-motion-easing);
    }

    .top-bar__inner::after {
        position: absolute;
        z-index: 3;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--mellow-nav-brand-fade-width, 0);
        visibility: hidden;
        opacity: 0;
        background: linear-gradient(
            90deg,
            var(--mellow-header-surface) 0,
            var(--mellow-header-surface) calc(100% - 34px),
            color-mix(in oklch, var(--mellow-header-surface) 0%, transparent) 100%
        );
        content: "";
        pointer-events: none;
        transition: opacity 140ms ease, visibility 140ms ease;
    }

    .top-bar__inner.has-nav-brand-collision::after {
        visibility: visible;
        opacity: 1;
    }

    .site-search {
        margin-left: auto;
    }

    .top-bar__inner:has(.site-search:focus-within) .site-nav {
        transform: translate(calc(-50% - 40px), -50%);
    }

    .top-bar__inner:has(.theme-mode:hover) .site-nav,
    .top-bar__inner:has(.theme-mode:focus-within) .site-nav {
        transform: translate(calc(-50% - var(--theme-mode-expand-shift)), -50%);
    }

    .top-bar__inner:has(.site-search:focus-within):has(.theme-mode:hover) .site-nav,
    .top-bar__inner:has(.site-search:focus-within):has(.theme-mode:focus-within) .site-nav {
        transform: translate(calc(-50% - 40px - var(--theme-mode-expand-shift)), -50%);
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: 13px;
    color: var(--color-text);
    background: transparent;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link > i:not(.nav-menu__chevron) {
    display: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--color-primary);
    background-color: transparent;
    text-decoration: none;
}

.nav-menu {
    position: relative;
}

.nav-menu--more[hidden] {
    display: none !important;
}

@media (min-width: 901px) {
    .nav-menu::after {
        position: absolute;
        top: 100%;
        left: 0;
        width: 240px;
        height: 12px;
        content: "";
    }
}

.nav-menu__chevron {
    font-size: 0.72rem;
    transition: transform 180ms ease;
}

.nav-menu__panel {
    position: absolute;
    top: calc(100% + 11px);
    left: 0;
    width: 240px;
    max-height: min(68vh, 520px);
    padding: 0.65rem;
    overflow-y: auto;
    border: 0;
    border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    visibility: hidden;
    opacity: 0;
    background: var(--color-float-surface);
    box-shadow: var(--shadow-attached-menu);
    transform: translateY(-7px) scale(0.98);
    transform-origin: top left;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-menu:hover .nav-menu__panel,
.nav-menu:focus-within .nav-menu__panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nav-menu:hover .nav-menu__chevron,
.nav-menu:focus-within .nav-menu__chevron {
    transform: rotate(180deg);
}

.nav-menu__panel a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 43px;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    color: var(--color-text);
    font-weight: 500;
    text-decoration: none;
}

.nav-menu__panel a:hover,
.nav-menu__panel a:focus-visible {
    color: var(--color-primary);
    background-color: transparent;
}

.nav-menu__panel i {
    width: 19px;
    flex: 0 0 auto;
    text-align: center;
}

@media (min-width: 901px) {
    .nav-menu--more > .nav-menu__panel {
        right: 0;
        left: auto;
        min-width: 226px;
        transform-origin: top right;
    }

    .nav-more__panel > .nav-link,
    .nav-more__panel > .nav-menu > .nav-link {
        width: 100%;
        min-height: 43px;
        padding: 0.55rem 0.7rem;
        justify-content: flex-start;
        border-radius: 12px;
        font-weight: 500;
    }

    .nav-more__panel .nav-link > i:not(.nav-menu__chevron) {
        display: none;
    }

    .nav-more__panel > .nav-menu {
        width: 100%;
    }

    .nav-more__panel > .nav-menu.is-in-more > .nav-menu__panel {
        position: static;
        display: none;
        width: 100%;
        max-height: min(46vh, 360px);
        margin-top: 0.1rem;
        padding: 0.1rem 0 0.35rem 0.45rem;
        overflow-y: auto;
        border-radius: 0;
        visibility: visible;
        opacity: 1;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .nav-more__panel > .nav-menu.is-in-more:hover > .nav-menu__panel,
    .nav-more__panel > .nav-menu.is-in-more:focus-within > .nav-menu__panel {
        display: block;
    }

    .nav-menu--more:hover .nav-menu.is-in-more:not(:hover):not(:focus-within) > .nav-menu__trigger .nav-menu__chevron {
        transform: none;
    }
}

.nav-menu__group {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--color-border);
}

.nav-menu__label {
    display: block;
    padding: 0.25rem 0.7rem;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.site-search {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.04);
    transition: background-color 160ms ease;
}

.site-search:hover,
.site-search:focus-within {
    background: rgba(0, 0, 0, 0.06);
}

.site-search input {
    width: 160px;
    height: 46px;
    padding: 0.55rem 0.5rem 0.55rem 0.9rem;
    border: 0;
    outline: 0;
    background: transparent;
    transition: width 220ms var(--mellow-motion-easing);
}

.site-search:focus-within input {
    width: 240px;
}

.site-search button {
    width: 42px;
    min-height: 42px;
    padding: 0;
    color: var(--color-muted);
    background: transparent;
}

.site-search button:hover {
    color: var(--color-primary);
}

.site-search i {
    font-size: 1rem;
}

.site-actions {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 0 0 auto;
}

.site-actions a,
.site-actions button {
    display: grid;
    width: 42px;
    min-height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    color: var(--color-muted);
    background: transparent;
    text-decoration: none;
}

.site-actions a:hover,
.site-actions a:focus-visible,
.site-actions button:hover,
.site-actions button:focus-visible {
    color: var(--color-primary);
    background-color: transparent;
}

.site-actions .theme-color-toggle[aria-expanded="true"] {
    color: var(--color-primary);
    background-color: transparent;
}

.header-social-menu {
    position: relative;
    display: flex;
}

.header-social-panel {
    position: absolute;
    z-index: 96;
    top: calc(100% + 13px);
    right: 0;
    width: 218px;
    max-width: calc(100vw - 2rem);
    padding: 0.55rem;
    border: 0;
    border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-attached-menu);
    transform-origin: top right;
    animation: mellow-picker-in 160ms ease-out;
}

.header-social-panel[hidden] {
    display: none;
}

.header-social-panel__title {
    margin: 0;
    padding: 0.35rem 0.55rem 0.45rem;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.header-social-panel__links {
    display: grid;
    gap: 0.18rem;
}

.site-actions .header-social-panel a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 14px;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    place-items: center start;
    gap: 0.5rem;
    border-radius: var(--shape-corner-medium);
    color: var(--color-text-normal);
    font-weight: 550;
    text-align: left;
}

.header-social-panel a iconify-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--color-primary);
}

.header-social-panel a > i {
    color: var(--color-text-faint);
    font-size: 0.66rem;
}

.theme-mode {
    position: relative;
    display: flex;
}

.site-actions .theme-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 220ms var(--mellow-motion-easing), gap 220ms var(--mellow-motion-easing), padding 220ms var(--mellow-motion-easing), margin 220ms var(--mellow-motion-easing), color var(--mellow-motion-fast) ease, background-color var(--mellow-motion-fast) ease;
}

.theme-toggle__icon {
    flex: 0 0 auto;
}

.theme-toggle__label,
.theme-toggle__chevron {
    display: none;
}

.theme-mode-panel {
    position: absolute;
    z-index: 96;
    top: calc(100% + 12px);
    right: 0;
    width: 188px;
    padding: 0.55rem;
    border: 0;
    border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-attached-menu);
    transform-origin: top right;
    animation: mellow-picker-in 160ms ease-out;
}

.theme-mode-panel[hidden] {
    display: none;
}

.theme-mode-panel__title {
    margin: 0;
    padding: 0.35rem 0.55rem 0.45rem;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.theme-mode-panel [role="radiogroup"] {
    display: grid;
    gap: 0.2rem;
}

.site-actions .theme-mode__option {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    border-radius: var(--shape-corner-medium);
    color: var(--color-text-normal);
    text-align: left;
}

.site-actions .theme-mode__option[aria-checked="true"] {
    color: var(--color-primary-strong);
    background-color: transparent;
}

.theme-mode__option > i:first-child {
    color: var(--color-primary);
    text-align: center;
}

.theme-mode__check {
    opacity: 0;
    color: var(--color-primary);
    font-size: 0.75rem;
}

.theme-mode__option[aria-checked="true"] .theme-mode__check {
    opacity: 1;
}

@media (min-width: 901px) {
    .theme-mode-panel {
        top: calc(100% + 13px);
    }

    .theme-toggle__label,
    .theme-toggle__chevron {
        display: inline-block;
        max-width: 0;
        overflow: hidden;
        opacity: 0;
        flex: 0 0 auto;
        transform: translateX(6px);
        transition: max-width 220ms var(--mellow-motion-easing), opacity var(--mellow-motion-fast) ease, transform 220ms var(--mellow-motion-easing);
    }

    .theme-toggle__label {
        font-size: 0.84rem;
        font-weight: 600;
    }

    .theme-toggle__chevron {
        font-size: 0.65rem;
    }

    .theme-mode:hover .theme-toggle,
    .theme-mode:focus-within .theme-toggle,
    .theme-toggle[aria-expanded="true"] {
        width: 136px;
        margin-left: 0.4rem;
        margin-right: -0.4rem;
        padding-inline: 0.75rem;
        justify-content: flex-start;
        gap: 0.5rem;
        color: var(--color-primary);
        background-color: transparent;
    }

    .theme-mode:hover :is(.theme-toggle__label, .theme-toggle__chevron),
    .theme-mode:focus-within :is(.theme-toggle__label, .theme-toggle__chevron),
    .theme-toggle[aria-expanded="true"] :is(.theme-toggle__label, .theme-toggle__chevron) {
        max-width: 5rem;
        opacity: 1;
        transform: translateX(0);
    }
}

.theme-toggle[aria-expanded="true"] .theme-toggle__chevron {
    transform: rotate(180deg);
}

@media (min-width: 901px) and (max-width: 1100px) {
    .site-actions a {
        width: 36px;
    }
}

.theme-color-panel {
    position: absolute;
    z-index: 95;
    top: calc(100% + 13px);
    right: 0;
    width: 320px;
    max-width: calc(100vw - 2rem);
    padding: 1rem;
    border: 0;
    border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-attached-menu);
    transform-origin: top right;
    animation: mellow-picker-in 160ms ease-out;
}

.theme-color-panel[hidden] {
    display: none;
}

.theme-color-panel__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.theme-color-panel__header h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 auto 0 0;
    font-size: 1rem;
    line-height: 1.3;
}

.theme-color-panel__header h2 span {
    width: var(--accent-bar-width);
    height: 16px;
    border-radius: var(--accent-bar-radius);
    background: var(--color-primary);
}

.site-actions .theme-color-reset {
    width: 30px;
    min-height: 30px;
    border-radius: 9px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.site-actions .theme-color-reset[hidden] {
    display: none;
}

.theme-color-value {
    min-width: 46px;
    padding: 0.25rem 0.45rem;
    border-radius: 9px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.theme-color-slider-wrap {
    height: 30px;
    padding: 3px 7px;
    border-radius: 9px;
    background: var(--color-selection-bar);
}

.theme-color-slider {
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
}

.theme-color-slider::-webkit-slider-thumb {
    width: 9px;
    height: 19px;
    border: 0;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 5px rgba(28, 35, 32, 0.22);
}

.theme-color-slider::-moz-range-thumb {
    width: 9px;
    height: 19px;
    border: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 5px rgba(28, 35, 32, 0.22);
}

@keyframes mellow-picker-in {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mellow-mobile-panel-in {
    from {
        border-radius: var(--shape-corner-large);
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass panels keep their top edge fixed while appearing so two translucent
   surfaces never overlap during the transition. */
@keyframes mellow-glass-panel-in {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mellow-glass-attached-panel-in {
    from {
        opacity: 0;
        transform: scaleY(0.96);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@media (min-width: 901px) {
    body.mellow-header-desktop-attached,
    body.mellow-header-desktop-contained {
        padding-top: 88px;
    }

    .mellow-header-desktop-contained .top-bar {
        top: 0;
        padding-inline: 0;
    }

    .mellow-header-desktop-contained .top-bar__inner {
        width: min(calc(100% - 2rem), var(--content-width));
        border-top: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    }

    .mellow-header-desktop-contained.mellow-page-layout-left .top-bar__inner,
    .mellow-header-desktop-contained.mellow-page-layout-right .top-bar__inner {
        width: min(calc(100% - 2rem), 1200px);
    }

    .mellow-header-desktop-contained.mellow-page-layout-both .top-bar__inner {
        width: min(calc(100% - 2rem), 1440px);
    }

    .mellow-header-desktop-attached .top-bar {
        top: 0;
        padding-inline: 0;
    }

    .mellow-header-desktop-attached .top-bar__inner {
        width: 100%;
        max-width: none;
        border-top: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    }
}

.site-main {
    min-height: 0;
    padding-block: 2rem 1.5rem;
}

.home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.6rem;
    padding: clamp(1.6rem, 4vw, 3rem);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--shape-corner-extra-large);
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-primary-faint) 58%, var(--color-surface) 100%);
    box-shadow: var(--shadow);
}

.home-hero__content {
    max-width: 720px;
}

.home-hero__eyebrow {
    margin: 0 0 0.45rem;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.home-hero__subtitle {
    max-width: 620px;
    margin: 0.85rem 0 0;
    color: var(--color-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.home-notice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 340px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.home-hero--background {
    position: relative;
    min-height: min(720px, 72vh);
    margin-top: -104px;
    margin-bottom: 0;
    padding: calc(104px + clamp(3.5rem, 9vh, 7rem)) max(6vw, calc((100vw - 1120px) / 2));
    padding-bottom: 140px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary) 58%, var(--color-primary-soft) 100%);
    box-shadow: none;
}

@media (min-width: 901px) {
    .mellow-header-desktop-attached .home-hero--background,
    .mellow-header-desktop-contained .home-hero--background {
        margin-top: -88px;
        padding-top: calc(88px + clamp(3.5rem, 9vh, 7rem));
    }
}

.home-hero--background::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    content: "";
    pointer-events: none;
}

.home-hero--background.home-hero--dim::before {
    background: rgba(0, 0, 0, 0.36);
}

.home-hero__background {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero--background .home-hero__content,
.home-hero--background .home-notice {
    position: relative;
    z-index: 2;
}

.home-hero--background .home-hero__content {
    max-width: 820px;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.28);
}

.home-hero--background .home-hero__eyebrow,
.home-hero--background .home-hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.home-hero--background .home-hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.home-hero--background .home-notice {
    color: #fff;
    background: rgba(22, 29, 27, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.home-hero__wave {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 110px;
    overflow: hidden;
    pointer-events: none;
}

.home-hero__wave-svg {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.mellow-wave-parallax > use {
    fill: var(--hero-wave-color);
    animation: mellow-wave-flow 12s linear infinite;
    will-change: transform;
}

.mellow-wave-parallax > use:nth-child(1) {
    opacity: 0.22;
    animation-delay: -2s;
}

.mellow-wave-parallax > use:nth-child(2) {
    opacity: 0.46;
    animation-delay: -2s;
    animation-duration: 8s;
}

.mellow-wave-parallax > use:nth-child(3) {
    opacity: 0.72;
    animation-delay: -4s;
    animation-duration: 6s;
}

.mellow-wave-parallax > use.mellow-wave-surface {
    fill: var(--color-background);
    opacity: 1;
    animation-delay: -5s;
    animation-duration: 14s;
}

@keyframes mellow-wave-flow {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Shared center-out hover fill for rounded, navigable controls. Keeping the
   fill on a separate layer lets existing icon, width and position motion run
   independently; leaving hover reverses the same transform back to center. */
.site-brand,
.nav-link,
.nav-menu__panel a,
.header-social-panel a,
.site-actions > a,
.site-actions > button,
.site-actions > .theme-mode > .theme-toggle,
.site-actions .theme-mode__option,
.post-card__meta-item:not(:first-child) > span:last-child a,
.article__post-meta-item:not(:first-child) > span:last-child a,
.post-card__rail,
.page-navigator > li:not(.current) > a,
.sidebar-categories li a,
.sidebar-recent li a,
.sidebar-expand-button,
.archive-entry,
.sidebar-toc__link,
.friend-link,
.site-footer a {
    --mellow-hover-fill: var(--color-primary-soft);
    position: relative;
    isolation: isolate;
}

.site-brand,
.nav-link,
.sidebar-expand-button,
.archive-entry {
    --mellow-hover-fill: var(--color-plain-hover);
}

.sidebar-categories li a,
.sidebar-recent li a {
    --mellow-hover-fill: var(--color-primary-faint);
}

.post-card__rail {
    --mellow-hover-fill: var(--color-enter-bg-hover);
}

.site-brand::before,
.nav-link::before,
.nav-menu__panel a::before,
.header-social-panel a::before,
.site-actions > a::before,
.site-actions > button::before,
.site-actions > .theme-mode > .theme-toggle::before,
.site-actions .theme-mode__option::before,
.post-card__meta-item:not(:first-child) > span:last-child a::before,
.article__post-meta-item:not(:first-child) > span:last-child a::before,
.post-card__rail::before,
.page-navigator > li:not(.current) > a::before,
.sidebar-categories li a::before,
.sidebar-recent li a::before,
.sidebar-expand-button::before,
.archive-entry::before,
.sidebar-toc__link::before,
.friend-link::before,
.site-footer a::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    corner-shape: inherit;
    background: var(--mellow-hover-fill);
    content: "";
    pointer-events: none;
    transform: scale(0);
    transform-origin: center;
    transition: transform 240ms var(--mellow-motion-easing);
    will-change: transform;
}

.site-brand:is(:hover, :focus-visible)::before,
.nav-link:is(:hover, :focus-visible, .is-active)::before,
.nav-menu__panel a:is(:hover, :focus-visible)::before,
.header-social-panel a:is(:hover, :focus-visible)::before,
.site-actions > a:is(:hover, :focus-visible)::before,
.site-actions > button:is(:hover, :focus-visible)::before,
.site-actions .theme-color-toggle[aria-expanded="true"]::before,
.theme-mode:is(:hover, :focus-within) > .theme-toggle::before,
.theme-toggle[aria-expanded="true"]::before,
.site-actions .theme-mode__option:is(:hover, :focus-visible)::before,
.site-actions .theme-mode__option[aria-checked="true"]::before,
.post-card__meta-item:not(:first-child) > span:last-child a:is(:hover, :focus-visible)::before,
.article__post-meta-item:not(:first-child) > span:last-child a:is(:hover, :focus-visible)::before,
.post-card__rail:is(:hover, :focus-visible)::before,
.page-navigator > li:not(.current) > a:is(:hover, :focus-visible)::before,
.sidebar-categories li a:is(:hover, :focus-visible)::before,
.sidebar-recent li a:is(:hover, :focus-visible)::before,
.sidebar-categories li.is-current a::before,
.sidebar-recent li.is-current a::before,
.sidebar-expand-button:is(:hover, :focus-visible)::before,
.archive-entry:is(:hover, :focus-within)::before,
.sidebar-toc__link:is(:hover, :focus-visible, .is-active)::before,
.friend-link:is(:hover, :focus-visible)::before,
.site-footer a:is(:hover, :focus-visible)::before {
    transform: scale(1);
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    padding: 0.1em 0.3em;
    border-radius: 8px;
}

.footer-social a {
    padding: 0.3rem 0.5rem;
    border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .mellow-wave-parallax > use {
        animation: none;
    }
}

@media (max-width: 640px) {
    .article__header--post {
        margin-bottom: 1.4rem;
        padding-bottom: 1.15rem;
    }

    .article__reading-stats {
        gap: 0.55rem 0.85rem;
        font-size: 0.8rem;
    }

    .article__reading-stats i {
        width: 26px;
        height: 26px;
        border-radius: 7px;
        font-size: 0.75rem;
    }

    .article__header--post .article__title {
        margin-block: 1rem 1.15rem;
        padding-left: 0.95rem;
        font-size: 1.75rem;
    }

    .article__header--post .article__title::before {
        height: 20px;
    }

    .article__post-meta {
        gap: 0.65rem 0.9rem;
        font-size: 0.82rem;
    }

    .article__post-meta-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        border-radius: 8px;
    }

    .article__post-meta-icon :is(i, iconify-icon) {
        font-size: 1.05rem;
    }

    .article__post-meta-item--tags {
        flex-basis: 100%;
    }

    .post-neighbor-nav {
        grid-template-columns: 1fr;
    }

    .post-neighbor-card {
        min-height: 40px;
        padding-block: 0.35rem;
        border-radius: 16px;
    }

    .post-list {
        gap: 0;
        overflow: hidden;
        border-radius: var(--shape-corner-large);
        background: var(--color-surface);
    }

    .post-list .post-card {
        border-radius: 0;
        background: transparent;
    }

    .post-list .post-card + .post-card {
        border-top: 1px dashed var(--color-divider);
    }

    .post-list .post-card:hover {
        background: var(--color-card-hover);
    }

    .post-card__meta-item--tags {
        display: none;
    }

    .post-card__meta {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .article {
        padding: 1.25rem;
    }

    .article__content {
        font-size: 0.96rem;
        line-height: 1.78;
    }

    .article-heading-anchor {
        opacity: 0.55;
        transform: none;
    }

}

/* Motion system and article banner, rebuilt without framework dependencies. */
:root {
    --mellow-motion-fast: 160ms;
    --mellow-motion-medium: 320ms;
    --mellow-motion-slow: 520ms;
    --mellow-motion-easing: cubic-bezier(0.22, 1, 0.36, 1);
}

.top-bar__inner {
    view-transition-name: mellow-header;
}

.primary-content {
    view-transition-name: mellow-primary;
}

.sidebar--left {
    view-transition-name: mellow-sidebar-left;
}

.sidebar--right {
    view-transition-name: mellow-sidebar-right;
}

.mellow-pjax-layout-change .primary-content {
    view-transition-name: none;
}

.mellow-pjax-arrival.article {
    opacity: 1 !important;
    animation: none !important;
}

.mellow-pjax-sidebar .sidebar-card {
    opacity: 1 !important;
    animation: none !important;
}

.mellow-pjax-loading {
    cursor: progress;
}

.mellow-animations-enabled.mellow-article-animations-enabled .mellow-pjax-arrival .article__header--post > * {
    opacity: 0;
    animation: mellow-content-in 420ms var(--mellow-motion-easing) forwards;
}

.mellow-animations-enabled.mellow-article-animations-enabled .mellow-pjax-arrival .article__header--post > :nth-child(1) {
    animation-delay: 40ms;
}

.mellow-animations-enabled.mellow-article-animations-enabled .mellow-pjax-arrival .article__header--post > :nth-child(2) {
    animation-delay: 90ms;
}

.mellow-animations-enabled.mellow-article-animations-enabled .mellow-pjax-arrival .article__header--post > :nth-child(3) {
    animation-delay: 150ms;
}

.post-page-banner {
    position: relative;
    z-index: 0;
    height: clamp(330px, 48vh, 520px);
    margin-top: -104px;
    overflow: hidden;
    background: var(--color-primary-soft);
}

@media (min-width: 901px) {
    .mellow-header-desktop-attached .post-page-banner,
    .mellow-header-desktop-contained .post-page-banner {
        margin-top: -88px;
    }
}

.post-page-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-page-banner--top img {
    object-position: center top;
}

.post-page-banner--center img {
    object-position: center;
}

.post-page-banner--bottom img {
    object-position: center bottom;
}

.post-page-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(14, 22, 19, 0.08), rgba(14, 22, 19, 0.18));
}

.post-page-banner--dim .post-page-banner__overlay {
    background: linear-gradient(to bottom, rgba(8, 14, 12, 0.34), rgba(8, 14, 12, 0.48));
}

.post-page-main--with-banner {
    position: relative;
    z-index: 1;
    margin-top: -132px;
}

.mellow-animations-enabled .top-bar__inner {
    animation: mellow-navbar-in 420ms var(--mellow-motion-easing) both;
}

.mellow-animations-enabled .post-page-banner img {
    opacity: 0;
    transform: scale(1.055);
    transition: opacity 650ms ease, transform 900ms var(--mellow-motion-easing);
}

.mellow-animations-enabled .post-page-banner img.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.mellow-animations-enabled .post-page-banner--reuse-home img,
.mellow-animations-enabled .post-page-banner--reuse-home img.mellow-image-animated,
.mellow-animations-enabled .post-page-banner--reuse-home img.mellow-image-animated.is-loaded {
    opacity: 1;
    filter: none;
    transform: scale(1);
    transition: none;
}

.mellow-animations-enabled.mellow-motion-ready .mellow-reveal {
    opacity: 0;
    translate: 0 18px;
    transition: opacity var(--mellow-motion-medium) ease-out, translate var(--mellow-motion-medium) var(--mellow-motion-easing);
    transition-delay: var(--mellow-reveal-delay, 0ms);
}

.mellow-animations-enabled.mellow-motion-ready .mellow-reveal.is-revealed {
    opacity: 1;
    translate: 0 0;
}

@keyframes mellow-friend-link-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mellow-animations-enabled.mellow-motion-ready .friend-links .friend-link {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    animation: mellow-friend-link-in 320ms var(--mellow-motion-easing) var(--mellow-friend-delay, 70ms) both;
}

.mellow-animations-enabled .mellow-image-animated {
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 320ms ease, transform 500ms var(--mellow-motion-easing);
}

.mellow-animations-enabled .mellow-image-animated.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.mellow-animations-enabled :is(button, .button, .about-action, .post-card__rail, .sidebar-profile__links a) {
    transition-duration: var(--mellow-motion-fast);
    transition-timing-function: ease;
}

.mellow-animations-enabled :is(button, .button, .about-action, .post-card__rail, .sidebar-profile__links a):active {
    scale: 0.94;
}

.mellow-animations-enabled .sidebar-card h2 > i {
    transition: rotate var(--mellow-motion-fast) ease, scale var(--mellow-motion-fast) ease;
}

.mellow-animations-enabled .sidebar-card:hover h2 > i {
    rotate: -6deg;
    scale: 1.08;
}

.theme-toggle.is-switching .theme-toggle__icon {
    animation: mellow-theme-icon 280ms var(--mellow-motion-easing);
}

@keyframes mellow-navbar-in {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mellow-content-in {
    from {
        opacity: 0;
        translate: 0 18px;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes mellow-theme-icon {
    0% {
        opacity: 1;
        rotate: 0deg;
        scale: 1;
    }
    45% {
        opacity: 0;
        rotate: -35deg;
        scale: 0.65;
    }
    100% {
        opacity: 1;
        rotate: 0deg;
        scale: 1;
    }
}

@keyframes mellow-page-out {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes mellow-page-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

::view-transition-old(root) {
    animation: 150ms ease-in both mellow-page-out;
}

::view-transition-new(root) {
    animation: 260ms var(--mellow-motion-easing) both mellow-page-in;
}

::view-transition-group(mellow-header) {
    animation-duration: 180ms;
}

::view-transition-group(mellow-primary),
::view-transition-group(mellow-sidebar-left),
::view-transition-group(mellow-sidebar-right) {
    animation-duration: 360ms;
    animation-timing-function: var(--mellow-motion-easing);
}

@media (max-width: 900px) {
    .post-page-banner {
        height: clamp(280px, 42vh, 410px);
        margin-top: -92px;
    }

    .mellow-header-mobile-attached .post-page-banner,
    .mellow-header-mobile-contained .post-page-banner {
        margin-top: -88px;
    }

    .post-page-main--with-banner {
        margin-top: -84px;
    }

    .site-nav {
        display: flex;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px) scale(0.985);
        transform-origin: top center;
        transition: opacity 180ms ease, transform 220ms var(--mellow-motion-easing), visibility 180ms ease;
    }

    .site-nav.is-open {
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
}

.mellow-animations-disabled *,
.mellow-animations-disabled *::before,
.mellow-animations-disabled *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    animation-delay: 0ms !important;
    transition: none !important;
}

html:has(body.mellow-animations-disabled) {
    scroll-behavior: auto;
}

html:has(body.mellow-animations-disabled)::view-transition-old(root),
html:has(body.mellow-animations-disabled)::view-transition-new(root) {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .mellow-reveal,
    .mellow-image-animated,
    .post-page-banner img {
        opacity: 1 !important;
        filter: none !important;
        translate: none !important;
        transform: none !important;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}

.home-hero--background + .site-main {
    position: relative;
    z-index: 4;
    margin-top: -52px;
}

.post-list {
    display: grid;
    gap: 1rem;
}

.post-card,
.article,
.sidebar-card,
.empty-state,
.comments {
    border: 0;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: none;
}

.post-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: clamp(1rem, 2.4vw, 1.5rem);
    min-height: 190px;
    padding: clamp(1.35rem, 2.7vw, 2rem);
    border: 0;
    overflow: hidden;
    transition: background-color 180ms ease, transform 180ms ease;
}

.post-card:hover {
    background: var(--color-card-hover);
}

.post-card--with-cover {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 30%);
    min-height: 205px;
}

.post-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.post-card__meta,
.article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.post-card__meta a,
.article__meta a {
    color: inherit;
}

.post-card__title {
    position: relative;
    margin: 0 0 0.75rem;
    padding-left: 0.8rem;
    font-size: clamp(1.55rem, 2.35vw, 1.9rem);
    font-weight: 700;
    line-height: 1.25;
}

.post-card__title::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--accent-bar-width);
    height: clamp(16px, 0.85em, 20px);
    border-radius: var(--accent-bar-radius);
    background: var(--color-primary);
    transform: translateY(-50%);
    content: "";
}

.post-card__title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 170ms ease;
}

.post-card__title-arrow {
    display: inline-block;
    margin-left: 0.18em;
    color: var(--color-primary);
    font-size: 0.78em;
    opacity: 0;
    transform: translateX(-0.35em);
    transition: opacity 170ms ease, transform 220ms var(--mellow-motion-easing);
}

.post-card__title a:hover,
.post-card__title a:focus-visible {
    color: var(--color-primary);
}

.post-card__title a:hover .post-card__title-arrow,
.post-card__title a:focus-visible .post-card__title-arrow {
    opacity: 1;
    transform: translateX(0);
}

.post-card__meta a,
.post-card__tags a,
.post-card__media,
.post-card__rail {
    position: relative;
    z-index: 2;
}

.post-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.post-card__meta-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.post-card__meta-icon :is(i, iconify-icon) {
    font-size: 1.05rem;
}

iconify-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
}

.post-card__meta-item--tags {
    flex: 1 1 220px;
}

.post-card__meta-item--tags a {
    text-decoration: none;
}

.post-card__meta-item--tags a:hover {
    color: var(--color-primary);
}

.post-card__meta-item:not(:first-child) > span:last-child a,
.article__post-meta-item:not(:first-child) > span:last-child a {
    display: inline-block;
    margin: -0.22rem 0;
    padding: 0.22rem 0.42rem;
    border-radius: 8px;
    transition: color 180ms ease, background-color 180ms ease;
}

.post-card__meta-item:not(:first-child) > span:last-child a:hover,
.post-card__meta-item:not(:first-child) > span:last-child a:focus-visible,
.article__post-meta-item:not(:first-child) > span:last-child a:hover,
.article__post-meta-item:not(:first-child) > span:last-child a:focus-visible {
    color: var(--color-primary-strong);
    background-color: transparent;
    font-weight: 700;
    text-decoration: none;
}

.post-card__excerpt {
    display: -webkit-box;
    margin-top: 0.8rem;
    overflow: hidden;
    color: var(--color-text-normal);
    font-size: 0.96rem;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-card__excerpt p {
    margin: 0;
}

.post-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 1rem;
}

.post-card__tags:empty {
    display: none;
}

.post-card__tags a {
    padding: 0.28rem 0.7rem;
    border-radius: 10px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.post-card__tags a::before {
    content: "#";
}

.post-card__stats {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 0.7rem;
    opacity: 1;
    color: var(--color-text-faint);
    font-size: 0.8rem;
}

.post-card__media {
    position: relative;
    display: block;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--shape-corner-large);
    background: var(--color-primary-soft);
}

.post-card__media::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    opacity: 0;
    background: rgba(8, 13, 11, 0.42);
    content: "";
    pointer-events: none;
    transition: opacity 200ms ease;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms var(--mellow-motion-easing);
}

.post-card__media:hover img,
.post-card__media:focus-visible img {
    transform: scale(1.035);
}

.post-card__media:hover::after,
.post-card__media:focus-visible::after {
    opacity: 1;
}

.post-card__arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.post-card__media:hover .post-card__arrow,
.post-card__media:focus-visible .post-card__arrow {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.post-card__arrow i,
.post-card__rail i {
    font-size: 1.4rem;
}

.post-card__rail {
    display: grid;
    min-height: 100%;
    place-items: center;
    border-radius: var(--shape-corner-medium);
    color: var(--color-button-content);
    background: var(--color-enter-bg);
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease;
}

.post-card__rail:hover,
.post-card__rail:focus-visible {
    color: var(--color-primary-strong);
    background-color: var(--color-enter-bg);
}

.post-card__rail:active {
    background: var(--color-enter-bg-active);
}

@media (hover: none) {
    .post-card__arrow {
        visibility: visible;
        opacity: 1;
        background: rgba(20, 35, 30, 0.32);
        transform: translate(-50%, -50%) scale(1);
    }

    .post-card__title-arrow {
        opacity: 1;
        transform: translateX(0);
    }
}

.text-link {
    font-weight: 600;
}

.pagination {
    margin-top: 1.75rem;
}

.page-navigator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: fit-content;
    gap: 0;
    margin-inline: auto;
    padding: 0;
    overflow: hidden;
    border-radius: var(--shape-corner-small);
    background: var(--color-surface);
    list-style: none;
}

.page-navigator > li > a,
.page-navigator > li > span {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: var(--shape-corner-small);
    color: var(--color-muted);
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 170ms ease, background-color 170ms ease, transform 170ms ease;
}

.page-navigator > li > a:hover,
.page-navigator > li > a:focus-visible {
    color: var(--color-primary);
    background-color: transparent;
    transform: none;
}

.page-navigator .prev a,
.page-navigator .next a {
    color: var(--color-muted);
    font-size: 1.2rem;
}

.page-navigator .current > a,
.page-navigator .current > span {
    color: var(--color-on-primary);
    background: var(--color-primary);
    transform: none;
}

.page-navigator li > span:not(.sr-only) {
    color: var(--color-muted);
    background: transparent;
}

@media (max-width: 640px) {
    .page-navigator {
        gap: 0.55rem;
    }

    .page-navigator > li > a,
    .page-navigator > li > span {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }
}

.friend-links {
    margin-top: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: var(--shape-corner-extra-large);
    background: var(--color-surface);
    box-shadow: var(--shadow);
}

.friend-links__header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.friend-links__heading-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 13px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-size: 1.3rem;
}

.friend-links__header p,
.friend-links__header h2 {
    margin: 0;
}

.friend-links__header p {
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.friend-links__header h2 {
    margin-top: 0.08rem;
    color: var(--color-text);
    font-size: 1.2rem;
    line-height: 1.25;
}

.friend-links__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0.65rem;
}

.friend-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 0.7rem;
    min-height: 68px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-divider);
    border-radius: var(--shape-corner-medium);
    color: var(--color-text-normal);
    background: transparent;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

.friend-links--with-icons .friend-link {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
}

.friend-link:hover,
.friend-link:focus-visible {
    border-color: color-mix(in oklch, var(--color-primary) 42%, var(--color-divider));
    color: var(--color-primary-strong);
    text-decoration: none;
}

.friend-link__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: var(--color-primary);
    background: var(--color-primary-faint);
    font-size: 1.2rem;
}

.friend-link__icon img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: contain;
}

.friend-link__icon i {
    font-size: 1.05rem;
}

.friend-link__content {
    min-width: 0;
}

.friend-link__content strong,
.friend-link__content small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-link__content strong {
    color: inherit;
    font-size: 0.92rem;
    line-height: 1.35;
}

.friend-link__content small {
    margin-top: 0.16rem;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.friend-link__arrow {
    color: var(--color-text-faint);
    font-size: 1.05rem;
    transition: color 160ms ease, transform 180ms var(--mellow-motion-easing);
}

.friend-link:is(:hover, :focus-visible) .friend-link__arrow {
    color: var(--color-primary);
    transform: translate(2px, -2px);
}

@media (max-width: 640px) {
    .friend-links {
        border-radius: var(--shape-corner-large);
    }

    .friend-links__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sidebar-layout {
    display: grid;
    align-items: start;
    gap: 1rem;
}

.sidebar-layout--none {
    grid-template-columns: minmax(0, 1fr);
}

.sidebar-layout--left {
    grid-template-columns: 280px minmax(0, 1fr);
    width: min(calc(100% - 2rem), 1200px);
}

.sidebar-layout--right {
    grid-template-columns: minmax(0, 1fr) 280px;
    width: min(calc(100% - 2rem), 1200px);
}

.sidebar-layout--both {
    grid-template-columns: 250px minmax(0, 1fr) 250px;
    width: min(calc(100% - 2rem), 1440px);
}

/* Wide desktop spacing. This mode intentionally changes only desktop
   container widths; the responsive rules below keep tablet and mobile intact. */
@media (min-width: 1101px) {
    .mellow-width-wide-margin {
        --content-width: 960px;
        --mellow-desktop-layout-width: 960px;
    }

    .mellow-width-wide-margin.mellow-page-layout-left,
    .mellow-width-wide-margin.mellow-page-layout-right {
        --mellow-desktop-layout-width: 1120px;
    }

    .mellow-width-wide-margin.mellow-page-layout-both {
        --mellow-desktop-layout-width: 1240px;
    }

    .mellow-width-wide-margin .sidebar-layout--left,
    .mellow-width-wide-margin .sidebar-layout--right,
    .mellow-width-wide-margin .sidebar-layout--both,
    .mellow-width-wide-margin:not(.mellow-header-desktop-attached) .top-bar__inner {
        width: min(calc(100% - 2rem), var(--mellow-desktop-layout-width));
    }

    .mellow-width-wide-margin .home-hero--background {
        padding-inline: max(6vw, calc((100vw - var(--mellow-desktop-layout-width)) / 2));
    }
}

.primary-content {
    min-width: 0;
}

.post-content-stack {
    display: grid;
    gap: clamp(1.35rem, 3vw, 2rem);
    align-content: start;
}

.article {
    min-width: 0;
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.post-neighbor-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 2vw, 1.25rem);
}

.post-neighbor-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 60px;
    padding: 0.55rem clamp(0.9rem, 2vw, 1.2rem);
    border-radius: var(--radius);
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: none;
    text-decoration: none;
    transition: color 160ms ease, background-color 180ms ease, transform 180ms ease;
}

.post-neighbor-card--next {
    grid-template-columns: minmax(0, 1fr) auto;
    text-align: right;
}

.post-neighbor-nav > :only-child {
    grid-column: 1 / -1;
}

.post-neighbor-card i {
    color: var(--color-primary);
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
}

.post-neighbor-card strong {
    display: block;
    overflow: hidden;
    color: var(--color-muted);
    font-size: clamp(0.98rem, 1.8vw, 1.12rem);
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-neighbor-card strong a {
    color: inherit;
    text-decoration: none;
}

.post-neighbor-card strong a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.post-neighbor-card:not(.is-disabled):hover,
.post-neighbor-card:not(.is-disabled):focus-within {
    background: var(--color-card-hover);
}

.post-neighbor-card:not(.is-disabled):hover strong,
.post-neighbor-card:not(.is-disabled):focus-within strong {
    color: var(--color-primary-strong);
}

.post-neighbor-card.is-disabled {
    color: var(--color-muted);
    background: var(--color-primary-faint);
    box-shadow: none;
}

.post-neighbor-card.is-disabled i,
.post-neighbor-card.is-disabled strong {
    color: var(--color-muted);
}

.article--page {
    width: 100%;
    max-width: 860px;
    margin-inline: auto;
}

.article--about {
    display: grid;
    width: 100%;
    max-width: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
}

.about-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    overflow: hidden;
    border: 0;
    border-radius: var(--shape-corner-extra-large);
    background: linear-gradient(135deg, var(--color-primary-soft), var(--color-primary-faint) 62%, var(--color-surface));
    box-shadow: none;
}

.about-hero::before,
.about-hero::after {
    position: absolute;
    border-radius: 50%;
    opacity: 0.55;
    background: var(--color-primary-soft);
    content: "";
    pointer-events: none;
}

.about-hero::before {
    width: 180px;
    height: 180px;
    top: -95px;
    right: -45px;
}

.about-hero::after {
    width: 90px;
    height: 90px;
    right: 18%;
    bottom: -55px;
}

.about-hero__avatar {
    position: relative;
    z-index: 1;
    display: grid;
    width: 112px;
    aspect-ratio: 1;
    overflow: hidden;
    place-items: center;
    border: 4px solid color-mix(in oklch, var(--color-surface) 76%, transparent);
    border-radius: var(--shape-corner-extra-large);
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 16px 34px color-mix(in oklch, var(--color-primary) 16%, transparent);
    font-size: 2.6rem;
    transform: rotate(-2deg);
}

.about-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-hero__content {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.about-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.25rem;
    color: var(--color-primary-strong);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.about-hero h1 {
    margin: 0;
    font-size: clamp(2.15rem, 5vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.about-hero h2 {
    margin: 0.55rem 0 0;
    color: var(--color-primary-strong);
    font-size: 1.12rem;
}

.about-hero__bio {
    max-width: 640px;
    margin: 0.5rem 0 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.about-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.15rem;
}

.about-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    color: var(--color-primary-strong);
    background: var(--color-surface);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 180ms ease, color 180ms ease, background-color 180ms ease;
}

.about-action :is(i, iconify-icon) {
    width: 1.2em;
    flex: 0 0 auto;
    font-size: 1.05rem;
    text-align: center;
}

.about-action:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.about-action--social:hover,
.about-action--social:focus-visible {
    transform: none;
}

.about-action--primary {
    border-color: var(--color-primary);
    color: var(--color-on-primary);
    background: var(--color-primary);
}

.about-action--primary:hover {
    color: var(--color-on-primary);
    background: var(--color-primary-strong);
}

.about-body {
    margin-top: 0;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    border: 0;
    border-radius: var(--shape-corner-extra-large);
    background: var(--color-surface);
}

.about-body__title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px dashed var(--color-divider);
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.about-body__title i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.about-body__content > :first-child {
    margin-top: 0;
}

.about-body__content > :last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .article--about {
        gap: 0.75rem;
    }

    .about-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 1.5rem 1.1rem;
        border-radius: var(--shape-corner-large);
        text-align: center;
    }

    .about-hero__avatar {
        width: 104px;
        border-radius: var(--shape-corner-extra-large);
        font-size: 2.35rem;
    }

    .about-hero__eyebrow,
    .about-hero__actions {
        justify-content: center;
    }

    .about-hero h1 {
        font-size: 2.5rem;
    }

    .about-body {
        padding: 1.15rem;
        border-radius: var(--shape-corner-large);
    }
}

.article__header h1 {
    margin: 0.5rem 0 1.5rem;
    font-size: clamp(2rem, 6vw, 3.25rem);
    line-height: 1.18;
}

.article__header--post {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--color-border);
}

.article__reading-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem 1.25rem;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.article__reading-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.article__reading-stats i {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 7px;
    color: var(--color-muted);
    background: var(--color-primary-faint);
    font-size: 0.82rem;
}

.article__header--post .article__title {
    position: relative;
    margin: 1.15rem 0 1.35rem;
    padding-left: 1rem;
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    line-height: 1.14;
}

.article__header--post .article__title::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--accent-bar-width);
    height: clamp(20px, 0.68em, 28px);
    border-radius: var(--accent-bar-radius);
    background: var(--color-primary);
    transform: translateY(-50%);
    content: "";
}

.article__post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.article__post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.article__post-meta-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 8px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.article__post-meta-icon :is(i, iconify-icon) {
    font-size: 1.05rem;
}

.article__post-meta a {
    color: inherit;
    text-decoration: none;
}

.article__post-meta a:hover {
    color: var(--color-primary);
}

.article__post-meta-item--tags {
    flex: 1 1 240px;
}

.article__cover {
    margin: 0 0 2rem;
    overflow: hidden;
    border-radius: var(--shape-corner-medium);
    background: var(--color-primary-soft);
}

.article__cover img {
    display: block;
    width: 100%;
    max-height: min(58vh, 620px);
    object-fit: cover;
}

.article__content {
    overflow-wrap: anywhere;
    color: var(--color-text-normal);
    font-size: 1rem;
    line-height: 1.82;
}

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

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

.article__content p {
    margin: 1.15em 0;
}

.article__content :is(h1, h2, h3, h4, h5, h6) {
    position: relative;
    scroll-margin-top: 7rem;
    color: var(--color-text-strong);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.article__content h1 {
    margin: 1.8em 0 0.75em;
    font-size: 2rem;
    line-height: 1.25;
}

.article__content h2 {
    margin: 2em 0 0.75em;
    font-size: 1.65rem;
}

.article__content h3 {
    margin: 1.8em 0 0.7em;
    font-size: 1.35rem;
}

.article__content h4 {
    margin: 1.65em 0 0.65em;
    font-size: 1.12rem;
}

.article__content :is(h5, h6) {
    margin: 1.5em 0 0.6em;
    font-size: 1rem;
}

.article-heading-anchor {
    display: inline-flex;
    margin-left: 0.25em;
    padding: 0.15em 0.3em;
    border: 0 !important;
    border-radius: var(--shape-corner-small) !important;
    opacity: 0;
    color: var(--color-primary) !important;
    background: linear-gradient(var(--link-hover), var(--link-hover)) center / 0 0 no-repeat !important;
    font-size: 0.72em;
    font-weight: 500 !important;
    line-height: 1;
    text-decoration: none;
    transform: translateX(-4px);
    transition: opacity 160ms ease, transform 160ms ease, background-size 240ms var(--mellow-motion-easing) !important;
}

.article-heading-anchor:hover,
.article-heading-anchor:focus-visible {
    background-size: 100% 100% !important;
}

.article__content :is(h1, h2, h3, h4, h5, h6):hover .article-heading-anchor,
.article-heading-anchor:focus-visible {
    opacity: 1;
    transform: translateX(0);
}

.article__content :is(strong, b) {
    color: var(--color-text-strong);
    font-weight: 700;
}

.article__content :is(ul, ol) {
    margin: 1.1em 0;
    padding-left: 1.65em;
}

.article__content li {
    margin: 0.35em 0;
    padding-left: 0.15em;
}

.article__content li > :is(ul, ol) {
    margin-block: 0.35em;
}

.article__content img {
    display: block;
    max-width: 100%;
    margin: 1.5rem auto;
    border-radius: var(--shape-corner-medium);
}

.article__content img[data-mellow-lightbox],
.article__cover img[data-mellow-lightbox] {
    cursor: zoom-in;
    transition: filter 180ms ease;
}

.article__content img[data-mellow-lightbox]:focus-visible,
.article__cover img[data-mellow-lightbox]:focus-visible {
    outline: 3px solid color-mix(in oklch, var(--color-primary) 48%, white);
    outline-offset: 4px;
}

.article__content figure {
    margin: 1.65rem 0;
}

.article__content figure img {
    margin-block: 0;
}

.article__content figcaption {
    margin-top: 0.65rem;
    color: var(--color-text-faint);
    font-size: 0.85rem;
    line-height: 1.55;
    text-align: center;
}

.article__content :is(video, iframe) {
    display: block;
    max-width: 100%;
    margin: 1.5rem auto;
    border: 0;
    border-radius: var(--shape-corner-medium);
}

.article__content video {
    width: 100%;
}

.article__content details {
    margin: 1.35rem 0;
    padding: 0.25rem 1rem 0.8rem;
    border-radius: var(--shape-corner-medium);
    background: var(--color-primary-faint);
}

.article__content summary {
    margin: -0.25rem -1rem -0.8rem;
    padding: 0.8rem 1rem;
    border-radius: inherit;
    color: var(--color-text-strong);
    font-weight: 600;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.article__content details[open] summary {
    margin-bottom: 0.6rem;
}

.article__content summary:hover {
    color: var(--color-primary);
    background: var(--color-plain-hover);
}

.article__content mark {
    padding: 0.05em 0.25em;
    border-radius: 4px;
    color: inherit;
    background: oklch(0.90 0.08 90 / 0.72);
}

.article__content kbd {
    display: inline-block;
    min-width: 1.65em;
    padding: 0.08em 0.42em;
    border: 1px solid var(--color-divider);
    border-bottom-width: 2px;
    border-radius: 6px;
    color: var(--color-text-normal);
    background: var(--color-surface);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    line-height: 1.45;
    text-align: center;
}

.article__content del {
    color: var(--color-text-muted);
}

.article__content a,
.comment-card__content a {
    margin-inline: 0;
    padding: 0.08em 0.28em;
    border-bottom: 1px dashed var(--link-underline);
    border-radius: 8px;
    color: var(--color-primary-strong);
    background: linear-gradient(var(--link-hover), var(--link-hover)) center / 0 0 no-repeat;
    font-weight: 700;
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: background-size 240ms var(--mellow-motion-easing), border-color 120ms ease, color 160ms ease;
}

.article__content a:hover,
.article__content a:focus-visible,
.comment-card__content a:hover,
.comment-card__content a:focus-visible {
    background-size: 100% 100%;
    border-bottom-color: transparent;
    border-radius: 8px;
    color: var(--color-primary-strong);
}

.article__content a:active,
.comment-card__content a:active {
    background-image: linear-gradient(var(--link-active), var(--link-active));
    background-size: 100% 100%;
}

.article__content a:has(> img),
.comment-card__content a:has(> img) {
    margin-inline: 0;
    padding: 0;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
}

.article__content blockquote {
    margin-inline: 0;
    padding: 0.15rem 1.15rem;
    border-left: 4px solid var(--color-button-bg);
    border-radius: 0 var(--shape-corner-small) var(--shape-corner-small) 0;
    color: var(--color-text-muted);
    background: var(--color-primary-faint);
}

.article__content :is(ul, ol) li::marker {
    color: var(--color-primary);
    font-weight: 600;
}

.article__content hr {
    height: 0;
    margin-block: 2rem;
    border: 0;
    border-top: 1px dashed var(--color-border);
}

.is-dark .article__content hr {
    border-top-color: var(--color-border);
}

.mellow-admonition {
    --admonition-color: oklch(0.70 0.14 250);
    --admonition-background: color-mix(in oklch, var(--admonition-color) 12%, transparent);
    position: relative;
    margin: 1.4rem 0;
    padding: 1rem 1.2rem;
    overflow: hidden;
    border-radius: 16px;
    background: var(--admonition-background);
}

.mellow-admonition__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--admonition-color);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mellow-admonition__title i {
    width: 1.15rem;
    font-size: 1.05rem;
    text-align: center;
}

.mellow-admonition__content {
    margin-top: 0.55rem;
    color: var(--color-text);
}

.mellow-admonition__content > :first-child {
    margin-top: 0;
}

.mellow-admonition__content > :last-child {
    margin-bottom: 0;
}

.mellow-admonition--tip {
    --admonition-color: oklch(0.70 0.14 180);
}

.mellow-admonition--important {
    --admonition-color: oklch(0.70 0.14 310);
}

.mellow-admonition--warning {
    --admonition-color: oklch(0.70 0.14 60);
}

.mellow-admonition--caution {
    --admonition-color: oklch(0.60 0.20 25);
}

.is-dark .mellow-admonition {
    --admonition-background: color-mix(in oklch, var(--admonition-color) 18%, transparent);
}

.article__content pre {
    position: relative;
    margin: 1.35rem 0;
    overflow-x: auto;
    padding: 1.15rem 1.25rem;
    border-radius: 12px;
    color: var(--codeblock-text);
    background: var(--codeblock-bg);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    tab-size: 4;
}

.code-frame {
    position: relative;
    margin: 1.35rem 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--shape-corner-medium);
    background: var(--codeblock-bg);
}

.code-frame pre {
    margin: 0;
    padding-top: 2.9rem;
    scrollbar-width: thin;
    scrollbar-color: #5f5f63 #252526;
    scrollbar-gutter: stable;
}

.code-frame pre::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.code-frame pre::-webkit-scrollbar-track {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #252526;
}

.code-frame pre::-webkit-scrollbar-thumb {
    min-width: 36px;
    border: 2px solid #252526;
    border-radius: 999px;
    background: #5f5f63;
}

.code-frame pre::-webkit-scrollbar-thumb:hover {
    background: #77777c;
}

.code-frame pre::-webkit-scrollbar-thumb:active {
    background: #8d8d92;
}

.code-frame pre::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.code-frame pre::-webkit-scrollbar-corner {
    background: #252526;
}

.code-frame::before {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 2.25rem;
    border-radius: var(--shape-corner-medium) var(--shape-corner-medium) 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #252526;
    content: "";
    pointer-events: none;
}

.code-frame::after {
    position: absolute;
    z-index: 2;
    top: 0.9rem;
    left: 1rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 13px 0 #ffd43b, 26px 0 #69db7c;
    content: "";
}

.code-language {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 4rem;
    display: flex;
    align-items: center;
    max-width: calc(100% - 9rem);
    height: 2.25rem;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.52);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.article__content pre code.hljs,
.code-frame pre code.hljs {
    display: block;
    overflow: visible;
    padding: 0;
    color: var(--codeblock-text);
    background: transparent;
}

/* VS Code Dark+ token palette layered over Highlight.js' official VS theme. */
.code-frame .hljs-comment,
.code-frame .hljs-quote {
    color: #6a9955;
}

.code-frame .hljs-keyword,
.code-frame .hljs-literal,
.code-frame .hljs-name,
.code-frame .hljs-symbol {
    color: #569cd6;
}

.code-frame .hljs-number {
    color: #b5cea8;
}

.code-frame .hljs-string,
.code-frame .hljs-meta .hljs-string {
    color: #ce9178;
}

.code-frame .hljs-title,
.code-frame .hljs-title.class_,
.code-frame .hljs-title.function_ {
    color: #dcdcaa;
}

.code-frame .hljs-built_in,
.code-frame .hljs-type {
    color: #4ec9b0;
}

.code-frame .hljs-attr,
.code-frame .hljs-attribute,
.code-frame .hljs-params,
.code-frame .hljs-template-variable,
.code-frame .hljs-variable {
    color: #9cdcfe;
}

.code-frame .hljs-regexp,
.code-frame .hljs-template-tag {
    color: #d16969;
}

.code-copy-button {
    position: absolute;
    z-index: 3;
    top: 0.4rem;
    right: 0.5rem;
    min-height: 1.7rem;
    padding: 0.2rem 0.65rem;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.code-copy-button:hover,
.code-copy-button.is-copied {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.article__content :not(pre) > code {
    padding: 0.14em 0.4em;
    border-radius: 6px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.92em;
    font-weight: 700;
}

.mellow-lightbox {
    --mellow-lightbox-surface: rgba(28, 33, 32, 0.96);
    --mellow-lightbox-surface-hover: rgba(47, 54, 52, 0.98);
    position: fixed;
    inset: 0;
    display: none;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    color: #fff;
    background: rgba(7, 10, 10, 0.96);
    box-shadow: none;
    opacity: 0;
    overscroll-behavior: contain;
    transform: scale(0.985);
    transition: opacity 180ms ease, transform 240ms var(--mellow-motion-easing, ease);
}

.mellow-lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    opacity: 1;
    transform: scale(1);
}

@starting-style {
    .mellow-lightbox[open] {
        opacity: 0;
        transform: scale(0.985);
    }
}

.mellow-lightbox.is-closing {
    opacity: 0;
    transform: scale(0.99);
}

.mellow-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: none;
    opacity: 1;
    transition: opacity 180ms ease;
    -webkit-backdrop-filter: none;
}

.mellow-lightbox.is-closing::backdrop {
    opacity: 0;
}

.mellow-lightbox__topbar {
    position: absolute;
    z-index: 5;
    top: clamp(0.75rem, 2.4vw, 1.5rem);
    right: clamp(0.75rem, 2.4vw, 1.5rem);
    left: clamp(0.75rem, 2.4vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none;
}

.mellow-lightbox__counter,
.mellow-lightbox__actions,
.mellow-lightbox__footer {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--mellow-lightbox-surface);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mellow-lightbox__counter {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    letter-spacing: 0.02em;
    pointer-events: auto;
}

.mellow-lightbox__counter iconify-icon {
    color: color-mix(in oklch, var(--color-primary) 68%, white);
    font-size: 1.2rem;
}

.mellow-lightbox__actions {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: var(--shape-corner-large);
    pointer-events: auto;
}

.mellow-lightbox__action,
.mellow-lightbox__nav {
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, scale 160ms ease;
}

.mellow-lightbox__action {
    display: inline-flex;
    width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--shape-corner-medium);
    text-decoration: none;
}

.mellow-lightbox__action iconify-icon {
    font-size: 1.35rem;
}

.mellow-lightbox__action:is(:hover, :focus-visible),
.mellow-lightbox__nav:is(:hover, :focus-visible) {
    border-color: color-mix(in oklch, var(--color-primary) 36%, rgba(255, 255, 255, 0.18));
    color: #fff;
    background: color-mix(in oklch, var(--color-primary) 18%, var(--mellow-lightbox-surface-hover));
}

.mellow-lightbox__action:focus-visible,
.mellow-lightbox__nav:focus-visible {
    outline-color: color-mix(in oklch, var(--color-primary) 70%, white);
    outline-offset: 2px;
}

.mellow-lightbox__stage {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    place-items: center;
    padding: clamp(6.8rem, 12vh, 9rem) clamp(4.75rem, 8vw, 8.5rem);
    cursor: zoom-out;
    touch-action: pan-y;
}

.mellow-lightbox__ambient {
    display: none;
}

.mellow-lightbox__image {
    position: relative;
    z-index: 2;
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--shape-corner-large);
    opacity: 0;
    object-fit: contain;
    box-shadow: none;
    transform: translateX(18px) scale(0.985);
    transition: opacity 220ms ease, transform 320ms var(--mellow-motion-easing, ease);
    user-select: none;
    -webkit-user-drag: none;
}

.mellow-lightbox[data-direction="previous"] .mellow-lightbox__image:not(.is-ready) {
    transform: translateX(-18px) scale(0.985);
}

.mellow-lightbox__image.is-ready {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.mellow-lightbox__loader {
    position: absolute;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: color-mix(in oklch, var(--color-primary) 74%, white);
    border-radius: 50%;
    opacity: 0;
    animation: mellow-lightbox-spin 760ms linear infinite;
    pointer-events: none;
}

.mellow-lightbox.is-loading .mellow-lightbox__loader {
    opacity: 1;
}

@keyframes mellow-lightbox-spin {
    to {
        transform: rotate(360deg);
    }
}

.mellow-lightbox__status {
    position: relative;
    z-index: 3;
    display: grid;
    max-width: min(82vw, 340px);
    place-items: center;
    gap: 0.6rem;
    padding: 1.15rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--shape-corner-large);
    color: rgba(255, 255, 255, 0.76);
    background: rgba(20, 24, 23, 0.74);
    font-size: 0.9rem;
    cursor: default;
}

.mellow-lightbox__status[hidden] {
    display: none;
}

.mellow-lightbox__status iconify-icon {
    color: color-mix(in oklch, var(--color-primary) 60%, white);
    font-size: 2rem;
}

.mellow-lightbox__nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 52px;
    min-height: 70px;
    padding: 0;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: var(--mellow-lightbox-surface);
    box-shadow: none;
    transform: translateY(-50%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mellow-lightbox__nav[hidden] {
    display: none;
}

.mellow-lightbox__nav--previous {
    left: clamp(0.75rem, 2.4vw, 1.5rem);
}

.mellow-lightbox__nav--next {
    right: clamp(0.75rem, 2.4vw, 1.5rem);
}

.mellow-lightbox__nav iconify-icon {
    font-size: 2rem;
}

.mellow-lightbox__footer {
    position: absolute;
    z-index: 5;
    right: 50%;
    bottom: clamp(0.75rem, 2.4vw, 1.5rem);
    display: flex;
    width: min(calc(100% - 2rem), 760px);
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.7rem 0.85rem 0.7rem 1rem;
    border-radius: var(--shape-corner-large);
    transform: translateX(50%);
}

.mellow-lightbox__footer[hidden] {
    display: none;
}

.mellow-lightbox__footer:has(.mellow-lightbox__caption[hidden]) {
    width: auto;
    justify-content: center;
    padding-inline: 1rem;
}

.mellow-lightbox__caption {
    display: -webkit-box;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mellow-lightbox__caption[hidden] {
    display: none;
}

.mellow-lightbox__hint {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.74rem;
    white-space: nowrap;
}

.mellow-lightbox__hint[hidden] {
    display: none;
}

.mellow-lightbox__hint kbd {
    min-width: 1.45rem;
    padding: 0.12rem 0.32rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    font: inherit;
    text-align: center;
}

@media (hover: hover) {
    .article__content img[data-mellow-lightbox]:hover,
    .article__cover img[data-mellow-lightbox]:hover {
        filter: saturate(1.035) brightness(1.015);
        box-shadow: none;
    }
}

@media (max-width: 640px) {
    .mellow-lightbox__topbar {
        top: max(0.65rem, env(safe-area-inset-top));
        right: max(0.65rem, env(safe-area-inset-right));
        left: max(0.65rem, env(safe-area-inset-left));
    }

    .mellow-lightbox__counter {
        min-height: 42px;
        padding: 0.45rem 0.75rem;
        font-size: 0.76rem;
    }

    .mellow-lightbox__counter iconify-icon {
        display: none;
    }

    .mellow-lightbox__actions {
        border-radius: var(--shape-corner-medium);
    }

    .mellow-lightbox__action {
        width: 38px;
        min-height: 38px;
        border-radius: 10px;
    }

    .mellow-lightbox__stage {
        padding: 6.25rem 0.75rem;
    }

    .mellow-lightbox__image {
        border-radius: var(--shape-corner-medium);
        box-shadow: none;
    }

    .mellow-lightbox__nav {
        width: 42px;
        min-height: 58px;
        opacity: 0.88;
    }

    .mellow-lightbox__nav--previous {
        left: 0.55rem;
    }

    .mellow-lightbox__nav--next {
        right: 0.55rem;
    }

    .mellow-lightbox__nav iconify-icon {
        font-size: 1.7rem;
    }

    .mellow-lightbox__footer {
        right: max(0.65rem, env(safe-area-inset-right));
        bottom: max(0.65rem, env(safe-area-inset-bottom));
        left: max(0.65rem, env(safe-area-inset-left));
        width: auto;
        min-height: 46px;
        padding: 0.6rem 0.8rem;
        transform: none;
    }

    .mellow-lightbox__caption {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .mellow-lightbox__hint {
        display: none;
    }

    .mellow-lightbox__footer:has(.mellow-lightbox__caption[hidden]) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article__content img[data-mellow-lightbox],
    .article__cover img[data-mellow-lightbox],
    .mellow-lightbox,
    .mellow-lightbox::backdrop,
    .mellow-lightbox__image {
        transition: none;
    }

    .mellow-lightbox__loader {
        animation: none;
    }
}

.post-download-card {
    position: relative;
    margin-top: 2.5rem;
    padding: clamp(1.1rem, 3vw, 1.45rem);
    overflow: hidden;
    border: 1px solid color-mix(in oklch, var(--color-primary) 15%, var(--color-border));
    border-radius: var(--shape-corner-large);
    background: color-mix(in oklch, var(--color-primary) 6%, var(--color-surface));
}

.post-download-card::before {
    position: absolute;
    top: 50%;
    right: -3.5rem;
    width: 11rem;
    height: 11rem;
    border: 2.5rem solid color-mix(in oklch, var(--color-primary) 7%, transparent);
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
    pointer-events: none;
}

.post-download-card > * {
    position: relative;
    z-index: 1;
}

.post-download-card__header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-download-card__icon {
    display: grid;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: var(--shape-corner-medium);
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-size: 1.35rem;
    place-items: center;
}

.post-download-card__content {
    min-width: 0;
}

.post-download-card__eyebrow {
    margin: 0 0 0.12rem;
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.post-download-card__content h2 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    line-height: 1.35;
}

.post-download-card__summary {
    margin: 0.3rem 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.post-download-card__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.post-download-card__action {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    min-height: 3.7rem;
    padding: 0.65rem 0.75rem;
    overflow: hidden;
    border: 1px solid color-mix(in oklch, var(--color-primary) 12%, var(--color-border));
    border-radius: var(--shape-corner-medium);
    color: var(--color-text);
    background: color-mix(in oklch, var(--color-primary) 5%, var(--color-surface));
    font-size: 0.88rem;
    text-decoration: none;
    transition: border-color var(--mellow-motion-fast) ease, box-shadow var(--mellow-motion-fast) ease;
}

.post-download-card__action::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    corner-shape: inherit;
    background: var(--color-primary-soft);
    content: "";
    transform: scale(0);
    transform-origin: center;
    transition: transform 240ms var(--mellow-motion-easing);
    pointer-events: none;
}

.post-download-card__source-icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: var(--shape-corner-small);
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-size: 1rem;
    place-items: center;
}

.post-download-card__action-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.18rem;
}

.post-download-card__action-copy strong,
.post-download-card__action-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-download-card__action-copy strong {
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.25;
}

.post-download-card__action-copy small {
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.post-download-card__action-icon {
    color: var(--color-primary);
    font-size: 0.78rem;
    transition: transform var(--mellow-motion-fast) var(--mellow-motion-easing);
}

.post-download-card__action:hover,
.post-download-card__action:focus-visible {
    color: var(--color-text);
    border-color: color-mix(in oklch, var(--color-primary) 32%, var(--color-border));
    box-shadow: 0 8px 18px color-mix(in oklch, var(--color-primary) 10%, transparent);
}

.post-download-card__action:hover::before,
.post-download-card__action:focus-visible::before {
    transform: scale(1);
}

.post-download-card__action:hover .post-download-card__action-icon,
.post-download-card__action:focus-visible .post-download-card__action-icon {
    transform: translateX(2px);
}

.post-download-card__action:focus-visible {
    outline: 3px solid color-mix(in oklch, var(--color-primary) 35%, transparent);
    outline-offset: 3px;
}

.post-download-card + .post-copyright {
    margin-top: 1.25rem;
}

.post-copyright {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 154px;
    margin-top: 2.5rem;
    padding: clamp(1.65rem, 4vw, 2.45rem) clamp(2rem, 5vw, 2.75rem);
    overflow: hidden;
    border-radius: var(--shape-corner-large);
    color: var(--color-text);
    background: var(--license-block-bg);
}

.post-copyright::after {
    content: none;
}

.post-copyright__content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.46rem;
    width: 100%;
    min-width: 0;
}

.post-copyright__title {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.02rem, 1.7vw, 1.25rem);
    font-weight: 800;
    line-height: 1.35;
}

.post-copyright__url {
    display: block;
    width: min(100%, 36rem);
    overflow: hidden;
    color: var(--color-primary);
    font-size: clamp(1.02rem, 2.1vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-copyright__url:hover,
.post-copyright__url:focus-visible,
.post-copyright__meta a:hover,
.post-copyright__meta a:focus-visible {
    color: var(--color-primary-strong);
}

.post-copyright__meta {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(0, 10rem) minmax(0, 13rem);
    gap: clamp(1.35rem, 4vw, 3.2rem);
    align-items: start;
    margin: 0.18rem 0 0;
}

.post-copyright__meta div {
    min-width: 0;
}

.post-copyright__meta dt {
    color: var(--color-muted);
    font-size: clamp(0.86rem, 1.8vw, 1rem);
    line-height: 1.35;
}

.post-copyright__meta dd {
    margin: 0.32rem 0 0;
    min-width: 0;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(0.98rem, 2vw, 1.15rem);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-copyright__meta a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.post-copyright__mark {
    position: absolute;
    top: 50%;
    right: clamp(1rem, 4vw, 3rem);
    z-index: 1;
    display: block;
    width: 1em;
    height: 1em;
    color: var(--license-mark);
    font-size: clamp(10.5rem, 25vw, 18rem);
    line-height: 0;
    opacity: 0.55;
    transform: translateY(-50%);
    pointer-events: none;
}

.is-dark .post-copyright {
    background: var(--license-block-bg);
}

.is-dark .post-copyright__mark {
    color: var(--license-mark);
}

@media (max-width: 640px) {
    .post-download-card {
        padding: 1rem;
    }

    .post-download-card__header {
        gap: 0.85rem;
    }

    .post-download-card__icon {
        width: 3.2rem;
        height: 3.2rem;
    }

    .post-download-card__links {
        grid-template-columns: 1fr;
    }

    .post-copyright {
        min-height: 150px;
        padding: 1.45rem 1.55rem;
    }

    .post-copyright__meta {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.45fr);
        gap: 0.8rem;
    }

    .post-copyright__url {
        width: min(100%, 28rem);
    }

    .post-copyright__mark {
        top: 50%;
        right: 0.7rem;
        font-size: clamp(12.5rem, 48vw, 14rem);
    }
}

.article-table-scroll {
    width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid var(--color-divider);
    border-radius: var(--shape-corner-medium);
    background: var(--color-surface);
    scrollbar-width: thin;
    scrollbar-color: var(--color-button-bg-hover) transparent;
}

.article__content table {
    display: table;
    width: 100%;
    margin: 1.5rem 0;
    border: 1px solid var(--color-divider);
    border-radius: var(--shape-corner-medium);
    border-spacing: 0;
    border-collapse: separate;
    table-layout: auto;
}

.article-table-scroll table {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.article__content th,
.article__content td {
    min-width: 7rem;
    padding: 0.7rem 0.9rem;
    border: 0;
    border-bottom: 1px solid var(--color-divider);
    vertical-align: middle;
}

.article__content :is(th, td):not([align]),
.article__content :is(th, td)[align="left" i] {
    text-align: left;
}

.article__content :is(th, td)[align="center" i] {
    text-align: center;
}

.article__content :is(th, td)[align="right" i] {
    text-align: right;
}

.article__content th {
    color: var(--color-text-strong);
    background: var(--color-primary-faint);
    font-weight: 600;
}

.article__content tr:last-child td {
    border-bottom: 0;
}

.article__content tbody tr {
    transition: background-color 160ms ease;
}

.article__content tbody tr:hover {
    background: var(--color-card-hover);
}

.article__footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.sidebar {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.sidebar-card {
    padding: 1.2rem;
    box-shadow: none;
}

.sidebar-card:not(.sidebar-profile) {
    padding: 1.05rem 1rem 1.15rem;
    border-radius: var(--shape-corner-large);
}

.sidebar-card:not(.sidebar-profile) h2 {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 0.8rem;
    padding-left: 1rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

.sidebar-card:not(.sidebar-profile) h2::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--accent-bar-width);
    height: 16px;
    border-radius: var(--accent-bar-radius);
    background: var(--color-primary);
    content: "";
    transform: translateY(-50%);
    transition: height 180ms var(--mellow-motion-easing), background-color 180ms ease;
}

.sidebar-card:not(.sidebar-profile):hover h2::before {
    height: 18px;
}

.sidebar-card:not(.sidebar-profile) h2 > i {
    display: none;
}

.sidebar-card ul {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-categories li a,
.sidebar-recent li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    overflow: hidden;
    border-radius: 12px;
    color: var(--color-text);
    line-height: 1.45;
    text-decoration: none;
    transition: padding 180ms var(--mellow-motion-easing), color 160ms ease, background-color 160ms ease, transform 120ms ease;
}

.sidebar-categories li a > span:first-child,
.sidebar-recent li a > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-categories li a:hover,
.sidebar-categories li a:focus-visible,
.sidebar-recent li a:hover,
.sidebar-recent li a:focus-visible,
.sidebar-categories li.is-current a,
.sidebar-recent li.is-current a {
    padding-left: 0.9rem;
    color: var(--color-primary);
    background-color: transparent;
}

.sidebar-categories li a:active,
.sidebar-recent li a:active {
    transform: scale(0.98);
}

.sidebar-count {
    display: inline-grid;
    min-width: 2rem;
    height: 1.75rem;
    flex: 0 0 auto;
    padding-inline: 0.45rem;
    place-items: center;
    border-radius: 10px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-size: 0.78rem;
    font-weight: 700;
    transition: color 160ms ease, background-color 160ms ease, transform 180ms var(--mellow-motion-easing);
}

.sidebar-categories li a:hover .sidebar-count,
.sidebar-categories li.is-current .sidebar-count {
    transform: translateX(-1px);
}

.sidebar-notice p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.sidebar-stats dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
}

.sidebar-stats dl div {
    padding: 0.65rem;
    border-radius: 13px;
    background: var(--color-primary-soft);
    text-align: center;
}

.sidebar-stats dt {
    color: var(--color-muted);
    font-size: 0.76rem;
}

.sidebar-stats dd {
    margin: 0.1rem 0 0;
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 800;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-collapsible-content {
    position: relative;
    transition: max-height 300ms var(--mellow-motion-easing);
}

.sidebar-collapsible-content.is-collapsed {
    max-height: 176px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, #000 0, #000 72%, transparent 100%);
}

.sidebar-expand-button {
    display: flex;
    width: 100%;
    min-height: 36px;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--shape-corner-small);
    color: var(--color-primary);
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-expand-button:hover,
.sidebar-expand-button:focus-visible {
    background-color: transparent;
}

.tag-cloud a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.38rem 0.75rem;
    border-radius: 11px;
    color: var(--color-primary);
    background: var(--color-primary-faint);
    font-size: 0.85rem;
    line-height: 1;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, transform 180ms var(--mellow-motion-easing), box-shadow 180ms ease;
}

.tag-cloud a:hover,
.tag-cloud a.is-current {
    color: var(--color-on-primary);
    background: var(--color-primary);
    box-shadow: none;
    transform: none;
}

.tag-cloud a:active {
    box-shadow: none;
    transform: translateY(0) scale(0.96);
}

.archive-header {
    margin-bottom: 1.5rem;
}

.archive-header__eyebrow {
    margin-bottom: 0;
    color: var(--color-muted);
}

.archive-header h1 {
    margin-top: 0.25rem;
}

.archive-panel {
    padding: clamp(1.25rem, 3vw, 2.25rem);
    overflow: hidden;
    border-radius: var(--shape-corner-large);
    background: var(--color-surface);
    box-shadow: var(--shadow);
}

.archive-year + .archive-year {
    margin-top: 1rem;
}

.archive-year__header,
.archive-entry {
    display: grid;
    grid-template-columns: minmax(3.75rem, 10%) minmax(3rem, 10%) minmax(0, 1fr) minmax(7.5rem, 22%);
    align-items: center;
}

.archive-year__header {
    min-height: 64px;
}

.archive-year__header strong {
    color: var(--color-text-normal);
    font-size: clamp(1.35rem, 2vw, 1.6rem);
    line-height: 1;
    text-align: right;
}

.archive-year__marker {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin: auto;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    background: var(--color-surface);
}

.archive-year__marker::after {
    position: absolute;
    z-index: -1;
    top: 100%;
    bottom: -34px;
    left: 50%;
    border-left: 2px dashed var(--color-divider);
    content: "";
    transform: translateX(-1px);
}

.archive-year__header small {
    grid-column: 3 / -1;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.archive-year__header small b {
    color: var(--color-text-normal);
    font-size: 1rem;
    font-weight: 600;
}

.archive-entry {
    position: relative;
    min-height: 44px;
    border-radius: var(--shape-corner-small);
    color: var(--color-text-muted);
    transition: color var(--mellow-motion-fast) ease, background-color var(--mellow-motion-fast) ease;
}

.archive-entry:is(:hover, :focus-within) {
    color: var(--color-primary);
    background-color: transparent;
}

.archive-entry:focus-within {
    outline: 3px solid color-mix(in oklch, var(--color-primary) 32%, transparent);
    outline-offset: 2px;
}

.archive-entry time {
    padding-right: 0.35rem;
    font-size: 0.82rem;
    text-align: right;
}

.archive-entry__track {
    position: relative;
    align-self: stretch;
}

.archive-entry__track::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 2px dashed var(--color-divider);
    content: "";
    transform: translateX(-1px);
}

.archive-entry:last-child .archive-entry__track::before {
    bottom: 50%;
}

.archive-entry__track i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 6px;
    background: var(--color-text-muted);
    box-shadow: 0 0 0 4px var(--color-surface);
    transform: translate(-50%, -50%);
    transition: height var(--mellow-motion-fast) ease, background-color var(--mellow-motion-fast) ease, box-shadow var(--mellow-motion-fast) ease;
}

.archive-entry:is(:hover, :focus-within) .archive-entry__track i {
    height: 20px;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-plain-hover);
}

.archive-entry__title {
    position: static;
    min-width: 0;
    padding: 0.55rem 1rem 0.55rem 0;
    overflow: hidden;
    color: var(--color-text-normal);
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 160ms ease, transform 160ms ease;
}

.archive-entry__title::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    corner-shape: inherit;
    content: "";
}

.archive-entry__title:focus-visible {
    outline: none;
}

.archive-entry:is(:hover, :focus-within) .archive-entry__title {
    color: var(--color-primary);
    transform: translateX(4px);
}

.archive-entry__tags {
    min-width: 0;
    padding-right: 0.75rem;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-entry__tags a {
    position: relative;
    z-index: 1;
    color: var(--color-text-faint);
    text-decoration: none;
    transition: color var(--mellow-motion-fast) ease;
}

.archive-entry__tags a::before {
    content: "#";
}

.archive-entry__tags a:hover {
    color: var(--color-primary);
}

@media (max-width: 640px) {
    .archive-panel {
        padding: 1rem 0.5rem 1.25rem;
    }

    .archive-year__header,
    .archive-entry {
        grid-template-columns: minmax(3.3rem, 20%) minmax(2.6rem, 14%) minmax(0, 1fr);
    }

    .archive-year__header small {
        grid-column: 3;
    }

    .archive-entry__tags {
        display: none;
    }

    .archive-entry__title {
        padding-right: 0.65rem;
    }
}

.comments {
    margin-top: 2.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 0;
    box-shadow: none;
}

.post-content-stack > .comments {
    margin-top: 0;
}

.comments__title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 1rem;
    margin: 0 0 1.25rem;
    font-size: 1.55rem;
}

.post-content-stack > .comments .comments__title::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--accent-bar-width);
    height: clamp(18px, 0.82em, 22px);
    border-radius: var(--accent-bar-radius);
    content: "";
    background: var(--color-primary);
    transform: translateY(-50%);
}

.comments__title small {
    min-width: 38px;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.comment-list,
.comment-list ol {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-list ol {
    gap: 0.6rem;
    margin: 0.35rem 0 0 3.75rem;
}

.comment-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.15rem 0.85rem;
    padding: 1.15rem 0.2rem;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
}

.comment-card__header {
    display: contents;
}

.comment-card__header img {
    grid-row: 1 / span 3;
    grid-column: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-card__header > div {
    display: flex;
    grid-column: 2;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    min-width: 0;
}

.comment-author {
    color: var(--color-text);
    font-size: 0.96rem;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-author a:hover,
.comment-author a:focus-visible {
    color: var(--color-primary);
    text-decoration: none;
}

.comment-by-author .comment-author::after {
    margin-left: 0.4rem;
    padding: 0.1rem 0.38rem;
    border-radius: 6px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.68rem;
    content: "作者";
}

.comment-card__header time {
    color: var(--color-muted);
    font-size: 0.78rem;
}

.comment-card__content,
.comment-awaiting,
.comment-card__actions {
    grid-column: 2;
}

.comment-card__content {
    color: var(--color-text);
    line-height: 1.65;
}

.comment-card__content p {
    margin: 0.35rem 0;
}

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

.comment-card__actions {
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.comment-card__actions a {
    color: var(--color-muted);
    text-decoration: none;
}

.comment-card__actions a:hover {
    color: var(--color-primary);
}

.comment-child > .comment-card {
    padding: 1rem;
    border-bottom: 0;
    border-radius: 16px;
    background: var(--color-primary-faint);
}

.comment-list-wrap {
    margin-top: 1rem;
}

.comments-empty {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--color-border);
    border-radius: 16px;
    color: var(--color-muted);
    background: var(--color-primary-faint);
}

.comments-empty i {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.comments-empty strong {
    display: block;
    color: var(--color-text);
    line-height: 1.4;
}

.comments-empty p {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
}

.comment-form-wrap {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.comment-card > .comment-form-wrap {
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem;
    grid-column: 1 / -1;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

.comment-reply-cancel {
    margin-bottom: 0.5rem;
    text-align: right;
}

.comment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.comment-fields p {
    margin: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.comment-form input {
    min-height: 48px;
    border-radius: 10px;
    background: transparent;
}

.comment-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.75rem;
    margin: 0.75rem 0 0;
}

.comment-editor {
    margin: 0;
}

.comment-editor textarea {
    display: block;
    height: 63px;
    min-height: 63px;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: transparent;
}

.comment-submit {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin: 0;
}

.comment-submit button {
    min-width: 118px;
    height: 63px;
    border-radius: 10px;
}

.comment-awaiting {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: #765a12;
    background: #fff3c4;
}

#cancel-comment-reply-link {
    font-size: 0.85rem;
    font-weight: 500;
}

.not-found,
.empty-state {
    padding: clamp(2rem, 7vw, 5rem);
    text-align: center;
}

.not-found__code {
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(4rem, 16vw, 8rem);
    font-weight: 800;
    line-height: 1;
}

.site-footer {
    padding-block: 1rem 1.5rem;
    color: var(--color-muted);
    text-align: center;
}

.site-footer > .site-container {
    padding-top: 1.5rem;
    border-top: 1px dashed var(--color-border);
}

@media (max-width: 640px) {
    .site-main {
        padding-bottom: 1rem;
    }

    .site-footer {
        padding-block: 0.75rem 1.25rem;
    }

    .site-footer > .site-container {
        padding-top: 1.25rem;
    }
}

.is-dark .site-footer > .site-container {
    border-top-color: var(--color-border);
}

.site-footer a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--color-primary-strong);
}

.footer-social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.footer-social iconify-icon,
.site-actions iconify-icon {
    font-size: 1.08rem;
}

.site-footer__custom {
    margin-bottom: 0.35rem;
    color: inherit;
}

.site-footer__copyright {
    margin-bottom: 0;
}

.is-dark {
    --color-background: var(--color-dark-background);
    --color-surface: var(--color-dark-surface);
    --color-text: oklch(0.94 0.015 var(--hue));
    --color-muted: oklch(0.72 0.025 var(--hue));
    --color-primary: oklch(0.75 0.14 var(--hue));
    --color-primary-strong: oklch(0.78 0.10 var(--hue));
    --color-primary-soft: var(--color-dark-primary-soft);
    --color-primary-faint: var(--color-dark-surface);
    --color-border: rgba(255, 255, 255, 0.10);
    --color-button-content: oklch(0.75 0.10 var(--hue));
    --color-button-bg: oklch(0.33 0.035 var(--hue));
    --color-button-bg-hover: oklch(0.38 0.04 var(--hue));
    --color-button-bg-active: oklch(0.43 0.045 var(--hue));
    --color-enter-bg: var(--color-button-bg);
    --color-enter-bg-hover: var(--color-button-bg-hover);
    --color-enter-bg-active: var(--color-button-bg-active);
    --color-plain-hover: oklch(0.30 0.035 var(--hue));
    --color-plain-active: oklch(0.27 0.025 var(--hue));
    --color-card-hover: oklch(0.30 0.03 var(--hue));
    --color-card-active: oklch(0.35 0.035 var(--hue));
    --color-float-surface: oklch(0.19 0.015 var(--hue));
    --color-text-strong: rgba(255, 255, 255, 0.90);
    --color-text-normal: rgba(255, 255, 255, 0.75);
    --color-text-muted: rgba(255, 255, 255, 0.50);
    --color-text-faint: rgba(255, 255, 255, 0.30);
    --color-divider: rgba(255, 255, 255, 0.08);
    --color-meta-divider: rgba(255, 255, 255, 0.20);
    --link-underline: oklch(0.40 0.08 var(--hue));
    --link-hover: oklch(0.40 0.08 var(--hue));
    --link-active: oklch(0.35 0.07 var(--hue));
    --license-block-bg: rgba(255, 255, 255, 0.06);
    --license-mark: rgba(220, 220, 220, 0.11);
    --color-selection-bar: linear-gradient(to right, oklch(0.70 0.10 0), oklch(0.70 0.10 30), oklch(0.70 0.10 60), oklch(0.70 0.10 90), oklch(0.70 0.10 120), oklch(0.70 0.10 150), oklch(0.70 0.10 180), oklch(0.70 0.10 210), oklch(0.70 0.10 240), oklch(0.70 0.10 270), oklch(0.70 0.10 300), oklch(0.70 0.10 330), oklch(0.70 0.10 360));
    --hero-wave-color: var(--color-dark-background);
    --shadow: none;
    --shadow-float: 0 18px 46px rgba(0, 0, 0, 0.38);
    --shadow-header-layer: 0 2px 12px rgba(0, 0, 0, 0.24), 0 1px 3px rgba(0, 0, 0, 0.18);
    --shadow-attached-menu: 0 18px 30px -12px rgba(0, 0, 0, 0.38), 0 8px 14px -8px rgba(0, 0, 0, 0.24);
    color-scheme: dark;
}

.is-dark .top-bar__inner {
    background: var(--mellow-header-surface);
}

.is-dark .nav-menu__panel,
.is-dark .header-social-panel {
    background: var(--color-dark-surface);
}

.is-dark .nav-link,
.is-dark .site-actions a,
.is-dark .site-actions button {
    color: var(--color-text);
}

.is-dark .theme-mode-panel {
    background: var(--color-dark-surface);
}

.is-dark .theme-mode:is(:hover, :focus-within) .theme-toggle,
.is-dark .theme-toggle[aria-expanded="true"],
.is-dark .site-actions .theme-mode__option[aria-checked="true"] {
    color: var(--color-primary);
    background-color: transparent;
}

.is-dark .site-search {
    background: var(--color-dark-primary-soft);
}

.is-dark .home-hero--card {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, var(--color-dark-primary-soft) 0%, var(--color-dark-surface) 100%);
}

.is-dark .home-hero__subtitle,
.is-dark .post-card__excerpt {
    color: var(--color-muted);
}

.is-dark .home-notice {
    color: var(--color-text);
    background: rgba(18, 27, 23, 0.55);
}

.is-dark .home-hero--background {
    background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-dark-primary-soft) 100%);
}

@media (max-width: 900px) {
    body.mellow-header-mobile-floating {
        padding-top: 92px;
    }

    body.mellow-header-mobile-contained,
    body.mellow-header-mobile-attached {
        padding-top: 88px;
    }

    .top-bar {
        top: 10px;
        padding-inline: 0.5rem;
    }

    .mellow-header-mobile-contained .top-bar {
        top: 0;
        padding-inline: 1rem;
    }

    .mellow-header-mobile-attached .top-bar {
        top: 0;
        padding-inline: 0;
    }

    .top-bar__inner {
        width: 100%;
        min-height: 64px;
        padding: 0.45rem 0.55rem;
    }

    .mellow-header-mobile-contained .top-bar__inner,
    .mellow-header-mobile-contained.mellow-page-layout-left .top-bar__inner,
    .mellow-header-mobile-contained.mellow-page-layout-right .top-bar__inner,
    .mellow-header-mobile-contained.mellow-page-layout-both .top-bar__inner {
        width: 100%;
        border-top: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    }

    .mellow-header-mobile-attached .top-bar__inner {
        width: 100%;
        max-width: none;
        border-top: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
    }

    .site-brand__text {
        display: none;
    }

    .site-nav {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        min-height: 44px;
        padding-inline: 0.7rem;
    }

    .site-search {
        display: none;
    }

    .site-actions a {
        display: none;
    }

    .nav-menu__panel {
        position: fixed;
        top: 78px;
        left: 4.5rem;
    }

    .sidebar-layout,
    .sidebar-layout--left,
    .sidebar-layout--right,
    .sidebar-layout--both {
        grid-template-columns: 1fr;
        width: min(calc(100% - 2rem), var(--content-width));
    }

    .primary-content {
        order: 1;
    }

    .sidebar--left {
        order: 2;
    }

    .sidebar--right {
        order: 3;
    }

    .mellow-sidebar-desktop-only .sidebar {
        display: none;
    }

    .comment-fields {
        grid-template-columns: 1fr;
    }

    .post-card--with-cover {
        grid-template-columns: minmax(0, 1fr) minmax(190px, 32%);
    }

    .home-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-hero--background {
        min-height: min(560px, 68vh);
        min-height: clamp(470px, 64svh, 560px);
        justify-content: center;
        margin-top: -92px;
        padding-top: calc(92px + 2.5rem);
        padding-inline: 2rem;
        padding-bottom: 92px;
    }

    .mellow-header-mobile-attached .home-hero--background,
    .mellow-header-mobile-contained .home-hero--background {
        margin-top: -88px;
        padding-top: calc(88px + 2.5rem);
    }

    .home-hero--background .home-hero__content {
        width: min(100%, 42rem);
    }

    .home-hero__wave {
        height: 84px;
    }

    .home-hero--background + .site-main {
        margin-top: -40px;
    }
}

@media (max-width: 640px) {
    .site-brand {
        padding-inline: 0.15rem;
    }

    .site-brand__mark {
        width: 36px;
        height: 36px;
    }

    .site-brand__mark--home {
        width: 30px;
    }

    .home-hero--card {
        gap: 1rem;
        padding: 1.35rem;
        border-radius: var(--shape-corner-large);
    }

    .home-hero--background {
        min-height: min(470px, 60vh);
        min-height: clamp(410px, 56svh, 470px);
        gap: 0.85rem;
        padding-top: calc(92px + 1.75rem);
        padding-right: 1.25rem;
        padding-bottom: 68px;
        padding-left: 1.25rem;
    }

    .mellow-header-mobile-attached .home-hero--background,
    .mellow-header-mobile-contained .home-hero--background {
        padding-top: calc(88px + 1.75rem);
    }

    .home-hero--background .home-hero__content {
        max-width: 34rem;
    }

    .home-hero--background h1 {
        max-width: 16ch;
        font-size: clamp(1.9rem, 7.8vw, 2.15rem);
        line-height: 1.14;
        text-wrap: balance;
    }

    .home-hero--background .home-hero__subtitle {
        max-width: 32ch;
        margin-top: 0.65rem;
        font-size: clamp(0.95rem, 4.2vw, 1.08rem);
        line-height: 1.55;
        text-wrap: balance;
    }

    .home-hero__wave {
        height: 68px;
    }

    .home-hero--background + .site-main {
        margin-top: -44px;
    }

    .home-hero--card h1 {
        font-size: 2rem;
    }

    .nav-link > i:not(.nav-menu__chevron) {
        display: none;
    }

    .post-card,
    .post-card--with-cover {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.85rem;
        min-height: 0;
        padding: 1rem;
        border-radius: var(--shape-corner-large);
    }

    .post-card--with-cover {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .post-card__content {
        min-width: 0;
    }

    .post-card__title {
        padding-left: 0.8rem;
        font-size: 1.2rem;
    }

    .post-card__title::before {
        height: 16px;
    }

    .post-card__meta {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 0.5rem 0.65rem;
        min-width: 0;
        font-size: 0.84rem;
    }

    .post-card__meta-item {
        min-width: 0;
        gap: 0.4rem;
        white-space: nowrap;
    }

    .post-card__meta-item > span:last-child,
    .post-card__meta-item time {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .post-card__meta-item--tags {
        flex-basis: auto;
    }

    .post-card__meta-item--tags > span:last-child {
        display: block;
    }

    .post-card__meta-item--tags a {
        display: inline;
    }

    .post-card__meta .post-card__meta-item > span:last-child a {
        display: inline;
        max-width: 100%;
        white-space: nowrap;
    }

    .post-card__meta-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .post-card__meta-icon :is(i, iconify-icon) {
        font-size: 0.98rem;
    }

    .post-card__media {
        grid-column: 1 / -1;
        min-height: 165px;
        order: -1;
        border-radius: var(--shape-corner-large);
    }

    .post-card__rail {
        display: none;
    }

    .comment-list ol {
        margin-left: 0.75rem;
    }
}

/* Responsive navigation and interaction additions, rebuilt for Typecho and Mellow. */
.top-bar__inner {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    min-height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    color: var(--color-text);
    background: transparent;
}

.site-actions .mobile-search-toggle,
.site-actions .mobile-toc-toggle,
.mobile-search-panel,
.mobile-toc-panel {
    display: none;
}

.site-actions .mobile-toc-toggle[hidden],
.mobile-search-panel[hidden],
.mobile-toc-panel[hidden] {
    display: none !important;
}

.sidebar-profile {
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
}

.sidebar-profile__avatar {
    position: relative;
    display: grid;
    width: 100%;
    max-width: 12rem;
    aspect-ratio: 1;
    margin: 0 auto 1.05rem;
    overflow: hidden;
    place-items: center;
    border-radius: var(--shape-corner-large);
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-size: 3rem;
    text-decoration: none;
    transition: transform 160ms ease;
}

@media (min-width: 901px) {
    .sidebar-profile__avatar {
        max-width: none;
    }
}

.sidebar-profile__avatar:active {
    transform: scale(0.98);
}

.sidebar-profile__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-profile__avatar-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(12, 18, 16, 0);
    opacity: 0;
    transition: opacity 180ms ease, background-color 180ms ease;
}

.sidebar-profile__avatar-overlay i {
    font-size: 3rem;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 180ms ease, transform 220ms var(--mellow-motion-easing);
}

.sidebar-profile__avatar:hover .sidebar-profile__avatar-overlay,
.sidebar-profile__avatar:focus-visible .sidebar-profile__avatar-overlay {
    background: rgba(12, 18, 16, 0.34);
    opacity: 1;
}

.sidebar-profile__avatar:hover .sidebar-profile__avatar-overlay i,
.sidebar-profile__avatar:focus-visible .sidebar-profile__avatar-overlay i {
    opacity: 1;
    transform: scale(1);
}

.sidebar-profile__body {
    padding: 0 0.35rem 0.2rem;
}

.sidebar-profile h2 {
    display: block;
    margin: 0 0 0.45rem;
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
}

.sidebar-profile__line {
    display: block;
    width: 28px;
    height: 4px;
    margin: 0 auto 0.65rem;
    border-radius: 99px;
    background: var(--color-primary);
}

.sidebar-profile p {
    margin: 0 0 0.8rem;
    color: var(--color-muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.sidebar-profile__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.sidebar-profile__links a {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.sidebar-profile__links iconify-icon {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

.sidebar-profile__link--discord iconify-icon {
    transform: translateX(-1px);
}

.sidebar-profile__links a:hover,
.sidebar-profile__links a:focus-visible {
    color: var(--color-on-primary);
    background: var(--color-primary);
}

.sidebar-toc {
    position: relative;
}

/* On post pages the sidebar fills the article row, giving the TOC card a
   meaningful sticky range. Other sidebar cards keep their normal flow. */
@media (min-width: 901px) {
    .post-page-main > .sidebar {
        align-self: stretch;
        align-content: start;
    }

    .post-page-main > .sidebar .sidebar-toc:not([hidden]) {
        position: sticky;
        z-index: 2;
        top: 98px;
    }

    .mellow-header-desktop-contained .post-page-main > .sidebar .sidebar-toc:not([hidden]),
    .mellow-header-desktop-attached .post-page-main > .sidebar .sidebar-toc:not([hidden]) {
        top: 82px;
    }
}

.sidebar-toc__nav {
    position: relative;
    display: grid;
    gap: 0.2rem;
    max-height: min(58vh, 520px);
    padding-bottom: 1.75rem;
    overflow-y: auto;
    scroll-padding-block: 0.5rem 1.75rem;
    overscroll-behavior: contain;
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 1.25rem), transparent 100%);
}

.sidebar-toc__nav::-webkit-scrollbar {
    display: none;
    width: 6px;
}

.sidebar-toc__nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-toc__nav::-webkit-scrollbar-thumb {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: var(--shape-corner-full);
    background: var(--color-button-bg-active);
    background-clip: padding-box;
}

.sidebar-toc__nav::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    background-clip: padding-box;
}

.sidebar-toc__indicator {
    display: none;
}

.sidebar-toc__nav:empty::after {
    color: var(--color-muted);
    font-size: 0.82rem;
    content: "正文暂无目录";
}

.sidebar-toc__link {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0.42rem 0.6rem;
    border-radius: 9px;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.sidebar-toc__link--h3 {
    padding-left: 1.35rem;
    font-size: 0.78rem;
}

.sidebar-toc__link:hover,
.sidebar-toc__link:focus-visible,
.sidebar-toc__link.is-active {
    color: var(--color-primary-strong);
    background-color: transparent;
}

.back-to-top {
    position: fixed;
    z-index: 70;
    right: max(1.25rem, calc((100vw - 1440px) / 2));
    bottom: 2rem;
    display: grid;
    width: 52px;
    min-height: 52px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--shape-corner-large);
    visibility: hidden;
    opacity: 0;
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: var(--shadow);
    transform: translateY(18px) scale(0.92);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.back-to-top.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes mellow-fade-up {
    from {
        opacity: 0;
        translate: 0 22px;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

.mellow-animations-enabled .home-hero--card,
.mellow-animations-enabled .post-card,
.mellow-animations-enabled .friend-links,
.mellow-animations-enabled .sidebar-card {
    opacity: 0;
    animation: mellow-fade-up 320ms ease-out forwards;
}

.mellow-animations-enabled.mellow-article-animations-enabled .article {
    opacity: 0;
    animation: mellow-fade-up 320ms ease-out forwards;
}

.mellow-animations-enabled .post-card:nth-child(2) {
    animation-delay: 70ms;
}

.mellow-animations-enabled .post-card:nth-child(3) {
    animation-delay: 120ms;
}

.mellow-animations-enabled .post-card:nth-child(4) { animation-delay: 170ms; }
.mellow-animations-enabled .post-card:nth-child(5) { animation-delay: 220ms; }
.mellow-animations-enabled .post-card:nth-child(6) { animation-delay: 270ms; }
.mellow-animations-enabled .post-card:nth-child(7) { animation-delay: 320ms; }
.mellow-animations-enabled .post-card:nth-child(n+8) { animation-delay: 370ms; }

.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(1) { animation-delay: 80ms; }
.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(2) { animation-delay: 130ms; }
.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(3) { animation-delay: 180ms; }
.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(4) { animation-delay: 230ms; }
.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(5) { animation-delay: 280ms; }
.mellow-animations-enabled .sidebar > .sidebar-card:nth-child(n+6) { animation-delay: 330ms; }

@media (max-width: 900px) {
    .top-bar {
        isolation: isolate;
    }

    /* Keep the focus veil behind the header and its attached search panel. */
    .top-bar::before {
        position: fixed;
        z-index: -1;
        inset: 0;
        content: "";
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        background: rgba(225, 231, 235, 0.34);
        background: color-mix(in srgb, var(--color-background) 34%, transparent);
        -webkit-backdrop-filter: blur(0);
        backdrop-filter: blur(0);
        transition: opacity 180ms ease,
            -webkit-backdrop-filter 180ms ease,
            backdrop-filter 180ms ease,
            visibility 0s linear 180ms;
    }

    .top-bar:has(.mobile-search-panel:not([hidden]))::before,
    .top-bar:has(.mobile-toc-panel:not([hidden]))::before {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        -webkit-backdrop-filter: blur(9px);
        backdrop-filter: blur(9px);
        transition-delay: 0s;
    }

    .top-bar__inner {
        gap: 0.25rem;
        transition:
            border-bottom-left-radius 220ms var(--mellow-motion-easing),
            border-bottom-right-radius 220ms var(--mellow-motion-easing);
    }

    .top-bar__inner:has(> .site-nav.is-open) {
        border-bottom-right-radius: 0;
    }

    /* The search panel is as wide as the header, so its open state becomes
       one continuous surface instead of exposing the header's lower arcs. */
    .top-bar__inner:has(> .mobile-search-panel:not([hidden])),
    .top-bar__inner:has(> .mobile-toc-panel:not([hidden])) {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    .site-brand {
        min-width: 0;
        margin-right: auto;
        flex: 1 1 auto;
    }

    .site-brand__text {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-brand__mark {
        flex: 0 0 38px;
    }

    .site-brand__mark--home {
        flex-basis: 30px;
    }

    .site-actions {
        margin-left: 0;
        gap: 0.1rem;
    }

    .mobile-menu-toggle {
        display: grid;
    }

    .site-actions .mobile-search-toggle,
    .site-actions .mobile-toc-toggle:not([hidden]) {
        display: grid;
    }

    /*
     * The search panel is positioned against the header itself, while the
     * two picker panels are positioned against their 42px triggers.  Keep a
     * one-pixel overlap in both cases so fractional viewport scaling cannot
     * expose the page background between the header and an attached panel.
     */
    .theme-color-panel,
    .theme-mode-panel,
    .header-social-panel {
        top: calc(100% + 10px);
        border: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
        background: var(--color-surface);
        box-shadow: var(--shadow-attached-menu);
    }

    .mobile-search-panel,
    .mobile-toc-panel {
        position: absolute;
        z-index: 96;
        top: calc(100% - 1px);
        right: 0;
        left: 0;
        display: block;
        padding: 0.65rem;
        border: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
        background: var(--color-surface);
        box-shadow: var(--shadow-attached-menu);
        transform-origin: top center;
        animation: mellow-mobile-panel-in 220ms var(--mellow-motion-easing) both;
    }

    .mobile-toc-panel {
        max-height: calc(100dvh - 78px);
        padding: 0.75rem;
        overflow: hidden;
    }

    .mobile-toc-panel__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.15rem 0.15rem 0.65rem 0.45rem;
    }

    .mobile-toc-panel__header h2 {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        font-size: 1rem;
    }

    .mobile-toc-panel__header h2 i {
        color: var(--color-primary);
    }

    .mobile-toc-panel__close {
        display: grid;
        width: 40px;
        height: 40px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: var(--shape-corner-full);
        color: var(--color-text-muted);
        background: transparent;
    }

    .mobile-toc-panel__close:is(:hover, :focus-visible) {
        color: var(--color-text);
        background: var(--color-plain-hover);
    }

    .mobile-toc-panel__nav {
        max-height: min(56dvh, 430px);
        padding: 0 0.1rem 0.4rem;
        overflow-y: auto;
        scroll-padding-block: 0.4rem;
        scrollbar-width: thin;
        scrollbar-color: var(--color-button-bg-active) transparent;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .mobile-toc-panel__nav::-webkit-scrollbar {
        display: block;
    }

    .mobile-toc-panel__nav .sidebar-toc__link {
        display: flex;
        min-height: 44px;
        align-items: center;
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
    }

    .mobile-toc-panel__nav .sidebar-toc__link--h3 {
        padding-left: 1.55rem;
        font-size: 0.84rem;
    }

    .mobile-search-panel form {
        position: relative;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.45rem;
        min-height: 48px;
        padding-left: 0.85rem;
        border-radius: var(--shape-corner-medium);
        background: var(--color-plain-hover);
    }

    .mobile-search-panel form > i {
        color: var(--color-text-muted);
    }

    .mobile-search-panel input {
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
    }

    .mobile-search-panel button {
        min-height: 38px;
        margin-right: 0.35rem;
        padding-inline: 0.9rem;
        color: var(--color-button-content);
        background: var(--color-button-bg);
    }

    .site-nav {
        position: absolute;
        z-index: 94;
        top: calc(100% - 1px);
        right: 0;
        left: auto;
        display: none;
        width: min(78vw, 280px);
        max-height: calc(100dvh - 74px);
        padding: 0.55rem;
        overflow-y: auto;
        border: 0;
        border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
        opacity: 0;
        background: var(--color-surface);
        box-shadow: var(--shadow-attached-menu);
        transform: translateY(-6px) scale(0.98);
        transform-origin: top right;
        transition: opacity 160ms ease, transform 160ms ease;
    }

    .site-nav.is-open {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        opacity: 1;
        transform: translateY(0);
        animation: mellow-picker-in 160ms ease-out;
    }

    .site-nav > .nav-link,
    .site-nav > .nav-menu > .nav-link {
        width: 100%;
        min-height: 50px;
        padding: 0.65rem 0.8rem;
        justify-content: flex-start;
        border-radius: var(--shape-corner-medium);
        font-size: 1rem;
        font-weight: 650;
    }

    .site-nav > .nav-link::after {
        width: 0.48rem;
        height: 0.48rem;
        margin-left: auto;
        flex: 0 0 auto;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        color: var(--color-primary);
        content: "";
        transform: rotate(45deg);
    }

    .site-nav .nav-menu {
        width: 100%;
    }

    .site-nav .nav-menu__panel {
        position: static;
        display: none;
        width: 100%;
        max-height: none;
        margin-top: 0;
        padding: 0.1rem 0 0.35rem;
        overflow: visible;
        border: 0;
        border-radius: 0;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        background: transparent;
        transform: none;
    }

    .site-nav .nav-menu__chevron {
        display: block;
        margin-left: auto;
        color: var(--color-primary);
        transform: rotate(-90deg);
    }

    .site-nav .nav-menu:hover .nav-menu__chevron,
    .site-nav .nav-menu:focus-within .nav-menu__chevron {
        transform: rotate(-90deg);
    }

    .site-nav .nav-menu.is-submenu-open .nav-menu__chevron,
    .site-nav .nav-menu.is-submenu-open:hover .nav-menu__chevron,
    .site-nav .nav-menu.is-submenu-open:focus-within .nav-menu__chevron {
        transform: rotate(0);
    }

    .site-nav .nav-menu.is-submenu-open .nav-menu__panel {
        display: block;
        animation: mellow-picker-in 160ms ease-out;
    }

    .site-nav .nav-menu__panel > a {
        padding-left: 1.8rem;
    }

    .site-nav .nav-menu__group {
        margin-top: 0.15rem;
        padding-top: 0.15rem;
        border-top: 0;
    }

    .site-nav .nav-menu__label {
        padding-left: 1.8rem;
    }

    .site-nav .nav-menu__group a {
        padding-left: 2.7rem;
    }

    .sidebar-toc {
        position: static;
    }

    .back-to-top {
        display: none;
    }
}

/*
 * Extend the optional title-bar glass treatment to surfaces that are
 * visually attached to it. Nested submenus intentionally remain transparent
 * so they inherit the outer glass surface instead of stacking another blur.
 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.mellow-header-glass :where(
        .nav-menu__panel,
        .header-social-panel,
        .theme-color-panel,
        .theme-mode-panel,
        .mobile-search-panel,
        .mobile-toc-panel
    ) {
        background: var(--mellow-header-glass-panel-surface);
        -webkit-backdrop-filter: var(--mellow-header-glass-filter);
        backdrop-filter: var(--mellow-header-glass-filter);
    }

    body.mellow-header-glass :where(
        .header-social-panel,
        .theme-color-panel,
        .theme-mode-panel
    ) {
        animation-name: mellow-glass-panel-in;
    }

    html.is-dark body.mellow-header-glass :where(
        .nav-menu__panel,
        .header-social-panel,
        .theme-color-panel,
        .theme-mode-panel,
        .mobile-search-panel,
        .mobile-toc-panel
    ) {
        background: var(--mellow-header-glass-panel-surface);
    }

    @media (min-width: 901px) {
        /* Solid surfaces use a one-pixel overlap to hide fractional scaling
           seams. Two translucent layers would compound their opacity there,
           so glass surfaces meet exactly at the title-bar boundary instead. */
        body.mellow-header-glass .nav-menu__panel {
            top: calc(100% + 12px);
            transform: scale(0.98);
        }

        body.mellow-header-glass :where(
            .header-social-panel,
            .theme-color-panel,
            .theme-mode-panel
        ) {
            top: calc(100% + 14px);
        }
    }

    @media (max-width: 900px) {
        body.mellow-header-glass :where(
            .theme-color-panel,
            .theme-mode-panel,
            .header-social-panel
        ) {
            top: calc(100% + 11px);
        }

        body.mellow-header-glass :where(
            .mobile-search-panel,
            .mobile-toc-panel,
            .site-nav.is-open
        ) {
            top: 100%;
        }

        body.mellow-header-glass :where(
            .mobile-search-panel,
            .mobile-toc-panel
        ) {
            animation-name: mellow-glass-attached-panel-in;
        }

        body.mellow-header-glass .site-nav.is-open {
            background: var(--mellow-header-glass-panel-surface);
            -webkit-backdrop-filter: var(--mellow-header-glass-filter);
            backdrop-filter: var(--mellow-header-glass-filter);
            animation-name: mellow-glass-panel-in;
        }

        body.mellow-header-glass .site-nav .nav-menu__panel {
            background: transparent;
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero--card,
    .article,
    .post-card,
    .friend-links,
    .sidebar-card {
        opacity: 1;
        animation: none;
    }
}
