:root {
    --bg-start: #071221;
    --bg-end: #0a1830;
    --panel: rgba(255, 255, 255, 0.95);
    --panel-soft: rgba(247, 250, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.98);
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(37, 99, 235, 0.16);
    --text: #0f172a;
    --muted: #64748b;
    --muted-strong: #475569;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --blue-soft: #eaf2ff;
    --cyan: #0891b2;
    --green: #0f9f86;
    --amber: #d97706;
    --purple: #7c3aed;
    --pink: #db2777;
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --shadow: 0 18px 48px rgba(5, 12, 28, 0.2);
    --shadow-soft: 0 12px 28px rgba(5, 12, 28, 0.12);
    --max-width: 1600px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.6;
    color: #f8fafc;
    background:
        radial-gradient(circle at 8% 4%, rgba(56, 189, 248, 0.12), transparent 18%),
        radial-gradient(circle at 96% 8%, rgba(99, 102, 241, 0.16), transparent 16%),
        linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 62%, #08101d 100%);
}

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 82px 82px;
    mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 78%);
    opacity: 0.5;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(var(--max-width), calc(100% - 22px));
    margin: 10px auto 24px;
}

.panel {
    background: var(--panel);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 242, 255, 0.9) 52%, rgba(248, 251, 255, 0.96)),
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 70%);
    box-shadow: var(--shadow);
}

.hero-decor {
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.8;
    pointer-events: none;
}

.hero-decor-a {
    width: 220px;
    height: 220px;
    right: -60px;
    top: -92px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0));
}

.hero-decor-b {
    width: 180px;
    height: 180px;
    left: 38%;
    bottom: -98px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.14), rgba(6, 182, 212, 0));
}

.hero-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.brand-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #071933 0%, #2563eb 58%, #38bdf8 100%);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.brand-copy {
    display: block;
    min-width: 0;
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted-strong);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.brand-copy strong {
    display: block;
    font-size: 23px;
    line-height: 1.22;
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-copy p {
    margin: 7px 0 0;
    max-width: 920px;
    font-size: 13px;
    color: var(--muted-strong);
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: var(--muted-strong);
    backdrop-filter: blur(10px);
}

.hero-chip-accent {
    color: var(--blue-strong);
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 10px;
}

.hero-stat {
    padding: 12px 10px 10px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(236, 244, 255, 0.92));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hero-stat strong {
    display: block;
    font-size: 20px;
    line-height: 1.05;
    color: var(--blue-strong);
    font-weight: 900;
}

.hero-stat span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.top-nav {
    position: sticky;
    top: 10px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 9px 10px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(6, 18, 35, 0.94), rgba(11, 31, 58, 0.94)),
        linear-gradient(90deg, rgba(37, 99, 235, 0.14), transparent);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.nav-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: 0.18s ease;
    white-space: nowrap;
}

.nav-chip span {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.nav-chip em {
    min-width: 22px;
    padding: 1px 6px;
    border-radius: 999px;
    font-style: normal;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
}

.nav-chip:hover {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(37, 99, 235, 0.16);
}

.nav-chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.92));
    border-color: rgba(191, 219, 254, 0.2);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.nav-chip.is-active em {
    background: rgba(255, 255, 255, 0.16);
}

.nav-home {
    background: rgba(255, 255, 255, 0.08);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 360px;
}

.search-box {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.search-box svg {
    width: 17px;
    height: 17px;
    fill: #64748b;
    flex: 0 0 auto;
}

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

.search-box input::placeholder {
    color: #94a3b8;
}

.search-button {
    min-height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.layout-grid {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 78px;
    display: grid;
    gap: 12px;
}

.sidebar-panel {
    padding: 12px;
}

.main-column {
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.panel-head h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
}

.tiny-link {
    font-size: 12px;
    color: var(--muted);
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.tiny-link.is-active,
.tiny-link:hover {
    color: var(--blue-strong);
    border-color: rgba(37, 99, 235, 0.18);
    background: var(--blue-soft);
}

.folder-tree {
    display: grid;
    gap: 10px;
}

.folder-group {
    padding: 10px 11px;
    border-radius: 15px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.folder-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.folder-group-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.folder-group-title.is-active,
.folder-group-title:hover {
    color: var(--blue-strong);
}

.folder-count {
    flex: 0 0 auto;
    min-width: 26px;
    padding: 1px 7px;
    border-radius: 999px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.06);
}

.folder-links {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding-left: 6px;
    border-left: 1px dashed rgba(148, 163, 184, 0.5);
}

.folder-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 10px;
    color: var(--muted-strong);
    font-size: 12.5px;
    transition: 0.16s ease;
}

.folder-link em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
    padding: 1px 6px;
}

.folder-link:hover,
.folder-link.is-active {
    color: var(--blue-strong);
    background: var(--blue-soft);
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.matrix-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    border: 1px solid rgba(37, 99, 235, 0.08);
    transition: 0.18s ease;
}

.matrix-link:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
}

.matrix-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

.matrix-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.matrix-copy strong {
    font-size: 12.5px;
    line-height: 1.2;
    color: var(--text);
}

.matrix-copy span {
    font-size: 11px;
    color: var(--muted);
}

.content-panel {
    padding: 14px 16px 16px;
}

.content-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.content-title-block h1 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
}

.content-title-block p {
    margin: 5px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.content-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sort-chip,
.filter-pill,
.clear-filter {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
}

.sort-chip {
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted-strong);
}

.filter-pill {
    color: var(--blue-strong);
    background: var(--blue-soft);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.clear-filter {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    color: var(--blue-strong);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.resource-list {
    display: grid;
    gap: 10px;
}

.resource-item {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(247, 250, 255, 0.98));
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: 0.18s ease;
}

.resource-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    border-color: rgba(37, 99, 235, 0.14);
}

.resource-link {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    align-items: stretch;
}

.resource-cover,
.article-cover {
    position: relative;
    overflow: hidden;
    border-radius: 13px;
    color: #fff;
    min-height: 96px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.resource-cover::before,
.article-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 55%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 40%);
    pointer-events: none;
}

.cover-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 11px;
    font-weight: 700;
}

.resource-cover strong,
.article-cover strong {
    position: relative;
    z-index: 1;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
}

.resource-cover small,
.article-cover small {
    position: relative;
    z-index: 1;
    font-size: 11px;
    opacity: 0.92;
}

.cover-blog {
    background: linear-gradient(135deg, #0f172a, #1d4ed8 60%, #38bdf8);
}

.cover-video {
    background: linear-gradient(135deg, #0b1024, #7c3aed 55%, #a855f7);
}

.cover-tutorial {
    background: linear-gradient(135deg, #0d1f1c, #0f9f86 55%, #2dd4bf);
}

.cover-code {
    background: linear-gradient(135deg, #1b1434, #4338ca 55%, #60a5fa);
}

.cover-paper {
    background: linear-gradient(135deg, #251226, #be185d 55%, #fb7185);
}

.resource-main {
    min-width: 0;
    display: grid;
    gap: 6px;
    align-content: start;
}

.resource-meta-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.type-badge,
.status-badge,
.section-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.type-badge {
    color: #fff;
}

.type-blog { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.type-video { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.type-tutorial { background: linear-gradient(135deg, #0f9f86, #14b8a6); }
.type-code { background: linear-gradient(135deg, #4338ca, #6366f1); }
.type-paper { background: linear-gradient(135deg, #be185d, #ec4899); }

.status-badge {
    color: var(--amber);
    background: rgba(245, 158, 11, 0.1);
}

.section-chip {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.06);
}

.resource-meta-inline,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 11.5px;
}

.resource-meta-inline {
    justify-content: flex-end;
    text-align: right;
}

.resource-code {
    color: var(--blue-strong);
    font-weight: 700;
}

.resource-main h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.38;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-main p {
    margin: 0;
    font-size: 12.8px;
    color: var(--muted-strong);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-meta-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted);
    font-size: 11.8px;
}

.resource-meta-bottom span {
    position: relative;
}

.resource-meta-bottom span:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    color: #cbd5e1;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.page-link,
.page-ellipsis {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.page-link {
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    color: var(--muted-strong);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.page-link:hover {
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--blue-strong);
}

.page-link.is-current {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.page-arrow {
    min-width: 72px;
}

.page-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--muted);
}

.empty-state {
    padding: 42px 16px;
    text-align: center;
}

.empty-state strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    color: var(--text);
}

.empty-state p {
    margin: 10px 0 0;
    color: var(--muted);
}

.empty-state .clear-filter {
    margin-top: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
}

.article-card {
    padding: 18px 18px 20px;
}

.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
}

.back-link,
.article-breadcrumb a:hover {
    color: var(--blue-strong);
}

.article-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 16px;
    align-items: stretch;
}

.article-copy h1 {
    margin: 10px 0 0;
    font-size: 28px;
    line-height: 1.24;
    color: var(--text);
}

.article-summary {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--muted-strong);
}

.article-meta {
    margin-top: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted-strong);
    font-size: 12px;
}

.article-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.article-section h2 {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.25;
    color: var(--text);
}

.article-section p {
    margin: 0 0 11px;
    font-size: 14px;
    color: #243244;
    line-height: 1.78;
}

.article-list {
    margin: 0;
    padding-left: 20px;
    color: #243244;
}

.article-list li {
    margin-top: 7px;
    line-height: 1.72;
}

.code-block {
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #0c1727;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.72;
}

.article-side {
    display: grid;
    gap: 12px;
    align-self: start;
    position: sticky;
    top: 78px;
}

.side-card {
    padding: 14px;
}

.side-card h3 {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.2;
}

.toc-list,
.related-list {
    display: grid;
    gap: 8px;
}

.toc-list a,
.related-item {
    display: block;
    padding: 9px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.toc-list a:hover,
.related-item:hover {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.related-type {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-strong);
    font-size: 11px;
    font-weight: 700;
}

.related-item strong {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.42;
    color: var(--text);
}

.related-item small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--muted);
}

.site-footer {
    margin-top: 12px;
}

.footer-about {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 14px;
    padding: 22px 22px 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 243, 255, 0.92)),
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 65%);
}

.footer-about::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -60px;
    bottom: -140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0));
    pointer-events: none;
}

.footer-about-copy {
    position: relative;
    z-index: 1;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted-strong);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.footer-about h2 {
    margin: 8px 0 0;
    font-size: 22px;
    line-height: 1.2;
    color: var(--text);
}

.footer-about p {
    margin: 10px 0 0;
    font-size: 13px;
    color: #243244;
    line-height: 1.78;
}

.footer-highlight-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.footer-highlight {
    min-height: 100%;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(10px);
}

.footer-highlight strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text);
}

.footer-highlight p {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.66;
    color: var(--muted-strong);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-top: 10px;
    padding: 0 8px 10px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.76);
}

.footer-legal a {
    color: rgba(191, 219, 254, 0.92);
}

.floating-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.contact-widget {
    position: relative;
    width: 250px;
    padding: 14px 14px 12px;
    border-radius: 18px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 247, 255, 0.98));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}

.contact-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted-strong);
}

.contact-head strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text);
}

.contact-head p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.contact-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-strong);
    font-size: 11px;
    font-weight: 700;
}

.contact-copy {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    text-align: left;
    color: var(--text);
}

.contact-copy:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.contact-copy-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.contact-copy strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.3;
}

.contact-copy em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 11px;
    color: var(--blue-strong);
}

.contact-dock,
.scroll-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border: none;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.contact-dock {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.dock-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
}

.scroll-top {
    width: 46px;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: 0.2s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 60;
    transform: translateX(-50%) translateY(10px);
    min-width: 120px;
    max-width: calc(100% - 36px);
    padding: 10px 14px;
    border-radius: 999px;
    text-align: center;
    color: #fff;
    background: rgba(8, 15, 30, 0.92);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.26);
    opacity: 0;
    pointer-events: none;
    transition: 0.18s ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.not-found-panel {
    min-height: 420px;
    display: grid;
    align-items: center;
}

@media (max-width: 1260px) {
    .hero-card {
        grid-template-columns: 1fr;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .article-side {
        position: static;
    }

    .footer-about {
        grid-template-columns: 1fr;
    }

    .footer-highlight-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .top-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        flex: 1 1 auto;
    }

    .layout-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .article-hero {
        grid-template-columns: 1fr;
    }

    .footer-highlight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 12.5px;
    }

    .page-shell {
        width: min(var(--max-width), calc(100% - 14px));
        margin-top: 7px;
    }

    .hero-card {
        padding: 15px 14px;
        gap: 14px;
    }

    .brand-copy strong {
        font-size: 19px;
        white-space: normal;
    }

    .brand-copy p {
        font-size: 12px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav-link-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .content-panel {
        padding: 12px;
    }

    .content-head {
        flex-direction: column;
    }

    .resource-link {
        grid-template-columns: 1fr;
    }

    .resource-cover {
        min-height: 88px;
    }

    .resource-meta-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-meta-inline {
        justify-content: flex-start;
        text-align: left;
    }

    .article-card {
        padding: 14px;
    }

    .article-copy h1 {
        font-size: 22px;
    }

    .footer-about {
        padding: 16px;
    }

    .floating-stack {
        right: 12px;
        bottom: 12px;
    }

    .contact-widget {
        width: min(240px, calc(100vw - 24px));
    }
}

/* --- refined interaction and project request updates --- */
:root {
    --max-width: 1720px;
    --radius-xl: 20px;
    --radius-lg: 15px;
    --radius-md: 11px;
    --radius-sm: 9px;
}

.page-shell {
    width: min(var(--max-width), calc(100% - 14px));
    margin-top: 8px;
}

.hero-card {
    grid-template-columns: minmax(0, 1fr) 286px;
    padding: 16px 18px;
    gap: 14px;
}

.brand-block {
    gap: 12px;
}

.brand-mark {
    width: 50px;
    height: 50px;
    padding: 0;
    overflow: hidden;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

.brand-copy strong {
    font-size: 21px;
}

.brand-copy p {
    margin: 5px 0 0;
    font-size: 12.6px;
}

.hero-chip {
    min-height: 28px;
}

.hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hero-stat {
    padding: 10px 10px 9px;
    border-radius: 14px;
}

.hero-stat strong {
    font-size: 18px;
}

.top-nav {
    top: 8px;
    margin-top: 10px;
}

.layout-grid {
    grid-template-columns: 242px minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.sidebar {
    top: 70px;
    gap: 10px;
}

.sidebar-panel {
    padding: 11px;
}

.folder-group {
    padding: 9px 10px;
    border-radius: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.folder-group.is-active {
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.08);
}

.folder-group-head {
    align-items: center;
    gap: 8px;
}

.folder-toggle {
    min-width: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.folder-toggle:hover .folder-group-title {
    color: var(--blue-strong);
}

.folder-caret {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    position: relative;
    transition: transform 0.18s ease, background 0.18s ease;
}

.folder-caret::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(-45deg);
    top: 4px;
    color: var(--muted-strong);
}

.folder-group.is-open .folder-caret {
    background: rgba(37, 99, 235, 0.1);
}

.folder-group.is-open .folder-caret::before {
    transform: rotate(45deg);
    top: 2px;
}

.folder-group-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.folder-group-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
}

.folder-filter {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.folder-filter:hover,
.folder-filter.is-active {
    color: var(--blue-strong);
    border-color: rgba(37, 99, 235, 0.16);
    background: var(--blue-soft);
}

.folder-links {
    margin-top: 9px;
    padding-left: 8px;
    gap: 4px;
}

.folder-links[hidden] {
    display: none !important;
}

.folder-link {
    padding: 6px 9px;
    border-radius: 9px;
}

.matrix-link {
    padding: 8px 9px;
}

.content-panel {
    padding: 13px 14px 15px;
}

.content-head {
    margin-bottom: 9px;
}

.content-title-block h1 {
    font-size: 20px;
}

.resource-list {
    gap: 8px;
}

.resource-item {
    border-radius: 15px;
}

.resource-link {
    grid-template-columns: 158px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
}

.resource-cover {
    min-height: 92px;
    padding: 10px 11px;
}

.resource-cover strong {
    font-size: 16px;
}

.resource-main {
    gap: 5px;
}

.resource-main h2 {
    font-size: 15.2px;
    line-height: 1.34;
}

.resource-main p {
    font-size: 12.4px;
    line-height: 1.55;
}

.resource-meta-bottom {
    gap: 5px 9px;
    font-size: 11.5px;
}

.pagination {
    margin-top: 12px;
}

.footer-about {
    padding: 20px 21px 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(230, 241, 255, 0.94) 56%, rgba(245, 249, 255, 0.97)),
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 68%);
}

.footer-about-copy {
    max-width: 720px;
}

.footer-about h2 {
    font-size: 21px;
}

.footer-about p {
    color: #243244;
}

.footer-highlight {
    background: rgba(255, 255, 255, 0.78);
}

.footer-legal {
    margin-top: 9px;
    padding-bottom: 12px;
}

.contact-widget {
    width: 258px;
}

.contact-close:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-strong);
}

.contact-dock,
.project-dock,
.scroll-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border: none;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.contact-dock,
.project-dock {
    text-decoration: none;
    font-weight: 700;
}

.contact-dock {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.project-dock {
    background: linear-gradient(135deg, #0f172a, #0f9f86);
}

.project-dock.is-current {
    background: linear-gradient(135deg, #0f172a, #0ea5a4);
}

.dock-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.scroll-top {
    width: 46px;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

.project-panel {
    padding: 18px 18px 20px;
}

.project-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.project-hero-copy h1 {
    margin: 8px 0 0;
    font-size: 28px;
    line-height: 1.16;
    color: var(--text);
}

.project-hero-copy p {
    margin: 8px 0 0;
    font-size: 13.2px;
    color: var(--muted-strong);
}

.project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.project-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.05);
}

.form-alert {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
}

.form-alert strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.2;
}

.form-alert span,
.form-alert li {
    font-size: 12.5px;
    color: var(--muted-strong);
}

.form-alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.form-alert.is-success {
    background: rgba(15, 159, 134, 0.08);
    border-color: rgba(15, 159, 134, 0.14);
}

.form-alert.is-error {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.16);
}

.project-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-section {
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.form-section-span {
    grid-column: 1 / -1;
}

.form-section-compact {
    padding-top: 12px;
    padding-bottom: 12px;
}

.form-section-head {
    margin-bottom: 10px;
}

.form-section-head h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text);
}

.type-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.type-card {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 13px 12px;
    border-radius: 15px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.type-card:hover,
.type-card.is-selected,
.type-card:has(input:checked) {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(234, 243, 255, 0.95));
}

.type-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.type-card-title {
    display: block;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
}

.type-card small {
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted-strong);
}

.field-block {
    display: grid;
    gap: 8px;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted-strong);
}

.field-block input,
.field-block textarea,
.upload-field {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
}

.field-block input,
.field-block textarea {
    padding: 11px 12px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field-block input:focus,
.field-block textarea:focus {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.field-block textarea {
    min-height: 188px;
    resize: vertical;
    line-height: 1.72;
}

.upload-field {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.upload-field:hover {
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.08);
}

.upload-field input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-field-main {
    display: grid;
    gap: 4px;
}

.upload-field-main strong {
    font-size: 13px;
    color: var(--text);
}

.upload-field-main small {
    font-size: 12px;
    color: var(--muted);
}

.agreement-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 12.5px;
    line-height: 1.6;
}

.agreement-line input {
    margin-top: 2px;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
}

.primary-button {
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 13px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.primary-button:hover {
    transform: translateY(-1px);
}

@media (max-width: 1320px) {
    .type-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1260px) {
    .layout-grid {
        grid-template-columns: 228px minmax(0, 1fr);
    }

    .project-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .type-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(var(--max-width), calc(100% - 12px));
    }

    .hero-card {
        padding: 14px 13px;
    }

    .layout-grid {
        gap: 8px;
    }

    .folder-group {
        padding: 8px 9px;
    }

    .resource-link {
        grid-template-columns: 1fr;
        padding: 8px;
    }

    .project-panel {
        padding: 14px;
    }

    .project-hero-copy h1 {
        font-size: 24px;
    }

    .type-card-grid {
        grid-template-columns: 1fr;
    }

    .floating-stack {
        gap: 8px;
    }

    .contact-dock,
    .project-dock {
        min-height: 42px;
        padding: 0 12px;
    }
}


/* --- v4 width tuning and clearer request type states --- */
body.page-home .page-shell {
    width: min(1460px, calc(100% - 40px));
}

body.page-detail .page-shell {
    width: min(1600px, calc(100% - 22px));
}

body.page-project .page-shell {
    width: min(1480px, calc(100% - 34px));
}

body.page-fallback .page-shell {
    width: min(1460px, calc(100% - 36px));
}

.type-card {
    overflow: hidden;
}

.type-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(29, 78, 216, 0));
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.type-card-check {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: rgba(255, 255, 255, 0);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    transform: scale(0.88);
    opacity: 0.78;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    pointer-events: none;
    z-index: 1;
}

.type-card:hover::before,
.type-card.is-selected::before,
.type-card:has(input:checked)::before {
    opacity: 1;
}

.type-card:hover,
.type-card.is-selected,
.type-card:has(input:checked) {
    transform: translateY(-1px);
    border-color: rgba(29, 78, 216, 0.44);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.14);
}

.type-card.is-selected,
.type-card:has(input:checked) {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(191, 219, 254, 0.96));
    border-color: rgba(29, 78, 216, 0.56);
    box-shadow:
        0 16px 32px rgba(37, 99, 235, 0.16),
        inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.type-card.is-selected .type-card-title,
.type-card:has(input:checked) .type-card-title {
    color: #11317a;
}

.type-card.is-selected small,
.type-card:has(input:checked) small {
    color: #1e3a5f;
}

.type-card.is-selected .type-card-check,
.type-card:has(input:checked) .type-card-check {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
    transform: scale(1);
    opacity: 1;
}

@media (max-width: 760px) {
    body.page-home .page-shell,
    body.page-detail .page-shell,
    body.page-project .page-shell,
    body.page-fallback .page-shell {
        width: min(100%, calc(100% - 12px));
    }

    .type-card-check {
        top: 9px;
        right: 9px;
        width: 22px;
        height: 22px;
    }
}
