/* =========================================================
   博客前台样式
   ========================================================= */

:root {
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --bg-elevated: #ffffff;
    --text: #1c2024;
    --text-soft: #5f6772;
    --text-faint: #8b939e;
    --border: #e7e9ee;
    --brand: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-soft: #eef3ff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 8px 24px -12px rgba(16, 24, 40, .18);
    --max-width: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --bg: #0e1116;
    --bg-soft: #151a21;
    --bg-elevated: #151a21;
    --text: #e6e9ee;
    --text-soft: #9aa4b2;
    --text-faint: #737d8c;
    --border: #232b36;
    --brand: #6ea8fe;
    --brand-hover: #8ab8ff;
    --brand-soft: #16233a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 28px -14px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-text small { color: var(--text-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-soft);
    transition: .18s;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--text); }
.site-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.search-form {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    transition: .18s;
}
.search-form:focus-within { border-color: var(--brand); background: var(--bg); }
.search-form input {
    border: 0;
    background: transparent;
    outline: none;
    color: var(--text);
    font-size: 14px;
    width: 130px;
    font-family: inherit;
}
.search-form button {
    border: 0;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 50%;
}
.search-form button:hover { color: var(--brand); }

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 15px;
    transition: .18s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }

.reading-progress {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    width: 0;
    background: var(--brand);
    transition: width .1s linear;
}

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 64px 0 40px; max-width: 760px; }

.hero-eyebrow {
    display: inline-block;
    margin: 0 0 16px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
}

.hero-title {
    margin: 0 0 10px;
    font-size: 44px;
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 800;
}

.hero-sub { margin: 0 0 12px; font-size: 20px; color: var(--text-soft); font-weight: 500; }
.hero-desc { margin: 0 0 26px; color: var(--text-faint); font-size: 16px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: .2s;
    font-family: inherit;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); color: #fff; transform: translateY(-1px); }
.btn.ghost { border-color: var(--border); color: var(--text-soft); background: transparent; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------- 布局 ---------------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    align-items: start;
    padding: 8px 0 72px;
}

.main-col { min-width: 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 20px 0 18px;
}
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.section-head a { font-size: 14px; color: var(--text-faint); }
.section-head a:hover { color: var(--brand); }

.page-head { padding: 28px 0 22px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.page-head h1 { margin: 8px 0 6px; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--text-faint); font-size: 14px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-faint); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span:last-child { color: var(--text-soft); }

/* ---------------- 文章卡片 ---------------- */
.post-list { display: flex; flex-direction: column; gap: 18px; }

.post-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: .22s;
}
.post-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-cover img { width: 100%; height: 220px; object-fit: cover; }
.post-body { padding: 22px 24px; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.post-cat {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

.post-title { margin: 0 0 8px; font-size: 21px; line-height: 1.4; letter-spacing: -.01em; }
.post-title a { transition: color .18s; }
.post-title a:hover { color: var(--brand); }

.post-summary {
    margin: 0;
    color: var(--text-soft);
    font-size: 14.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text-soft);
    font-size: 12.5px;
    transition: .18s;
}
.tag:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------------- 侧边栏 ---------------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }

.widget {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

.widget-title { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.widget-text { margin: 0 0 10px; color: var(--text-soft); font-size: 13.5px; }
.widget-link { font-size: 13px; color: var(--brand); }

.hot-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.hot-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.hot-index {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--bg-soft);
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}
.hot-list li:nth-child(-n+3) .hot-index { background: var(--brand-soft); color: var(--brand); }
.hot-list a { color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-list a:hover { color: var(--brand); }

.cat-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text-soft);
    transition: .18s;
}
.cat-list a:hover { background: var(--bg-soft); color: var(--text); }
.cat-list em { font-style: normal; font-size: 12px; color: var(--text-faint); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 36px 0 0; flex-wrap: wrap; }
.pager a {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-soft);
    transition: .18s;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------------- 文章详情 ---------------- */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 44px;
    align-items: start;
    padding: 32px 0 72px;
}

.article { min-width: 0; }

.article-title { margin: 14px 0 14px; font-size: 36px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-faint);
}

.article-aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }

.toc-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 140px);
    overflow: auto;
}
.toc-card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.toc-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.toc-card li { font-size: 13px; line-height: 1.5; border-left: 2px solid var(--border); padding-left: 10px; }
.toc-card li.toc-sub { padding-left: 22px; font-size: 12.5px; }
.toc-card a { color: var(--text-soft); display: block; }
.toc-card a:hover, .toc-card a.active { color: var(--brand); }
.toc-card li:has(a.active) { border-left-color: var(--brand); }

/* ---------------- 正文排版 ---------------- */
.prose { font-size: 16.5px; line-height: 1.9; color: var(--text); padding: 26px 0 8px; word-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
    margin: 2.1em 0 .8em;
    font-size: 24px;
    line-height: 1.4;
    letter-spacing: -.01em;
    padding-left: 14px;
    border-left: 4px solid var(--brand);
    scroll-margin-top: 90px;
}
.prose h3 {
    margin: 1.7em 0 .7em;
    font-size: 19px;
    line-height: 1.45;
    scroll-margin-top: 90px;
}
.prose h4 { margin: 1.5em 0 .6em; font-size: 17px; }
.prose p { margin: 0 0 1.15em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .45em; }
.prose blockquote {
    margin: 1.6em 0;
    padding: 14px 20px;
    border-left: 4px solid var(--brand);
    background: var(--brand-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-soft);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.4em auto; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose code {
    font-family: var(--mono);
    font-size: .88em;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 6px;
    color: #d6336c;
}
.prose pre {
    position: relative;
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    overflow: auto;
    font-size: 13.5px;
    line-height: 1.7;
    margin: 1.5em 0;
}
.prose pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }

.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 4px; font-size: 13px; color: var(--text-faint); }

.article-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    margin-top: 12px;
    border-top: 1px solid var(--border);
}

.like-btn, .copy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-soft);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: .18s;
}
.like-btn:hover, .copy-link:hover { border-color: var(--brand); color: var(--brand); }
.like-btn.liked { background: var(--brand); border-color: var(--brand); color: #fff; }
.like-btn em { font-style: normal; font-weight: 700; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 32px; }
.post-nav-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: .18s;
}
.post-nav-item small { color: var(--text-faint); font-size: 12px; }
.post-nav-item strong { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-nav-item:hover { border-color: var(--brand); }
.post-nav-item.next { text-align: right; }

.related { margin: 8px 0 36px; }
.related h2 { font-size: 17px; margin: 0 0 12px; }
.related ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.related li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.related time { color: var(--text-faint); font-size: 12.5px; flex: 0 0 auto; }

/* ---------------- 评论 ---------------- */
.comments { padding-top: 24px; border-top: 1px solid var(--border); }
.comments h2 { font-size: 18px; margin: 0 0 18px; }

.flash { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin: 0 0 16px; }
.flash.success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.flash.error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

.comment-list { margin: 0 0 26px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.comment-item { display: flex; gap: 12px; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px; object-fit: cover; }
.comment-avatar.placeholder {
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
    font-size: 15px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.comment-head strong { font-size: 14px; }
.comment-head time { font-size: 12px; color: var(--text-faint); }
.comment-text { margin: 0; font-size: 14.5px; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.empty-comment { color: var(--text-faint); font-size: 14px; margin: 0 0 24px; }

.comment-form { display: flex; flex-direction: column; gap: 12px; }
.comment-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea, .search-page-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: .18s;
}
.comment-form input:focus, .comment-form textarea:focus, .search-page-form input:focus { border-color: var(--brand); }
.comment-form textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-footer .hint { font-size: 12.5px; color: var(--text-faint); }

/* ---------------- 标签墙 / 友链 ---------------- */
.tag-wall { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 60px; }
.tag-wall-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 14px;
    transition: .18s;
}
.tag-wall-item em { font-style: normal; font-size: 12px; color: var(--text-faint); }
.tag-wall-item:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding-bottom: 60px; }
.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    transition: .18s;
}
.link-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.link-card img, .link-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 42px;
}
.link-logo.placeholder { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.link-info { display: flex; flex-direction: column; min-width: 0; }
.link-info strong { font-size: 14.5px; }
.link-info small { color: var(--text-faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 归档 ---------------- */
.month-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.month-chips a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-soft);
    transition: .18s;
}
.month-chips a em { font-style: normal; font-size: 11.5px; color: var(--text-faint); }
.month-chips a:hover { border-color: var(--brand); color: var(--brand); }
.month-chips a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.month-chips a.active em { color: rgba(255,255,255,.8); }

/* ---------------- 通用块 ---------------- */
.card-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    padding: 24px 26px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.card-panel .prose { padding: 0; font-size: 15.5px; }
.panel-title { margin: 0 0 10px; font-size: 17px; }
.about-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }

.search-page-form { display: flex; gap: 10px; margin-bottom: 24px; }
.search-page-form input { flex: 1; }

.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-faint);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.error-page { text-align: center; padding: 80px 0 100px; }
.error-code { font-size: 80px; font-weight: 800; margin: 0; color: var(--brand); letter-spacing: -.04em; }
.error-page h1 { margin: 6px 0 8px; font-size: 26px; }
.error-page p { color: var(--text-faint); margin: 0 0 22px; }
.error-page .hero-actions { justify-content: center; }

/* ---------------- 广告位 ---------------- */
.ad-slot { margin: 20px 0; }
.ad-slot:empty { display: none; }
.ad-slot > * { max-width: 100%; }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 36px 0 44px; margin-top: 20px; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; font-size: 13px; color: var(--text-faint); }
.footer-meta p { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar, .article-aside { position: static; }
    .toc-card { max-height: none; }
    .hero-title { font-size: 36px; }
    .article-title { font-size: 30px; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { height: 60px; gap: 12px; flex-wrap: wrap; }
    .brand-text small { display: none; }
    .site-nav { order: 3; width: 100%; overflow-x: auto; padding: 0 0 8px; margin-left: 0; }
    .site-nav a { white-space: nowrap; padding: 6px 10px; }
    .header-actions { margin-left: auto; }
    .search-form input { width: 90px; }
    .hero { padding: 40px 0 24px; }
    .hero-title { font-size: 30px; }
    .hero-sub { font-size: 17px; }
    .post-body { padding: 18px; }
    .post-title { font-size: 18px; }
    .article-title { font-size: 25px; }
    .prose { font-size: 16px; }
    .prose h2 { font-size: 20px; }
    .prose h3 { font-size: 17px; }
    .post-nav { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-footer { flex-direction: column; align-items: flex-start; }
    .page-head h1 { font-size: 24px; }
    .error-code { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
