:root {
    --m3-bg: #F8FAFC;
    --m3-surface: #FFFFFF;
    --m3-surface-2: #F1F5F9;
    --m3-text: #0F172A;
    --m3-muted: #475569;
    --m3-border: #E2E8F0;
    --m3-primary: #2563EB;
    --m3-primary-2: #3B82F6;
    --m3-primary-3: #60A5FA;
    --m3-success: #16A34A;
    --m3-warning: #F59E0B;
    --m3-danger: #EF4444;
    --m3-ring: rgba(37, 99, 235, .25);
    --m3-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --m3-shadow-sm: 0 6px 18px rgba(15, 23, 42, .08);
    --m3-radius: 14px;
    --m3-radius-sm: 10px;
    --m3-max: 1380px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--m3-text);
    background: var(--m3-bg);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto
}

a {
    color: inherit;
    text-decoration: none
}

.m3-container {
    max-width: var(--m3-max);
    margin: 0 auto;
    padding: 0 18px
}

.m3-skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.m3-skip:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--m3-border);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: var(--m3-shadow-sm);
    outline: none;
}

.m3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
    user-select: none;
    white-space: nowrap;
}

.m3-btn:focus {
    outline: none
}

.m3-btn:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring)
}

.m3-btn-primary {
    background: linear-gradient(135deg, var(--m3-primary), var(--m3-primary-2));
    color: #fff
}

.m3-btn-primary:hover {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25)
}

.m3-btn-ghost {
    background: rgba(255, 255, 255, .75);
    border-color: var(--m3-border);
    color: var(--m3-text)
}

.m3-btn-ghost:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .28)
}

.m3-btn-soft {
    background: rgba(37, 99, 235, .10);
    border-color: rgba(37, 99, 235, .18);
    color: var(--m3-primary)
}

.m3-btn-soft:hover {
    background: rgba(37, 99, 235, .14);
    border-color: rgba(37, 99, 235, .28)
}

.m3-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    border: 1px solid rgba(37, 99, 235, .18);
    color: var(--m3-primary);
    font-weight: 600;
    font-size: 13px;
}

.m3-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--m3-surface-2);
    border: 1px solid var(--m3-border);
    color: var(--m3-muted);
    font-size: 12px;
    font-weight: 600;
}

.m3-card {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: var(--m3-radius);
    box-shadow: var(--m3-shadow-sm);
    backdrop-filter: blur(10px);
}

.m3-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(248, 250, 252, .75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
}

.m3-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0
}

.m3-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px
}

.m3-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--m3-primary), var(--m3-primary-3));
    color: #fff;
    font-weight: 800
}

.m3-brand-name {
    font-weight: 800;
    letter-spacing: .2px
}

.m3-brand-sub {
    font-size: 12px;
    color: var(--m3-muted)
}

.m3-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(226, 232, 240, .8);

    /* PC 栏目过多时：不换行，允许横向滚动，避免“丑换行” */
    max-width: calc(100vw - 520px);
    overflow: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.m3-nav::-webkit-scrollbar {
    height: 6px
}

.m3-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .6);
    border-radius: 999px
}

.m3-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--m3-muted);
    font-weight: 700;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;

    /* 强制单行 */
    white-space: nowrap;
}

.m3-nav a:hover {
    background: #fff;
    color: var(--m3-text)
}

.m3-nav a.is-active {
    background: rgba(37, 99, 235, .10);
    color: var(--m3-primary);
    border: 1px solid rgba(37, 99, 235, .18)
}

.m3-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.m3-burger {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--m3-border);
    background: rgba(255, 255, 255, .75);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: background .2s ease, border-color .2s ease;
}

.m3-burger:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .28)
}

.m3-burger:focus {
    outline: none
}

.m3-burger:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring)
}

/* 汉堡三条线：更长、更标准 */
.m3-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}

/* 汉堡按钮打开态 -> X */
.m3-burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
}

.m3-burger.is-open span:nth-child(2) {
    opacity: 0
}

.m3-burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
}

/* 移动端左侧抽屉 */
.m3-lock {
    overflow: hidden
}

.m3-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.m3-drawer[hidden] {
    display: none !important
}

.m3-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(194, 196, 199, 0.55);
    opacity: 0;
    transition: opacity .22s ease;
}

.m3-drawer-panel {
    position: absolute;
    left: 0;
    top: 0;

    width: min(86vw, 360px);
    background: #fff;
    border-right: 1px solid rgba(226, 232, 240, .95);
    transform: translateX(-102%);
    transition: transform .24s ease;
    box-shadow: 24px 0 60px rgba(15, 23, 42, .18);
    display: flex;
    flex-direction: column;
}

.m3-drawer-nav {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 6px 10px 10px;
    -webkit-overflow-scrolling: touch;

    /* 强制在任何情况下都有可见空间（避免被误算为 0 高度） */
    min-height: 180px;
}

.m3-drawer-actions {
    flex-shrink: 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(226, 232, 240, .95);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 打开态：用 aria-hidden 控制，避免额外 JS class */
.m3-drawer[aria-hidden="false"] .m3-drawer-backdrop {
    opacity: 1
}

.m3-drawer[aria-hidden="false"] .m3-drawer-panel {
    transform: translateX(0)
}

.m3-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 10px
}

.m3-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px
}

.m3-drawer-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--m3-border);
    background: rgba(255, 255, 255, .75);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.m3-drawer-close:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .28)
}

.m3-drawer-close:focus {
    outline: none
}

.m3-drawer-close:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring)
}

/* 以 flex 版本为准（上面已定义 .m3-drawer-nav flex:1），这里不再覆写 */
.m3-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    color: var(--m3-text);
    font-weight: 800;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.m3-drawer-nav a:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .18)
}

.m3-drawer-nav a i {
    width: 18px;
    color: var(--m3-primary)
}

.m3-drawer-arrow {
    margin-left: auto;
    color: rgba(71, 85, 105, .85);
    font-weight: 900
}

/* 搜索弹窗 */
.m3-search-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease
}

.m3-search-modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto
}

.m3-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .75);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px)
}

.m3-search-dialog {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
    border: 1px solid rgba(226, 232, 240, .9);
    transform: translateY(-20px);
    transition: transform .2s ease
}

.m3-search-modal:not([hidden]) .m3-search-dialog {
    transform: translateY(0)
}

.m3-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, .8)
}

.m3-search-icon {
    color: var(--m3-primary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center
}

.m3-search-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--m3-text);
    background: transparent;
    padding: 0
}

.m3-search-field::placeholder {
    color: var(--m3-muted);
    font-weight: 500
}

.m3-search-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--m3-surface-2);
    color: var(--m3-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    font-size: 16px
}

.m3-search-close:hover {
    background: rgba(37, 99, 235, .1);
    color: var(--m3-primary)
}

.m3-search-close:focus {
    outline: none
}

.m3-search-close:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring)
}

.m3-search-hint {
    padding: 12px 18px;
    font-size: 13px;
    color: var(--m3-muted);
    font-weight: 600
}

@media (max-width: 640px) {
    .m3-search-modal {
        padding-top: 10vh
    }

    .m3-search-dialog {
        width: 95%;
        border-radius: 12px
    }

    .m3-search-header {
        padding: 14px 16px
    }

    .m3-search-field {
        font-size: 15px
    }
}

.m3-cat-latest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
}

.m3-cat-block {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: var(--m3-radius);
    box-shadow: var(--m3-shadow-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color .2s ease, box-shadow .2s ease
}

.m3-cat-block:hover {
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .10)
}

.m3-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, .8)
}

.m3-cat-name {
    font-weight: 900;
    font-size: 16px;
    letter-spacing: -.2px
}

.m3-mini-list {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.m3-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease
}

.m3-mini-item:hover {
    background: rgba(37, 99, 235, .04);
    border-color: rgba(37, 99, 235, .12)
}

.m3-mini-item:focus {
    outline: none
}

.m3-mini-item:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring)
}

.m3-mini-thumb {
    width: 50px;
    flex: 0 0 50px;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--m3-surface-2);
    border: 1px solid rgba(226, 232, 240, .9)
}

.m3-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.m3-mini-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--m3-text)
}

.m3-mini-empty {
    padding: 16px 12px;
    text-align: center;
    border-radius: 10px;
    background: var(--m3-surface-2);
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 13px
}

@media (max-width: 980px) {
    .m3-cat-latest {
        grid-template-columns: 1fr
    }
}


.m3-hero {
    padding: 28px 0 6px
}

.m3-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
    align-items: stretch
}

.m3-hero-main {
    position: relative;
    overflow: hidden;
    padding: 26px;
}

.m3-hero-main:before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, .55), rgba(37, 99, 235, 0) 65%);
    pointer-events: none;
}

.m3-hero-main:after {
    content: "";
    position: absolute;
    inset: auto auto -55% -30%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(37, 99, 235, .35), rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.m3-hero-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1
}

.m3-hero-title {
    margin: 14px 0 8px;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -.6px;
    position: relative;
    z-index: 1
}

.m3-hero-sub {
    margin: 0;
    color: var(--m3-muted);
    font-weight: 500;
    position: relative;
    z-index: 1
}

.m3-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    position: relative;
    z-index: 1
}

.m3-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    position: relative;
    z-index: 1
}

.m3-metric {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(226, 232, 240, .85)
}

.m3-metric-title {
    color: var(--m3-muted);
    font-weight: 700;
    font-size: 12px
}

.m3-metric-value {
    font-weight: 900;
    font-size: 16px;
    margin-top: 2px
}

.m3-hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.m3-panel {
    padding: 16px
}

.m3-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px
}

.m3-panel-title strong {
    font-size: 14px
}

.m3-panel-title span {
    font-size: 12px;
    color: var(--m3-muted);
    font-weight: 600
}

.m3-featured a {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}

.m3-featured a:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .18)
}

.m3-thumb {
    width: 86px;
    flex: 0 0 86px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--m3-surface-2);
    border: 1px solid rgba(226, 232, 240, .9)
}

.m3-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.m3-featured-title {
    font-weight: 800;
    line-height: 1.3
}

.m3-featured-meta {
    margin-top: 6px;
    color: var(--m3-muted);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.m3-searchbox {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.m3-searchrow {
    display: flex;
    gap: 10px;
    align-items: center
}

.m3-input {
    flex: 1;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--m3-border);
    background: rgba(255, 255, 255, .85);
    font-weight: 600;
    color: var(--m3-text);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.m3-input:focus {
    outline: none
}

.m3-input:focus-visible {
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 0 0 4px var(--m3-ring);
    background: #fff
}

.m3-searchhint {
    font-size: 12px;
    color: var(--m3-muted);
    font-weight: 600
}

.m3-section {
    padding: 22px 0
}

.m3-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px
}

.m3-section-title {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.4px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--m3-text), var(--m3-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent
}

.m3-section-sub {
    margin: 6px 0 0;
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5
}

.m3-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--m3-primary);
    font-weight: 800
}

.m3-link:hover {
    text-decoration: underline
}

.m3-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px
}

.m3-category {
    padding: 16px;
    border-radius: var(--m3-radius);
    border: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--m3-shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer;
}

.m3-category:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 14px 34px rgba(37, 99, 235, .12)
}

.m3-category:focus {
    outline: none
}

.m3-category:focus-visible {
    box-shadow: 0 0 0 4px var(--m3-ring), 0 14px 34px rgba(37, 99, 235, .12)
}

.m3-category-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .10);
    border: 1px solid rgba(37, 99, 235, .18);
    color: var(--m3-primary)
}

.m3-category-title {
    margin-top: 10px;
    font-weight: 900
}

.m3-category-desc {
    margin-top: 4px;
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 13px
}

.m3-latest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.m3-post {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: var(--m3-radius);
    border: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--m3-shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.m3-post:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 14px 34px rgba(37, 99, 235, .12)
}

.m3-post-cover {
    width: 140px;
    flex: 0 0 140px;
    aspect-ratio: 16/10;
    border-radius: 14px;
    overflow: hidden;
    background: var(--m3-surface-2);
    border: 1px solid rgba(226, 232, 240, .9)
}

.m3-post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.m3-post-body {
    min-width: 0
}

.m3-post-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.m3-meta {
    color: var(--m3-muted);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.m3-post-title {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: -.2px
}

.m3-post-title a {
    color: var(--m3-text)
}

.m3-post-title a:hover {
    color: var(--m3-primary)
}

.m3-post-excerpt {
    margin: 8px 0 0;
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 13px
}

.m3-post-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--m3-primary);
    font-weight: 900
}

.m3-post-read:hover {
    text-decoration: underline
}

.m3-branches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px
}

.m3-branch {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(226, 232, 240, .9);
    font-weight: 800;
    color: var(--m3-text);
    transition: border-color .2s ease, background .2s ease;
}

.m3-branch:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .22)
}

.m3-footer {
    margin-top: 22px;
    padding: 26px 0 20px;
    border-top: 1px solid rgba(226, 232, 240, .8);
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(10px)
}

.m3-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 16px
}

.m3-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px
}

.m3-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--m3-primary), var(--m3-primary-3));
    color: #fff;
    font-weight: 900
}

.m3-logo-text {
    font-weight: 900
}

.m3-footer-desc {
    margin: 10px 0 0;
    color: var(--m3-muted);
    font-weight: 600
}

.m3-footer-title {
    font-weight: 900;
    margin-bottom: 10px
}

.m3-footer-link {
    display: block;
    padding: 8px 0;
    color: var(--m3-muted);
    font-weight: 700
}

.m3-footer-link:hover {
    color: var(--m3-primary)
}

.m3-footer-meta {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--m3-muted);
    font-weight: 700;
    padding: 6px 0
}

.m3-footer-meta i {
    margin-top: 3px;
    color: var(--m3-primary)
}

.m3-footer-bottom {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, .75);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.m3-footer-copy {
    color: var(--m3-muted);
    font-weight: 700;
    font-size: 12px
}

.m3-footer-sep {
    opacity: .6;
    margin: 0 10px
}

/* 正文内容区域（供 detail 页复用，先放在设计系统里） */
.m3-content {
    color: var(--m3-text);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.85;
}

.m3-content img {
    max-width: 100%;
    display: block;
    margin: 0 auto
}

.m3-content a {
    color: var(--m3-primary);
    text-decoration: underline
}

.m3-content table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--m3-border);
    background: #fff;
}

.m3-content table th,
.m3-content table td {
    border: 1px solid var(--m3-border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.m3-content table th {
    background: var(--m3-surface-2);
    font-weight: 900
}

.m3-content pre {
    overflow: auto;
    background: #0B1220;
    color: #E2E8F0;
    padding: 14px;
    border-radius: 14px
}

/* 面包屑导航 */
.m3-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--m3-muted);
    margin-bottom: 12px
}

.m3-breadcrumb a {
    color: var(--m3-primary);
    transition: color .2s ease
}

.m3-breadcrumb a:hover {
    color: var(--m3-primary-2)
}

.m3-breadcrumb-sep {
    color: var(--m3-muted);
    opacity: .6
}

/* 页面标题 */
.m3-page-title {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.3px;
    line-height: 1.3
}

.m3-page-desc {
    margin: 10px 0 0;
    color: var(--m3-muted);
    font-weight: 600
}

/* 列表页样式 */
.m3-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px
}

.m3-list-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: var(--m3-radius);
    border: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--m3-shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.m3-list-item:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 14px 34px rgba(37, 99, 235, .12)
}

.m3-list-cover {
    position: relative;
    width: 160px;
    flex: 0 0 160px;
    aspect-ratio: 16/10;
    border-radius: 14px;
    overflow: hidden;
    background: var(--m3-surface-2);
    border: 1px solid rgba(226, 232, 240, .9)
}

.m3-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.m3-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--m3-primary), var(--m3-primary-2));
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25)
}

.m3-badge-top {
    background: linear-gradient(135deg, #F59E0B, #F97316)
}

.m3-badge-hot {
    background: linear-gradient(135deg, #EF4444, #DC2626)
}

.m3-list-body {
    min-width: 0;
    flex: 1
}

.m3-list-title {
    margin: 8px 0 0;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -.2px
}

.m3-list-title a {
    color: var(--m3-text)
}

.m3-list-title a:hover {
    color: var(--m3-primary)
}

.m3-list-excerpt {
    margin: 8px 0 0;
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

/* 空状态 */
.m3-empty {
    padding: 60px 20px;
    text-align: center
}

.m3-empty-icon {
    font-size: 64px;
    color: var(--m3-muted);
    opacity: .5;
    margin-bottom: 16px
}

.m3-empty-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px
}

.m3-empty-desc {
    color: var(--m3-muted);
    font-weight: 600;
    margin-bottom: 20px
}

/* 分页样式 */
.m3-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px
}

/* 内容页样式 */
.m3-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 14px;
    align-items: start
}

.m3-detail-main {
    min-width: 0
}

.m3-detail-title {
    margin: 12px 0 0;
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: -.4px
}

.m3-detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--m3-border)
}

.m3-detail-desc {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(37, 99, 235, .06);
    border: 1px solid rgba(37, 99, 235, .12);
    color: var(--m3-text);
    font-weight: 600;
    line-height: 1.75
}

.m3-detail-thumb {
    margin-top: 16px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--m3-border)
}

.m3-detail-thumb img {
    width: 100%;
    display: block
}

.m3-detail-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--m3-border)
}

.m3-detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.m3-tag-label {
    color: var(--m3-muted);
    font-weight: 700;
    font-size: 14px
}

.m3-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .16);
    color: var(--m3-primary);
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, border-color .2s ease
}

.m3-tag:hover {
    background: rgba(37, 99, 235, .12);
    border-color: rgba(37, 99, 235, .24)
}

/* 上下篇导航 */
.m3-nav-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px
}

.m3-nav-item {
    padding: 16px;
    border-radius: var(--m3-radius);
    border: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--m3-shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    min-width: 0
}

.m3-nav-item:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .10)
}

.m3-nav-prev {
    text-align: left
}

.m3-nav-next {
    text-align: right
}

.m3-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--m3-muted);
    margin-bottom: 6px
}

.m3-nav-title {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

/* 侧边栏 */
.m3-detail-sidebar {
    position: sticky;
    top: 80px
}

.m3-sidebar-block {
    padding: 16px;
    margin-bottom: 12px
}

.m3-sidebar-title {
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 12px
}

.m3-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.m3-sidebar-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease
}

.m3-sidebar-item:hover {
    background: rgba(37, 99, 235, .06);
    border-color: rgba(37, 99, 235, .12)
}

.m3-sidebar-thumb {
    width: 70px;
    flex: 0 0 70px;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--m3-surface-2);
    border: 1px solid var(--m3-border)
}

.m3-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.m3-sidebar-content {
    min-width: 0;
    flex: 1
}

.m3-sidebar-item-title {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.m3-sidebar-item-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--m3-muted);
    font-weight: 700
}

/* 搜索页样式 */
.m3-search-form {
    margin-top: 16px
}

.m3-search-box {
    display: flex;
    gap: 10px;
    align-items: stretch
}

.m3-search-input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--m3-border);
    background: rgba(255, 255, 255, .92);
    font-weight: 600;
    font-size: 16px;
    color: var(--m3-text);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease
}

.m3-search-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 0 0 4px var(--m3-ring);
    background: #fff
}

.m3-search-result-info {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(37, 99, 235, .06);
    border: 1px solid rgba(37, 99, 235, .12);
    font-weight: 600;
    font-size: 14px
}

.m3-search-result-info strong {
    color: var(--m3-primary)
}

/* 404页样式 */
.m3-404-section {
    padding: 40px 0
}

.m3-404-wrap {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0
}

.m3-404-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center
}

.m3-404-number {
    font-size: 140px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--m3-primary), var(--m3-primary-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: -8px
}

.m3-404-decoration {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, .15), transparent 60%);
    pointer-events: none
}

.m3-404-content {
    text-align: left
}

.m3-404-title {
    margin: 0;
    font-size: 32px;
    letter-spacing: -.5px
}

.m3-404-desc {
    margin: 12px 0 0;
    color: var(--m3-muted);
    font-weight: 600;
    font-size: 16px
}

.m3-404-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px
}

.m3-404-tips {
    margin-top: 32px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(37, 99, 235, .06);
    border: 1px solid rgba(37, 99, 235, .12)
}

.m3-404-tips-title {
    font-weight: 900;
    margin-bottom: 12px
}

.m3-404-tips-list {
    margin: 0;
    padding-left: 20px;
    color: var(--m3-muted);
    font-weight: 600
}

.m3-404-tips-list li {
    margin-bottom: 6px
}

.m3-404-recommend {
    margin-top: 40px
}

@media (max-width: 980px) {
    .m3-hero-grid {
        grid-template-columns: 1fr
    }

    .m3-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .m3-latest-grid {
        grid-template-columns: 1fr
    }

    .m3-footer-grid {
        grid-template-columns: 1fr
    }

    .m3-nav {
        display: none
    }

    .m3-burger {
        display: inline-flex
    }

    .m3-detail-wrap {
        grid-template-columns: 1fr
    }

    .m3-detail-sidebar {
        position: static
    }

    .m3-nav-article {
        grid-template-columns: 1fr
    }

    .m3-404-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0
    }

    .m3-404-number {
        font-size: 100px
    }
}

@media (max-width: 520px) {
    .m3-hero-title {
        font-size: 34px
    }

    .m3-metrics {
        grid-template-columns: 1fr;
    }

    .m3-post {
        flex-direction: column
    }

    .m3-post-cover {
        width: 100%;
        flex: 0 0 auto
    }

    .m3-list-item {
        flex-direction: column
    }

    .m3-list-cover {
        width: 100%;
        flex: 0 0 auto;
        aspect-ratio: 16/9
    }

    .m3-detail-title {
        font-size: 22px
    }

    .m3-page-title {
        font-size: 20px
    }

    .m3-404-number {
        font-size: 80px;
        letter-spacing: -4px
    }

    .m3-404-title {
        font-size: 24px
    }

    .m3-category-grid {
        grid-template-columns: 1fr
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important
    }
}