/* Technical notebook theme */
:root {
    --bg-color: #f5f7f8;
    --surface-color: #ffffff;
    --surface-muted: #eef2f4;
    --text-color: #172026;
    --muted-color: #687782;
    --soft-text: #88949c;
    --page-glow: rgba(168, 85, 247, 0.07);
    --page-image: url("./imgs/bg_img/bg1.jpg");
    --page-image-position: center 28%;
    --page-overlay-top: rgba(247, 240, 247, 0.48);
    --page-overlay-bottom: rgba(245, 247, 248, 0.82);
    --page-image-tint: rgba(168, 85, 247, 0.12);
    --glass-strong: rgba(255, 255, 255, 0.62);
    --glass-soft: rgba(255, 255, 255, 0.18);
    --sidebar-bg: #fbf9ff;
    --sidebar-panel: #ffffff;
    --sidebar-text: #172026;
    --sidebar-muted: #756987;
    --sidebar-border: #e6ddf2;
    --sidebar-hover: #f4edff;
    --sidebar-active: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.08));
    --sidebar-input-bg: #ffffff;
    --sidebar-input-border: #ded2ef;
    --sidebar-chip-bg: #f2e9ff;
    --sidebar-mark-border: #dcc7ef;
    --border-color: #e5dfec;
    --strong-border: #d5c8e3;
    --accent-color: #a855f7;
    --accent-strong: #8b2edb;
    --accent-soft: rgba(168, 85, 247, 0.14);
    --warning-color: #ec4899;
    --danger-color: #d84c4c;
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --code-border: rgba(56, 189, 248, 0.24);
    --code-accent: #22d3ee;
    --code-selection-bg: #164e63;
    --code-selection-text: #ecfeff;
    --shadow: 0 18px 45px rgba(22, 32, 38, 0.08);
    --radius: 8px;
    --sidebar-width: 300px;
    --rightbar-width: 260px;
}

[data-theme="dark"] {
    --bg-color: #0f1214;
    --surface-color: #171b1f;
    --surface-muted: #20262b;
    --text-color: #e9eef2;
    --muted-color: #a3adb5;
    --soft-text: #77828b;
    --page-glow: rgba(192, 132, 252, 0.09);
    --page-overlay-top: rgba(10, 12, 16, 0.26);
    --page-overlay-bottom: rgba(10, 12, 16, 0.62);
    --page-image-tint: rgba(192, 132, 252, 0.16);
    --glass-strong: rgba(12, 15, 20, 0.48);
    --glass-soft: rgba(12, 15, 20, 0.14);
    --sidebar-bg: #0e0b14;
    --sidebar-panel: #171120;
    --sidebar-text: #edf5f6;
    --sidebar-muted: #9a8caf;
    --sidebar-border: rgba(244, 214, 255, 0.1);
    --sidebar-hover: rgba(216, 180, 254, 0.1);
    --sidebar-active: linear-gradient(90deg, rgba(192, 132, 252, 0.24), rgba(244, 114, 182, 0.1));
    --sidebar-input-bg: rgba(255, 255, 255, 0.05);
    --sidebar-input-border: rgba(244, 214, 255, 0.12);
    --sidebar-chip-bg: rgba(216, 180, 254, 0.1);
    --sidebar-mark-border: rgba(244, 214, 255, 0.18);
    --border-color: #30283a;
    --strong-border: #4b3d5e;
    --accent-color: #c084fc;
    --accent-strong: #f0abfc;
    --accent-soft: rgba(192, 132, 252, 0.16);
    --warning-color: #f472b6;
    --danger-color: #ff6b6b;
    --code-bg: #0b1220;
    --code-text: #e2e8f0;
    --code-border: rgba(45, 212, 191, 0.26);
    --code-accent: #2dd4bf;
    --code-selection-bg: #134e4a;
    --code-selection-text: #ecfeff;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    transition: background-color 0.2s ease, color 0.2s ease;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

::selection {
    background: color-mix(in srgb, var(--accent-color) 28%, transparent);
    color: inherit;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(104, 119, 130, 0.35);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(104, 119, 130, 0.56);
    border: 2px solid transparent;
    background-clip: content-box;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    min-height: 0;
    position: relative;
    isolation: isolate;
}

.app-container::before,
.app-container::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.app-container::before {
    z-index: -2;
    background:
        linear-gradient(180deg, var(--page-overlay-top), var(--page-overlay-bottom)),
        linear-gradient(90deg, var(--page-image-tint), transparent 38%),
        var(--page-image) var(--page-image-position) / cover no-repeat;
    transform: scale(1.03);
    transform-origin: center;
}

.app-container::after {
    z-index: -1;
    background:
        radial-gradient(circle at top left, var(--page-glow), transparent 32%),
        radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--warning-color) 10%, transparent), transparent 24%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E") 0 0 / 140px 140px repeat;
    background-blend-mode: normal, normal, soft-light;
    opacity: 0.88;
}

.sidebar-backdrop {
    display: none;
}

.startup-intro {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: block;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(8, 11, 16, 0.88), rgba(14, 12, 18, 0.74)),
        var(--page-image) var(--page-image-position) / cover no-repeat;
    color: #f8fbff;
    transition: opacity 0.9s ease, visibility 0.9s ease, transform 0.9s ease;
}

.startup-intro.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.035);
}

.startup-intro::before,
.startup-intro::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
}

.startup-intro::before {
    background:
        radial-gradient(ellipse at 18% 44%, rgba(255, 255, 255, 0.64), transparent 34%),
        radial-gradient(ellipse at 48% 52%, rgba(221, 235, 255, 0.45), transparent 38%),
        radial-gradient(ellipse at 76% 42%, rgba(255, 255, 255, 0.5), transparent 32%);
    filter: blur(34px);
    opacity: 0.72;
    transform: translateX(-38%) translateY(3%) scale(1.08);
    animation: mistBank 2.7s cubic-bezier(0.2, 0.72, 0.24, 1) forwards;
}

.startup-intro::after {
    background:
        radial-gradient(ellipse at 24% 62%, rgba(255, 255, 255, 0.44), transparent 32%),
        radial-gradient(ellipse at 58% 36%, rgba(204, 231, 255, 0.3), transparent 34%),
        radial-gradient(ellipse at 90% 56%, rgba(255, 255, 255, 0.36), transparent 34%);
    filter: blur(54px);
    opacity: 0.6;
    transform: translateX(-55%) translateY(-4%) scale(1.2);
    animation: mistBank 3.25s cubic-bezier(0.2, 0.72, 0.24, 1) 0.08s forwards;
}

.startup-mist {
    position: absolute;
    left: -38vw;
    width: 74vw;
    min-width: 720px;
    height: 34vh;
    border-radius: 999px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.58), transparent 44%),
        radial-gradient(ellipse at 50% 44%, rgba(237, 244, 255, 0.5), transparent 45%),
        radial-gradient(ellipse at 78% 54%, rgba(255, 255, 255, 0.38), transparent 46%);
    filter: blur(28px);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
}

.startup-mist-a {
    top: 22%;
    animation: mistRibbon 2.65s cubic-bezier(0.16, 0.8, 0.28, 1) forwards;
}

.startup-mist-b {
    top: 42%;
    height: 40vh;
    animation: mistRibbon 3.05s cubic-bezier(0.16, 0.8, 0.28, 1) 0.12s forwards;
}

.startup-mist-c {
    top: 58%;
    height: 28vh;
    opacity: 0;
    animation: mistRibbon 2.8s cubic-bezier(0.16, 0.8, 0.28, 1) 0.24s forwards;
}

.startup-glow {
    position: absolute;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E") 0 0 / 180px 180px repeat,
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.12), transparent 26%),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-blend-mode: screen, normal, normal;
    opacity: 0;
    animation: mistLight 2.8s ease forwards;
    pointer-events: none;
}

.startup-whisper {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.startup-whisper span {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(22px, 4vw, 46px);
    font-weight: 780;
    line-height: 1;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.34);
    opacity: 0;
    transform: translateY(8px);
    animation: mistTitle 2.3s ease forwards;
}

.app-container.is-entering .sidebar-left,
.app-container.is-entering .main-content,
.app-container.is-entering .sidebar-right {
    animation: appSurfaceIn 0.72s ease both;
}

.app-container.is-entering .main-content {
    animation-delay: 0.06s;
}

.app-container.is-entering .sidebar-right {
    animation-delay: 0.12s;
}

@keyframes mistRibbon {
    0% {
        opacity: 0;
        transform: translate3d(-18vw, 4vh, 0) scale(0.94);
    }
    22% {
        opacity: 0.86;
    }
    68% {
        opacity: 0.58;
    }
    100% {
        opacity: 0;
        transform: translate3d(155vw, -3vh, 0) scale(1.18);
    }
}

@keyframes mistBank {
    0% {
        opacity: 0;
    }
    18% {
        opacity: 0.78;
    }
    100% {
        opacity: 0;
        transform: translateX(62%) translateY(-2%) scale(1.24);
    }
}

@keyframes mistLight {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.82;
    }
    100% {
        opacity: 0;
    }
}

@keyframes mistTitle {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    24%,
    62% {
        opacity: 0.72;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes appSurfaceIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .startup-intro::before,
    .startup-intro::after,
    .startup-mist,
    .startup-glow,
    .startup-whisper span,
    .app-container.is-entering .sidebar-left,
    .app-container.is-entering .main-content,
    .app-container.is-entering .sidebar-right {
        animation: none;
    }

    .startup-intro {
        transition-duration: 0.18s;
    }

    .notes-container,
    .note-item,
    .expand-icon {
        transition-duration: 0.01ms;
        transition-delay: 0s;
    }
}

@media (max-width: 820px) {
    .app-container.is-entering .sidebar-left {
        animation: none;
    }
}

.sidebar-left,
.sidebar-right {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-left {
    width: var(--sidebar-width);
    min-width: 220px;
    max-width: 500px;
    background: color-mix(in srgb, var(--sidebar-bg) 76%, transparent);
    color: var(--sidebar-text);
    border-right: 1px solid var(--sidebar-border);
    backdrop-filter: blur(16px) saturate(115%);
}

.sidebar-right {
    width: var(--rightbar-width);
    min-width: 200px;
    max-width: 400px;
    background: color-mix(in srgb, var(--surface-color) 58%, transparent);
    border-left: 1px solid var(--border-color);
    backdrop-filter: blur(16px) saturate(115%);
}

.app-container.home-layout .sidebar-right,
.app-container.home-layout .resizer-right {
    display: none;
}

.site-panel {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--sidebar-border);
}

.site-pages-panel {
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header-lite {
    padding: 6px 0 10px;
    border: 0;
}

.site-pages-nav {
    display: grid;
    gap: 8px;
}

.site-page-link {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--sidebar-border) 86%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--sidebar-panel) 74%, transparent);
    color: var(--sidebar-muted);
    text-align: left;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.site-page-link:hover {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--sidebar-border));
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
    transform: translateX(1px);
}

.site-page-link.active {
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--sidebar-border));
    background: var(--sidebar-active);
    color: var(--sidebar-text);
    box-shadow: inset 2px 0 0 var(--accent-color);
}

.site-page-name {
    font-size: 13px;
    font-weight: 700;
}

.site-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--sidebar-mark-border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--warning-color) 18%, transparent)),
        var(--sidebar-panel);
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.site-title {
    font-size: 17px;
    font-weight: 750;
    line-height: 1.2;
}

.site-subtitle {
    margin-top: 4px;
    color: var(--sidebar-muted);
    font-size: 12px;
    letter-spacing: 0;
}

.sidebar-tools {
    padding: 14px 16px 6px;
}

.search-box {
    display: flex;
    align-items: center;
    height: 38px;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--sidebar-input-border);
    border-radius: var(--radius);
    background: var(--sidebar-input-bg);
    color: var(--sidebar-muted);
}

.search-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 5px;
    background: var(--sidebar-chip-bg);
    color: var(--accent-color);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.search-box:focus-within {
    border-color: color-mix(in srgb, var(--accent-color) 72%, var(--sidebar-input-border));
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--sidebar-text);
    font-size: 13px;
}

.search-box input::placeholder {
    color: var(--sidebar-muted);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-left .sidebar-header {
    border-bottom-color: var(--sidebar-border);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-count,
.reading-percent {
    color: var(--soft-text);
    font-size: 12px;
}

.outline-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reading-percent {
    min-width: 34px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.outline-top-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.sidebar-left .sidebar-count {
    color: var(--sidebar-muted);
}

.file-tree,
.outline-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.file-tree {
    padding: 10px 10px 18px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.file-tree::-webkit-scrollbar {
    display: none;
}

.outline-container {
    padding: 12px 14px 18px;
}

.category-item {
    margin: 0 0 8px;
}

.category-header,
.note-item,
.outline-item {
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
}

.category-header {
    gap: 9px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--sidebar-muted);
}

.category-header:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.category-icon {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--warning-color);
    box-shadow: 0 0 0 4px rgba(216, 151, 0, 0.12);
    font-size: 0;
}

.category-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: 13px;
    font-weight: 720;
}

.category-count {
    margin-left: auto;
    min-width: 16px;
    color: var(--sidebar-muted);
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.expand-icon {
    width: 8px;
    height: 8px;
    margin-left: 8px;
    flex: 0 0 auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: var(--sidebar-muted);
    opacity: 0.72;
    transform: translateY(-1px) rotate(-45deg);
    transition: transform 0.24s ease, color 0.18s ease, opacity 0.18s ease;
}

.category-header:hover .expand-icon {
    color: var(--accent-color);
    opacity: 1;
}

.notes-container {
    max-height: 0;
    overflow: hidden;
    margin-left: 13px;
    padding: 0 0 0 13px;
    border-left: 1px solid color-mix(in srgb, var(--sidebar-border) 72%, transparent);
    opacity: 0;
    transform: translateY(-4px);
    transition:
        max-height 0.34s cubic-bezier(0.22, 0.78, 0.22, 1),
        opacity 0.2s ease,
        padding-top 0.24s ease,
        transform 0.28s ease;
}

.category-item.expanded .notes-container {
    max-height: 1200px;
    padding-top: 3px;
    opacity: 1;
    transform: translateY(0);
}

.category-item.expanded .expand-icon {
    transform: translateY(-1px) rotate(45deg);
}

.note-item {
    position: relative;
    gap: 7px;
    min-height: 32px;
    margin: 2px 0;
    padding: 6px 10px 6px 9px;
    color: var(--sidebar-muted);
    font-size: 13px;
    opacity: 0;
    transform: translateX(18px);
    transition:
        opacity 0.24s ease,
        transform 0.3s cubic-bezier(0.22, 0.78, 0.22, 1),
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
    will-change: transform, opacity;
}

.category-item.expanded .note-item {
    opacity: 1;
    transform: translateX(0);
}

.category-item:not(.expanded) .note-item {
    transition-delay: 0s;
}

.category-item.expanded .note-item:nth-child(1) {
    transition-delay: 0.03s;
}

.category-item.expanded .note-item:nth-child(2) {
    transition-delay: 0.06s;
}

.category-item.expanded .note-item:nth-child(3) {
    transition-delay: 0.09s;
}

.category-item.expanded .note-item:nth-child(4) {
    transition-delay: 0.12s;
}

.category-item.expanded .note-item:nth-child(5) {
    transition-delay: 0.15s;
}

.category-item.expanded .note-item:nth-child(6) {
    transition-delay: 0.18s;
}

.category-item.expanded .note-item:nth-child(7) {
    transition-delay: 0.21s;
}

.category-item.expanded .note-item:nth-child(8) {
    transition-delay: 0.24s;
}

.category-item.expanded .note-item:nth-child(n + 9) {
    transition-delay: 0.27s;
}

.note-item[hidden] {
    display: none;
}

.note-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.note-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
    box-shadow: inset 3px 0 0 var(--accent-color);
}

.note-icon {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    font-size: 0;
    transition: opacity 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.note-item:hover .note-icon {
    background: color-mix(in srgb, var(--accent-color) 70%, var(--sidebar-muted));
    opacity: 0.85;
}

.note-item.active .note-icon {
    background: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-soft);
    opacity: 1;
}

.note-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-message,
.empty-outline,
.welcome-message,
.error-message,
.no-results-message {
    padding: 20px;
    color: var(--muted-color);
    font-size: 14px;
    text-align: center;
}

.sidebar-left .empty-message,
.sidebar-left .no-results-message {
    color: var(--sidebar-muted);
}

.error-message {
    color: var(--danger-color);
}

.main-content {
    position: relative;
    display: flex;
    min-width: 360px;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-color) 62%, transparent);
    backdrop-filter: blur(12px) saturate(112%);
}

.reading-progress {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    height: 3px;
    background: transparent;
}

.reading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--warning-color));
    transition: width 0.08s linear;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--border-color);
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
}

.title-block {
    min-width: 0;
}

.content-kicker {
    margin-bottom: 4px;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 680;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-header h1 {
    margin: 0;
    overflow: hidden;
    color: var(--text-color);
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 760;
    line-height: 1.24;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.btn,
.code-copy-btn,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 650;
}

.btn:hover {
    border-color: var(--strong-border);
    background: var(--surface-muted);
}

.btn.active {
    border-color: color-mix(in srgb, var(--accent-color) 55%, var(--border-color));
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
}

.icon-btn:hover {
    background: var(--surface-muted);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.content-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 34px clamp(22px, 5vw, 64px) 56px;
    background: linear-gradient(180deg, var(--glass-soft), transparent 240px);
    scroll-behavior: smooth;
    scroll-padding-top: 22px;
}

.markdown-body {
    width: min(900px, 100%);
    margin: 0 auto;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.78;
    overflow-wrap: anywhere;
}

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

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--text-color);
    font-weight: 760;
    line-height: 1.3;
    scroll-margin-top: 24px;
}

.markdown-body h1 {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: clamp(30px, 5vw, 46px);
    letter-spacing: 0;
}

.markdown-body h2 {
    position: relative;
    margin: 42px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
    font-size: 25px;
}

.markdown-body h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 72px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent-color) 88%, transparent), transparent);
}

.markdown-body h3 {
    position: relative;
    margin: 30px 0 12px;
    font-size: 20px;
}

.markdown-body h4 {
    position: relative;
    margin: 24px 0 10px;
    font-size: 17px;
}

.markdown-body .heading-anchor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 10px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 18%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color) 84%, transparent);
    color: var(--muted-color);
    vertical-align: middle;
    opacity: 0;
    transform: translateY(-1px);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.markdown-body .heading-anchor::before {
    content: "#";
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.markdown-body h2:hover .heading-anchor,
.markdown-body h3:hover .heading-anchor,
.markdown-body h4:hover .heading-anchor,
.markdown-body .heading-anchor:focus-visible {
    opacity: 1;
}

.markdown-body .heading-anchor:hover,
.markdown-body .heading-anchor:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 52%, var(--border-color));
    background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface-color));
    color: var(--accent-strong);
    transform: translateY(-2px);
}

.markdown-body .heading-anchor.copied {
    border-color: color-mix(in srgb, var(--code-accent) 58%, var(--border-color));
    background: color-mix(in srgb, var(--code-accent) 18%, var(--surface-color));
    color: var(--code-accent);
    opacity: 1;
}

.markdown-body .heading-anchor.copied::before {
    content: "✓";
}

@media (hover: none) {
    .markdown-body .heading-anchor {
        opacity: 1;
    }
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body table,
.markdown-body pre {
    margin-top: 0;
    margin-bottom: 18px;
}

.markdown-body p {
    color: color-mix(in srgb, var(--text-color) 92%, var(--muted-color));
}

.markdown-body a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-color) 35%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.markdown-body a:hover {
    text-decoration-color: var(--accent-color);
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 24px;
}

.markdown-body li {
    margin: 5px 0;
}

.markdown-body li::marker {
    color: var(--accent-color);
}

.markdown-body blockquote {
    position: relative;
    overflow: hidden;
    padding: 18px 20px 18px 24px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 18%, var(--border-color));
    border-left: 4px solid var(--accent-color);
    border-radius: 16px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 22%, var(--surface-muted)), color-mix(in srgb, var(--surface-color) 95%, var(--surface-muted)));
    color: var(--muted-color);
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
}

.markdown-body blockquote::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 32%, transparent), transparent 44%);
    pointer-events: none;
}

.markdown-body blockquote::after {
    content: "“";
    position: absolute;
    top: 10px;
    right: 16px;
    color: color-mix(in srgb, var(--accent-color) 22%, transparent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1;
    pointer-events: none;
}

.markdown-body blockquote > * {
    position: relative;
    z-index: 1;
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-body hr {
    height: 1px;
    margin: 34px 0;
    border: 0;
    background: var(--border-color);
}

.markdown-body code {
    padding: 0.14em 0.38em;
    border: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
    border-radius: 5px;
    background: var(--surface-muted);
    color: color-mix(in srgb, var(--accent-strong) 82%, var(--text-color));
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

.markdown-body pre,
.markdown-body pre[class*="language-"] {
    position: relative;
    overflow-x: auto;
    padding: 18px 18px 20px;
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    background: var(--code-bg) !important;
    box-shadow: 0 18px 42px rgba(8, 15, 28, 0.3);
}

.markdown-body pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    right: 54px;
    color: rgba(148, 163, 184, 0.78);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.markdown-body pre code,
.markdown-body pre[class*="language-"] code {
    display: block;
    overflow-x: visible;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: var(--code-text) !important;
    font-family: Consolas, "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Menlo, "Liberation Mono", monospace !important;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.72;
    text-shadow: none !important;
    white-space: pre;
}

.markdown-body pre[class*="language-"],
.markdown-body code[class*="language-"],
.markdown-body pre code *,
.markdown-body pre[class*="language-"] code * {
    text-shadow: none !important;
}

.markdown-body pre .token.operator,
.markdown-body pre .token.entity,
.markdown-body pre .token.url {
    background: transparent !important;
}

.markdown-body pre .token.comment,
.markdown-body pre .token.prolog,
.markdown-body pre .token.doctype,
.markdown-body pre .token.cdata {
    color: #64748b;
}

.markdown-body pre .token.punctuation {
    color: #cbd5e1;
}

.markdown-body pre .token.boolean,
.markdown-body pre .token.constant,
.markdown-body pre .token.deleted,
.markdown-body pre .token.number,
.markdown-body pre .token.property,
.markdown-body pre .token.symbol,
.markdown-body pre .token.tag {
    color: #f59e0b;
}

.markdown-body pre .token.attr-name,
.markdown-body pre .token.builtin,
.markdown-body pre .token.char,
.markdown-body pre .token.inserted,
.markdown-body pre .token.selector,
.markdown-body pre .token.string {
    color: #34d399;
}

.markdown-body pre .token.atrule,
.markdown-body pre .token.attr-value,
.markdown-body pre .token.keyword {
    color: #38bdf8;
}

.markdown-body pre .token.class-name,
.markdown-body pre .token.function {
    color: #facc15;
}

.markdown-body pre .token.important,
.markdown-body pre .token.regex,
.markdown-body pre .token.variable {
    color: #60a5fa;
}

.markdown-body pre::selection,
.markdown-body pre code::selection,
.markdown-body pre code *::selection {
    background: var(--code-selection-bg) !important;
    color: var(--code-selection-text) !important;
    text-shadow: none !important;
}

.markdown-body pre::-moz-selection,
.markdown-body pre code::-moz-selection,
.markdown-body pre code *::-moz-selection {
    background: var(--code-selection-bg) !important;
    color: var(--code-selection-text) !important;
    text-shadow: none !important;
}

.code-copy-btn {
    position: absolute;
    top: 7px;
    right: 8px;
    min-height: 27px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(232, 237, 240, 0.82);
    font-size: 12px;
    opacity: 0;
}

.markdown-body pre:hover .code-copy-btn,
.code-copy-btn:focus-visible {
    opacity: 1;
}

.code-copy-btn:hover {
    background: color-mix(in srgb, var(--code-accent) 34%, transparent);
    color: #ffffff;
}

.copy-success {
    position: absolute;
    top: 7px;
    right: 8px;
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--code-accent), #14b8a6);
    color: #04131d;
    font-size: 12px;
    font-weight: 700;
    animation: fadeOut 1.5s ease forwards;
}

@keyframes fadeOut {
    0%,
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    border-spacing: 0;
}

.markdown-body table th,
.markdown-body table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.markdown-body table th {
    background: var(--surface-muted);
    color: var(--text-color);
    font-weight: 720;
}

.markdown-body table tr:nth-child(even) td {
    background: color-mix(in srgb, var(--surface-muted) 44%, transparent);
}

.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.markdown-body img:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
    box-shadow: 0 24px 42px rgba(16, 24, 40, 0.16);
}

.markdown-body img[width*="50"],
.markdown-body img[style*="width: 50"] {
    max-width: 50%;
}

.markdown-body img[width*="30"],
.markdown-body img[style*="width: 30"] {
    max-width: 30%;
}

.markdown-body .markdown-media {
    margin: 28px 0 30px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    transition: transform 0.2s ease;
}

.markdown-body .markdown-media img {
    margin: 0 auto;
    border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
    border-radius: 16px;
    box-shadow:
        0 22px 44px rgba(8, 15, 28, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.markdown-body .markdown-media:hover {
    transform: translateY(-1px);
}

.markdown-body .markdown-media:hover img {
    border-color: color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
    box-shadow:
        0 28px 56px rgba(8, 15, 28, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.markdown-body .image-caption {
    margin: 12px 0 2px;
    padding-top: 0;
    border-top: 0;
    color: var(--muted-color);
    font-size: 12.5px;
    line-height: 1.6;
    text-align: center;
}

.markdown-body div[style*="background: linear-gradient"] {
    border-radius: var(--radius) !important;
    background: linear-gradient(135deg, var(--accent-strong), color-mix(in srgb, var(--warning-color) 72%, var(--accent-color))) !important;
    box-shadow: var(--shadow);
}

.home-shell {
    display: grid;
    gap: 14px;
    margin: 4px 0 36px;
}

.home-shell > * {
    animation: homeReveal 0.55s ease both;
}

.home-shell > *:nth-child(2) {
    animation-delay: 0.08s;
}

@keyframes homeReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 20px;
    align-items: stretch;
    padding: 28px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 16%, var(--border-color));
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 34%),
        linear-gradient(145deg, color-mix(in srgb, var(--surface-color) 96%, var(--bg-color)), color-mix(in srgb, var(--surface-color) 78%, var(--bg-color)));
    box-shadow: var(--shadow);
}

.home-hero::before {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--warning-color) 18%, transparent), transparent 68%);
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    top: 26px;
    right: 26px;
    width: 150px;
    height: 150px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 22%, transparent);
    border-radius: 24px;
    opacity: 0.45;
    transform: rotate(12deg);
    pointer-events: none;
}

.home-hero-copy,
.home-hero-side {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.home-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-eyebrow,
.home-card-label,
.home-strip-kicker,
.home-route-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-eyebrow::before,
.home-card-label::before,
.home-strip-kicker::before,
.home-route-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.markdown-body .home-hero-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text-color);
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 820;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.home-hero-lead {
    max-width: 60ch;
    margin: 18px 0 0;
    color: var(--muted-color);
    font-size: 16px;
}

.home-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.home-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface-color));
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.markdown-body .home-actions a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-color));
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 740;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.markdown-body .home-actions a:hover {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-soft) 86%, var(--surface-muted));
    transform: translateY(-1px);
}

.markdown-body .home-actions a.home-action-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    color: #ffffff;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--accent-color) 26%, transparent);
}

.home-terminal {
    display: flex;
    height: 100%;
    min-height: 100%;
    flex-direction: column;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--code-bg) 88%, #08070d), color-mix(in srgb, var(--surface-color) 6%, var(--code-bg)));
    box-shadow: 0 22px 44px rgba(8, 10, 14, 0.28);
}

.home-terminal-bar {
    display: flex;
    gap: 8px;
    padding: 2px 2px 14px;
}

.home-terminal-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.home-terminal-bar span:nth-child(1) {
    background: #fb7185;
}

.home-terminal-bar span:nth-child(2) {
    background: #fbbf24;
}

.home-terminal-bar span:nth-child(3) {
    background: #4ade80;
}

.home-terminal-screen {
    display: grid;
    gap: 14px;
    height: 100%;
}

.home-terminal-label {
    margin: 0;
    color: rgba(240, 245, 247, 0.68);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.home-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 240px;
    margin: 0;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.04), rgba(216, 180, 254, 0.08));
    overflow: hidden;
}

.markdown-body .home-visual img {
    width: 100%;
    height: 220px;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.22));
}

.home-terminal-metrics {
    display: grid;
    gap: 10px;
}

.home-terminal-metrics div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-terminal-metrics strong {
    color: rgba(240, 245, 247, 0.96);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.home-terminal-metrics span {
    color: rgba(240, 245, 247, 0.64);
    font-size: 12px;
    text-align: right;
}

.home-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.home-strip-card {
    padding: 18px 18px 17px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-color) 96%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 18%, var(--surface-color)));
    box-shadow: var(--shadow);
}

.home-strip-value {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 18px;
    line-height: 1.35;
}

.home-strip-copy {
    margin: 0;
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.72;
}

.home-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 0.85fr));
    gap: 14px;
    margin: 18px 0 30px;
}

.home-panel {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-color) 92%, var(--bg-color));
    box-shadow: var(--shadow);
}

.home-panel-feature {
    background: linear-gradient(155deg, color-mix(in srgb, var(--surface-color) 96%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 28%, var(--surface-color)));
}

.home-panel-title {
    margin: 0 0 12px;
    color: var(--text-color);
    font-size: clamp(22px, 3vw, 31px);
    font-weight: 780;
    line-height: 1.24;
}

.home-panel p:last-child {
    margin-bottom: 0;
    color: var(--muted-color);
}

.home-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-list li {
    position: relative;
    padding-left: 18px;
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.72;
}

.home-list li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.home-flow {
    display: grid;
    gap: 10px;
}

.home-flow-step {
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 18%, var(--border-color));
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface-color));
}

.home-flow-step strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-color);
    font-size: 14px;
}

.home-flow-step span {
    color: var(--muted-color);
    font-size: 13px;
    line-height: 1.62;
}

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

.markdown-body .home-route-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-color) 96%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 12%, var(--surface-color)));
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.markdown-body .home-route-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-color) 58%, var(--border-color));
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 28%, var(--surface-color)), color-mix(in srgb, var(--surface-color) 92%, var(--bg-color)));
}

.markdown-body .home-route-card.home-route-card-wide {
    grid-column: span 3;
    min-height: 0;
    padding: 22px;
}

.home-route-title {
    font-size: 22px;
    line-height: 1.25;
}

.home-route-copy {
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.72;
}

.home-route-meta {
    margin-top: auto;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.home-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-color) 92%, var(--bg-color));
    color: var(--muted-color);
    box-shadow: var(--shadow);
}

.home-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--border-color) 86%, transparent);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--muted-color);
}

.home-contact-item strong {
    color: var(--text-color);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.markdown-body .home-contact a.home-contact-item {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.home-note {
    margin-top: 12px;
    color: var(--soft-text);
    font-size: 13px;
}

.home-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 20px;
    align-items: end;
    margin-top: 4px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface-color) 94%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 18%, var(--surface-color)));
    box-shadow: var(--shadow);
}

.home-footer-copy {
    min-width: 0;
}

.home-footer-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 780;
}

.home-footer-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--code-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--code-accent) 14%, transparent);
}

.home-footer-title {
    max-width: 58ch;
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 740;
    line-height: 1.6;
}

.home-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.markdown-body .home-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 22%, var(--border-color));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-color) 92%, var(--accent-soft));
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 730;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.markdown-body .home-footer-links a:hover {
    border-color: color-mix(in srgb, var(--code-accent) 46%, var(--border-color));
    background: color-mix(in srgb, var(--surface-color) 86%, var(--accent-soft));
    transform: translateY(-1px);
}

.home-footer-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 86%, transparent);
    color: var(--soft-text);
    font-size: 13px;
}

.timeline-page-intro,
.friends-page-intro {
    max-width: 70ch;
    margin-bottom: 30px;
    color: var(--muted-color);
    font-size: 18px;
    line-height: 1.75;
}

.timeline-simple-list {
    position: relative;
    display: grid;
    gap: 10px;
    margin: 24px 0 10px;
    padding-left: 30px;
}

.timeline-simple-list::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 11px;
    width: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-color) 52%, transparent), color-mix(in srgb, var(--border-color) 88%, transparent));
}

.markdown-body .timeline-simple-item {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-color) 88%, var(--bg-color));
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.markdown-body .timeline-simple-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-soft) 30%, transparent);
    transform: translateY(-50%);
}

.markdown-body .timeline-simple-item:hover {
    border-color: color-mix(in srgb, var(--accent-color) 44%, var(--border-color));
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--surface-color));
    transform: translateY(-1px);
}

.timeline-simple-date {
    color: var(--soft-text);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timeline-simple-title {
    color: var(--text-color);
    font-size: 17px;
    line-height: 1.45;
    word-break: break-word;
}

.timeline-archive {
    display: grid;
    gap: 24px;
    margin: 24px 0 10px;
}

.timeline-year {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.timeline-year-label {
    position: sticky;
    top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface-color));
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 760;
}

.timeline-year-list {
    position: relative;
    display: grid;
    gap: 12px;
    padding-left: 18px;
}

.timeline-year-list::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-color) 44%, transparent), color-mix(in srgb, var(--border-color) 82%, transparent));
}

.markdown-body .timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
    border-radius: 16px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-color) 95%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 10%, var(--surface-color)));
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.markdown-body .timeline-entry::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

.markdown-body .timeline-entry:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-color) 46%, var(--border-color));
}

.timeline-entry-date {
    color: var(--soft-text);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timeline-entry-body {
    display: grid;
    gap: 6px;
}

.timeline-entry-body strong {
    color: var(--text-color);
    font-size: 18px;
    line-height: 1.35;
}

.timeline-entry-body span {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-entry-body p {
    margin: 0;
    color: var(--muted-color);
    font-size: 13px;
    line-height: 1.68;
}

.timeline-entry-updated,
.timeline-entry-spacer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
}

.timeline-entry-updated {
    border: 1px solid color-mix(in srgb, var(--code-accent) 34%, var(--border-color));
    background: color-mix(in srgb, var(--code-accent) 14%, var(--surface-color));
    color: var(--code-accent);
    font-weight: 700;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 30px 36px;
    margin: 34px 0 16px;
}

.markdown-body .friend-card {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 150px;
    padding: 26px 28px;
    border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
    border-radius: 16px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-color) 95%, var(--bg-color)), color-mix(in srgb, var(--accent-soft) 10%, var(--surface-color)));
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.markdown-body .friend-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 40%, var(--border-color));
    transform: translateY(-2px);
}

.friend-avatar {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border: 2px solid color-mix(in srgb, var(--accent-color) 36%, var(--border-color));
    border-radius: 50%;
    object-fit: cover;
}

.friend-card-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.friend-name {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 760;
    line-height: 1.3;
}

.friend-meta {
    color: var(--muted-color);
    font-size: 17px;
    line-height: 1.65;
}

.markdown-editor {
    width: 100%;
    height: 100%;
    padding: 16px;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    line-height: 1.7;
}

.markdown-editor:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.welcome-message {
    width: min(620px, 100%);
    margin: 56px auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

.welcome-message h2 {
    margin: 0 0 10px;
    color: var(--text-color);
}

.loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(15, 18, 20, 0.72);
    color: #ffffff;
}

.spinner {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.resizer {
    position: relative;
    z-index: 12;
    width: 5px;
    min-width: 5px;
    max-width: 5px;
    background: var(--border-color);
    cursor: col-resize;
    transition: background-color 0.18s ease;
}

.resizer-left {
    background: var(--sidebar-border);
}

.resizer:hover,
.resizer.dragging {
    background: var(--accent-color);
}

.resizer::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.18s ease;
}

.resizer:hover::before,
.resizer.dragging::before {
    opacity: 1;
}

.outline-item {
    position: relative;
    display: block;
    margin: 2px 0;
    padding: 6px 8px 6px 13px;
    color: var(--muted-color);
    font-size: 13px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.outline-item::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 4px;
    width: 2px;
    border-radius: 999px;
    background: transparent;
}

.outline-item:hover {
    background: var(--surface-muted);
    color: var(--text-color);
}

.outline-item.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 700;
}

.outline-item.active::before {
    background: var(--accent-color);
}

.outline-item.level-1 {
    font-weight: 720;
}

.outline-item.level-2 {
    padding-left: 23px;
    font-size: 12.5px;
}

.outline-item.level-3 {
    padding-left: 34px;
    color: var(--soft-text);
    font-size: 12px;
}

.btn:focus-visible,
.code-copy-btn:focus-visible,
.note-item:focus-visible,
.category-header:focus-visible,
.outline-item:focus-visible,
.icon-btn:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .sidebar-right,
    .resizer-right {
        display: none;
    }

    .friends-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-panel-feature {
        grid-column: span 2;
    }

    .home-route-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .markdown-body .home-route-card.home-route-card-wide {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    body {
        overflow: hidden;
    }

    .sidebar-left {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        width: min(86vw, 330px);
        max-width: min(86vw, 330px);
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 24px 0 50px rgba(0, 0, 0, 0.26);
    }

    .sidebar-left.active {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        visibility: hidden;
        background: rgba(0, 0, 0, 0.38);
        opacity: 0;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .sidebar-backdrop.active {
        visibility: visible;
        opacity: 1;
    }

    .resizer-left {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .content-header {
        min-height: 68px;
        padding: 10px 14px;
    }

    .content-header h1 {
        max-width: 58vw;
        font-size: 18px;
    }

    .content-kicker {
        font-size: 11px;
    }

    .btn {
        min-height: 36px;
        padding: 0 11px;
    }

    .content-area {
        padding: 24px 16px 44px;
    }

    .markdown-body {
        font-size: 15px;
    }

    .markdown-body h1 {
        font-size: 31px;
    }

    .markdown-body h2 {
        font-size: 23px;
    }

    .markdown-body img[width*="50"],
    .markdown-body img[style*="width: 50"],
    .markdown-body img[width*="30"],
    .markdown-body img[style*="width: 30"] {
        max-width: 100%;
    }

    .home-hero,
    .home-strip,
    .home-info-grid,
    .home-route-grid,
    .friends-grid,
    .timeline-year,
    .markdown-body .timeline-simple-item {
        grid-template-columns: 1fr;
    }

    .home-hero {
        padding: 18px;
    }

    .timeline-year {
        gap: 12px;
    }

    .markdown-body .timeline-simple-item {
        gap: 4px;
    }

    .timeline-simple-list {
        padding-left: 24px;
    }

    .timeline-simple-list::before {
        left: 9px;
    }

    .markdown-body .timeline-simple-item::before {
        left: -20px;
    }

    .timeline-year-list {
        padding-left: 14px;
    }

    .markdown-body .timeline-entry {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .timeline-entry-updated,
    .timeline-entry-spacer {
        justify-self: start;
    }

    .home-panel-feature,
    .markdown-body .home-route-card.home-route-card-wide {
        grid-column: span 1;
    }

    .home-terminal {
        padding: 12px;
    }

    .markdown-body .home-visual img {
        height: 180px;
    }
}

@media (max-width: 520px) {
    .content-actions {
        gap: 6px;
    }

    .site-pages-panel {
        padding-right: 12px;
        padding-left: 12px;
    }

    .content-header h1 {
        max-width: 48vw;
    }

    .markdown-body pre,
    .markdown-body pre[class*="language-"] {
        margin-right: -6px;
        margin-left: -6px;
        border-radius: 7px;
    }
}

/* Interface polish layer */
.sidebar-left,
.sidebar-right,
.main-content {
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 20%, transparent);
}

.site-panel {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 46%, transparent), transparent 56%),
        color-mix(in srgb, var(--sidebar-panel) 68%, transparent);
}

.site-title {
    letter-spacing: 0.01em;
}

.site-page-link,
.category-header,
.note-item {
    position: relative;
    overflow: hidden;
}

.site-page-link::after,
.category-header::after,
.note-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 64%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.site-page-link:hover::after,
.category-header:hover::after,
.note-item:hover::after,
.site-page-link.active::after,
.note-item.active::after {
    opacity: 1;
}

.category-header {
    border: 1px solid transparent;
}

.category-item.expanded .category-header {
    border-color: color-mix(in srgb, var(--accent-color) 16%, transparent);
    background: color-mix(in srgb, var(--sidebar-panel) 58%, transparent);
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border: 1px solid color-mix(in srgb, var(--sidebar-border) 68%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--sidebar-chip-bg) 72%, transparent);
}

.note-item.active {
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, transparent);
}

.content-header {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--surface-color) 74%, transparent), color-mix(in srgb, var(--glass-strong) 74%, transparent)),
        color-mix(in srgb, var(--surface-color) 54%, transparent);
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.06);
}

.content-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.content-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--code-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--code-accent) 14%, transparent);
}

.markdown-body {
    padding: 2px 0 24px;
}

.markdown-body > h1:first-child {
    padding-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 76%, transparent);
}

.markdown-body h2 {
    padding-top: 4px;
}

.markdown-body p,
.markdown-body li {
    text-wrap: pretty;
}

.markdown-body blockquote {
    backdrop-filter: blur(8px);
}

.markdown-body pre,
.markdown-body pre[class*="language-"] {
    border-radius: 10px;
}

.markdown-body pre::after {
    content: "";
    position: absolute;
    top: 13px;
    left: 15px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 14px 0 0 #f59e0b, 28px 0 0 #22c55e;
    opacity: 0.72;
    pointer-events: none;
}

.markdown-body pre code,
.markdown-body pre[class*="language-"] code {
    padding-top: 18px;
}

.outline-item {
    border: 1px solid transparent;
}

.outline-item:hover,
.outline-item.active {
    border-color: color-mix(in srgb, var(--accent-color) 18%, transparent);
}

/* Home page refresh */
.markdown-body .home-page-title {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 42px;
    font-weight: 820;
    line-height: 1.12;
    letter-spacing: 0;
}

.home-shell {
    gap: 22px;
    margin: 0 0 36px;
}

.home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
    gap: 30px;
    align-items: center;
    padding: 4px 0 30px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.home-hero::before,
.home-hero::after {
    content: none;
    display: none;
}

.home-hero-copy {
    justify-content: flex-start;
}

.home-eyebrow,
.home-card-label,
.home-strip-kicker,
.home-route-label {
    gap: 7px;
    margin-bottom: 10px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0;
}

.home-eyebrow::before,
.home-card-label::before,
.home-strip-kicker::before,
.home-route-label::before {
    width: 7px;
    height: 7px;
    background: var(--code-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--code-accent) 14%, transparent);
}

.markdown-body .home-hero-title {
    max-width: 13ch;
    font-size: 44px;
    font-weight: 820;
    line-height: 1.14;
    letter-spacing: 0;
}

.home-hero-lead {
    max-width: 58ch;
    margin-top: 18px;
    color: var(--muted-color);
    font-size: 15px;
    line-height: 1.86;
}

.home-chip-row {
    gap: 8px;
    margin-top: 18px;
}

.home-chip {
    min-height: 30px;
    padding: 0 11px;
    border-color: color-mix(in srgb, var(--accent-color) 22%, var(--border-color));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-muted) 76%, var(--surface-color));
    color: var(--text-color);
    font-size: 12px;
}

.home-actions {
    gap: 9px;
    margin-top: 22px;
}

.markdown-body .home-actions a {
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-color) 92%, var(--accent-soft));
    font-size: 13px;
}

.markdown-body .home-actions a.home-action-primary {
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--code-accent) 34%, var(--warning-color)));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

.home-terminal {
    display: grid;
    place-items: center;
    width: fit-content;
    min-height: 0;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--border-color) 86%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-color) 82%, transparent);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.home-terminal-bar {
    padding-bottom: 12px;
}

.home-terminal-screen {
    gap: 12px;
}

.home-terminal-label {
    color: rgba(240, 245, 247, 0.74);
    font-size: 12px;
}

.home-visual {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.markdown-body .home-visual img {
    display: block;
    width: min(252px, 100%);
    height: auto;
    max-height: none;
    border-radius: 6px;
    object-fit: cover;
    filter: none;
}

.home-terminal-metrics {
    gap: 8px;
}

.home-terminal-metrics div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding-top: 9px;
}

.home-terminal-metrics strong,
.home-terminal-metrics span {
    font-size: 12px;
}

.home-terminal-metrics span {
    text-align: left;
}

.home-strip {
    gap: 12px;
}

.home-strip-card,
.home-panel,
.markdown-body .home-route-card,
.home-contact {
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.home-strip-card {
    padding: 17px;
    background: color-mix(in srgb, var(--surface-color) 94%, var(--surface-muted));
}

.home-strip-value {
    margin-bottom: 8px;
    font-size: 17px;
}

.home-strip-copy,
.home-route-copy,
.home-list li {
    font-size: 14px;
    line-height: 1.74;
}

.home-info-grid {
    grid-template-columns: minmax(0, 1.05fr) repeat(2, minmax(0, 0.95fr));
    gap: 12px;
    margin: 16px 0 28px;
}

.home-panel {
    padding: 18px;
    background: color-mix(in srgb, var(--surface-color) 94%, var(--bg-color));
}

.home-panel-feature {
    border-left: 3px solid var(--code-accent);
    background: color-mix(in srgb, var(--surface-color) 90%, var(--accent-soft));
}

.home-panel-title {
    font-size: 25px;
    letter-spacing: 0;
}

.home-flow-step {
    padding: 12px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-muted) 74%, var(--surface-color));
}

.home-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 28px;
}

.markdown-body .home-route-card {
    min-height: 162px;
    padding: 18px;
    background: color-mix(in srgb, var(--surface-color) 94%, var(--bg-color));
}

.markdown-body .home-route-card:hover {
    border-color: color-mix(in srgb, var(--code-accent) 46%, var(--border-color));
    background: color-mix(in srgb, var(--surface-color) 88%, var(--accent-soft));
}

.markdown-body .home-route-card.home-route-card-wide {
    grid-column: span 2;
    min-height: 150px;
}

.home-route-title {
    font-size: 21px;
}

.home-route-meta {
    color: var(--accent-strong);
    font-size: 12px;
}

.home-contact {
    padding: 14px;
    background: color-mix(in srgb, var(--surface-color) 94%, var(--bg-color));
}

.home-contact-item {
    border-radius: var(--radius);
}

.home-contact-item strong {
    letter-spacing: 0;
}

.home-footer {
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-color) 94%, var(--bg-color));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.home-footer-title {
    font-size: 17px;
}

.home-footer-meta {
    letter-spacing: 0;
}

@media (max-width: 1180px) {
    .home-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-panel-feature {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .markdown-body .home-page-title {
        font-size: 34px;
    }

    .home-hero,
    .home-strip,
    .home-info-grid,
    .home-route-grid,
    .home-footer {
        grid-template-columns: 1fr;
    }

    .home-hero {
        gap: 20px;
        padding: 0 0 24px;
    }

    .markdown-body .home-hero-title {
        max-width: 100%;
        font-size: 34px;
    }

    .home-terminal {
        padding: 8px;
    }

    .home-panel-feature,
    .markdown-body .home-route-card.home-route-card-wide {
        grid-column: span 1;
    }

    .home-footer {
        align-items: start;
    }

    .home-footer-links {
        justify-content: flex-start;
    }

    .home-visual {
        min-height: 0;
    }

    .markdown-body .home-visual img {
        width: min(230px, 100%);
        max-height: none;
    }
}

@media (max-width: 520px) {
    .markdown-body .home-page-title {
        font-size: 32px;
    }

    .markdown-body .home-hero-title {
        font-size: 31px;
    }

    .home-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .markdown-body .home-actions a {
        justify-content: center;
    }

    .home-footer {
        padding: 16px;
    }

    .home-footer-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .markdown-body .home-footer-links a {
        justify-content: center;
    }

    .home-footer-meta {
        display: grid;
        gap: 6px;
    }
}
