:root {
    --navy: #12355B;
    --blue: #1B5E9A;
    --red: #B4232C;
    --gold: #B9964A;
    --bg: #F3F6F9;
    --text: #1F2937;
    --muted: #5C6B7A;
    --line: #D9E1EA;
    --card: #FFFFFF;
    --soft: #E8EEF5;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}
body > main { flex: 1 0 auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1720px, calc(100% - 48px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.is-hidden { display: none !important; }

.topstrip { background: #A61F2A; color: #F8E8E6; font-size: 14px; line-height: 1.2; }
.topstrip-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topstrip-inner { min-height: 34px; }
.top-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.top-nav a { color: #F8E8E6; padding: 6px 12px; }
.top-nav a:hover { color: #FFE7A3; }
.top-nav a.is-active { color: #FFE7A3; font-weight: 650; }
.top-side { display: flex; align-items: center; gap: 12px; min-width: 0; color: #F8E8E6; }
.top-meta { color: rgba(255,255,255,.82); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-login { color: #fff; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.top-login .icon { width: 14px; height: 14px; }
.top-user { white-space: nowrap; }
.page { padding: 22px 0 40px; }
.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 78px; align-items: flex-start; flex-direction: column; padding: 16px 0; gap: 4px; }
.footer-inner p { margin: 0; }

.lib-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 16px; }
.lib-head h1, .case-hero h1, .admin-main h1 { margin: 0; font-size: 28px; line-height: 1.35; color: var(--navy); font-weight: 650; }
.lib-kicker, .crumb { margin: 0 0 4px; color: var(--gold); font-size: 14px; letter-spacing: .04em; }
.crumb { color: var(--muted); }
.lead { margin: 6px 0 0; color: var(--muted); max-width: 920px; }
.lib-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; background: #fff; color: var(--navy); padding: 8px 14px; border-radius: 4px; cursor: pointer; line-height: 1.4; }
.btn .icon, .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-line { border-color: #B7C6D6; background: #fff; }
.btn-text { background: transparent; border-color: transparent; color: var(--blue); padding-inline: 6px; }
.btn-sm { padding: 6px 10px; }
.btn-gold { background: var(--gold); color: #fff; }

.search-hero { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); padding: 14px; margin-bottom: 16px; }
.search-hero input { flex: 1; height: 46px; border: 1px solid #C9D5E2; padding: 0 12px; border-radius: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 14px 16px 12px; min-height: 108px; }
.stat:nth-child(2) { border-top-color: var(--blue); }
.stat:nth-child(3) { border-top-color: var(--gold); }
.stat:nth-child(4) { border-top-color: var(--red); }
.stat-label { display: block; color: var(--muted); }
.stat strong { display: inline-block; font-size: 34px; line-height: 1.2; color: var(--navy); margin-right: 6px; }
.stat-unit { color: var(--muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 16px; }
.panel-hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #F8FAFC; }
.panel-hd h2, .panel-hd h1 { margin: 0; font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 6px; font-weight: 650; }
.panel-hd span, .panel-hd a { color: var(--muted); font-size: 14px; }
.panel-bd { padding: 14px 16px; }
.split, .filter-layout, .doc-layout, .triple, .map-split { display: grid; gap: 16px; }
.map-split { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 420px); }
.triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.filter-layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.doc-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.map-box, .chart-box { height: 540px; }
.chart-box { height: 320px; }

.plain-list a, .entry-list a, .stack-list a, .admin-side a, .plain-list article { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.plain-list a:last-child, .stack-list a:last-child, .stack-list article:last-child { border-bottom: 0; }
.plain-list strong, .stack-list strong { color: var(--navy); font-weight: 650; }
.plain-list span, .stack-list span, .meta-line { color: var(--muted); }
.entry-list a { flex-direction: row; justify-content: space-between; align-items: center; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.entry { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); padding: 18px 16px; color: var(--navy); min-height: 92px; }
.entry strong { display: block; margin-top: 8px; font-size: 18px; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.course-grid a { border: 1px solid var(--line); padding: 12px; color: var(--text); background: #F8FAFC; }
.course-grid p { margin: 6px 0 0; color: var(--muted); }

.case-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; background: #fff; border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 12px; }
.case-item h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.4; }
.case-item h2 a { color: var(--navy); }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0; }
.meta-line span { display: inline-flex; align-items: center; gap: 4px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { display: inline-block; background: var(--soft); color: var(--navy); border-radius: 2px; padding: 2px 8px; font-size: 14px; }
.tag-gold { background: #F8F1E3; color: #7A6230; }
.doc-names, .reason, .form-note { color: var(--muted); margin: 6px 0; }
.case-actions { display: flex; flex-direction: column; gap: 8px; }
.result-count { margin: 0 0 10px; color: var(--navy); }

.tag-dim h3 { margin: 12px 0 4px; font-size: 16px; color: var(--navy); }
.dim-note { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.tag-check { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.tag-check span { flex: 1; min-width: 0; line-height: 1.45; }
.tag-check em { color: var(--blue); font-style: normal; min-width: 1.5em; text-align: right; }
.filter-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.hint-box { background: #F8F1E3; border: 1px solid #E4D3AE; color: #6E5828; padding: 8px 10px; margin-bottom: 10px; }
.advanced .panel-bd { display: none; }
.advanced.is-open .panel-bd { display: block; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid label, .stack-form label { display: flex; flex-direction: column; gap: 4px; color: var(--navy); }
.span-2 { grid-column: span 2; }
input, select, textarea { width: 100%; border: 1px solid #C9D5E2; border-radius: 4px; padding: 8px 10px; background: #fff; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; flex: 0 0 16px; accent-color: var(--blue); }
textarea { resize: vertical; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.check-line { flex-direction: row !important; align-items: center; }
.block-title { margin: 16px 0 8px; color: var(--navy); font-size: 18px; }
.req { color: #A61F2A; font-style: normal; font-size: 13px; }
.picked-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 4px; padding: 8px 0 10px; border-bottom: 2px solid #C53434; }
.picked-tags > span { color: #A61F2A; }
.picked-tags .picked-empty { color: #8A7B6A; font-style: normal; }
.picked-chip { border: 0; background: transparent; color: #3D342C; cursor: pointer; font: inherit; padding: 0; }
.picked-chip i { margin-left: 6px; color: #A61F2A; font-style: normal; }
.intake-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.intake-cats .hint-box { grid-column: 1 / -1; }
.intake-cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 1px solid #E6D9C8; background: #FBF7F1; padding: 12px 14px; cursor: pointer; }
.intake-cat strong { color: #A61F2A; font-weight: 650; }
.intake-cat span { color: #6D6256; font-size: 14px; min-width: 0; text-align: right; }
.pick-backdrop { display: none; }
body.is-picking .pick-backdrop { display: block; position: fixed; inset: 0; background: rgba(40, 24, 20, .45); z-index: 45; }
.pick-sheet { display: none; }
.tag-dim.is-picking .pick-sheet,
[data-point-picker].is-picking .pick-sheet { display: flex; flex-direction: column; position: fixed; z-index: 50; left: 50%; top: 48px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 96px); background: #fff; border-top: 3px solid #C53434; }
.pick-search { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 8px 10px; border: 1px solid #E6D9C8; background: #fff; color: #3D342C; }
.is-filtered-out { display: none !important; }
.point-pick-list { list-style: none; margin: 0; padding: 0; }
.point-pick-list li { border-bottom: 1px solid #F3EBDF; }
.point-pick-list label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.point-dims { margin-bottom: 12px; }
.point-dim h4 { margin: 10px 0 4px; color: #A61F2A; font-size: 15px; }
.point-dim.is-hidden { display: none; }
.pick-sheet-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #E6D9C8; }
.pick-sheet-hd h3 { margin: 0; color: #3D342C; font-size: 18px; }
.pick-sheet-hd button { border: 0; background: #A61F2A; color: #fff; padding: 6px 16px; cursor: pointer; }
.pick-sheet-bd { overflow: auto; padding: 8px 16px 16px; }
.pick-sheet .tag-check { flex: 1; }
.kind-switch { display: flex; gap: 18px; margin-bottom: 12px; }
.kind-switch label { display: flex; gap: 6px; align-items: center; }
.login-panel { max-width: 560px; margin: 20px auto; }

.doc-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.doc-tab { border: 1px solid var(--line); background: #fff; border-radius: 4px 4px 0 0; padding: 8px 12px; cursor: pointer; color: var(--navy); }
.doc-tab small { display: block; color: var(--muted); font-size: 12px; }
.doc-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.doc-tab.is-active small { color: #D5E2EF; }
.doc-paper { margin: 0 16px 16px; border: 1px solid var(--line); background: #fff; min-height: 420px; }
.paper-tool { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #F4F7FA; border-bottom: 1px solid var(--line); color: var(--navy); }
.doc-pdf .paper-tool { border-top: 3px solid var(--red); }
.doc-docx .paper-tool { border-top: 3px solid var(--blue); }
.doc-ofd .paper-tool { border-top: 3px solid var(--gold); }
.doc-txt .paper-tool { border-top: 3px solid #7D8B99; }
.paper-body { padding: 16px 18px 24px; white-space: normal; }
.paper-file { padding: 0; }
.doc-frame { display: block; width: 100%; height: 72vh; min-height: 520px; border: 0; background: #525659; }
.doc-html p { margin: 0 0 0.8em; line-height: 1.8; }
.doc-pre { margin: 0; white-space: pre-wrap; font-family: inherit; }
.case-hero { padding: 18px 18px 8px; }
.case-hero .lib-actions { margin: 8px 0 12px; }
.doc-side .panel-bd p { margin: 0; }
.stack-list article { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stack-list article p { margin: 4px 0 0; }

.region-stat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.region-stat b { display: block; font-size: 26px; color: var(--navy); }
.region-links { display: flex; flex-direction: column; gap: 6px; }
.region-links a { color: var(--text); }

.arch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.arch-col { border: 1px solid var(--line); padding: 12px 14px; background: #F8FAFC; }
.arch-col h3, .two-col h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.std-list { margin: 0; padding-left: 20px; }
.std-list li { margin: 8px 0; }
.dim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dim-grid a { display: flex; flex-direction: column; border: 1px solid var(--line); padding: 10px 12px; color: var(--text); min-height: 84px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow-step { border: 1px solid var(--line); padding: 12px; color: var(--text); background: #fff; }
.flow-step b { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--navy); color: #fff; margin-bottom: 8px; }
.flow-step span, .flow-step small { display: block; }
.flow-step small { color: var(--muted); }

.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-side { background: #fff; border: 1px solid var(--line); padding: 8px; }
.side-title { margin: 8px 10px; color: var(--navy); font-weight: 650; }
.admin-side a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--text); border-left: 3px solid transparent; }
.admin-side a.is-active { background: var(--soft); border-left-color: var(--blue); color: var(--navy); }
.admin-main h1 { margin-bottom: 12px; }
.tag-admin { display: grid; grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.tag-admin.mode-table { grid-template-columns: 200px minmax(0, 1fr); }
.tag-admin.mode-table > .panel:last-child { grid-column: 1 / -1; }
.plain-list a.is-current { color: var(--blue); font-weight: 650; }
.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: 8px 10px; }
.table th { background: #F7F9FB; color: var(--navy); font-weight: 650; }
.wide-table thead { display: none; }
.wide-table, .wide-table tbody { display: block; }
.wide-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wide-table td { display: flex; flex-direction: column; padding: 0; border: 0; min-width: 0; word-break: break-word; }
.wide-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs a { padding: 4px 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); }
.filter-tabs a.is-active { background: var(--navy); color: #fff; }
.flash { padding: 10px 12px; margin-bottom: 12px; background: #EAF3FB; border: 1px solid #C5D8EA; color: var(--navy); }
.flash-error { background: #FBECEE; border-color: #E7C4C7; color: var(--red); }
.flash-ok { background: #F4F7FA; }
.empty-panel { padding: 28px 20px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 20px; }
.pager a { min-width: 36px; text-align: center; border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 4px 8px; }
.pager a.is-active { background: var(--navy); color: #fff; }
fieldset { border: 1px solid var(--line); margin: 0; padding: 8px 10px; }
legend { color: var(--navy); padding: 0 4px; }

.is-doc-home { background: #F4EFE6; }
.is-doc-home .site-footer { background: #A61F2A; color: #F8E8E6; border-top: 0; }
.page-doc-home { width: 100%; max-width: none; padding: 0 0 28px; background: #F4EFE6; }

.ws-banner { position: relative; overflow: hidden; background: #C53434; color: #fff; padding: 26px 0 34px; }
.ws-arcs { position: absolute; right: 0; bottom: -20px; width: min(46vw, 640px); height: auto; pointer-events: none; }
.ws-banner-inner { position: relative; width: min(1100px, calc(100% - 48px)); margin: 0 auto; text-align: center; }
.ws-emblem { width: 120px; height: 127px; margin: 0 auto 10px; display: grid; place-items: center; }
.ws-emblem img { width: 120px; height: 127px; display: block; object-fit: contain; }
.ws-banner h1 { margin: 8px 0 0; font-size: 40px; font-weight: 650; letter-spacing: .08em; line-height: 1.3; }
.ws-kicker { margin: 6px 0 0; color: #fff; font-size: 16px; letter-spacing: .16em; }
.ws-cats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 18px; }
.ws-cats a { color: #fff; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; font-size: 16px; }
.ws-cats a:hover, .ws-cats a.is-current { color: #FFE7A3; }
.ws-typenav { background: #C53434; }
.ws-typenav .container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 52px; }
.ws-typenav a { color: #fff; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; }
.ws-typenav a:hover, .ws-typenav a.is-current { color: #FFE7A3; }
.doc-wrap { padding-top: 22px; }
.is-doc-home .btn-primary { background: #C53434; border-color: #C53434; }
.is-doc-home .btn-primary:hover { background: #A61F2A; border-color: #A61F2A; color: #fff; }
.is-doc-home .lib-head h1, .is-doc-home .case-hero h1 { color: #3D342C; }
.is-doc-home .lib-kicker { color: #A61F2A; }
.is-doc-home .panel { border-color: #E6D9C8; }
.is-doc-home .panel-hd { background: #FBF7F1; border-bottom-color: #E6D9C8; }
.is-doc-home .panel-hd h2 { color: #3D342C; }
.is-doc-home .doc-tab.is-active { background: #A61F2A; border-color: #A61F2A; }
.is-doc-home .doc-tab.is-active small { color: #F8E8E6; }
.is-doc-home .pager a.is-active { background: #A61F2A; }
.is-doc-home .tag { background: #F6EFE4; color: #5C4632; }
.is-doc-home .case-item h2 a, .is-doc-home .plain-list strong { color: #3D342C; }
.ws-search-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.ws-search { display: flex; align-items: stretch; width: min(760px, 100%); height: 48px; background: #fff; }
.ws-adv { display: flex; align-items: center; padding: 0 16px; color: #333; border-right: 1px solid #E6E6E6; white-space: nowrap; }
.ws-adv:hover { color: #A61F2A; }
.ws-search input { width: auto; flex: 1; min-width: 0; height: 48px; border: 0; border-radius: 0; padding: 0 14px; color: #3D342C; caret-color: #3D342C; }
.ws-search input::placeholder { color: #8A7B6A; }
.ws-search button[type="submit"] { border: 0; border-radius: 0; background: #243B67; color: #fff; padding: 0 28px; cursor: pointer; }
.ws-search button[type="submit"]:hover { background: #1A2C4E; }
button.ws-adv { background: #fff; border: 0; cursor: pointer; font: inherit; }
button.ws-help { background: transparent; cursor: pointer; padding: 0; }
.ws-help { width: 42px; height: 42px; border: 2px solid #fff; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.ws-help:hover { color: #FFE7A3; border-color: #FFE7A3; }
.ws-slogan { margin: 22px 0 0; font-size: 30px; font-style: italic; letter-spacing: .42em; font-weight: 500; }

.ws-stats { display: flex; justify-content: center; gap: 72px; padding: 34px 24px 8px; }
.ws-stat { width: 230px; text-align: center; color: #4A4036; }
.ws-stat-icon { width: 86px; height: 86px; margin: 0 auto 8px; border-radius: 50%; background: #C53434; color: #fff; display: grid; place-items: center; }
.ws-stat-icon .icon { width: 34px; height: 34px; }
.ws-stat b { font-size: 28px; line-height: 1.2; color: #2B241C; margin-right: 4px; }
.ws-unit { color: #6D6256; }
.ws-sub { margin: 12px 0 0; text-align: left; color: #6D6256; font-size: 14px; }
.ws-sub span { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; }
.ws-sub span::before { content: ""; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: #C53434; flex: 0 0 auto; }

.ws-map { width: min(1720px, calc(100% - 48px)); margin: 18px auto 8px; text-align: center; }
.ws-map h2 { margin: 8px 0 0; font-size: 28px; font-weight: 650; color: #3D342C; }
.ws-map > p { margin: 4px 0 8px; color: #8A7B6A; }
.ws-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; text-align: left; align-items: stretch; }
.ws-map .map-box { height: min(900px, calc(100vh - 300px)); min-height: 760px; }
.ws-map #region-panel { border-left: 1px solid #E3D5C2; padding: 12px 8px 12px 28px; max-height: min(900px, calc(100vh - 300px)); min-height: 760px; overflow: auto; scrollbar-width: none; }
.ws-map #region-panel::-webkit-scrollbar { width: 0; height: 0; }
.ws-map #region-title { margin: 4px 0 12px; color: #C53434; font-size: 22px; font-weight: 650; }
.ws-map .region-stat b { color: #3D342C; }
.ws-map .region-links a { display: block; padding: 7px 0; border-bottom: 1px dotted #CDBBA4; color: #3D342C; }
.ws-map .region-links a:hover { color: #A61F2A; }
.ws-map h3 { margin: 14px 0 6px; font-size: 16px; color: #3D342C; }
.ws-lower { padding-top: 8px; }

.list-quick { display: flex; align-items: stretch; height: 46px; margin: 0 0 12px; background: #fff; border: 1px solid #E6D9C8; }
.picked-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 2px solid #C53434; min-height: 28px; color: #3D342C; }
.picked-bar > span { color: #A61F2A; }
.picked-bar a { color: #3D342C; }
.picked-bar a:hover { color: #A61F2A; }
.picked-bar i { margin-left: 6px; color: #A61F2A; font-style: normal; font-size: 16px; }
.list-adv, .list-help { border: 0; background: #fff; color: #3D342C; cursor: pointer; font: inherit; }
.list-adv { display: flex; align-items: center; padding: 0 16px; border-right: 1px solid #E6D9C8; white-space: nowrap; line-height: 1; }
.list-adv:hover, .list-help:hover { color: #A61F2A; }
.list-quick input { width: auto; flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 0; }
.list-quick button[type="submit"] { border: 0; border-radius: 0; background: #243B67; color: #fff; padding: 0 28px; cursor: pointer; }
.list-help { width: 46px; border-left: 1px solid #E6D9C8; font-size: 18px; }
.doc-sheet { display: grid; grid-template-columns: 280px minmax(0, 1fr); background: #fff; border: 1px solid #E6D9C8; border-top: 3px solid #C53434; align-items: stretch; min-height: calc(100vh - 240px); }
.facet-side { border-right: 1px solid #E6D9C8; padding: 6px 12px 18px; max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 8px; }
.facet-dim h3 { margin: 14px 0 4px; font-size: 15px; color: #A61F2A; }
.facet-dim h4, .facet-sub h4 { margin: 10px 0 2px; font-size: 13px; color: #6E5B4E; font-weight: 650; }
.facet-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 1px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.facet-toggle i { flex: 0 0 14px; width: 14px; height: 14px; border: 1px solid #C4A484; background: #fff; color: #A61F2A; font: 700 14px/12px Arial, "Microsoft YaHei", sans-serif; text-align: center; }
.facet-toggle i::before { content: "+"; }
.facet-dim.is-open > h3 .facet-toggle i::before,
.facet-sub.is-open > h4 .facet-toggle i::before { content: "−"; }
.facet-dim > .facet-body,
.facet-sub > .facet-body { display: none; }
.facet-dim.is-open > .facet-body,
.facet-sub.is-open > .facet-body { display: block; }
.facet-empty { margin: 0 0 8px; color: #8A7B6A; font-size: 13px; }
.xtree-label { overflow-wrap: anywhere; }
.xtree { list-style: none; margin: 0; padding: 0; --xtree-ink: #C4A484; --xtree-mark: #A61F2A; }
body.is-admin .xtree { --xtree-ink: #8FA0B3; --xtree-mark: #1A2332; }
.xtree-root, .xtree .xtree { position: relative; margin: 0 0 0 7px; padding: 0 0 1px 28px; }
.xtree .xtree { display: none; }
.xtree-item.is-open > .xtree { display: block; }
.xtree-root::before, .xtree .xtree::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 12px; width: 3px; background-image: radial-gradient(circle, var(--xtree-ink) 1.15px, transparent 1.35px); background-size: 3px 5px; background-repeat: repeat-y; }
.xtree .xtree::before { top: -8px; }
.xtree-item { position: relative; }
.xtree-root > .xtree-item > .xtree-row::before, .xtree .xtree > .xtree-item > .xtree-row::before { content: ""; position: absolute; left: -28px; top: 8px; width: 28px; height: 4px; background-image: radial-gradient(circle, var(--xtree-ink) 1.15px, transparent 1.35px); background-size: 5px 4px; background-repeat: repeat-x; }
.xtree-root:has(> .xtree-item:only-child) { margin-left: 0; padding-left: 0; }
.xtree-root:has(> .xtree-item:only-child)::before,
.xtree-root:has(> .xtree-item:only-child) > .xtree-item > .xtree-row::before { content: none; }
.xtree-row { display: flex; align-items: flex-start; gap: 8px; min-height: 22px; position: relative; }
.xtree-switch, .xtree-elbow { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 3px; position: relative; z-index: 1; }
.xtree-switch { border: 1px solid var(--xtree-ink); background: #fff; color: var(--xtree-mark); padding: 0; cursor: pointer; line-height: 12px; }
.xtree-switch::before { content: "+"; display: block; font: 700 14px/12px Arial, "Microsoft YaHei", sans-serif; }
.xtree-item.is-open > .xtree-row > .xtree-switch::before { content: "−"; }
.xtree-root > .xtree-item > .xtree-row > .xtree-switch,
.xtree-root > .xtree-item > .xtree-row > .xtree-elbow,
.xtree .xtree > .xtree-item > .xtree-row > .xtree-switch,
.xtree .xtree > .xtree-item > .xtree-row > .xtree-elbow { position: absolute; left: -35px; top: 3px; }
.xtree-root:has(> .xtree-item:only-child) > .xtree-item > .xtree-row > .xtree-switch,
.xtree-root:has(> .xtree-item:only-child) > .xtree-item > .xtree-row > .xtree-elbow { position: relative; left: auto; top: auto; }
.xtree-label { min-width: 0; color: #3D342C; line-height: 1.45; padding: 1px 0; }
.xtree-label em { font-style: normal; color: #8A7B6A; margin-left: 4px; }
.xtree-item.is-on > .xtree-row > .xtree-label,
.xtree-label.is-on { color: #A61F2A; font-weight: 650; }
body.is-admin .xtree-label { color: var(--text); }
body.is-admin .xtree-label.is-current { color: var(--blue); font-weight: 650; }
.xtree-row .tag-check { flex: 1; align-items: center; padding: 0; }
.pick-sheet .xtree-row .tag-check { padding: 1px 0; }
.doc-results { padding: 12px 18px 8px; }
.doc-results .result-count { color: #6D6256; border-bottom: 1px solid #E6D9C8; padding-bottom: 8px; }
.doc-results .case-item { background: transparent; border: 0; border-bottom: 1px solid #EFE6DA; border-radius: 0; margin: 0; padding: 14px 0; }
.doc-results .case-item h2 { font-size: 18px; }
.doc-results .case-item h2 a { color: #243B67; }
.doc-results .case-item h2 a:hover { color: #A61F2A; }
.search-modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(40, 24, 20, .45); }
.search-modal-panel { position: relative; width: min(980px, 100%); max-height: calc(100vh - 80px); overflow: auto; background: #fff; border-top: 3px solid #C53434; padding: 16px 18px 20px; }
.search-modal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.search-modal-hd h2 { margin: 0; color: #3D342C; font-size: 20px; }
.search-modal-tags { margin-top: 8px; max-height: 46vh; overflow: auto; }
.search-modal-tags .tag-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.search-modal-tags .hint-box { grid-column: 1 / -1; }
.search-modal-actions { display: flex; gap: 10px; margin-top: 14px; }

@media (max-width: 1360px) {
    .container { width: min(1720px, calc(100% - 32px)); }
    .top-meta { display: none; }
    .course-grid, .flow, .dim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .map-split, .doc-layout, .filter-layout, .triple, .split, .admin-shell, .tag-admin, .ws-map-layout, .doc-sheet { grid-template-columns: minmax(0, 1fr); }
    .ws-stats { gap: 28px; flex-wrap: wrap; }
    .ws-banner h1 { font-size: 32px; letter-spacing: .04em; }
    .ws-slogan { font-size: 24px; letter-spacing: .28em; }
    .ws-map #region-panel { border-left: 0; border-top: 1px solid #E3D5C2; padding: 16px 0 0; }
    .filter-side, .facet-side { position: static; max-height: none; }
    .facet-side { border-right: 0; border-bottom: 1px solid #E6D9C8; }
    .stat strong { font-size: 28px; }
}
@media (max-width: 900px) {
    .stat-grid, .entry-grid, .form-grid, .arch, .two-col, .course-grid, .flow, .dim-grid, .wide-table tr, .intake-cats { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .search-modal-tags .tag-panel { grid-template-columns: 1fr; }
    .lib-head, .case-item { flex-direction: column; display: flex; }
    .case-item { display: flex; }
    body.is-admin .admin-app { grid-template-columns: minmax(0, 1fr); }
    .admin-nav { position: static; height: auto; }
}

body.is-admin { background: #E8EDF2; }
body.is-admin .admin-app { flex: 1; display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.admin-nav { background: #1A2332; color: #C5D0DC; position: sticky; top: 0; height: 100vh; overflow: auto; padding-bottom: 24px; }
.admin-brand { display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
.admin-brand:hover { color: #fff; }
.admin-brand strong { font-size: 18px; font-weight: 650; }
.admin-brand span { color: #8FA0B3; font-size: 12px; }
.admin-group { margin: 16px 18px 6px; color: #7E90A4; font-size: 12px; letter-spacing: .14em; }
.admin-nav > a { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 1px 10px; padding: 8px 10px; color: #D5DEE8; border-radius: 4px; }
.admin-nav > a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav > a.is-active { background: #243044; color: #fff; box-shadow: inset 3px 0 0 #C53434; }
.admin-nav .icon { width: 16px; height: 16px; }
.admin-workspace { min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 0 22px; background: #fff; border-bottom: 1px solid #D7DEE6; position: sticky; top: 0; z-index: 5; }
.admin-top > strong { color: #1A2332; font-size: 16px; }
.admin-top-side { display: flex; align-items: center; gap: 14px; color: #5C6B7A; font-size: 14px; }
.admin-top-side a { display: inline-flex; align-items: center; gap: 4px; color: #1B5E9A; }
.admin-main { padding: 20px 22px 40px; }
body.is-admin .admin-main h1 { font-size: 20px; margin-bottom: 14px; color: #1A2332; }
body.is-admin .table-wrap { background: #fff; border: 1px solid #D7DEE6; }
body.is-admin .stat { border-color: #D7DEE6; border-top-color: #1A2332; }
body.is-admin .panel { border-color: #D7DEE6; }
