:root {
  --ink: #24312d;
  --forest: #173f35;
  --forest-2: #245b4b;
  --jade: #5f8f72;
  --paper: #f8f5ec;
  --paper-deep: #eee8d9;
  --gold: #b38a48;
  --red: #9c4339;
  --muted: #717a75;
  --line: rgba(34, 63, 53, .14);
  --shadow: 0 20px 55px rgba(28, 48, 41, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.paper-grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .22; z-index: 20;
  background-image: radial-gradient(rgba(29,65,53,.12) .55px, transparent .55px);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
}

.site-header {
  position: sticky; top: 0; z-index: 15; height: 76px; padding: 0 max(5vw, 24px);
  display: flex; align-items: center; gap: 40px;
  background: rgba(248,245,236,.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 310px; }
.brand-seal {
  width: 42px; height: 42px; display: grid; place-items: center; color: #fff;
  background: var(--red); border: 1px solid #7f302c; font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.14); border-radius: 3px;
}
.brand-copy { display: flex; align-items: center; line-height: 1; }
.brand strong { display: block; color: var(--forest); letter-spacing: 2px; font: 700 18px "STSong", "SimSun", serif; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1.5px; line-height: 1.2; margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(23,63,53,.25); white-space: nowrap; }
.desktop-nav { flex: 1; display: flex; justify-content: center; gap: 32px; }
.desktop-nav a { color: #4e5c57; font-size: 14px; padding: 25px 2px 22px; border-bottom: 3px solid transparent; }
.desktop-nav a.active { color: var(--forest); border-bottom-color: var(--gold); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .avatar-button { border: 0; background: transparent; color: var(--forest); width: 40px; height: 40px; border-radius: 50%; font-size: 24px; }
.icon-button:hover { background: var(--paper-deep); }
.member-button { border: 1px solid var(--forest); border-radius: 2px; padding: 8px 18px; color: var(--forest); background: transparent; }
.member-button:hover { color: white; background: var(--forest); }
.avatar-button { background: var(--forest); color: white; font-size: 15px; }

main { min-height: calc(100vh - 76px); }
.page { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.wrap { width: min(1180px, 90vw); margin: 0 auto; }
.eyebrow { color: var(--gold); letter-spacing: 4px; font-size: 12px; font-weight: 700; }
.section-title { margin: 8px 0 6px; color: var(--forest); font: 700 clamp(25px, 3vw, 36px) "STSong", "SimSun", serif; letter-spacing: 2px; }
.section-subtitle { margin: 0; color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.text-link { color: var(--forest-2); font-size: 14px; border-bottom: 1px solid var(--jade); }

.hero { position: relative; overflow: hidden; min-height: 510px; color: white; background: var(--forest); }
.hero::before { content: ""; position: absolute; width: 530px; height: 530px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -110px; top: -130px; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.hero::after { content: "校长\A讲话"; white-space: pre; position: absolute; right: 1.5vw; bottom: 24px; color: rgba(255,255,255,.035); font: 700 105px/.94 "STKaiti", "KaiTi", serif; }
.hero-inner { position: relative; z-index: 2; width: min(1180px, 90vw); margin: 0 auto; padding: 86px 0 74px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 70px; align-items: center; }
.hero h1 { margin: 12px 0 20px; max-width: 730px; font: 700 clamp(38px, 5vw, 62px)/1.25 "STSong", "SimSun", serif; letter-spacing: 5px; }
.hero h1 em { color: #e0c792; font-style: normal; }
.hero-copy { max-width: 650px; color: rgba(255,255,255,.72); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.primary-btn, .secondary-btn, .danger-btn { border-radius: 3px; padding: 11px 22px; border: 1px solid transparent; }
.primary-btn { background: var(--gold); color: #fff; }
.primary-btn:hover { background: #c09754; }
.secondary-btn { background: transparent; color: inherit; border-color: currentColor; }
.hero-stat { border-left: 1px solid rgba(255,255,255,.2); padding-left: 45px; display: grid; gap: 24px; }
.stat-row strong { font: 700 32px "STSong", "SimSun", serif; color: #e4cf9f; }
.stat-row span { display: block; color: rgba(255,255,255,.58); font-size: 13px; }

.categories { margin-top: -28px; position: relative; z-index: 4; }
.category-collection { background: white; box-shadow: var(--shadow); border-top: 3px solid var(--gold); padding: 26px 28px 30px; }
.category-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 0 4px 20px; border-bottom: 1px solid var(--line); }
.category-heading h2 { margin: 5px 0 0; color: var(--forest); font: 700 28px "STSong", "SimSun", serif; letter-spacing: 2px; }
.category-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.category-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding-top: 18px; }
.category-group { padding: 18px; border: 1px solid var(--line); background: #fbfaf5; }
.category-group-head { margin-bottom: 13px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.category-group-head h3 { margin: 0 0 4px; color: var(--forest); font: 700 20px "STSong", "SimSun", serif; letter-spacing: 1px; }
.category-group-head span { color: var(--muted); font-size: 12px; }
.category-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 8px; }
.category-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 8px 9px; text-align: left; border: 0; background: transparent; cursor: pointer; }
.category-item:hover { background: #eee9dc; }
.category-item span { min-width: 0; color: var(--forest); font: 700 14px "STSong", "SimSun", serif; white-space: nowrap; }
.category-item small { color: var(--muted); font-size: 10px; white-space: nowrap; }

.featured-section, .latest-section { padding: 78px 0; }
.latest-section { background: #f0ecdf; }
.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.content-card { position: relative; background: #fff; border: 1px solid rgba(33,64,53,.1); transition: .25s ease; overflow: hidden; }
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-cover { height: 155px; position: relative; display: flex; align-items: end; padding: 18px; overflow: hidden; background: linear-gradient(135deg, #285948, #102f28); }
.card-cover::before { content: ""; position: absolute; inset: -20px; background: repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,.035) 22px 23px); }
.card-cover.gold { background: linear-gradient(135deg, #8b693b, #4f3821); }
.card-cover.red { background: linear-gradient(135deg, #873f38, #44201f); }
.card-cover.blue { background: linear-gradient(135deg, #38586c, #172e3b); }
.cover-watermark { position: absolute; z-index: 1; top: 52%; left: 50%; transform: translate(-50%,-50%); color: rgba(255,255,255,.105); font: 700 42px/1 "STKaiti", "KaiTi", serif; letter-spacing: 5px; white-space: nowrap; }
.member-tag { position: absolute; z-index: 3; top: 13px; right: 13px; color: #f4dfad; background: rgba(10,30,24,.62); padding: 5px 11px; font-size: 13px; }
.card-body { padding: 20px 20px 18px; }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.card-body h3 { margin: 9px 0 10px; color: var(--forest); font: 700 19px/1.5 "STSong", "SimSun", serif; }
.card-body p { color: var(--muted); font-size: 13px; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 13px; font-size: 12px; color: var(--muted); }
.favorite { border: 0; background: transparent; color: var(--gold); font-size: 19px; padding: 0; }
.value-banner { margin-top: 28px; background: var(--forest); color: white; display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 28px; gap: 28px; }
.value-item { display: flex; gap: 14px; align-items: center; }
.value-item b { width: 38px; height: 38px; border: 1px solid #bda164; display: grid; place-items: center; border-radius: 50%; color: #ddc991; }
.value-item span { display: block; font-size: 13px; color: rgba(255,255,255,.62); }

.page-hero { background: var(--forest); color: white; padding: 52px 0 42px; }
.page-hero h1 { margin: 4px 0; font: 700 36px "STSong", "SimSun", serif; letter-spacing: 3px; }
.page-hero p { color: rgba(255,255,255,.62); margin: 7px 0 0; }
.library-layout { display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 45px 0 80px; }
.filters { background: #fff; border: 1px solid var(--line); padding: 18px; height: fit-content; position: sticky; top: 96px; }
.filters h3 { margin: 0 0 14px; color: var(--forest); font: 700 17px "STSong", "SimSun", serif; }
.filter-list { display: grid; gap: 5px; }
.filter-list button { text-align: left; border: 0; padding: 9px 10px; color: #59645f; background: transparent; }
.filter-list button.active, .filter-list button:hover { background: #edf1e8; color: var(--forest); font-weight: 700; }
.search-box { display: flex; margin-bottom: 22px; }
.search-box input { flex: 1; min-width: 0; padding: 11px 14px; background: white; border: 1px solid var(--line); outline: 0; }
.search-box input:focus { border-color: var(--jade); }
.search-box button { border: 0; color: white; background: var(--forest); padding: 0 19px; }
.result-line { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.empty-state { text-align: center; background: white; padding: 60px 20px; border: 1px solid var(--line); }
.empty-state b { display: block; color: var(--forest); font: 700 22px "STSong", "SimSun", serif; }

.detail-wrap { width: min(920px, 90vw); margin: 0 auto; padding: 46px 0 90px; }
.breadcrumbs { color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.article-head { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 30px; }
.article-head .badge { color: var(--red); border: 1px solid rgba(156,67,57,.35); padding: 3px 10px; font-size: 12px; }
.article-head h1 { color: var(--forest); font: 700 clamp(27px,4vw,40px)/1.35 "STSong", "SimSun", serif; margin: 16px 0 12px; }
.article-meta { color: var(--muted); font-size: 13px; }
.article-body { font-family: "STSong", "SimSun", serif; font-size: 18px; line-height: 2.05; padding: 34px 4vw; background: rgba(255,255,255,.5); margin-top: 24px; }
.document-body-title { max-width: 820px; margin: 4px auto 30px; padding-bottom: 22px; border-bottom: 1px solid rgba(151,61,54,.22); color: var(--red); text-align: center; font: 700 28px/1.55 "STSong", "SimSun", serif; letter-spacing: 1px; }
.article-body h2 { color: var(--forest); font-size: 22px; margin-top: 30px; }
.locked-block { text-align: center; padding: 48px 20px; border-top: 1px dashed var(--gold); background: linear-gradient(transparent, #f3eee0); }
.locked-block h3 { font: 700 22px "STSong", "SimSun", serif; color: var(--forest); }
.attachment { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; background: white; border-left: 4px solid var(--gold); box-shadow: 0 7px 24px rgba(28,48,41,.07); }
.attachment-info { display: flex; align-items: center; gap: 14px; }
.file-icon { width: 45px; height: 52px; display: grid; place-items: center; background: #e7eee9; color: var(--forest); font-weight: 800; font-size: 11px; }
.attachment-info b { display: block; color: var(--forest); }
.attachment-info span { color: var(--muted); font-size: 12px; }
.download-btn { border: 0; background: var(--forest); color: white; padding: 10px 17px; white-space: nowrap; }
.download-btn:disabled { background: #a6aca9; cursor: not-allowed; }
.mobile-file-tip { margin-top: 10px; padding: 11px 14px; color: var(--muted); background: #f1eee5; font-size: 12px; }
.mobile-file-tip b { color: var(--forest); }
.original-preview { margin: -10px -2vw 10px; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #e9eee8; color: var(--forest); font-family: "Microsoft YaHei", sans-serif; }
.preview-heading b, .preview-heading span { display: block; }
.preview-heading span { color: var(--muted); font-size: 12px; font-weight: 400; }
.pdf-preview-loading, .pdf-preview-error { min-height: 360px; display: grid; place-items: center; padding: 30px; background: #e3e1da; color: var(--muted); font-family: "Microsoft YaHei", sans-serif; }
.pdf-preview-error { color: var(--red); }
.pdf-preview { position: relative; background: #d7d6d1; }
.pdf-preview iframe { display: block; width: 100%; height: 680px; border: 0; background: white; }
.open-pdf-link { position: absolute; top: 10px; right: 10px; color: var(--forest); background: rgba(255,255,255,.92); font-family: "Microsoft YaHei", sans-serif; font-size: 12px; padding: 6px 11px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 45px 0 80px; }
.profile-card { background: #fff; border: 1px solid var(--line); padding: 28px; }
.profile-card.wide { grid-column: 1 / -1; }
.member-identity { display: flex; align-items: center; gap: 16px; }
.large-avatar { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); font-size: 22px; }
.member-identity h2 { margin: 0; font: 700 22px "STSong", "SimSun", serif; color: var(--forest); }
.member-identity p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.quota-ring { width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; margin: 18px auto; background: conic-gradient(var(--gold) calc(var(--used) * 1%), #e9e5db 0); position: relative; }
.quota-ring::after { content: ""; position: absolute; inset: 10px; background: white; border-radius: 50%; }
.quota-ring span { position: relative; z-index: 1; text-align: center; color: var(--forest); }
.quota-ring strong { display: block; font-size: 30px; line-height: 1; }
.profile-card h3 { margin-top: 0; color: var(--forest); font: 700 19px "STSong", "SimSun", serif; }
.record-list { display: grid; }
.record { display: grid; grid-template-columns: 1fr 150px 90px; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.record span { color: var(--muted); }

.admin-switch { position: fixed; right: 18px; bottom: 20px; z-index: 12; border: 0; border-radius: 30px; background: var(--red); color: white; padding: 10px 15px; box-shadow: 0 8px 24px rgba(77,31,28,.25); }
.admin-layout { width: min(1180px, 92vw); margin: 0 auto; padding: 38px 0 80px; }
.admin-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin-bottom: 25px; }
.metric { background: white; border: 1px solid var(--line); padding: 20px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; color: var(--forest); font-size: 27px; }
.admin-panel { background: white; border: 1px solid var(--line); padding: 25px; margin-bottom: 20px; }
.admin-panel h2 { margin: 0 0 18px; color: var(--forest); font: 700 21px "STSong", "SimSun", serif; }
.panel-hint { color: var(--muted); font-size: 13px; margin: -10px 0 18px; }
.upload-zone { min-height: 112px; display: grid; place-items: center; align-content: center; gap: 3px; text-align: center; border: 1px dashed var(--jade); background: #f6f7f1; color: var(--forest); cursor: pointer; transition: .2s; }
.upload-zone:hover { background: #edf2e9; border-color: var(--forest); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone b { font: 700 17px "STSong", "SimSun", serif; }
.upload-zone span { color: var(--muted); font-size: 12px; }
.parse-status { margin-top: 14px; padding: 11px 14px; background: #edf4ee; border-left: 3px solid var(--jade); color: var(--forest); font-size: 13px; }
.parse-status span { color: var(--muted); }
.upload-fields { margin-top: 18px; }
.upload-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.upload-form-grid .wide-field { grid-column: 1 / -1; }
.upload-form-grid input, .upload-form-grid select, .upload-form-grid textarea { width: 100%; border: 1px solid var(--line); padding: 10px 11px; background: #fff; color: var(--ink); outline: 0; }
.upload-form-grid input:focus, .upload-form-grid select:focus, .upload-form-grid textarea:focus { border-color: var(--jade); }
.upload-form-grid input:disabled { background: #f3f1ea; color: var(--muted); }
.upload-actions { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.batch-zone { min-height: 95px; }
.batch-workspace { margin-top: 18px; }
.batch-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 9px; }
.batch-progress-head b, .batch-progress-head span { display: block; }
.batch-progress-head b { color: var(--forest); }
.batch-progress-head span { color: var(--muted); font-size: 12px; }
.progress-track { height: 7px; margin-bottom: 15px; overflow: hidden; background: #e8e5dc; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--jade),var(--gold)); transition: width .2s; }
.batch-table { min-width: 850px; }
.batch-table input, .batch-table select { width: 100%; min-width: 150px; padding: 7px 8px; border: 1px solid var(--line); background: white; }
.batch-table .word-input { min-width: 85px; width: 90px; }
.batch-table small { color: var(--muted); }
.stored-body-loading { min-height: 280px; display: grid; place-items: center; color: var(--muted); background: #f3f1ea; }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; }
.form-row input, .form-row select { width: 100%; border: 1px solid var(--line); padding: 10px; background: #fff; }
.invite-result { margin-top: 15px; padding: 14px; background: #f1eee4; word-break: break-all; display: flex; justify-content: space-between; gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.status { display: inline-block; padding: 2px 8px; background: #e4efe8; color: var(--forest); }
.status.used { background: #eee9df; color: #777; }
.status.warning { background: #f8edcf; color: #8b641e; }
.status.expired { background: #f1e3df; color: var(--red); }
.status.paused { background: #e7e8e6; color: #676d69; }
.status.disabled { background: #554e4b; color: white; }
.tiny-btn { border: 1px solid var(--line); background: white; color: var(--forest); padding: 4px 9px; }
.danger-text { color: var(--red); }
.member-toolbar { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; margin-bottom: 14px; }
.member-toolbar select, .member-toolbar input { min-width: 0; border: 1px solid var(--line); padding: 9px 11px; background: white; }
.member-summary { display: flex; flex-wrap: wrap; gap: 18px; padding: 11px 14px; margin-bottom: 12px; background: #f3f1e8; color: var(--muted); font-size: 12px; }
.member-summary b { color: var(--forest); font-size: 16px; margin-left: 3px; }
.member-table { min-width: 1050px; }
.member-table small { color: var(--muted); }
.member-actions { min-width: 290px; }
.member-actions .tiny-btn { margin: 2px 1px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(14,28,23,.65); z-index: 30; backdrop-filter: blur(3px); }
.modal { position: fixed; z-index: 31; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(430px,90vw); max-height: 90vh; overflow: auto; background: var(--paper); padding: 34px; box-shadow: 0 25px 80px rgba(0,0,0,.3); }
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: transparent; font-size: 25px; color: var(--muted); }
.modal h2 { color: var(--forest); font: 700 25px "STSong", "SimSun", serif; margin: 0 0 8px; }
.modal p { color: var(--muted); font-size: 14px; }
.login-icon { width: 70px; height: 70px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: white; font: 700 24px "STSong", "SimSun", serif; box-shadow: 0 8px 24px rgba(21,47,40,.18); }
.auth-form { display: grid; gap: 13px; margin-top: 20px; text-align: left; }
.auth-form label { display: grid; gap: 6px; color: var(--forest); font-size: 13px; }
.auth-form input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--line); background: white; color: var(--ink); outline: none; }
.auth-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(180,145,73,.12); }
.auth-form .full-btn { margin-top: 0; }
.auth-note { margin-top: 14px; padding: 10px 12px; background: #f1eee4; color: var(--muted); font-size: 12px; text-align: center; }
.auth-error { min-height: 18px; color: var(--red); font-size: 12px; text-align: left; }
.auth-footnote { margin: 12px 0 0; font-size: 12px !important; text-align: center; }
.full-btn { width: 100%; border: 0; padding: 12px; color: white; background: var(--forest); margin-top: 12px; }
.invite-ticket { border: 1px dashed var(--gold); background: #fffdf7; padding: 18px; margin: 18px 0; text-align: center; }
.invite-ticket strong { display: block; color: var(--forest); font-size: 26px; }
.toast { position: fixed; z-index: 50; bottom: 26px; left: 50%; transform: translate(-50%,20px); background: #152f28; color: white; padding: 10px 18px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .site-header { height: 66px; padding: 0 16px; }
  .brand { min-width: 0; flex: 1; }
  .brand-seal { width: 37px; height: 37px; }
  .brand strong { font-size: 16px; }
  .brand small { display: none; }
  .header-actions .icon-button { display: none; }
  main { min-height: calc(100vh - 126px); padding-bottom: 60px; }
  .hero-inner { grid-template-columns: 1fr; padding: 58px 0 70px; }
  .hero-stat { grid-template-columns: repeat(3,1fr); border-left: 0; border-top: 1px solid rgba(255,255,255,.2); padding: 22px 0 0; }
  .hero::after { font-size: 82px; right: -10px; bottom: 18px; }
  .category-strip { grid-template-columns: repeat(2,1fr); }
  .category-heading { align-items: flex-start; flex-direction: column; }
  .content-grid { grid-template-columns: repeat(2,1fr); }
  .value-banner { grid-template-columns: 1fr; }
  .library-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filter-list { grid-template-columns: repeat(3,1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card.wide { grid-column: auto; }
  .admin-grid { grid-template-columns: repeat(2,1fr); }
  .mobile-nav { position: fixed; z-index: 18; bottom: 0; left: 0; right: 0; height: 60px; display: grid; grid-template-columns: repeat(4,1fr); background: rgba(248,245,236,.97); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
  .mobile-nav a { display: grid; place-items: center; align-content: center; color: #6c756f; font-size: 10px; }
  .mobile-nav a span { font-size: 18px; line-height: 1.1; }
  .mobile-nav a.active { color: var(--forest); }
  .admin-switch { bottom: 72px; }
}

@media (max-width: 580px) {
  .member-button { padding: 7px 11px; font-size: 13px; }
  .hero { min-height: auto; }
  .hero h1 { letter-spacing: 2px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-stat { gap: 10px; }
  .stat-row strong { font-size: 24px; }
  .categories { margin-top: -18px; }
  .category-collection { padding: 22px 16px 24px; }
  .category-strip { grid-template-columns: 1fr; }
  .category-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .featured-section, .latest-section { padding: 55px 0; }
  .section-heading { align-items: start; gap: 10px; }
  .library-layout { padding-top: 25px; }
  .filter-list { grid-template-columns: repeat(2,1fr); }
  .attachment { align-items: flex-start; flex-direction: column; }
  .download-btn { width: 100%; }
  .article-body { padding: 25px 18px; font-size: 17px; }
  .original-preview { margin: -8px -18px 8px; }
  .pdf-preview iframe { height: 65vh; min-height: 430px; }
  .open-pdf-link { position: static; display: block; text-align: center; border: 0; border-top: 1px solid var(--line); }
  .record { grid-template-columns: 1fr; gap: 2px; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .member-toolbar { grid-template-columns: 1fr; }
  .upload-form-grid { grid-template-columns: 1fr; }
  .upload-form-grid .wide-field { grid-column: auto; }
  .upload-actions { align-items: stretch; flex-direction: column; }
  .batch-progress-head { align-items: flex-start; }
}
