:root {
  --primary: #0b7a53;
  --accent: #f0bd24;
  --navy: #12305a;
  --ink: #13233a;
  --muted: #667085;
  --line: #e7ecf1;
  --soft: #f5f8f7;
  --white: #fff;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(18, 48, 90, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.icon { width: 24px; height: 24px; }
.topbar { background: var(--navy); color: rgba(255,255,255,.9); font-size: 13px; }
.topbar .container { display:flex; gap:12px; align-items:center; justify-content:center; min-height: 36px; text-align:center; }
.topbar-dot { width:7px; height:7px; background:var(--accent); border-radius:50%; flex:0 0 auto; }
.header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); border-bottom:1px solid rgba(231,236,241,.9); }
.nav { min-height: 80px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand { display:flex; align-items:center; gap:12px; min-width: 0; }
.brand img { width:52px; height:52px; object-fit:contain; }
.brand-copy { min-width:0; }
.brand-copy strong { display:block; font-size:15px; line-height:1.2; color:var(--navy); }
.brand-copy span { display:block; font-size:12px; color:var(--muted); margin-top:4px; }
.navlinks { display:flex; align-items:center; gap:26px; font-size:14px; font-weight:700; }
.navlinks a:hover { color:var(--primary); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:46px; padding:0 18px; border-radius:12px; font-weight:800; font-size:14px; border:1px solid transparent; cursor:pointer; transition:.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background:var(--primary); color:white; box-shadow:0 8px 22px rgba(11,122,83,.2); }
.btn-dark { background:var(--navy); color:#fff; }
.btn-ghost { border-color:var(--line); background:#fff; color:var(--navy); }
.menu-btn { display:none; background:none; border:0; color:var(--navy); padding:8px; }
.mobile-menu { display:none; }
.hero { overflow:hidden; position:relative; background: linear-gradient(135deg, #f5fbf8 0%, #fbfcf5 55%, #f5f8ff 100%); border-bottom:1px solid var(--line); }
.hero::before { content:""; position:absolute; width:520px; height:520px; right:-150px; top:-180px; border-radius:50%; background:radial-gradient(circle, rgba(240,189,36,.18), rgba(240,189,36,0) 68%); }
.hero-grid { position:relative; min-height:610px; display:grid; grid-template-columns:1.08fr .92fr; align-items:center; gap:70px; padding:72px 0; }
.eyebrow { display:inline-flex; align-items:center; gap:9px; color:var(--primary); font-size:12px; letter-spacing:.13em; font-weight:900; margin-bottom:18px; }
.eyebrow::before { content:""; width:26px; height:2px; background:var(--accent); }
h1 { font-size:clamp(44px, 6vw, 72px); line-height:1.02; letter-spacing:-.045em; margin:0 0 22px; color:var(--navy); max-width:820px; }
.hero-copy > p { font-size:18px; color:#526176; max-width:690px; margin:0 0 28px; }
.search-card { background:#fff; border:1px solid rgba(18,48,90,.08); border-radius:18px; padding:10px; box-shadow:var(--shadow); display:flex; gap:10px; max-width:690px; }
.search-card .search-input { display:flex; align-items:center; gap:10px; flex:1; padding:0 10px; }
.search-card input { width:100%; border:0; outline:0; min-height:50px; color:var(--ink); }
.hero-actions { display:flex; align-items:center; gap:14px; margin-top:18px; flex-wrap:wrap; }
.hero-note { margin-top:14px; color:var(--muted); font-size:12px; }
.hero-visual { position:relative; min-height:430px; }
.visual-panel { position:absolute; inset:20px 0 0 34px; border-radius:32px; background:var(--navy); overflow:hidden; box-shadow:0 30px 80px rgba(18,48,90,.22); }
.visual-panel::before, .visual-panel::after { content:""; position:absolute; border-radius:50%; }
.visual-panel::before { width:280px; height:280px; right:-80px; top:-70px; background:rgba(240,189,36,.13); }
.visual-panel::after { width:310px; height:310px; left:-120px; bottom:-130px; background:rgba(37,184,133,.15); }
.visual-grid { position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size:32px 32px; }
.visual-logo { position:absolute; top:36px; left:36px; width:82px; height:82px; padding:9px; border-radius:22px; background:white; box-shadow:0 12px 32px rgba(0,0,0,.12); }
.visual-logo img { width:100%; height:100%; object-fit:contain; }
.visual-kicker { position:absolute; left:38px; top:145px; color:rgba(255,255,255,.58); letter-spacing:.16em; font-weight:800; font-size:11px; }
.visual-title { position:absolute; left:38px; top:175px; right:45px; color:#fff; font-weight:900; font-size:34px; line-height:1.08; letter-spacing:-.03em; }
.visual-card { position:absolute; left:38px; right:38px; bottom:38px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.13); border-radius:18px; padding:18px; backdrop-filter:blur(10px); color:#fff; }
.visual-card strong { display:block; font-size:14px; }
.visual-card span { display:block; font-size:12px; color:rgba(255,255,255,.63); margin-top:4px; }
.pulse { display:inline-block; width:8px; height:8px; border-radius:50%; background:#55df9b; margin-right:7px; box-shadow:0 0 0 6px rgba(85,223,155,.12); }
.stats-wrap { position:relative; margin-top:-42px; z-index:5; }
.stats { display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow); overflow:hidden; }
.stat { display:flex; align-items:center; gap:14px; padding:24px; border-right:1px solid var(--line); }
.stat:last-child { border-right:0; }
.stat-icon { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:#eff8f4; color:var(--primary); flex:0 0 auto; }
.stat strong { display:block; color:var(--navy); font-size:22px; line-height:1.1; }
.stat span { display:block; font-size:12px; color:var(--muted); margin-top:5px; }
.section { padding:94px 0; }
.section-soft { background:var(--soft); }
.section-heading { max-width:720px; margin-bottom:36px; }
.section-heading.row { max-width:none; display:flex; justify-content:space-between; align-items:end; gap:24px; }
.kicker { color:var(--primary); font-size:12px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; margin-bottom:10px; }
h2 { margin:0; color:var(--navy); font-size:clamp(32px, 4vw, 46px); letter-spacing:-.035em; line-height:1.08; }
.section-heading p { color:var(--muted); font-size:16px; margin:14px 0 0; }
.platform-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.platform-card { position:relative; padding:28px; min-height:290px; border-radius:var(--radius); border:1px solid var(--line); background:#fff; overflow:hidden; transition:.22s ease; }
.platform-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.platform-card::after { content:""; position:absolute; width:150px; height:150px; border-radius:50%; right:-70px; top:-70px; background:rgba(11,122,83,.06); }
.platform-icon { width:58px; height:58px; border-radius:18px; display:grid; place-items:center; background:#eff8f4; color:var(--primary); margin-bottom:22px; }
.platform-card h3, .card h3 { margin:0 0 8px; color:var(--navy); font-size:21px; line-height:1.25; }
.platform-card p, .card p { color:var(--muted); font-size:14px; margin:0; }
.card-subtitle { font-size:12px; font-weight:900; letter-spacing:.08em; color:var(--primary); text-transform:uppercase; margin-bottom:8px; }
.badge { display:inline-flex; align-items:center; min-height:27px; padding:0 9px; border-radius:999px; background:#eff8f4; color:var(--primary); font-size:11px; font-weight:900; }
.platform-footer { position:absolute; left:28px; right:28px; bottom:24px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.text-link { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:900; color:var(--navy); }
.text-link .icon { width:17px; height:17px; }
.collection-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.collection-card { border:1px solid var(--line); border-radius:20px; background:#fff; overflow:hidden; }
.book-cover { height:200px; padding:22px; position:relative; display:flex; align-items:flex-end; background:linear-gradient(135deg, #0f355d, #0d7a53); overflow:hidden; }
.collection-card:nth-child(2) .book-cover { background:linear-gradient(135deg, #115d58, #60a86a); }
.collection-card:nth-child(3) .book-cover { background:linear-gradient(135deg, #5e477c, #173e63); }
.collection-card:nth-child(4) .book-cover { background:linear-gradient(135deg, #926a16, #d6a925); }
.book-cover::before { content:""; position:absolute; width:170px; height:170px; border:1px solid rgba(255,255,255,.16); border-radius:50%; right:-60px; top:-50px; }
.book-cover::after { content:"MEDISTRA LIBRARY"; position:absolute; top:20px; left:22px; font-size:10px; color:rgba(255,255,255,.58); letter-spacing:.16em; font-weight:900; }
.book-cover strong { color:#fff; font-size:21px; line-height:1.12; position:relative; z-index:2; max-width:190px; }
.card-body { padding:20px; }
.card-body h3 { font-size:17px; }
.card-meta { color:var(--primary); font-size:12px; font-weight:900; margin-bottom:8px; }
.card-actions { margin-top:16px; }
.news-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:20px; }
.news-feature { border-radius:24px; background:var(--navy); color:#fff; padding:36px; min-height:390px; position:relative; overflow:hidden; }
.news-feature::before { content:""; position:absolute; width:350px; height:350px; border-radius:50%; background:rgba(240,189,36,.11); right:-100px; bottom:-150px; }
.news-feature .badge { background:rgba(255,255,255,.1); color:#fff; }
.news-feature h3 { font-size:32px; line-height:1.1; margin:56px 0 16px; max-width:530px; position:relative; }
.news-feature p { color:rgba(255,255,255,.68); max-width:590px; position:relative; }
.news-feature .text-link { color:#fff; margin-top:30px; position:relative; }
.news-list { display:grid; gap:14px; }
.news-item { padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.news-item-top { display:flex; justify-content:space-between; gap:14px; margin-bottom:10px; }
.news-item time { color:var(--muted); font-size:12px; font-weight:800; }
.news-item h3 { margin:0 0 8px; font-size:18px; color:var(--navy); line-height:1.25; }
.events-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.event-card { border:1px solid var(--line); border-radius:20px; padding:24px; background:#fff; }
.event-date { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.date-box { width:62px; min-height:62px; border-radius:15px; display:grid; place-items:center; background:var(--navy); color:#fff; font-weight:900; text-align:center; font-size:13px; }
.event-card h3 { margin:0 0 9px; font-size:19px; color:var(--navy); }
.event-card p { color:var(--muted); font-size:14px; }
.event-meta { display:grid; gap:7px; margin-top:18px; font-size:12px; color:#59687c; }
.event-meta span { display:flex; align-items:center; gap:8px; }
.event-meta .icon { width:17px; height:17px; color:var(--primary); }
.resource-groups { display:grid; gap:20px; }
.resource-group { border:1px solid var(--line); border-radius:22px; background:#fff; padding:24px; }
.resource-group h3 { color:var(--navy); margin:0 0 18px; font-size:18px; }
.resource-list { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.resource-item { border:1px solid var(--line); border-radius:15px; padding:16px; display:flex; align-items:center; justify-content:space-between; gap:14px; transition:.2s; }
.resource-item:hover { border-color:rgba(11,122,83,.35); background:#fbfefd; }
.resource-item strong { display:block; font-size:14px; color:var(--navy); }
.resource-item span { font-size:11px; color:var(--muted); display:block; margin-top:2px; }
.resource-item .icon { width:18px; color:var(--primary); }
.service-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.service-card { padding:24px; border-radius:19px; border:1px solid var(--line); background:#fff; }
.service-card .platform-icon { width:48px; height:48px; border-radius:14px; margin-bottom:17px; }
.service-card h3 { font-size:18px; margin:0 0 8px; color:var(--navy); }
.service-card p { font-size:13px; color:var(--muted); min-height:63px; }
.facility-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.facility-card { border-radius:24px; min-height:320px; padding:30px; background:linear-gradient(145deg, #0f355d, #0b7a53); color:#fff; position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:flex-end; }
.facility-card:nth-child(2) { background:linear-gradient(145deg, #164a67, #27896b); }
.facility-card:nth-child(3) { background:linear-gradient(145deg, #5f4d24, #b28b1d); }
.facility-card::before { content:""; position:absolute; inset:0; background-image:radial-gradient(circle at 75% 25%, rgba(255,255,255,.15), transparent 22%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size:auto, 30px 30px, 30px 30px; }
.facility-card .platform-icon { position:absolute; top:28px; left:28px; background:rgba(255,255,255,.13); color:#fff; }
.facility-card h3 { position:relative; margin:0 0 8px; font-size:24px; }
.facility-card p { position:relative; margin:0; color:rgba(255,255,255,.73); font-size:14px; }
.hours-wrap { display:grid; grid-template-columns:.9fr 1.1fr; border-radius:28px; overflow:hidden; background:var(--navy); color:#fff; }
.hours-panel { padding:48px; }
.hours-panel h2 { color:#fff; }
.hours-panel p { color:rgba(255,255,255,.65); }
.hours-list { display:grid; gap:14px; margin-top:30px; }
.hours-row { display:flex; justify-content:space-between; gap:20px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,.1); font-size:14px; }
.hours-row span { color:rgba(255,255,255,.65); }
.contact-panel { padding:48px; background:#f6f9f7; color:var(--ink); }
.contact-panel h3 { margin:0 0 22px; color:var(--navy); font-size:26px; }
.contact-list { display:grid; gap:16px; }
.contact-row { display:flex; gap:13px; align-items:flex-start; }
.contact-row .platform-icon { width:42px; height:42px; border-radius:12px; margin:0; flex:0 0 auto; }
.contact-row strong { display:block; font-size:13px; color:var(--navy); }
.contact-row span { display:block; font-size:13px; color:var(--muted); margin-top:3px; }
.cta { padding:70px 0; }
.cta-box { border-radius:28px; padding:48px; background:linear-gradient(120deg, var(--primary), #0e5a54); color:#fff; display:flex; align-items:center; justify-content:space-between; gap:36px; position:relative; overflow:hidden; }
.cta-box::after { content:""; position:absolute; width:300px; height:300px; right:-100px; top:-130px; border-radius:50%; background:rgba(240,189,36,.16); }
.cta-copy { position:relative; z-index:2; max-width:700px; }
.cta-box h2 { color:#fff; font-size:36px; }
.cta-box p { color:rgba(255,255,255,.72); margin:12px 0 0; }
.cta-box .btn { position:relative; z-index:2; background:#fff; color:var(--navy); flex:0 0 auto; }
.faq-list { border-top:1px solid var(--line); }
.faq-item { border-bottom:1px solid var(--line); }
.faq-button { width:100%; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:22px 0; border:0; background:none; color:var(--navy); font-weight:850; text-align:left; cursor:pointer; }
.faq-plus { width:32px; height:32px; border-radius:50%; background:var(--soft); display:grid; place-items:center; flex:0 0 auto; transition:.2s; }
.faq-answer { max-height:0; overflow:hidden; transition:max-height .28s ease; color:var(--muted); font-size:14px; }
.faq-answer p { margin:0; padding:0 52px 22px 0; }
.faq-item.open .faq-answer { max-height:220px; }
.faq-item.open .faq-plus { transform:rotate(45deg); background:#eaf6f0; color:var(--primary); }
.footer { background:#0c213d; color:#fff; padding:58px 0 24px; }
.footer-grid { display:grid; grid-template-columns:1.5fr repeat(3,1fr); gap:42px; }
.footer .brand-copy strong { color:#fff; }
.footer .brand-copy span, .footer p, .footer a { color:rgba(255,255,255,.61); }
.footer p { font-size:13px; max-width:390px; }
.footer h4 { font-size:13px; margin:0 0 15px; }
.footer-links { display:grid; gap:9px; font-size:13px; }
.footer a:hover { color:#fff; }
.footer-bottom { margin-top:40px; padding-top:20px; border-top:1px solid rgba(255,255,255,.1); display:flex; justify-content:space-between; gap:20px; color:rgba(255,255,255,.48); font-size:12px; }

/* Admin */
.admin-body { background:#f4f6f8; min-height:100vh; }
.admin-shell { display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.sidebar { background:#0c213d; color:#fff; padding:22px 16px; position:sticky; top:0; height:100vh; overflow:auto; }
.sidebar .brand { padding:4px 8px 22px; border-bottom:1px solid rgba(255,255,255,.08); margin-bottom:18px; }
.sidebar .brand img { width:42px; height:42px; }
.sidebar .brand-copy strong { color:#fff; font-size:13px; }
.sidebar .brand-copy span { color:rgba(255,255,255,.5); }
.side-label { color:rgba(255,255,255,.38); text-transform:uppercase; letter-spacing:.13em; font-size:10px; font-weight:900; padding:12px 10px 8px; }
.side-nav { display:grid; gap:4px; }
.side-nav a { padding:10px 12px; border-radius:10px; font-size:13px; color:rgba(255,255,255,.72); font-weight:750; }
.side-nav a:hover, .side-nav a.active { background:rgba(255,255,255,.09); color:#fff; }
.admin-main { min-width:0; }
.admin-top { min-height:68px; background:#fff; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; padding:0 28px; position:sticky; top:0; z-index:30; }
.admin-top strong { color:var(--navy); }
.admin-user { font-size:12px; color:var(--muted); }
.admin-content { padding:30px; }
.admin-title-row { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.admin-title-row h1 { font-size:30px; margin:0; }
.admin-title-row p { color:var(--muted); margin:6px 0 0; font-size:13px; }
.admin-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.admin-stat { background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; }
.admin-stat span { display:block; color:var(--muted); font-size:12px; }
.admin-stat strong { display:block; color:var(--navy); font-size:28px; margin-top:5px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px; margin-top:20px; }
.panel h3 { margin:0 0 16px; color:var(--navy); }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:13px 12px; border-bottom:1px solid var(--line); text-align:left; font-size:12px; vertical-align:top; }
th { color:#667085; background:#fafbfc; font-weight:850; }
td strong { color:var(--navy); }
.actions { display:flex; gap:7px; flex-wrap:wrap; }
.btn-sm { min-height:34px; padding:0 10px; border-radius:8px; font-size:11px; }
.btn-danger { background:#fff1f1; color:#b42318; border-color:#ffd7d7; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-field { display:grid; gap:7px; }
.form-field.full { grid-column:1/-1; }
.form-field label { font-size:12px; font-weight:850; color:#344054; }
.form-field input, .form-field textarea, .form-field select { width:100%; border:1px solid #d9e0e7; border-radius:10px; padding:11px 12px; outline:0; background:#fff; color:var(--ink); }
.form-field textarea { min-height:115px; resize:vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(11,122,83,.09); }
.form-help { color:var(--muted); font-size:11px; }
.form-actions { display:flex; gap:10px; margin-top:20px; }
.checkbox-row { display:flex; align-items:center; gap:9px; }
.checkbox-row input { width:auto; }
.alert { padding:12px 14px; border-radius:10px; margin-bottom:16px; font-size:12px; }
.alert-success { background:#ecfdf3; color:#027a48; border:1px solid #abefc6; }
.alert-error { background:#fef3f2; color:#b42318; border:1px solid #fecdca; }
.login-page { min-height:100vh; display:grid; place-items:center; background:linear-gradient(145deg,#f5fbf8,#eef2f8); padding:24px; }
.login-card { width:min(430px,100%); background:#fff; border:1px solid var(--line); border-radius:22px; padding:32px; box-shadow:var(--shadow); }
.login-card .brand { margin-bottom:26px; }
.login-card h1 { font-size:28px; margin-bottom:8px; }
.login-card > p { color:var(--muted); font-size:13px; margin:0 0 24px; }
.demo-credentials { margin-top:18px; border-radius:12px; background:#fff8e5; border:1px solid #f5df9d; padding:12px; color:#6f5610; font-size:11px; }
.preview-logo { width:80px; height:80px; object-fit:contain; border:1px solid var(--line); border-radius:14px; padding:6px; background:#fff; }

@media (max-width: 980px) {
  .navlinks { display:none; }
  .menu-btn { display:block; }
  .mobile-menu.open { display:grid; padding:0 0 16px; gap:6px; }
  .mobile-menu a { padding:10px 4px; border-bottom:1px solid var(--line); font-size:14px; font-weight:800; }
  .hero-grid { grid-template-columns:1fr; gap:30px; min-height:auto; }
  .hero-visual { min-height:380px; }
  .stats { grid-template-columns:1fr 1fr; }
  .stat:nth-child(2) { border-right:0; }
  .stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .platform-grid, .events-grid, .service-grid, .facility-grid { grid-template-columns:1fr 1fr; }
  .collection-grid { grid-template-columns:1fr 1fr; }
  .news-grid, .hours-wrap { grid-template-columns:1fr; }
  .resource-list { grid-template-columns:1fr 1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .admin-shell { grid-template-columns:1fr; }
  .sidebar { position:relative; height:auto; }
  .admin-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width:min(100% - 28px, 1180px); }
  .brand-copy span { display:none; }
  .nav { min-height:68px; }
  .brand img { width:44px; height:44px; }
  .hero-grid { padding:56px 0 74px; }
  h1 { font-size:43px; }
  .hero-copy > p { font-size:15px; }
  .search-card { display:grid; }
  .search-card .btn { width:100%; }
  .hero-visual { min-height:350px; }
  .visual-panel { inset:10px 0 0 0; }
  .visual-title { font-size:28px; }
  .stats-wrap { margin-top:-34px; }
  .stats, .platform-grid, .collection-grid, .events-grid, .service-grid, .facility-grid, .resource-list, .footer-grid, .admin-grid, .form-grid { grid-template-columns:1fr; }
  .stat { border-right:0; border-bottom:1px solid var(--line); }
  .stat:last-child { border-bottom:0; }
  .section { padding:72px 0; }
  .section-heading.row { align-items:flex-start; flex-direction:column; }
  .news-feature { padding:28px; min-height:360px; }
  .news-feature h3 { font-size:27px; }
  .hours-panel, .contact-panel, .cta-box { padding:30px; }
  .cta-box { align-items:flex-start; flex-direction:column; }
  .cta-box h2 { font-size:30px; }
  .footer-bottom { flex-direction:column; }
  .admin-content, .admin-top { padding-left:16px; padding-right:16px; }
  .admin-title-row { align-items:flex-start; flex-direction:column; }
  .form-field.full { grid-column:auto; }
}

/* v2: slider, resource logos, map, rich editor */
.home-slider { position:relative; width:100%; height:clamp(430px, 54vw, 650px); background:var(--navy); overflow:hidden; }
.home-slide { position:relative; height:100%; background-size:cover; background-position:center; background-color:var(--navy); }
.home-slide-fallback { background-image:radial-gradient(circle at 80% 20%, rgba(240,189,36,.32), transparent 28%), radial-gradient(circle at 12% 88%, rgba(37,184,133,.32), transparent 30%), linear-gradient(125deg,#0c213d,#0d5d53 65%,#12305a); }
.home-slide-fallback::before { content:""; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:36px 36px; }
.home-slide-fallback::after { content:"MEDISTRA"; position:absolute; right:4vw; bottom:-3vw; color:rgba(255,255,255,.035); font-size:clamp(90px,18vw,250px); line-height:1; font-weight:950; letter-spacing:-.08em; }
.home-slide-overlay { position:absolute; inset:0; background:linear-gradient(90deg,rgba(5,25,48,.92) 0%,rgba(5,25,48,.76) 44%,rgba(5,25,48,.18) 78%,rgba(5,25,48,.12)); }
.home-slide-content { position:relative; z-index:2; height:100%; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; color:#fff; padding-top:52px; padding-bottom:74px; }
.home-slide-content h2 { max-width:820px; color:#fff; font-size:clamp(38px,5vw,66px); line-height:1.03; letter-spacing:-.04em; text-shadow:0 8px 34px rgba(0,0,0,.22); }
.slide-kicker { display:inline-flex; align-items:center; gap:10px; margin-bottom:14px; font-size:12px; font-weight:900; letter-spacing:.15em; color:#ffe083; }
.slide-kicker::before { content:""; width:28px; height:2px; background:var(--accent); }
.slide-description { max-width:720px; color:rgba(255,255,255,.82); font-size:17px; margin:14px 0 24px; }
.slide-description p { margin:0; }
.btn-slider { background:#fff; color:var(--navy); }
.home-slider .swiper-pagination-bullet { background:#fff; opacity:.45; }
.home-slider .swiper-pagination-bullet-active { opacity:1; width:28px; border-radius:8px; }
.slider-nav { position:absolute; z-index:8; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; border:1px solid rgba(255,255,255,.28); background:rgba(9,29,52,.34); color:#fff; font-size:34px; line-height:1; display:grid; place-items:center; cursor:pointer; backdrop-filter:blur(8px); }
.slider-prev { left:24px; } .slider-next { right:24px; }
.slider-nav:hover { background:rgba(9,29,52,.7); }

.rich-text { color:inherit; }
.rich-text > :first-child { margin-top:0; }
.rich-text > :last-child { margin-bottom:0; }
.rich-text p { margin:.45em 0; }
.rich-text ul, .rich-text ol { padding-left:1.45em; }
.rich-text blockquote { margin:1em 0; padding:10px 16px; border-left:3px solid var(--primary); background:rgba(11,122,83,.055); }
.rich-text img { max-width:100%; height:auto; border-radius:12px; margin:10px 0; }
.rich-text iframe { width:100%; aspect-ratio:16/9; border:0; border-radius:12px; margin:12px 0; }
.rich-text a { color:var(--primary); text-decoration:underline; text-underline-offset:2px; }
.ql-align-center { text-align:center; } .ql-align-right { text-align:right; } .ql-align-justify { text-align:justify; }
.card-rich { color:var(--muted); font-size:14px; }
.card-rich p { margin:.35em 0; }
.facility-rich { color:rgba(255,255,255,.76); }

.resource-groups { display:grid; gap:38px; }
.resource-group { border:1px solid var(--line); border-radius:24px; background:#fff; padding:24px; box-shadow:0 12px 35px rgba(18,48,90,.045); }
.resource-group-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:18px; }
.resource-group-heading > div { display:flex; gap:13px; align-items:center; }
.resource-category-icon { width:48px; height:48px; border-radius:14px; display:grid; place-items:center; background:#eff8f4; color:var(--primary); }
.resource-category-icon .icon { width:22px; height:22px; }
.resource-group-label { display:block; color:var(--primary); font-size:9px; letter-spacing:.15em; font-weight:900; }
.resource-group h3 { margin:2px 0 0; color:var(--navy); font-size:21px; }
.resource-count { color:var(--muted); font-size:11px; font-weight:800; background:var(--soft); border-radius:999px; padding:6px 10px; white-space:nowrap; }
.resource-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.resource-card { display:grid; grid-template-columns:60px minmax(0,1fr) 28px; align-items:center; gap:14px; border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; min-height:96px; transition:.2s ease; }
.resource-card:hover { transform:translateY(-2px); border-color:rgba(11,122,83,.24); box-shadow:0 12px 30px rgba(18,48,90,.08); }
.resource-logo { width:60px; height:60px; border-radius:14px; border:1px solid var(--line); display:grid; place-items:center; overflow:hidden; background:#fff; padding:8px; }
.resource-logo img { width:100%; height:100%; object-fit:contain; }
.resource-logo-fallback { background:linear-gradient(135deg,var(--navy),var(--primary)); color:#fff; border:0; font-weight:950; letter-spacing:-.04em; font-size:18px; }
.resource-copy { min-width:0; }
.resource-copy strong { display:block; color:var(--navy); font-size:15px; line-height:1.25; }
.resource-copy span { display:block; color:var(--primary); font-size:11px; font-weight:800; margin-top:3px; }
.resource-copy small { display:block; color:var(--muted); font-size:11px; line-height:1.45; margin-top:6px; }
.resource-arrow { color:var(--navy); opacity:.55; }
.resource-arrow .icon { width:18px; height:18px; }

.map-frame { margin-top:18px; border-radius:24px; overflow:hidden; border:1px solid var(--line); background:#fff; box-shadow:var(--shadow); }
.map-frame iframe { display:block; width:100%; height:390px; border:0; }
.book-cover-image { background-size:cover !important; background-position:center !important; }
.book-cover-image::after { text-shadow:0 1px 4px rgba(0,0,0,.4); }

.plugin-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.plugin-grid > div { border:1px solid var(--line); background:#fafbfc; border-radius:12px; padding:15px; }
.plugin-grid strong { display:block; color:var(--navy); font-size:13px; }
.plugin-grid span { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.drag-handle { cursor:grab; color:#98a2b3; font-size:18px; user-select:none; }
.drag-handle:active { cursor:grabbing; }
.sortable-ghost { opacity:.35; background:#eff8f4; }
.preview-content-image { max-width:260px; max-height:160px; object-fit:contain; padding:8px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.rich-editor { display:none; }
.js-rich .rich-editor { display:block; }
.js-rich .rich-editor-source { display:none; }
.rich-editor.ql-container { min-height:260px; font-family:inherit; font-size:14px; border-radius:0 0 10px 10px; }
.rich-editor .ql-editor { min-height:260px; }
.form-field .ql-toolbar.ql-snow { border-color:#d9e0e7; border-radius:10px 10px 0 0; background:#fafbfc; }
.form-field .ql-container.ql-snow { border-color:#d9e0e7; }
.upload-toast { position:fixed; right:20px; bottom:20px; z-index:100; padding:12px 16px; border-radius:12px; background:#0c213d; color:#fff; font-size:12px; box-shadow:var(--shadow); }
.faq-item.open .faq-answer { max-height:1400px; }
.faq-answer .rich-text { padding:0 52px 22px 0; }

@media (max-width: 980px) {
  .home-slider { height:520px; }
  .resource-list { grid-template-columns:1fr; }
  .plugin-grid { grid-template-columns:1fr; }
  .slider-nav { display:none; }
}
@media (max-width: 640px) {
  .home-slider { height:520px; }
  .home-slide-content { padding-top:34px; padding-bottom:64px; }
  .home-slide-overlay { background:linear-gradient(90deg,rgba(5,25,48,.94),rgba(5,25,48,.68)); }
  .home-slide-content h2 { font-size:38px; }
  .slide-description { font-size:15px; }
  .resource-group { padding:16px; border-radius:18px; }
  .resource-group-heading { align-items:flex-start; }
  .resource-count { display:none; }
  .resource-card { grid-template-columns:52px minmax(0,1fr) 22px; padding:12px; }
  .resource-logo { width:52px; height:52px; }
  .map-frame iframe { height:320px; }
}
.home-slider .swiper-wrapper { height:100%; }
.home-slider .swiper-slide { width:100%; }
.home-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) { display:none; }

/* Resource logo network fallback */
.resource-logo-with-image { position:relative; }
.resource-logo-with-image .resource-logo-initials { position:absolute; inset:0; display:grid; place-items:center; background:linear-gradient(135deg,var(--navy),var(--primary)); color:#fff; font-weight:950; letter-spacing:-.04em; font-size:18px; z-index:0; }
.resource-logo-with-image img { position:relative; z-index:1; background:#fff; }
.resource-logo-with-image img.is-broken { display:none; }

/* Librarian editor utilities */
.editor-heading-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.editor-heading-row > label { margin:0; }
.editor-utility { display:flex; align-items:center; gap:10px; color:#667085; font-size:12px; }
.editor-fullscreen-active { position:fixed; inset:18px; z-index:2000; background:#fff; border:1px solid var(--line); border-radius:18px; padding:18px; box-shadow:0 24px 80px rgba(15,23,42,.24); display:flex; flex-direction:column; }
.editor-fullscreen-active .ql-toolbar { flex:0 0 auto; }
.editor-fullscreen-active .rich-editor { flex:1 1 auto; min-height:0; overflow:auto; }
.editor-fullscreen-active .ql-container { flex:1 1 auto; min-height:0; }
.editor-fullscreen-active .ql-editor { min-height:calc(100vh - 190px); }
.editor-fullscreen-body { overflow:hidden; }
@media (max-width:700px) {
  .editor-heading-row { align-items:flex-start; flex-direction:column; }
  .editor-fullscreen-active { inset:8px; padding:12px; }
}

/* v4 safe upgrade: category emblems + Jodit librarian editor */
.resource-category-logo { padding:0; overflow:hidden; background:#fff; border:1px solid var(--line); }
.resource-category-logo img { width:100%; height:100%; object-fit:cover; display:block; }
.rich-text table { width:100%; border-collapse:collapse; margin:14px 0; font-size:.95em; }
.rich-text th, .rich-text td { border:1px solid var(--line); padding:9px 11px; vertical-align:top; }
.rich-text th { background:var(--soft); color:var(--navy); text-align:left; }
.rich-text hr { border:0; border-top:1px solid var(--line); margin:20px 0; }
.js-jodit .rich-editor { display:block; min-height:280px; }
.js-jodit .rich-editor-source { display:none; }
.form-field .jodit-container { border-color:#d9e0e7; border-radius:12px; overflow:hidden; font-family:inherit; }
.form-field .jodit-toolbar__box { background:#fafbfc; }
.form-field .jodit-wysiwyg { font-family:inherit; font-size:14px; line-height:1.65; }
.form-field .jodit-status-bar { background:#fafbfc; }
.form-field .jodit-workplace { background:#fff; }
.jodit_fullsize-box_true { z-index:2200 !important; }

/* ============================================================
   v5 — Medistra Library Discovery Portal
   Public-facing redesign inspired by a modern academic library
   portal pattern while preserving Medistra's own identity.
   ============================================================ */

.topbar { background:var(--navy); }
.topbar .container { justify-content:flex-start; min-height:38px; }
.topbar-label { font-size:10px; line-height:1; letter-spacing:.14em; font-weight:950; color:#fff; background:rgba(255,255,255,.1); padding:6px 9px; border-radius:999px; }
.header { box-shadow:0 1px 0 rgba(18,48,90,.025); }
.nav { min-height:78px; }
.navlinks { gap:23px; }
.navlinks > a:not(.btn) { color:#344054; }
.nav-opac { min-height:42px; padding-inline:16px; }
.menu-btn { width:42px; height:42px; border-radius:10px; border:1px solid var(--line); align-content:center; justify-items:center; gap:4px; }
.menu-btn span { display:block; width:19px; height:2px; border-radius:2px; background:var(--navy); }
.mobile-menu { background:#fff; }

.library-hero { position:relative; overflow:hidden; background:linear-gradient(135deg,#f6fbf8 0%,#ffffff 46%,#f3f5ff 100%); border-bottom:1px solid var(--line); }
.library-hero::before { content:""; position:absolute; inset:0; pointer-events:none; background-image:linear-gradient(rgba(35,37,141,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(35,37,141,.025) 1px,transparent 1px); background-size:42px 42px; mask-image:linear-gradient(to right,#000,transparent 72%); }
.hero-orb { position:absolute; border-radius:50%; pointer-events:none; filter:blur(2px); }
.hero-orb-one { width:430px; height:430px; right:-140px; top:-160px; background:radial-gradient(circle,rgba(241,201,40,.22),rgba(241,201,40,0) 70%); }
.hero-orb-two { width:380px; height:380px; left:-190px; bottom:-210px; background:radial-gradient(circle,rgba(7,136,63,.13),rgba(7,136,63,0) 70%); }
.library-hero-grid { position:relative; z-index:1; min-height:625px; display:grid; grid-template-columns:1.03fr .97fr; gap:64px; align-items:center; padding:72px 0 78px; }
.library-hero-copy { min-width:0; }
.library-hero-copy .eyebrow { margin-bottom:16px; }
.library-hero-copy .eyebrow span { display:inline-flex; align-items:center; gap:10px; padding:7px 11px; border:1px solid rgba(7,136,63,.14); border-radius:999px; background:rgba(255,255,255,.8); color:var(--primary); }
.library-hero-copy .eyebrow::before { display:none; }
.library-hero-copy h1 { max-width:760px; font-size:clamp(48px,5.6vw,74px); }
.library-hero-copy > p { max-width:700px; margin:0; color:#5b6677; font-size:18px; }
.library-hero-copy .hero-actions { margin:26px 0 18px; }
.library-search { max-width:700px; margin-top:0; border-color:rgba(35,37,141,.1); box-shadow:0 22px 60px rgba(23,32,58,.1); }
.library-search .search-input .icon { color:var(--primary); }
.library-search input::placeholder { color:#98a2b3; }
.library-hero-copy .hero-note { display:flex; align-items:center; gap:8px; margin-top:13px; }
.library-hero-copy .hero-note .pulse { margin:0; }
.library-hero-copy .hero-note strong { color:#344054; }

.library-hero-visual { min-width:0; }
.hero-visual-card { position:relative; border-radius:30px; padding:13px; background:#fff; border:1px solid rgba(35,37,141,.09); box-shadow:0 30px 80px rgba(29,35,102,.16); }
.hero-main-art { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:22px; background:var(--navy); }
.hero-main-art-fallback { background:linear-gradient(135deg,var(--navy),var(--primary)); }
.hero-system-stack { position:relative; width:calc(100% - 40px); margin:-56px auto 8px; display:grid; gap:8px; }
.hero-system-item { min-height:66px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:11px; padding:10px 12px; border:1px solid rgba(35,37,141,.09); background:rgba(255,255,255,.97); box-shadow:0 10px 28px rgba(18,48,90,.09); border-radius:15px; backdrop-filter:blur(14px); }
.system-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:#eff9f3; color:var(--primary); }
.system-icon .icon { width:20px; height:20px; }
.hero-system-item strong { display:block; font-size:13px; line-height:1.2; color:var(--navy); }
.hero-system-item div > span { display:block; margin-top:3px; font-size:10.5px; color:var(--muted); }
.system-status { font-style:normal; font-size:9px; font-weight:950; text-transform:uppercase; letter-spacing:.06em; border-radius:999px; padding:5px 8px; white-space:nowrap; }
.system-status.active { color:#067647; background:#ecfdf3; }
.system-status.build { color:#9a6700; background:#fff8df; }

.stat-band { position:relative; z-index:3; margin-top:-28px; padding-bottom:24px; }
.stat-band .stats { border-radius:18px; box-shadow:0 18px 46px rgba(23,32,58,.1); }
.stat-band .stat { min-height:96px; }
.stat-band .stat-icon { background:linear-gradient(135deg,#eff9f3,#f4f4ff); }

.section-compact { padding:66px 0 76px; }
.quick-platform { background:#fff; }
.portal-gateway-grid { gap:16px; }
.portal-gateway-card { min-height:270px; padding:24px; }
.portal-gateway-card::after { width:120px; height:120px; }
.gateway-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.gateway-top .platform-icon { margin-bottom:18px; }
.portal-gateway-card .platform-footer { position:static; margin-top:20px; }
.gateway-action { margin-top:20px; }
.badge-build { color:#9a6700; background:#fff8df; }
.portal-gateway-card.is-development { background:linear-gradient(180deg,#fffdf5,#fff); }
.muted-link { color:#98a2b3; cursor:default; }

.highlight-strip { padding:34px 0 42px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.highlight-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.highlight-card { min-height:158px; display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; padding:22px; border-radius:18px; background:#fff; border:1px solid var(--line); transition:.2s ease; }
.highlight-card:hover { transform:translateY(-3px); border-color:rgba(7,136,63,.23); box-shadow:0 14px 34px rgba(18,48,90,.07); }
.highlight-kicker { color:var(--primary); font-size:9px; font-weight:950; letter-spacing:.13em; }
.highlight-card strong { display:block; margin:9px 0 16px; color:var(--navy); font-size:17px; line-height:1.3; }
.highlight-link { display:inline-flex; align-items:center; gap:6px; color:#667085; font-size:11px; font-weight:850; }
.highlight-link .icon { width:15px; height:15px; }

.collection-section { padding-top:86px; }
.collection-card { transition:.22s ease; }
.collection-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.collection-card .book-cover { height:215px; }
.collection-card:nth-child(1) .book-cover { background:linear-gradient(135deg,var(--navy),#087347); }
.collection-card:nth-child(2) .book-cover { background:linear-gradient(135deg,#0b6b52,#19a55f); }
.collection-card:nth-child(3) .book-cover { background:linear-gradient(135deg,#342b8f,#6872c5); }
.collection-card:nth-child(4) .book-cover { background:linear-gradient(135deg,#96731c,#d3ae25); }
.book-cover::after { content:"MEDISTRA • HEALTH SCIENCES"; }

.info-section .news-feature { background:linear-gradient(135deg,var(--navy),#1a477a 58%,var(--primary)); }
.news-feature-top { display:flex; align-items:center; justify-content:space-between; gap:16px; position:relative; z-index:2; }
.news-feature-top time { font-size:12px; font-weight:800; color:rgba(255,255,255,.7); }
.news-feature h3 { margin-top:68px; }
.news-feature .rich-text { color:rgba(255,255,255,.72); position:relative; }
.news-feature .rich-text p { color:inherit; }

.resource-card-disabled { opacity:.78; background:#fafafa; }
.resource-card-disabled:hover { transform:none; border-color:var(--line); box-shadow:none; }
.resource-card-disabled .resource-copy span { color:#9a6700; }

.partner-section { padding:72px 0 82px; border-top:1px solid var(--line); }
.compact-heading { margin-bottom:28px; }
.partner-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.partner-card { min-height:105px; display:grid; grid-template-columns:52px minmax(0,1fr) 20px; gap:12px; align-items:center; padding:16px; border-radius:16px; background:#fff; border:1px solid var(--line); transition:.2s ease; }
.partner-card:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(18,48,90,.07); }
.partner-card .resource-logo { width:52px; height:52px; border-radius:12px; }
.partner-card strong { color:var(--navy); font-size:13px; line-height:1.25; }
.partner-card > span:last-child { color:var(--primary); }
.partner-card > span:last-child .icon { width:17px; height:17px; }

.cta-box { background:linear-gradient(115deg,var(--primary),#0b6954 50%,var(--navy)); }
.contact-section { padding-top:84px; }
.hours-wrap { background:linear-gradient(135deg,var(--navy),#162a6f); }
.footer { background:#11164f; }
.footer-system-note { margin-top:18px; max-width:410px; color:rgba(255,255,255,.44); font-size:11px; line-height:1.55; }

@media (max-width: 1100px) {
  .library-hero-grid { grid-template-columns:1fr 1fr; gap:38px; }
  .library-hero-copy h1 { font-size:clamp(46px,5.5vw,64px); }
  .partner-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 980px) {
  .library-hero-grid { grid-template-columns:1fr; min-height:auto; padding:62px 0 72px; }
  .library-hero-copy { max-width:760px; }
  .library-hero-visual { max-width:720px; width:100%; }
  .highlight-grid { grid-template-columns:1fr; }
  .highlight-card { min-height:132px; }
  .portal-gateway-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 640px) {
  .topbar-label { display:none; }
  .topbar .container { justify-content:center; font-size:11px; }
  .library-hero-grid { padding:48px 0 66px; gap:32px; }
  .library-hero-copy h1 { font-size:43px; }
  .library-hero-copy > p { font-size:15px; }
  .library-hero-copy .hero-actions { gap:9px; }
  .library-hero-copy .hero-actions .btn { flex:1 1 auto; }
  .hero-visual-card { border-radius:22px; padding:9px; }
  .hero-main-art { border-radius:16px; aspect-ratio:16/11; }
  .hero-system-stack { width:calc(100% - 18px); margin:-32px auto 2px; }
  .hero-system-item { grid-template-columns:38px minmax(0,1fr); padding:9px 10px; }
  .system-icon { width:38px; height:38px; }
  .system-status { display:none; }
  .stat-band { margin-top:-18px; }
  .stat-band .stats { grid-template-columns:1fr 1fr; }
  .stat-band .stat { padding:17px 14px; min-height:92px; }
  .stat-band .stat-icon { width:39px; height:39px; }
  .stat-band .stat strong { font-size:17px; }
  .stat-band .stat span { font-size:10px; }
  .section-compact { padding:58px 0 66px; }
  .portal-gateway-grid, .partner-grid { grid-template-columns:1fr; }
  .portal-gateway-card { min-height:auto; }
  .highlight-strip { padding:26px 0 32px; }
  .highlight-card { min-height:125px; }
  .collection-card .book-cover { height:190px; }
}

/* v6: defensive hero slider with overlay search */
.header.header-home { position:absolute; top:36px; left:0; right:0; z-index:50; background:transparent; border-bottom:0; backdrop-filter:none; }
.header.header-home .nav { min-height:88px; }
.header.header-home .brand-copy strong,
.header.header-home .brand-copy span,
.header.header-home .navlinks a { color:#fff; }
.header.header-home .navlinks a:hover { color:#d9fff0; }
.header.header-home .brand img { filter:drop-shadow(0 8px 18px rgba(0,0,0,.18)); }
.header.header-home .menu-btn { color:#fff; }
.header.header-home .menu-btn { border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.08); }
.header.header-home .menu-btn span { background:#fff; }
.header.header-home .nav-opac,
.btn-ghost-light { background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.22); backdrop-filter:blur(10px); }
.header.header-home .nav-opac:hover,
.btn-ghost-light:hover { background:rgba(255,255,255,.2); color:#fff; }
.hero-slider { position:relative; overflow:hidden; min-height:720px; background:#102746; }
.hero-slider-track { position:relative; min-height:720px; }
.hero-slide { position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .55s ease, visibility .55s ease; background:linear-gradient(135deg,#173154,#12305a); }
.hero-slide.is-active { opacity:1; visibility:visible; }
.hero-slide-bg,
.hero-slide-image,
.hero-slide-overlay { position:absolute; inset:0; }
.hero-slide-bg { background:linear-gradient(135deg,#173154,#12305a); }
.hero-slide-image { width:100%; height:100%; object-fit:cover; }
.hero-slide-overlay { background:linear-gradient(90deg,rgba(11,24,48,.84) 0%,rgba(14,31,57,.68) 36%,rgba(15,43,63,.35) 70%,rgba(15,43,63,.24) 100%), linear-gradient(180deg,rgba(8,16,34,.18) 0%,rgba(8,16,34,.35) 100%); }
.hero-slide-inner { position:relative; z-index:2; min-height:720px; display:flex; align-items:center; padding:150px 0 120px; }
.hero-slide-copy { max-width:780px; color:#fff; }
.hero-chip { display:inline-flex; align-items:center; padding:9px 16px; border-radius:999px; border:1px solid rgba(76,235,208,.35); background:rgba(76,235,208,.12); color:#5bf0d8; font-size:12px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; margin-bottom:20px; }
.hero-slide-copy h1 { color:#fff; font-size:clamp(48px,5.8vw,78px); max-width:920px; margin:0 0 20px; text-shadow:0 12px 30px rgba(0,0,0,.18); }
.hero-slide-copy .slide-description { max-width:720px; color:rgba(255,255,255,.84); font-size:18px; margin-bottom:26px; }
.hero-slide-copy .slide-description p { margin:0; }
.search-card-on-hero { max-width:720px; background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.18); box-shadow:0 20px 60px rgba(0,0,0,.14); backdrop-filter:blur(10px); }
.search-card-on-hero .search-input { color:#fff; }
.search-card-on-hero .search-input .icon { color:rgba(255,255,255,.92); }
.search-card-on-hero input { background:transparent; color:#fff; }
.search-card-on-hero input::placeholder { color:rgba(255,255,255,.74); }
.search-card-on-hero .btn-primary { min-width:138px; }
.hero-quicklinks { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:16px; }
.btn-slider { background:#fff; color:var(--navy); border-color:#fff; box-shadow:0 14px 38px rgba(255,255,255,.14); }
.btn-slider:hover { color:var(--navy); }
.hero-note-on-dark { display:flex; align-items:center; gap:8px; margin-top:14px; color:rgba(255,255,255,.78); }
.hero-note-on-dark strong { color:#fff; }
.hero-slider-ui { position:absolute; left:50%; bottom:38px; transform:translateX(-50%); z-index:4; display:flex; align-items:center; justify-content:space-between; gap:18px; width:min(1180px, calc(100% - 40px)); }
.hero-slider-pagination { display:flex; gap:8px; align-items:center; }
.hero-slider-dot { width:10px; height:10px; border-radius:999px; border:0; background:rgba(255,255,255,.42); padding:0; cursor:pointer; transition:.25s ease; }
.hero-slider-dot.is-active { width:28px; background:#39dcc7; }
.hero-slider-arrows { display:flex; gap:10px; }
.hero-slider .slider-nav { position:static; transform:none; width:46px; height:46px; border-color:rgba(255,255,255,.22); background:rgba(255,255,255,.12); backdrop-filter:blur(10px); font-size:28px; }
.hero-slider .slider-nav:hover { background:rgba(255,255,255,.2); }
.stat-band { margin-top:-54px; }
.highlight-strip { border-top:0; }

@media (max-width: 980px) {
  .header.header-home { top:36px; }
  .header.header-home .navlinks { display:none; }
  .header.header-home .mobile-menu { background:rgba(10,25,46,.94); backdrop-filter:blur(16px); border:1px solid rgba(255,255,255,.12); }
  .header.header-home .mobile-menu a { color:#fff; }
  .hero-slider,
  .hero-slider-track,
  .hero-slide-inner { min-height:680px; }
  .hero-slide-inner { padding-top:146px; padding-bottom:108px; }
  .hero-slider-ui { bottom:26px; }
  .stat-band { margin-top:-28px; }
}

@media (max-width: 768px) {
  .header.header-home { position:absolute; }
  .header.header-home .brand img { width:44px; height:44px; }
  .header.header-home .brand-copy strong { font-size:14px; }
  .header.header-home .brand-copy span { font-size:11px; }
  .hero-slider,
  .hero-slider-track,
  .hero-slide-inner { min-height:640px; }
  .hero-slide-inner { padding:132px 0 100px; align-items:flex-end; }
  .hero-slide-copy h1 { font-size:42px; }
  .hero-slide-copy .slide-description { font-size:15px; margin-bottom:20px; }
  .search-card-on-hero { padding:8px; gap:8px; flex-direction:column; align-items:stretch; background:rgba(255,255,255,.14); }
  .search-card-on-hero .search-input { min-height:50px; }
  .search-card-on-hero .btn-primary { width:100%; }
  .hero-quicklinks { gap:10px; }
  .hero-quicklinks .btn { flex:1 1 auto; }
  .hero-slider-ui { display:flex; justify-content:flex-start; gap:14px; }
  .hero-slider .slider-nav { width:40px; height:40px; }
}

@media (max-width: 560px) {
  .container { width:min(100%, calc(100% - 24px)); }
  .header.header-home { top:36px; }
  .header.header-home .nav { min-height:78px; }
  .hero-slider,
  .hero-slider-track,
  .hero-slide-inner { min-height:620px; }
  .hero-slide-inner { padding:126px 0 96px; }
  .hero-chip { padding:8px 14px; margin-bottom:14px; }
  .hero-slide-copy h1 { font-size:36px; }
  .hero-slider-ui { bottom:18px; width:min(100%, calc(100% - 24px)); }
  .hero-slider-arrows { display:none; }
  .stat-band { margin-top:-12px; }
}


/* v7: overlap fix, remove arrow nav, softer logo surfaces */
.hero-slider-ui { justify-content:flex-start; }
.hero-slider-arrows { display:none !important; }
.stat-band { margin-top:0 !important; padding-top:22px; padding-bottom:28px; background:#fff; }
.highlight-strip { padding-top:22px; }
.hero-slide-inner { padding-bottom:136px; }
.hero-quicklinks { margin-bottom:8px; }
.search-card-on-hero { margin-bottom:10px; }

.resource-logo {
  background:#f7f5ef;
  border:1px solid #ece7db;
  box-shadow:none;
  padding:10px;
}
.resource-logo img {
  background:transparent;
  object-fit:contain;
}
.resource-logo-with-image .resource-logo-initials {
  background:linear-gradient(135deg,#6a7387,#8c94a5);
}
.partner-card .resource-logo,
.resource-card .resource-logo {
  background:#f8f6f1;
  border-color:#ece7db;
}
.partner-card {
  align-items:center;
}
.partner-card strong {
  line-height:1.3;
}

@media (max-width: 980px) {
  .stat-band { padding-top:16px; }
  .hero-slide-inner { padding-bottom:120px; }
}

@media (max-width: 768px) {
  .stat-band { padding-top:12px; }
  .hero-slide-inner { padding-bottom:108px; }
  .hero-slider-ui { bottom:14px; }
}

/* v8: production-facing visual refinement */
:root {
  --announcement-offset: 56px;
}
[data-theme="dark"] {
  --ink: #e7edf6;
  --muted: #a7b4c8;
  --line: #243246;
  --soft: #0e1723;
  --white: #111b29;
  --navy: #dbe7ff;
  background: #0b1320;
}
html[data-theme="dark"], html[data-theme="dark"] body { background:#0b1320; color:var(--ink); }
html[data-theme="dark"] .header { background:rgba(9,16,28,.9); border-bottom-color:rgba(36,50,70,.95); }
html[data-theme="dark"] .btn-ghost { background:#111b29; color:#edf3ff; border-color:#2c3d55; }
html[data-theme="dark"] .section-soft,
html[data-theme="dark"] .partner-section { background:#0f1724; }
html[data-theme="dark"] .resource-group,
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .platform-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .partner-card,
html[data-theme="dark"] .stats,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .hours-panel,
html[data-theme="dark"] .map-frame,
html[data-theme="dark"] .hours-wrap,
html[data-theme="dark"] .cta-box,
html[data-theme="dark"] .collection-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .facility-card {
  background:#111b29;
  border-color:#243246;
  box-shadow:none;
}
html[data-theme="dark"] .resource-copy strong,
html[data-theme="dark"] .partner-card strong,
html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .footer h4,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .navlinks a,
html[data-theme="dark"] .brand-copy span,
html[data-theme="dark"] .card-body h3 { color:#edf3ff; }
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .resource-copy p,
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer-links a,
html[data-theme="dark"] .footer-links span,
html[data-theme="dark"] .faq-answer,
html[data-theme="dark"] .resource-arrow,
html[data-theme="dark"] .resource-arrow-muted,
html[data-theme="dark"] .news-item time,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .stat span { color:var(--muted); }
html[data-theme="dark"] .footer { background:#09111d; border-top-color:#243246; }
html[data-theme="dark"] .resource-pill { background:#182638; color:#d7e8ff; border-color:#2a3e56; }
html[data-theme="dark"] .theme-toggle { background:#111b29; border-color:#2b3d55; color:#fff; }
html[data-theme="dark"] .announcement-popup { background:linear-gradient(90deg,#1e378f 0%, #1e7f84 100%); }
body.announcement-hidden { --announcement-offset: 0px; }
.announcement-popup {
  position:fixed; inset:0 0 auto 0; z-index:90;
  background:linear-gradient(90deg,#2543a8 0%, #21b4a9 100%);
  color:#fff; box-shadow:0 10px 24px rgba(4,19,42,.16);
}
.announcement-inner { min-height:56px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.announcement-copy { display:flex; align-items:center; gap:16px; min-width:0; }
.announcement-copy p { margin:0; font-size:14px; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.announcement-badge { display:inline-flex; align-items:center; gap:8px; padding:7px 14px; border-radius:999px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.18); font-size:12px; font-weight:900; letter-spacing:.04em; flex:0 0 auto; }
.announcement-badge .icon { width:16px; height:16px; }
.announcement-close {
  width:34px; height:34px; border-radius:999px; border:0; background:transparent; color:#fff;
  display:grid; place-items:center; cursor:pointer; font-size:28px; line-height:1; flex:0 0 auto;
}
.announcement-close:hover { background:rgba(255,255,255,.12); }
.topbar { display:none !important; }
.header.header-home { top: calc(var(--announcement-offset) + 8px) !important; }
.theme-toggle {
  width:42px; height:42px; border-radius:12px; border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.1); color:#fff; display:inline-grid; place-items:center; cursor:pointer;
  transition:.2s ease; padding:0;
}
.theme-toggle:hover { transform:translateY(-1px); background:rgba(255,255,255,.18); }
.theme-icon { display:grid; place-items:center; width:20px; height:20px; line-height:0; }
.theme-icon .icon { width:20px; height:20px; display:block; }
.theme-icon-sun { display:none; }
html[data-theme="dark"] .theme-icon-moon { display:none; }
html[data-theme="dark"] .theme-icon-sun { display:grid; }
.header:not(.header-home) .theme-toggle { background:#fff; color:var(--navy); border-color:var(--line); }
.mobile-menu-top { display:flex; justify-content:flex-end; margin-bottom:10px; }
.section-heading.compact-heading p { display:none; }
.resource-groups { gap:30px; }
.resource-group {
  padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;
}
.resource-group-heading {
  display:flex; align-items:center; gap:10px; margin:0 0 18px; padding-bottom:14px;
  border-bottom:1px solid var(--line);
}
.resource-group-heading h3 { margin:0; font-size:18px; line-height:1.2; }
.resource-heading-icon {
  width:18px; height:18px; display:grid; place-items:center; color:#274ab6; flex:0 0 auto;
}
.resource-heading-icon .icon { width:18px; height:18px; }
.resource-group-label, .resource-count, .resource-category-icon { display:none !important; }
.resource-list { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; }
.resource-card {
  grid-template-columns:48px minmax(0,1fr) 18px; min-height:126px; align-items:start;
  padding:18px 16px; border-radius:16px; box-shadow:none;
}
.resource-card:hover { transform:none; box-shadow:none; }
.resource-logo,
.partner-card .resource-logo,
.resource-card .resource-logo {
  width:44px; height:44px; padding:0; border:0; border-radius:10px; background:transparent !important; box-shadow:none !important;
}
.resource-logo img { background:transparent !important; object-fit:contain; }
.resource-logo-with-image .resource-logo-initials,
.resource-logo-fallback {
  background:#eef2f6 !important; color:#5a6b81 !important; border:1px solid #dde3ea; font-size:14px;
}
.resource-copy strong { font-size:15px; line-height:1.28; margin-bottom:8px; }
.resource-copy span, .resource-copy small { display:none !important; }
.resource-copy p { margin:0; font-size:13px; line-height:1.45; color:var(--muted); }
.resource-pill {
  display:inline-flex; margin-top:12px; min-height:24px; padding:0 10px; align-items:center; border-radius:999px;
  border:1px solid #dfe5eb; background:#f5f7fa; color:#617187; font-size:10px; font-weight:900; letter-spacing:.04em;
}
.resource-arrow { color:#86a0bc; margin-top:2px; }
.resource-arrow .icon { width:17px; height:17px; }
.resource-card-disabled { opacity:1; }
.resource-card-disabled .resource-arrow-muted { color:#93a0b0; }
.partner-section .section-heading { margin-bottom:24px; }
.partner-grid { gap:14px; }
.partner-card {
  min-height:88px; grid-template-columns:44px minmax(0,1fr) 16px; padding:16px 18px;
  box-shadow:none; border-radius:16px;
}
.partner-card:hover { transform:none; box-shadow:none; }
.partner-card strong { font-size:13px; }
.stat-band { margin-top:0 !important; padding-top:26px !important; }
.hero-slide-inner { padding-bottom:152px !important; }
.hero-slider-ui { bottom:30px; }
.nav-opac { min-height:42px; }
.footer-system-note { color:var(--muted); }

@media (max-width: 1100px) {
  .resource-list { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .announcement-copy p { font-size:13px; }
  .header.header-home { top: calc(var(--announcement-offset) + 8px) !important; }
}
@media (max-width: 768px) {
  :root { --announcement-offset: 60px; }
  .announcement-inner { min-height:60px; }
  .announcement-copy { gap:10px; }
  .announcement-copy p { font-size:12px; }
  .announcement-badge { padding:6px 11px; font-size:11px; }
  .mobile-menu { padding:16px; }
  .resource-list { grid-template-columns:1fr; }
  .theme-toggle { width:40px; height:40px; }
}
.announcement-hidden .announcement-popup { display:none; }

/* v9: sticky header, centered section titles, improved dark mode, and back-to-top */
:root {
  --header-offset: calc(var(--announcement-offset) + 12px);
}
body {
  padding-top: 0;
}
.header,
.header.header-home {
  position: fixed;
  top: var(--header-offset);
  left: 0;
  right: 0;
  z-index: 80;
}
.header.header-home {
  background: rgba(8, 19, 42, .74) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
  transition: background .2s ease, box-shadow .2s ease, top .2s ease;
}
.header.header-home.is-scrolled,
.header.is-scrolled {
  background: rgba(7, 18, 36, .96) !important;
  box-shadow: 0 10px 32px rgba(2,8,20,.18);
}
.header.header-home .nav { min-height: 74px; }
.header.header-home .navlinks a,
.header.header-home .brand-copy strong,
.header.header-home .brand-copy span { color:#fff; }
.header.header-home .navlinks a { opacity:.92; }
.header.header-home .navlinks a:hover { opacity:1; color:#fff; }
.header.header-home .theme-toggle { border-color: rgba(255,255,255,.16); }
body.announcement-hidden {
  --announcement-offset: 0px;
}
.announcement-hidden .header,
.announcement-hidden .header.header-home {
  top: 12px;
}
.hero-slider { margin-top: 0; }
.section-heading {
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: center;
}
.section-heading.row {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.section-heading.row > div { width:100%; }
.section-heading .kicker,
.section-heading h2,
.section-heading p { text-align:center; }
.section-heading p { max-width: 760px; margin-left:auto; margin-right:auto; }
.resource-group-heading {
  justify-content: flex-start !important;
  text-align: left;
}
.resource-group-heading h3 {
  text-align: left;
}
.resource-heading-icon { margin-right: 2px; }
.quick-platform .section-heading,
.collection-section .section-heading,
.info-section .section-heading,
.partner-section .section-heading,
.contact-section .section-heading,
.section-heading.compact-heading { text-align:center; }
.quick-platform .btn,
.collection-section .btn { align-self:center; }
.stat-band {
  position: relative;
  z-index: 5;
  margin-top: -34px !important;
}
.stats {
  background: #0d1a2f;
  border-color: rgba(255,255,255,.08);
  color: #fff;
  overflow: hidden;
}
.stat { border-right-color: rgba(255,255,255,.08); }
.stat strong { color:#4a57e2; }
.stat span { color: rgba(255,255,255,.78); }
.stat-icon { background: rgba(255,255,255,.92); color: var(--primary); }
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #25d6c8, #18b9b1);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 28px rgba(8, 27, 57, .24);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .2s ease;
  z-index: 90;
}
.back-to-top .icon {
  transform: rotate(-90deg);
  width: 20px;
  height: 20px;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { filter: brightness(1.03); }
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #071326;
}
html[data-theme="dark"] .hero-slider,
html[data-theme="dark"] .quick-platform,
html[data-theme="dark"] .section,
html[data-theme="dark"] .section-soft,
html[data-theme="dark"] .collection-section,
html[data-theme="dark"] .info-section,
html[data-theme="dark"] .partner-section,
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .cta,
html[data-theme="dark"] .stat-band {
  background: #071326;
}
html[data-theme="dark"] .stats {
  background: #0c1930;
  border-color: #22324b;
}
html[data-theme="dark"] .resource-group-heading {
  border-bottom-color: #22324b;
}
html[data-theme="dark"] .header.header-home {
  background: rgba(7, 18, 36, .82) !important;
  border-bottom-color: rgba(255,255,255,.07);
}
html[data-theme="dark"] .header.header-home.is-scrolled,
html[data-theme="dark"] .header.is-scrolled {
  background: rgba(5, 13, 28, .98) !important;
}
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .kicker,
html[data-theme="dark"] .resource-group-heading h3,
html[data-theme="dark"] .resource-copy strong,
html[data-theme="dark"] .resource-copy p,
html[data-theme="dark"] .partner-card strong,
html[data-theme="dark"] .platform-card h3,
html[data-theme="dark"] .news-item h3,
html[data-theme="dark"] .event-card h3,
html[data-theme="dark"] .contact-panel h3,
html[data-theme="dark"] .hours-panel h2,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] .footer-system-note {
  color: #eef4ff;
}
html[data-theme="dark"] .resource-copy p,
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .news-item p,
html[data-theme="dark"] .hours-row span,
html[data-theme="dark"] .footer-links a,
html[data-theme="dark"] .footer-links span,
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .stat span {
  color: #b4c2d6;
}
html[data-theme="dark"] .platform-card,
html[data-theme="dark"] .collection-card,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .facility-card,
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .partner-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .hours-panel,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .map-frame,
html[data-theme="dark"] .cta-box {
  background: #0d1a2f;
  border-color: #22324b;
}
html[data-theme="dark"] .resource-logo-with-image .resource-logo-initials,
html[data-theme="dark"] .resource-logo-fallback {
  background: #14243a !important;
  color: #dbe8fb !important;
  border-color: #253a57;
}
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .btn-slider {
  background: #0d1a2f;
  color: #eef4ff;
  border-color: #243854;
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .nav-opac {
  box-shadow: 0 10px 22px rgba(11,122,83,.18);
}
html[data-theme="dark"] .back-to-top { box-shadow: 0 16px 28px rgba(0,0,0,.36); }
@media (max-width: 980px) {
  .header, .header.header-home { top: var(--header-offset); }
  .announcement-hidden .header,
  .announcement-hidden .header.header-home { top: 8px; }
  .section-heading.row { align-items:center; }
}
@media (max-width: 768px) {
  :root { --header-offset: calc(var(--announcement-offset) + 8px); }
  .header.header-home .nav { min-height: 68px; }
  .section-heading, .section-heading.row { margin-bottom: 28px; }
  .stat-band { margin-top: -18px !important; }
  .back-to-top { right: 18px; bottom: 18px; width: 46px; height: 46px; }
}
html { scroll-padding-top: 120px; } @media (max-width: 768px) { html { scroll-padding-top: 96px; } }

/* v10: pixel-level alignment + responsive hardening */
:root {
  --announcement-offset: 46px;
  --header-height: 68px;
}
body.announcement-hidden { --announcement-offset: 0px; }
html { scroll-padding-top: calc(var(--header-height) + var(--announcement-offset) + 18px); }
.announcement-popup { min-height:46px; }
.announcement-inner { min-height:46px; }
.announcement-badge { padding:5px 12px; font-size:11px; }
.announcement-copy p { font-size:13px; }
.announcement-close { width:32px; height:32px; font-size:25px; }
.header,
.header.header-home {
  top: var(--announcement-offset) !important;
  min-height: var(--header-height);
  background: rgba(9, 20, 43, .92) !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
  backdrop-filter: blur(16px);
  box-shadow: none;
}
.header.header-home.is-scrolled,
.header.is-scrolled {
  background: rgba(8, 18, 38, .985) !important;
  box-shadow: 0 8px 26px rgba(2,8,20,.18);
}
.header .nav { min-height:var(--header-height) !important; }
.header .brand img { width:44px; height:44px; }
.header .brand-copy strong { font-size:15px; color:#fff; }
.header .brand-copy span { font-size:10px; color:rgba(255,255,255,.68); }
.header .navlinks { gap:8px; }
.header .navlinks > a:not(.nav-opac) {
  min-height:38px; padding:0 13px; display:inline-flex; align-items:center;
  border-radius:12px; color:rgba(255,255,255,.82); transition:.18s ease;
}
.header .navlinks > a:not(.nav-opac):hover,
.header .navlinks > a:not(.nav-opac).is-active {
  color:#fff; background:rgba(255,255,255,.10);
}
.header .nav-opac { margin-left:4px; min-height:42px; border-radius:999px; padding:0 18px; }
.header .theme-toggle { width:40px; height:40px; border-radius:12px; }
.header .mobile-menu { top:100%; }
.hero-slider,
.hero-slider-track,
.hero-slide-inner { min-height:700px; }
.hero-slide-inner { padding:150px 0 118px !important; }
.hero-slide-copy { max-width:760px; }
.hero-slide-copy h1 { font-size:clamp(48px,5vw,70px); line-height:1.04; }
.hero-slide-copy .slide-description { max-width:650px; font-size:17px; }
.search-card-on-hero { max-width:680px; border-radius:999px; padding:7px; }
.search-card-on-hero .search-input { padding-left:16px; }
.search-card-on-hero .btn-primary { border-radius:999px; min-width:130px; min-height:44px; }
.hero-quicklinks { margin-top:14px; }
.hero-quicklinks .btn { min-height:40px; }
.hero-slider-ui { bottom:38px; }
.hero-slider-dot { width:9px; height:9px; }
.hero-slider-dot.is-active { width:30px; }
.stat-band { margin-top:0 !important; padding:22px 0 10px !important; background:#fff !important; }
.stats {
  background:#fff !important; border-color:var(--line); color:var(--ink);
  border-radius:18px; box-shadow:0 14px 36px rgba(18,48,90,.08);
}
.stat { min-height:92px; border-right-color:var(--line); padding:20px 22px; }
.stat-icon { width:46px; height:46px; background:#f2f8f5; }
.stat strong { color:#262c95; font-size:20px; }
.stat span { color:var(--muted); font-size:11px; }
.section { padding:86px 0; }
.section-compact { padding:72px 0; }
.section-heading,
.section-heading.row {
  max-width:860px; margin:0 auto 34px; text-align:center; align-items:center;
}
.section-heading .kicker { margin-bottom:8px; }
.section-heading h2 { font-size:clamp(32px,3.5vw,46px); }
.section-heading p { max-width:720px; font-size:15px; margin-top:12px; }
.highlight-strip { display:none; }
.platform-grid { gap:18px; }
.portal-gateway-card { min-height:250px; padding:24px; }
.collection-grid { gap:16px; }
.news-grid { gap:18px; }
.events-grid { gap:18px; }
.resource-groups { gap:34px; }
.resource-group-heading {
  display:flex !important; justify-content:flex-start !important; align-items:center !important;
  gap:9px; margin:0 0 16px; padding:0 0 14px; text-align:left !important;
  border-bottom:1px solid var(--line);
}
.resource-group-heading h3 { margin:0 !important; text-align:left !important; font-size:16px; color:#334155; }
.resource-heading-icon { color:#274ab6; }
.resource-list { gap:14px; }
.resource-list-internal { grid-template-columns:repeat(3,minmax(0,1fr)); }
.resource-list-national,
.resource-list-international,
.resource-list-ebook { grid-template-columns:repeat(4,minmax(0,1fr)); }
.resource-list-default { grid-template-columns:repeat(3,minmax(0,1fr)); }
.resource-card {
  grid-template-columns:44px minmax(0,1fr) !important; min-height:126px;
  padding:18px; border-radius:13px; align-items:start; gap:14px;
  border:1px solid #dde5ee; background:#fff; box-shadow:none;
}
.resource-card:hover { border-color:#cbd7e5; background:#fbfdff; }
.resource-logo,
.resource-card .resource-logo,
.partner-card .resource-logo {
  width:44px; height:44px; padding:0; border:0; background:transparent !important;
}
.resource-copy strong { font-size:14px; color:#172033; margin-bottom:5px; }
.resource-copy p { font-size:12px; line-height:1.45; color:#68758a; }
.resource-pill { margin-top:9px; min-height:20px; padding:0 8px; font-size:9px; }
.partner-section { padding:72px 0 78px; }
.partner-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.partner-card { min-height:82px; border-radius:13px; padding:15px; grid-template-columns:42px minmax(0,1fr) 16px; }
.partner-card .resource-logo { width:42px; height:42px; }
.faq-list { max-width:900px; margin:0 auto; }
.back-to-top { width:48px; height:48px; border-radius:14px; right:24px; bottom:24px; }

html[data-theme="dark"] {
  --navy:#f2f6ff !important;
  --ink:#e7edf7 !important;
  --muted:#aab8cb !important;
  --line:#2a3950 !important;
  --soft:#0a1424 !important;
  --white:#0d1a2d !important;
}
html[data-theme="dark"], html[data-theme="dark"] body { background:#07111f !important; color:#e7edf7; }
html[data-theme="dark"] .stat-band { background:#07111f !important; }
html[data-theme="dark"] .stats { background:#0d1a2d !important; border-color:#2a3950; box-shadow:none; }
html[data-theme="dark"] .stat { border-right-color:#2a3950; }
html[data-theme="dark"] .stat-icon { background:#edf4f3; }
html[data-theme="dark"] .stat strong { color:#7b87ff; }
html[data-theme="dark"] .stat span { color:#aab8cb; }
html[data-theme="dark"] .resource-group-heading { border-bottom-color:#314157; }
html[data-theme="dark"] .resource-group-heading h3 { color:#cbd6e6 !important; }
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .partner-card {
  background:#111e31 !important; border-color:#314157 !important;
}
html[data-theme="dark"] .resource-card:hover { background:#142238 !important; border-color:#3b4e68 !important; }
html[data-theme="dark"] .resource-copy strong,
html[data-theme="dark"] .partner-card strong { color:#f4f7fb !important; }
html[data-theme="dark"] .resource-copy p { color:#a9b7ca !important; }
html[data-theme="dark"] .resource-pill { background:#e9eef5; color:#5d6a7b; border-color:#e9eef5; }
html[data-theme="dark"] .section-heading h2 { color:#f5f7fb !important; }
html[data-theme="dark"] .section-heading p { color:#b6c2d4 !important; }
html[data-theme="dark"] .kicker { color:#26b76d !important; }
html[data-theme="dark"] .platform-card,
html[data-theme="dark"] .collection-card,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .facility-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .hours-panel,
html[data-theme="dark"] .cta-box {
  background:#0d1a2d !important; border-color:#2a3950 !important;
}
html[data-theme="dark"] .section-soft,
html[data-theme="dark"] .partner-section { background:#091525 !important; }
html[data-theme="dark"] .btn-ghost { background:#111e31 !important; color:#eef4ff !important; border-color:#314157 !important; }

@media (max-width: 1180px) {
  .container { width:min(1120px,calc(100% - 36px)); }
  .header .navlinks { gap:4px; }
  .header .navlinks > a:not(.nav-opac) { padding:0 10px; font-size:13px; }
  .resource-list-national,
  .resource-list-international,
  .resource-list-ebook { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  :root { --header-height:64px; }
  .header .navlinks { display:none; }
  .menu-btn { display:grid; }
  .header .mobile-menu.open {
    position:absolute; left:18px; right:18px; top:calc(100% + 8px); display:grid;
    padding:14px; border-radius:16px; background:rgba(7,18,36,.98) !important;
    border:1px solid rgba(255,255,255,.10); box-shadow:0 18px 38px rgba(0,0,0,.24);
  }
  .header .mobile-menu a { color:#fff; border-bottom-color:rgba(255,255,255,.08); }
  .hero-slider,.hero-slider-track,.hero-slide-inner { min-height:650px; }
  .hero-slide-inner { padding:130px 0 96px !important; }
  .hero-slide-copy h1 { font-size:clamp(44px,6vw,58px); }
  .stats { grid-template-columns:repeat(2,1fr); }
  .stat:nth-child(2) { border-right:0; }
  .stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  html[data-theme="dark"] .stat:nth-child(-n+2) { border-bottom-color:#2a3950; }
  .platform-grid,.events-grid,.service-grid,.facility-grid { grid-template-columns:repeat(2,1fr); }
  .collection-grid { grid-template-columns:repeat(2,1fr); }
  .resource-list-internal,
  .resource-list-national,
  .resource-list-international,
  .resource-list-ebook,
  .resource-list-default { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .partner-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  :root { --announcement-offset:44px; --header-height:60px; }
  .container { width:calc(100% - 24px); }
  .announcement-inner { min-height:44px; gap:8px; }
  .announcement-copy { gap:8px; min-width:0; }
  .announcement-badge { padding:5px 9px; font-size:10px; }
  .announcement-copy p { font-size:11px; max-width:calc(100vw - 170px); }
  .announcement-close { width:28px; height:28px; }
  .header .brand img { width:40px; height:40px; }
  .header .brand-copy span { display:none; }
  .hero-slider,.hero-slider-track,.hero-slide-inner { min-height:610px; }
  .hero-slide-inner { padding:116px 0 86px !important; align-items:center; }
  .hero-chip { font-size:10px; padding:7px 11px; }
  .hero-slide-copy h1 { font-size:38px; line-height:1.06; margin-bottom:15px; }
  .hero-slide-copy .slide-description { font-size:14px; line-height:1.55; }
  .search-card-on-hero { border-radius:18px; flex-direction:column; align-items:stretch; padding:8px; }
  .search-card-on-hero .search-input { min-height:46px; }
  .search-card-on-hero .btn-primary { width:100%; border-radius:12px; }
  .hero-quicklinks .btn { flex:1 1 calc(50% - 6px); }
  .hero-note-on-dark { font-size:10px; }
  .hero-slider-ui { bottom:22px; }
  .stat-band { padding-top:14px !important; }
  .stat { padding:16px 14px; min-height:84px; }
  .stat-icon { width:40px; height:40px; }
  .stat strong { font-size:17px; }
  .stat span { font-size:10px; }
  .section { padding:62px 0; }
  .section-compact,.partner-section { padding:56px 0; }
  .section-heading,.section-heading.row { margin-bottom:26px; }
  .section-heading h2 { font-size:32px; }
  .section-heading p { font-size:14px; }
  .platform-grid,.collection-grid,.events-grid,.service-grid,.facility-grid,
  .resource-list-internal,.resource-list-national,.resource-list-international,
  .resource-list-ebook,.resource-list-default,.partner-grid,.footer-grid { grid-template-columns:1fr; }
  .news-grid,.hours-wrap { grid-template-columns:1fr; }
  .resource-card { min-height:106px; padding:15px; }
  .resource-group-heading h3 { font-size:15px; }
  .partner-card { min-height:76px; }
  .back-to-top { right:16px; bottom:16px; width:44px; height:44px; border-radius:13px; }
  .footer-bottom { flex-direction:column; }
}
@media (max-width: 420px) {
  .announcement-badge span { display:none; }
  .announcement-copy p { max-width:calc(100vw - 105px); }
  .header .brand-copy strong { font-size:13px; }
  .hero-slide-copy h1 { font-size:34px; }
  .hero-quicklinks { display:none; }
  .stats { grid-template-columns:1fr; }
  .stat { border-right:0 !important; border-bottom:1px solid var(--line); }
  .stat:last-child { border-bottom:0; }
  html[data-theme="dark"] .stat { border-bottom-color:#2a3950; }
}

/* ===== V11 refinements ===== */
.hero-slide { pointer-events:none; }
.hero-slide.is-active { pointer-events:auto; }
.hero-slide-bg {
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
}
.resource-logo-with-image,
.resource-card .resource-logo,
.partner-card .resource-logo {
  display:grid;
  place-items:center;
  overflow:hidden;
}
.resource-logo-with-image {
  background:#edf4f6 !important;
  border-radius:14px;
}
.resource-logo-with-image img {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  background:transparent !important;
}
.resource-logo-had-error,
.resource-logo-fallback {
  background:linear-gradient(135deg,#1f3f8f,#2ec4b6) !important;
  color:#fff !important;
  border-radius:14px;
}
.resource-logo-fallback-text,
.resource-logo-fallback {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  font-weight:900;
  letter-spacing:-.04em;
  font-size:16px;
}
.resource-copy strong {
  line-height:1.25;
  display:block;
}
.resource-copy p {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.resource-more-wrap { display:none; }
.resource-more-btn {
  min-height:48px;
  padding:0 28px;
  border-radius:999px;
  border:2px solid #274ab6;
  background:#fff;
  color:#274ab6;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  transition:.2s ease;
}
.resource-more-btn:hover { transform:translateY(-1px); box-shadow:0 10px 24px rgba(39,74,182,.12); }
.resource-more-btn.is-expanded::after,
.resource-more-btn::after {
  content:'⌄';
  display:inline-block;
  margin-left:10px;
  font-size:18px;
  line-height:1;
  transform:translateY(1px);
}
.resource-more-btn.is-expanded::after { transform:rotate(180deg) translateY(-1px); }
.admin-top-actions {
  display:flex;
  align-items:center;
  gap:12px;
}
.admin-theme-toggle {
  width:42px;
  height:42px;
  border-radius:12px;
}
.login-card-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:8px;
}
.captcha-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 140px;
  gap:10px;
  align-items:center;
}
.captcha-question {
  min-height:46px;
  padding:0 14px;
  border:1px dashed #98a2b3;
  border-radius:12px;
  background:#f8fafc;
  display:flex;
  align-items:center;
  font-weight:850;
  color:#0f172a;
}
html[data-theme="dark"] .admin-body {
  background:#07111f !important;
}
html[data-theme="dark"] .sidebar {
  background:#091728 !important;
  border-right:1px solid #1d3046;
}
html[data-theme="dark"] .side-nav a:hover,
html[data-theme="dark"] .side-nav a.active {
  background:#142238 !important;
}
html[data-theme="dark"] .admin-top,
html[data-theme="dark"] .admin-stat,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .login-card {
  background:#0d1a2d !important;
  border-color:#2a3950 !important;
  color:#e7edf7 !important;
  box-shadow:none;
}
html[data-theme="dark"] .admin-top strong,
html[data-theme="dark"] .admin-title-row h1,
html[data-theme="dark"] .panel h3,
html[data-theme="dark"] td strong,
html[data-theme="dark"] .login-card h1 {
  color:#f5f7fb !important;
}
html[data-theme="dark"] .admin-user,
html[data-theme="dark"] .admin-title-row p,
html[data-theme="dark"] .form-help,
html[data-theme="dark"] .login-card > p,
html[data-theme="dark"] .admin-stat span,
html[data-theme="dark"] th {
  color:#aab8cb !important;
}
html[data-theme="dark"] .admin-stat strong {
  color:#7b87ff !important;
}
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-bottom-color:#2a3950 !important;
  background:transparent;
}
html[data-theme="dark"] .form-field label {
  color:#d8e3f2 !important;
}
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field textarea,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .captcha-question {
  background:#111e31 !important;
  border-color:#314157 !important;
  color:#e7edf7 !important;
}
html[data-theme="dark"] .demo-credentials {
  background:#2b2207 !important;
  border-color:#665318 !important;
  color:#f4deb1 !important;
}
html[data-theme="dark"] .login-page {
  background:linear-gradient(145deg,#07111f,#0e1b30) !important;
}
@media (max-width: 700px) {
  .resource-card {
    grid-template-columns:64px minmax(0,1fr) !important;
    min-height:118px;
    padding:18px 16px;
    border-radius:20px;
    align-items:center;
    gap:14px;
  }
  .resource-logo,
  .resource-card .resource-logo,
  .partner-card .resource-logo {
    width:64px;
    height:64px;
    border-radius:16px;
    padding:10px;
    background:#edf4f6 !important;
  }
  .resource-copy strong {
    font-size:15px;
    margin-bottom:6px;
  }
  .resource-copy p {
    font-size:12px;
    line-height:1.5;
  }
  .resource-more-wrap {
    display:flex;
    justify-content:center;
    margin-top:16px;
  }
  .resource-extra.is-collapsed { display:none !important; }
  .back-to-top { bottom:90px; }
  .admin-top { padding:12px 16px; }
  .admin-content { padding:18px 14px 26px; }
  .admin-top-actions { gap:8px; }
}
@media (max-width: 520px) {
  .captcha-row { grid-template-columns:1fr; }
  .login-card { padding:24px 18px; }
  .login-card-top { align-items:center; }
  .admin-user { font-size:11px; }
}

/* ===== V12 dynamic navigation + admin menu manager ===== */
.dynamic-nav { position:relative; }
.nav-menu-item { position:relative; }
.nav-menu-link { display:flex; align-items:center; gap:5px; white-space:nowrap; color:inherit; }
.nav-caret { font-size:13px; opacity:.72; transform:translateY(-1px); transition:transform .18s ease; }
.nav-menu-item:hover > .nav-menu-link .nav-caret,
.nav-menu-item:focus-within > .nav-menu-link .nav-caret { transform:rotate(180deg); }
.nav-dropdown {
  position:absolute; top:calc(100% + 10px); left:-12px; width:270px; padding:9px;
  border:1px solid rgba(219,227,235,.96); border-radius:16px; background:#fff;
  box-shadow:0 22px 56px rgba(10,28,52,.16); opacity:0; visibility:hidden;
  transform:translateY(7px); transition:opacity .16s ease,transform .16s ease,visibility .16s ease; z-index:120;
}
.nav-menu-item:hover > .nav-dropdown,
.nav-menu-item:focus-within > .nav-dropdown,
.nav-sub-item:hover > .nav-dropdown,
.nav-sub-item:focus-within > .nav-dropdown { opacity:1; visibility:visible; transform:translateY(0); }
.nav-sub-item { position:relative; }
.nav-sub-item > a { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 11px; border-radius:10px; color:#25354c !important; font-size:12px; font-weight:760; line-height:1.35; }
.nav-sub-item > a:hover { background:#f1f8f5; color:var(--primary) !important; }
.nav-sub-item > .nav-dropdown { top:-9px; left:calc(100% + 8px); }
.nav-caret-side { margin-left:auto; transform:none !important; font-size:18px; }
.header.header-home .nav-dropdown a { color:#25354c !important; opacity:1; }
.header.header-home .nav-dropdown a:hover { color:var(--primary) !important; }
.header .dynamic-nav { gap:7px; }
.header .dynamic-nav > .nav-menu-item > .nav-menu-link { min-height:40px; padding:0 8px; border-radius:10px; font-size:11.5px; font-weight:800; letter-spacing:.01em; }
.header:not(.header-home) .dynamic-nav > .nav-menu-item > .nav-menu-link { color:#344054; }
.header .dynamic-nav > .nav-menu-item > .nav-menu-link:hover { background:rgba(255,255,255,.10); }
.header:not(.header-home) .dynamic-nav > .nav-menu-item > .nav-menu-link:hover { background:#f3f7f5; color:var(--primary); }
.mobile-menu-title { font-size:11px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.mobile-menu-level { display:grid; gap:3px; }
.mobile-menu-item { border-bottom:1px solid var(--line); }
.mobile-menu-line { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
.mobile-menu-line > a { border:0 !important; padding:11px 4px !important; min-width:0; }
.mobile-submenu-toggle { width:36px; height:36px; border:0; border-radius:10px; background:var(--soft); color:var(--navy); font-size:20px; cursor:pointer; transition:transform .18s ease; }
.mobile-submenu-toggle[aria-expanded="true"] { transform:rotate(45deg); }
.mobile-submenu { display:none; padding:0 0 7px 13px; }
.mobile-submenu.is-open { display:block; }
.mobile-depth-1 .mobile-menu-line > a { font-weight:750; font-size:13px; }
.mobile-depth-2 .mobile-menu-line > a,
.mobile-depth-3 .mobile-menu-line > a { font-weight:650; font-size:12px; }
.mobile-opac-link { margin-top:12px; border:0 !important; border-radius:12px; background:var(--primary); color:#fff !important; text-align:center; }
.header.header-home .dynamic-mobile-menu .mobile-menu-title { color:rgba(255,255,255,.65); }
.header.header-home .mobile-menu-item { border-bottom-color:rgba(255,255,255,.12); }
.header.header-home .mobile-submenu-toggle { background:rgba(255,255,255,.1); color:#fff; }
html[data-theme="dark"] .nav-dropdown { background:#101d30; border-color:#2a3950; box-shadow:0 22px 56px rgba(0,0,0,.32); }
html[data-theme="dark"] .nav-dropdown a { color:#e3eaf4 !important; }
html[data-theme="dark"] .nav-dropdown a:hover { background:#17263a; color:#fff !important; }
html[data-theme="dark"] .mobile-menu-item { border-bottom-color:#2a3950; }
html[data-theme="dark"] .mobile-submenu-toggle { background:#17263a; color:#fff; }
.menu-admin-table code { display:inline-block; max-width:330px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#475467; background:#f6f8fa; border:1px solid var(--line); border-radius:7px; padding:4px 7px; }
.menu-depth-mark { color:#98a2b3; white-space:pre; }
.badge-muted { background:#f2f4f7 !important; color:#667085 !important; }
.menu-guide p { margin:0; }
html[data-theme="dark"] .menu-admin-table code { background:#111e31; border-color:#314157; color:#d8e3f2; }
@media (max-width:1180px) {
  .header .dynamic-nav > .nav-menu-item > .nav-menu-link { padding:0 5px; font-size:10.5px; }
  .header .dynamic-nav { gap:2px; }
  .header .nav-opac { padding:0 12px; }
}
@media (max-width:1040px) {
  .navlinks.dynamic-nav { display:none; }
  .menu-btn { display:grid; }
}
@media (max-width:700px) {
  .menu-admin-table th:nth-child(3), .menu-admin-table td:nth-child(3),
  .menu-admin-table th:nth-child(4), .menu-admin-table td:nth-child(4) { display:none; }
  .menu-admin-table code { max-width:155px; }
}
/* Keep four-level fly-outs inside common laptop widths. */
.nav-depth-2 .nav-depth-3 { left:auto; right:calc(100% + 8px); }

/* ===== V13 first-party visitor statistics ===== */
.footer-visitor-strip {
  margin-top:34px;
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:rgba(255,255,255,.055);
  scroll-margin-top:96px;
}
.footer-visitor-title { display:flex; align-items:center; gap:13px; min-width:0; }
.footer-visitor-title strong { display:block; font-size:13px; color:#fff; }
.footer-visitor-title span:not(.footer-visitor-icon) { display:block; margin-top:3px; color:rgba(255,255,255,.52); font-size:11px; line-height:1.45; }
.footer-visitor-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 38px; border-radius:12px; background:rgba(255,255,255,.1); color:#fff; }
.footer-visitor-icon svg { width:19px; height:19px; }
.footer-visitor-numbers { display:grid; grid-template-columns:repeat(2,minmax(92px,1fr)); gap:10px; }
.footer-visitor-numbers > div { min-width:100px; padding:9px 13px; border-radius:12px; background:rgba(255,255,255,.07); text-align:right; }
.footer-visitor-numbers span { display:block; color:rgba(255,255,255,.5); font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.footer-visitor-numbers strong { display:block; margin-top:2px; color:#fff; font-size:19px; font-variant-numeric:tabular-nums; }
.admin-stat-highlight { border-color:rgba(11,122,83,.25); box-shadow:0 10px 28px rgba(11,122,83,.07); }
.admin-stat a { display:inline-block; margin-top:8px; color:var(--primary); font-size:11px; font-weight:800; }
.visitor-summary-grid { margin-bottom:20px; }
.panel-heading-inline { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.panel-heading-inline h3 { margin-bottom:3px; }
.visitor-chart { display:grid; gap:8px; margin-top:20px; }
.visitor-bar-row { display:grid; grid-template-columns:48px minmax(0,1fr) 56px; align-items:center; gap:10px; font-size:11px; color:var(--muted); }
.visitor-bar-row > strong { color:var(--navy); text-align:right; font-size:11px; font-variant-numeric:tabular-nums; }
.visitor-bar-track { height:10px; overflow:hidden; border-radius:999px; background:#edf2f4; }
.visitor-bar-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),#34a56f); }
.visitor-privacy-note p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
html[data-theme="dark"] .footer-visitor-strip { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.11); }
html[data-theme="dark"] .visitor-bar-track { background:#17263a; }
html[data-theme="dark"] .visitor-bar-row > strong { color:#eef4fb; }
html[data-theme="dark"] .admin-stat-highlight { border-color:rgba(66,184,131,.28); box-shadow:none; }
@media (max-width:700px) {
  .footer-visitor-strip { align-items:stretch; flex-direction:column; padding:16px; }
  .footer-visitor-numbers { width:100%; }
  .footer-visitor-numbers > div { text-align:left; min-width:0; }
  .visitor-bar-row { grid-template-columns:42px minmax(0,1fr) 44px; gap:7px; }
}


/* v16: exact first-screen hero fix */
:root {
  --announcement-offset: 46px;
  --header-height: 68px;
  --hero-first-screen: calc(100dvh - var(--announcement-offset));
}
@supports not (height: 100dvh) {
  :root { --hero-first-screen: calc(100vh - var(--announcement-offset)); }
}
.header.header-home .theme-toggle,
.mobile-menu .theme-toggle,
.admin-theme-toggle {
  display:inline-flex; align-items:center; justify-content:center;
}
.footer-visitor-title > div { display:flex; align-items:center; min-height:38px; }
.footer-visitor-title > div strong { display:block; }
.hero-slider,
.hero-slider-track {
  height: var(--hero-first-screen) !important;
  min-height: var(--hero-first-screen) !important;
}
.hero-slide,
.hero-slide-inner {
  min-height: var(--hero-first-screen) !important;
}
.hero-slide-inner {
  display:flex;
  align-items:center;
  padding: calc(var(--header-height) + 56px) 0 96px !important;
}
.hero-slide-copy {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:18px;
  max-width:760px;
}
.hero-slide-copy h1,
.hero-slide-copy .slide-description,
.search-card-on-hero,
.hero-quicklinks {
  margin:0 !important;
}
.hero-slide-copy .slide-description p { margin:0; }
.hero-slider-ui { bottom: 22px !important; }
.stat-band { margin-top:0 !important; }
@media (max-width: 980px) {
  :root { --hero-first-screen: calc(100dvh - var(--announcement-offset)); }
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height:auto !important;
    min-height: max(640px, var(--hero-first-screen)) !important;
  }
  .hero-slide-inner { padding: calc(var(--header-height) + 44px) 0 88px !important; }
}
@media (max-width: 768px) {
  :root { --announcement-offset:44px; --header-height:60px; }
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height:auto !important;
    min-height: 610px !important;
  }
  .hero-slide-inner { padding: calc(var(--header-height) + 34px) 0 78px !important; }
  .hero-slide-copy { gap:14px; }
  .hero-slider-ui { bottom:18px !important; }
}


/* v17: full-viewport hero + glass-to-solid sticky header */
:root {
  --hero-viewport-height: 100vh;
}
@supports (height: 100dvh) {
  :root { --hero-viewport-height: 100dvh; }
}

/* The announcement/header are fixed overlays, so the hero must use the full viewport. */
.hero-slider,
.hero-slider-track,
.hero-slide,
.hero-slide-inner {
  height: var(--hero-viewport-height) !important;
  min-height: 700px !important;
}
.hero-slide-inner {
  padding: calc(var(--announcement-offset) + var(--header-height) + 44px) 0 82px !important;
  align-items:center !important;
}
.hero-slide-copy {
  gap:18px !important;
}
.hero-slider-ui {
  bottom:22px !important;
}
.stat-band {
  margin-top:0 !important;
}

/* Initial state: glass header that visually blends into the hero image. */
.header.header-home:not(.is-scrolled) {
  background: linear-gradient(90deg, rgba(6,18,40,.58), rgba(8,27,49,.48)) !important;
  border-bottom:1px solid rgba(255,255,255,.055) !important;
  -webkit-backdrop-filter: blur(10px) saturate(118%);
  backdrop-filter: blur(10px) saturate(118%);
  box-shadow:none !important;
}
.header.header-home:not(.is-scrolled) .navlinks > a:not(.nav-opac),
.header.header-home:not(.is-scrolled) .dynamic-nav > .nav-menu-item > .nav-menu-link {
  color:rgba(255,255,255,.92) !important;
  text-shadow:0 1px 12px rgba(0,0,0,.12);
}
.header.header-home:not(.is-scrolled) .theme-toggle,
.header.header-home:not(.is-scrolled) .nav-opac {
  background:rgba(255,255,255,.075) !important;
  border-color:rgba(255,255,255,.20) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

/* Scrolled state: opaque navigation for maximum readability. */
.header.header-home.is-scrolled,
.header.is-scrolled {
  background:rgba(7,18,37,.985) !important;
  border-bottom-color:rgba(255,255,255,.075) !important;
  -webkit-backdrop-filter:blur(18px) saturate(125%);
  backdrop-filter:blur(18px) saturate(125%);
  box-shadow:0 9px 28px rgba(1,7,20,.24) !important;
}
.header.header-home,
.header {
  transition:background-color .24s ease, background .24s ease, box-shadow .24s ease, border-color .24s ease, backdrop-filter .24s ease !important;
}

/* V17 removes the old secondary CTA row from the hero completely. */
.hero-quicklinks { display:none !important; }

@media (max-width:980px) {
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height:auto !important;
    min-height:max(640px, var(--hero-viewport-height)) !important;
  }
  .hero-slide-inner {
    padding:calc(var(--announcement-offset) + var(--header-height) + 34px) 0 80px !important;
  }
}
@media (max-width:768px) {
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height:auto !important;
    min-height:610px !important;
  }
  .hero-slide-inner {
    padding:calc(var(--announcement-offset) + var(--header-height) + 24px) 0 72px !important;
  }
  .header.header-home:not(.is-scrolled) {
    background:rgba(6,18,40,.72) !important;
    -webkit-backdrop-filter:blur(14px);
    backdrop-filter:blur(14px);
  }
}


/* v18: information pages linked from dynamic navigation */
.content-page { background:#f6f8fb; }
.info-page-main { min-height:70vh; padding-top:calc(var(--announcement-offset) + var(--header-height)); }
.info-page-hero {
  position:relative; overflow:hidden; padding:58px 0 68px;
  background:
    radial-gradient(circle at 85% 18%, rgba(50,201,183,.18), transparent 28%),
    linear-gradient(135deg, #0b1d3a 0%, #123762 58%, #0b6e67 145%);
  color:#fff;
}
.info-page-hero::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(110deg, rgba(255,255,255,.035), transparent 48%);
}
.info-page-hero .container { position:relative; z-index:1; }
.info-page-back, .info-page-hero > .container > span { display:inline-flex; align-items:center; font-size:12px; font-weight:750; color:rgba(255,255,255,.72); }
.info-page-back:hover { color:#fff; }
.info-page-separator { margin:0 8px; }
.info-page-heading { max-width:840px; margin-top:24px; }
.info-page-heading .kicker { color:#55dfcd; }
.info-page-heading h1 { margin:8px 0 12px; color:#fff; font-size:clamp(38px,5vw,64px); line-height:1.04; letter-spacing:-.035em; }
.info-page-heading p { max-width:720px; margin:0; color:rgba(255,255,255,.8); font-size:17px; }
.info-page-section { padding:64px 0 84px; }
.info-page-card { max-width:980px; margin:0 auto; padding:44px 48px; border:1px solid var(--line); border-radius:26px; background:#fff; box-shadow:0 24px 70px rgba(18,48,90,.09); }
.info-page-figure { margin:0 0 40px; }
.info-page-figure img { width:100%; max-height:none; object-fit:contain; border-radius:18px; border:1px solid var(--line); background:#fff; }
.info-page-figure figcaption { margin-top:10px; text-align:center; font-size:12px; color:var(--muted); }
.info-page-content { color:#334155; font-size:16px; line-height:1.85; }
.info-page-content > :first-child { margin-top:0; }
.info-page-content > :last-child { margin-bottom:0; }
.info-page-content h2 { margin:34px 0 14px; color:var(--navy); font-size:27px; }
.info-page-content h3 { margin:26px 0 10px; color:var(--navy); font-size:20px; }
.info-page-content p { margin:0 0 18px; }
.info-page-content ul, .info-page-content ol { margin:12px 0 22px; padding-left:24px; }
.info-page-content li { margin:0 0 12px; padding-left:4px; }
.info-page-content strong { color:#102b4c; }
.info-page-content blockquote { margin:26px 0; padding:20px 24px; border-left:4px solid var(--primary); background:#f4faf8; border-radius:0 14px 14px 0; }
.info-page-actions { display:flex; gap:12px; margin-top:38px; padding-top:28px; border-top:1px solid var(--line); }
.slug-input-row { display:flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.slug-input-row > span { padding:0 10px; color:#667085; background:#f7f9fb; border-right:1px solid var(--line); white-space:nowrap; }
.slug-input-row input { border:0 !important; border-radius:0 !important; }
html[data-theme="dark"] .content-page { background:#081321; }
html[data-theme="dark"] .info-page-card { background:#0f1c2c; border-color:#27384e; box-shadow:none; }
html[data-theme="dark"] .info-page-content { color:#cbd5e1; }
html[data-theme="dark"] .info-page-content h2,
html[data-theme="dark"] .info-page-content h3,
html[data-theme="dark"] .info-page-content strong { color:#f2f6fb; }
html[data-theme="dark"] .info-page-figure img { border-color:#27384e; }
html[data-theme="dark"] .info-page-actions { border-top-color:#27384e; }
@media (max-width:768px) {
  .info-page-main { padding-top:calc(var(--announcement-offset) + var(--header-height)); }
  .info-page-hero { padding:38px 0 46px; }
  .info-page-heading { margin-top:18px; }
  .info-page-heading h1 { font-size:38px; }
  .info-page-heading p { font-size:14px; }
  .info-page-section { padding:28px 0 54px; }
  .info-page-card { padding:24px 20px; border-radius:20px; }
  .info-page-figure { margin-bottom:28px; }
  .info-page-content { font-size:15px; line-height:1.75; }
}


/* v19: longer OPAC search + footer manager polish */
@media (min-width: 981px) {
  .hero-slide-copy { max-width: 900px !important; }
  .hero-slide-copy h1 { max-width: 780px; }
  .hero-slide-copy .slide-description { max-width: 700px; }
  .search-card-on-hero {
    width: min(820px, 100%) !important;
    max-width: 820px !important;
  }
}
.admin-title-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:14px; }
.panel-heading h3 { margin:0 0 4px; }
.form-span-2 { grid-column:1 / -1; }
.table-actions { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.table-actions form { margin:0; }
@media (max-width: 768px) {
  .admin-title-actions { width:100%; }
  .admin-title-actions .btn { flex:1 1 auto; }
  .form-span-2 { grid-column:auto; }
}

/* v21: news content import + news detail pages */
.news-feature.has-image {
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
}
.news-feature .news-excerpt {
  color:rgba(255,255,255,.76);
  max-width:620px;
  position:relative;
  z-index:2;
  line-height:1.72;
}
.news-item.has-image {
  display:grid;
  grid-template-columns:138px minmax(0,1fr);
  gap:18px;
  align-items:stretch;
  padding:14px;
}
.news-item-image {
  width:100%;
  height:100%;
  min-height:150px;
  object-fit:cover;
  border-radius:13px;
  background:var(--soft);
}
.news-item-body { min-width:0; padding:7px 5px 7px 0; }
.news-item .news-excerpt {
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}
.news-detail-main { background:var(--soft); min-height:70vh; }
.news-detail-hero {
  padding:150px 0 64px;
  background:linear-gradient(135deg,#0c1d3a 0%,#12305a 62%,#0b7a53 140%);
  color:#fff;
}
.news-breadcrumb { display:flex; align-items:center; gap:9px; margin-bottom:26px; color:rgba(255,255,255,.68); font-size:13px; font-weight:700; }
.news-breadcrumb a:hover { color:#fff; }
.news-detail-heading { max-width:960px; }
.news-detail-heading .badge { background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.16); }
.news-detail-heading h1 { margin:18px 0 16px; color:#fff; font-size:clamp(36px,5vw,62px); line-height:1.06; letter-spacing:-.035em; }
.news-detail-heading > p { max-width:760px; margin:0; color:rgba(255,255,255,.76); font-size:17px; }
.news-detail-meta { display:flex; flex-wrap:wrap; gap:18px; margin-top:24px; color:rgba(255,255,255,.78); font-size:13px; font-weight:700; }
.news-detail-meta span { display:inline-flex; align-items:center; gap:8px; }
.news-detail-meta .icon { width:17px; height:17px; }
.news-detail-section { padding:54px 0 82px; }
.news-detail-card { max-width:960px; margin:0 auto; padding:34px; background:#fff; border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); }
.news-detail-image { margin:0 0 34px; overflow:hidden; border-radius:18px; background:var(--soft); }
.news-detail-image img { width:100%; max-height:560px; object-fit:cover; }
.news-detail-content { max-width:820px; margin:0 auto; font-size:16px; line-height:1.85; }
.news-detail-content p { margin:0 0 20px; }
.news-detail-actions { max-width:820px; margin:34px auto 0; padding-top:24px; border-top:1px solid var(--line); }
html[data-theme="dark"] .news-detail-main { background:#091525; }
html[data-theme="dark"] .news-detail-card { background:#101d30; border-color:#2a3950; }
html[data-theme="dark"] .news-detail-content { color:#d9e4f2; }
html[data-theme="dark"] .news-detail-actions { border-top-color:#2a3950; }
@media (max-width:768px) {
  .news-item.has-image { grid-template-columns:100px minmax(0,1fr); gap:12px; padding:12px; }
  .news-item-image { min-height:120px; }
  .news-detail-hero { padding:120px 0 46px; }
  .news-detail-heading h1 { font-size:34px; }
  .news-detail-section { padding:28px 0 54px; }
  .news-detail-card { padding:18px; border-radius:18px; }
  .news-detail-image { margin-bottom:24px; border-radius:14px; }
  .news-detail-content { font-size:15px; }
}
@media (max-width:520px) {
  .news-item.has-image { grid-template-columns:1fr; }
  .news-item-image { height:190px; min-height:0; }
  .news-item-body { padding:4px 2px; }
}


/* v22: compact news cards inspired by the supplied reference */
.info-section-compact {
  padding-top: 54px;
  padding-bottom: 60px;
}
.news-section-heading {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}
.news-section-heading h2 {
  margin-bottom: 10px;
}
.news-section-heading p {
  max-width: 590px;
  margin: 0 auto;
}
.news-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}
.news-compact-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 10px 30px rgba(18,48,90,.055);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.news-compact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18,48,90,.16);
  box-shadow: 0 18px 42px rgba(18,48,90,.09);
}
.news-compact-media {
  display: block;
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--soft);
}
.news-compact-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.news-compact-card:hover .news-compact-media img {
  transform: scale(1.025);
}
.news-compact-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 26px 25px;
}
.news-compact-meta {
  min-height: 22px;
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.news-compact-meta .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.news-compact-meta-badge span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eff8f4;
  color: var(--primary);
  font-size: 10px;
}
.news-compact-card h3 {
  margin: 0 0 13px;
  color: #0d1b3b;
  font-size: 18px;
  line-height: 1.38;
  letter-spacing: -.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-compact-card h3 a:hover {
  color: var(--primary);
}
.news-compact-excerpt {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-compact-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}
.news-compact-link .icon {
  width: 15px;
  height: 15px;
  transition: transform .18s ease;
}
.news-compact-link:hover {
  color: var(--primary);
}
.news-compact-link:hover .icon {
  transform: translateX(3px);
}
html[data-theme="dark"] .news-compact-card {
  background: #101d30;
  border-color: #2a3950;
  box-shadow: none;
}
html[data-theme="dark"] .news-compact-card h3,
html[data-theme="dark"] .news-compact-meta,
html[data-theme="dark"] .news-compact-link {
  color: #eef4fb;
}
html[data-theme="dark"] .news-compact-excerpt {
  color: #aab8ca;
}
html[data-theme="dark"] .news-compact-meta-badge span {
  background: rgba(11,122,83,.16);
  color: #70e1bd;
}
@media (max-width: 980px) {
  .news-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .news-compact-media { height: 180px; }
}
@media (max-width: 640px) {
  .info-section-compact {
    padding-top: 40px;
    padding-bottom: 44px;
  }
  .news-section-heading { margin-bottom: 26px; }
  .news-compact-grid { grid-template-columns: 1fr; gap: 18px; }
  .news-compact-media { height: 200px; }
  .news-compact-body { padding: 20px; }
  .news-compact-card h3 { font-size: 17px; -webkit-line-clamp: 2; }
  .news-compact-excerpt { -webkit-line-clamp: 3; }
}


/* ===== V26: Mobile full-bleed hero + transparent initial header ===== */
:root {
  --mobile-viewport-height: 100dvh;
}
@supports not (height: 100dvh) {
  :root { --mobile-viewport-height: 100vh; }
}

@media (max-width: 768px) {
  /* Header is an overlay on the hero, not a separate navy block. */
  .header.header-home {
    position: fixed !important;
    top: var(--announcement-offset) !important;
    left: 0;
    right: 0;
    background: transparent !important;
    border-bottom-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .header.header-home:not(.is-scrolled) {
    background: linear-gradient(180deg, rgba(5,17,39,.40) 0%, rgba(5,17,39,.20) 65%, rgba(5,17,39,0) 100%) !important;
    border-bottom-color: transparent !important;
    -webkit-backdrop-filter: blur(2px) saturate(108%) !important;
    backdrop-filter: blur(2px) saturate(108%) !important;
    box-shadow: none !important;
  }
  .header.header-home.is-scrolled {
    background: rgba(7,18,37,.985) !important;
    border-bottom-color: rgba(255,255,255,.075) !important;
    -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
    backdrop-filter: blur(18px) saturate(125%) !important;
    box-shadow: 0 9px 28px rgba(1,7,20,.24) !important;
  }
  .header.header-home .container,
  .header.header-home .nav {
    background: transparent !important;
  }

  /* The background begins at the top of the viewport and continues behind the header. */
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height: var(--mobile-viewport-height) !important;
    min-height: var(--mobile-viewport-height) !important;
  }
  .hero-slider {
    margin: 0 !important;
    width: 100%;
    background: #09182f;
  }
  .hero-slide-bg,
  .hero-slide-overlay {
    inset: 0 !important;
  }
  .hero-slide-bg {
    background-size: cover !important;
    background-position: center center !important;
  }
  .hero-slide-inner {
    align-items: center !important;
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 34px) !important;
    padding-bottom: 76px !important;
  }
  .hero-slide-copy {
    width: 100%;
    gap: 14px !important;
  }
  .hero-chip {
    margin-bottom: 0 !important;
  }
  .hero-slider-ui {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }
  .stat-band {
    margin-top: 0 !important;
  }

  /* Slightly cleaner mobile branding; keeps the hero visually dominant. */
  .header.header-home .brand-copy span {
    display: none;
  }
  .header.header-home .brand img {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 28px, 1180px);
  }
  .hero-slide-inner {
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 26px) !important;
    padding-bottom: 70px !important;
  }
  .hero-slide-copy h1 {
    font-size: clamp(34px, 10vw, 44px) !important;
    line-height: 1.06 !important;
  }
  .hero-slide-copy .slide-description {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
}


/* ===== V27: hard mobile hero fullscreen ===== */
@media (max-width: 768px) {
  /* Always keep the next section below the first screen. 100vh is intentionally
     included because on some Android Chrome builds it is taller than visualViewport. */
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height: max(100vh, 100dvh, var(--mobile-viewport-height)) !important;
    min-height: max(100vh, 100dvh, var(--mobile-viewport-height)) !important;
    width: 100% !important;
  }

  .hero-slider,
  .hero-slider-track,
  .hero-slide {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .hero-slide-bg,
  .hero-slide-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .hero-slide-bg {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: 50% 50% !important;
    transform: translateZ(0);
  }

  /* Keep the content inside the fullscreen image while header/announcement float above it. */
  .hero-slide-inner {
    position: relative !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 28px) !important;
    padding-bottom: 78px !important;
  }

  .stat-band {
    position: relative !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 420px) {
  .hero-slider,
  .hero-slider-track,
  .hero-slide,
  .hero-slide-inner {
    height: max(100vh, 100dvh, var(--mobile-viewport-height)) !important;
    min-height: max(100vh, 100dvh, var(--mobile-viewport-height)) !important;
  }
  .hero-slide-inner {
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 20px) !important;
    padding-bottom: 72px !important;
  }
}


/* ===== V28: restore V26 mobile proportions while keeping V27 fullscreen hero ===== */
@media (max-width: 768px) {
  /* V27 made .hero-slide-inner width:100%, overriding the shared .container gutter.
     Restore the V26 container width so text no longer feels zoomed/cropped. */
  .hero-slide-inner.container {
    width: min(100% - 32px, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero-slide-inner {
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 34px) !important;
    padding-bottom: 76px !important;
  }
  .hero-slide-copy {
    width: 100% !important;
    max-width: 680px !important;
    gap: 14px !important;
  }
  .hero-slide-copy h1 {
    max-width: 100% !important;
  }
  .search-card-on-hero {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 420px) {
  .hero-slide-inner.container {
    width: min(100% - 28px, 1180px) !important;
  }
  .hero-slide-inner {
    padding-top: calc(var(--announcement-offset) + var(--header-height) + 26px) !important;
    padding-bottom: 70px !important;
  }
  .hero-slide-copy h1 {
    font-size: clamp(34px, 10vw, 44px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em !important;
  }
  .hero-slide-copy .slide-description {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .hero-chip {
    font-size: 11px !important;
    padding: 8px 14px !important;
  }
  .search-card-on-hero {
    border-radius: 18px !important;
    padding: 8px !important;
  }
}


/* v31: grouped admin navigation + production readiness */
.admin-nav-groups{display:grid;gap:7px}.admin-nav-group{border:1px solid rgba(255,255,255,.06);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.025)}.admin-nav-group-toggle{width:100%;border:0;background:transparent;color:rgba(255,255,255,.84);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;font-size:12px;font-weight:850;cursor:pointer;text-align:left}.admin-nav-group-toggle:hover{background:rgba(255,255,255,.06);color:#fff}.admin-nav-chevron{font-size:16px;line-height:1;transition:transform .18s ease;color:rgba(255,255,255,.5)}.admin-nav-group.is-open .admin-nav-chevron{transform:rotate(180deg)}.admin-nav-group-panel{display:none;gap:3px;padding:0 6px 7px}.admin-nav-group.is-open .admin-nav-group-panel{display:grid}.admin-nav-group-panel a{padding:9px 10px;font-size:12px}.sidebar-quick-actions{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.08);display:grid;grid-template-columns:1fr 1fr;gap:7px}.sidebar-quick-actions a,.sidebar-quick-actions button{width:100%;border:0;border-radius:10px;padding:9px 8px;background:rgba(255,255,255,.06);color:rgba(255,255,255,.72);font:inherit;font-size:11px;font-weight:800;cursor:pointer;text-align:center;display:block}.sidebar-quick-actions a:hover,.sidebar-quick-actions button:hover{background:rgba(255,255,255,.11);color:#fff}.sidebar-quick-actions form{margin:0}.production-score{display:inline-flex;align-items:center;min-height:38px;padding:0 13px;border-radius:999px;background:#eefaf4;border:1px solid #ccebdc;color:#087a50;font-size:12px;font-weight:850;white-space:nowrap}.production-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.production-check{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px}.production-check.is-warning{border-color:#f2d39b;background:#fffbf3}.production-check-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.production-check-head strong{color:var(--navy);font-size:13px}.production-check-head span{font-size:10px;font-weight:900;border-radius:999px;padding:4px 8px;background:#eaf8f1;color:#087a50}.production-check.is-warning .production-check-head span{background:#fff0d2;color:#9a6700}.production-check-value{margin-top:10px;font-size:12px;font-weight:800;word-break:break-word}.production-check p{margin:7px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.production-notes ol{margin:0;padding-left:20px;display:grid;gap:8px;color:#475467;font-size:12px}.production-notes code{background:#f4f6f8;border:1px solid var(--line);border-radius:6px;padding:2px 5px}html[data-theme="dark"] .admin-nav-group{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.02)}html[data-theme="dark"] .production-check{background:#111e31;border-color:#2c3b50}html[data-theme="dark"] .production-check.is-warning{background:#211d15;border-color:#6b5124}html[data-theme="dark"] .production-check-head strong{color:#eef4fb}html[data-theme="dark"] .production-check-value{color:#e2e8f0}html[data-theme="dark"] .production-notes code{background:#0d1827;border-color:#314157;color:#e2e8f0}@media(max-width:980px){.sidebar{padding-bottom:14px}.admin-nav-groups{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}@media(max-width:640px){.admin-nav-groups{grid-template-columns:1fr}.production-check-grid{grid-template-columns:1fr}.production-score{margin-top:4px}}

/* v32: repository activation, news archive, production finalization */
.news-all-actions { display:flex; justify-content:center; margin-top:28px; }
.news-all-actions .btn .icon { width:16px; height:16px; }
.news-archive-main { background:var(--soft); min-height:70vh; }
.news-archive-hero { padding:132px 0 48px; background:linear-gradient(135deg,#0d2141 0%,#162f59 100%); color:#fff; }
.news-archive-heading { max-width:760px; margin-top:24px; }
.news-archive-heading .kicker { color:#66e0c9; }
.news-archive-heading h1 { margin:8px 0 12px; color:#fff; font-size:clamp(38px,5vw,62px); line-height:1.05; letter-spacing:-.035em; }
.news-archive-heading p { margin:0; color:rgba(255,255,255,.75); font-size:16px; }
.news-archive-section { padding:52px 0 80px; }
.news-archive-grid { align-items:stretch; }
.news-archive-grid .news-compact-card { height:100%; }
.cta-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.production-score.is-ready { background:#e9f9f1; border-color:#bfe7d2; color:#067647; box-shadow:0 0 0 3px rgba(6,118,71,.06); }
html[data-theme="dark"] .news-archive-main { background:#091525; }
@media (max-width:768px) {
  .news-archive-hero { padding:112px 0 38px; }
  .news-archive-heading h1 { font-size:34px; }
  .news-archive-section { padding:30px 0 56px; }
  .news-all-actions { margin-top:22px; }
  .cta-actions { width:100%; }
  .cta-actions .btn { width:100%; }
}

/* V34 — Librarian Experience */
.admin-simple-toggle{
  width:100%; margin-top:12px; border:1px solid rgba(255,255,255,.10); border-radius:10px;
  padding:10px 12px; background:rgba(255,255,255,.05); color:rgba(255,255,255,.82);
  font:inherit; font-size:11px; font-weight:850; cursor:pointer;
}
.admin-simple-toggle:hover,.admin-simple-toggle.is-active{background:rgba(255,255,255,.12);color:#fff}
body.admin-simple-mode .side-nav a[data-nav-key="system"],
body.admin-simple-mode .side-nav a[data-nav-key="database"]{display:none}
.librarian-quick-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0 0 20px}
.librarian-quick-grid>a{display:flex;flex-direction:column;gap:5px;min-height:118px;padding:16px;border:1px solid var(--line);border-radius:15px;background:#fff;transition:.18s ease}
.librarian-quick-grid>a:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(18,48,90,.08);border-color:#d6e3ee}
.librarian-quick-grid>a>span{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#eef8f4;color:var(--primary)}
.librarian-quick-grid>a>span .icon{width:18px;height:18px}
.librarian-quick-grid strong{font-size:12px;color:var(--navy)}
.librarian-quick-grid small{font-size:10.5px;line-height:1.45;color:var(--muted)}
.section-visibility-inline{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-4px 0 16px;padding:11px 14px;border:1px solid #dce9e3;border-radius:12px;background:#f4fbf7;font-size:11px;color:#475467}
.section-visibility-inline strong{color:#087a50}.section-visibility-inline a{font-weight:850;color:var(--navy)}
.home-section-switches{display:grid;gap:10px}
.home-section-switch{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer}
.home-section-switch>div{display:grid;gap:3px}.home-section-switch strong{font-size:13px;color:var(--navy)}.home-section-switch>div span{font-size:11px;color:var(--muted)}
.switch-control{display:flex;align-items:center;gap:9px;flex:0 0 auto}.switch-control input{position:absolute;opacity:0;pointer-events:none}.switch-control i{position:relative;width:42px;height:24px;border-radius:999px;background:#d7dee7;transition:.18s ease}.switch-control i::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 2px 6px rgba(0,0,0,.16);transition:.18s ease}.switch-control input:checked+i{background:var(--primary)}.switch-control input:checked+i::after{transform:translateX(18px)}.switch-control b{min-width:80px;font-size:10px;color:var(--muted)}
.librarian-tip p{margin:5px 0 0;color:var(--muted);font-size:11px}
.login-card h1{margin-bottom:20px}
html[data-theme="dark"] .librarian-quick-grid>a,html[data-theme="dark"] .home-section-switch{background:#111e31;border-color:#2c3b50}
html[data-theme="dark"] .librarian-quick-grid strong,html[data-theme="dark"] .home-section-switch strong{color:#eef4fb}
html[data-theme="dark"] .section-visibility-inline{background:#10271f;border-color:#214b3b;color:#cbd5e1}
html[data-theme="dark"] .section-visibility-inline strong{color:#7ee0b4}
@media(max-width:1180px){.librarian-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.librarian-quick-grid{grid-template-columns:1fr 1fr}.home-section-switch{align-items:flex-start;flex-direction:column}.switch-control{width:100%;justify-content:space-between}.section-visibility-inline{align-items:flex-start;flex-direction:column}}
@media(max-width:460px){.librarian-quick-grid{grid-template-columns:1fr}}


/* v35: E-Resources admin category tabs */
.admin-resource-tabs{
  display:flex;align-items:center;gap:8px;overflow-x:auto;padding:4px 2px 10px;
  scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;margin:2px 0 4px;
}
.admin-resource-tab{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:9px;min-height:42px;padding:0 14px;
  border:1px solid var(--line);border-radius:12px;background:#fff;color:#475467;font-size:12px;font-weight:800;
  transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease;
}
.admin-resource-tab:hover{border-color:#b9c7d8;color:var(--navy);transform:translateY(-1px)}
.admin-resource-tab b{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#eef3f8;color:#526173;font-size:10px}
.admin-resource-tab.is-active{background:#eef5ff;border-color:#9ab8ee;color:#173f9d;box-shadow:0 8px 22px rgba(40,81,153,.08)}
.admin-resource-tab.is-active b{background:#173f9d;color:#fff}
.resource-tab-summary{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px;margin:10px 0 0}
.resource-tab-summary>div{border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.resource-tab-summary span{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800}
.resource-tab-summary strong{font-size:13px;color:var(--navy)}
.resource-paid-control{margin-top:0!important;margin-bottom:14px}
.resource-paid-control-inner{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.resource-paid-control-inner .checkbox-row{margin:0}
.resource-category-panel{margin-top:12px}
.resource-empty-state{padding:24px 10px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;color:var(--muted)}
.resource-empty-state strong{color:var(--navy)}
html[data-theme="dark"] .admin-resource-tab,
html[data-theme="dark"] .resource-tab-summary>div{background:#101d30;border-color:#2a3950;color:#cbd5e1}
html[data-theme="dark"] .admin-resource-tab b{background:#17263a;color:#d8e3f2}
html[data-theme="dark"] .admin-resource-tab.is-active{background:#17345f;border-color:#416aa2;color:#fff}
html[data-theme="dark"] .admin-resource-tab.is-active b{background:#dbeafe;color:#173f9d}
html[data-theme="dark"] .resource-tab-summary strong,
html[data-theme="dark"] .resource-empty-state strong{color:#eef4fb}
@media(max-width:700px){
  .admin-resource-tabs{margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}
  .admin-resource-tab{min-height:40px;padding:0 12px;font-size:11px}
  .resource-tab-summary{grid-template-columns:1fr 110px}
  .resource-paid-control-inner{align-items:flex-start}
}

/* v36: Dynamic Page & Menu Builder */
.cms-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 14px}.cms-overview-grid>div{border:1px solid var(--line);background:#fff;border-radius:13px;padding:13px 15px;display:flex;flex-direction:column;gap:3px}.cms-overview-grid span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:800}.cms-overview-grid strong{font-size:20px;color:var(--navy)}.menu-target-stack{display:grid;gap:3px;align-items:start}.menu-target-stack strong{font-size:11px;color:var(--navy)}.menu-target-stack code{width:max-content;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-target-stack small{font-size:10px;color:var(--muted)}.menu-page-select-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.menu-target-field[hidden]{display:none!important}.section-anchor-input,.slug-input-row{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.section-anchor-input span,.slug-input-row span{padding:0 10px;color:var(--muted);font-size:12px;background:#f7f9fb;align-self:stretch;display:flex;align-items:center;border-right:1px solid var(--line)}.section-anchor-input input,.slug-input-row input{border:0!important;border-radius:0!important;min-width:0}.cms-parent-note{padding:13px 14px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;display:grid;gap:4px}.cms-parent-note strong{font-size:12px;color:var(--navy)}.cms-parent-note span{font-size:11px;color:var(--muted)}.page-template-strip{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:#fff}.page-template-strip>span{font-size:10px;text-transform:uppercase;color:var(--muted);font-weight:900;margin-right:3px}.page-template-strip a{padding:7px 10px;border-radius:9px;border:1px solid var(--line);font-size:10px;font-weight:800;color:#475467}.page-template-strip a.is-active{background:#eaf7f1;color:#087a50;border-color:#bfe2d1}.cms-link-notice,.page-cms-help{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border:1px solid #cfe6dc;border-radius:14px;background:#f4fbf7;margin:0 0 14px}.cms-link-notice>span,.page-cms-help>span{width:34px;height:34px;border-radius:10px;background:#e2f4eb;color:var(--primary);display:grid;place-items:center;flex:0 0 auto}.cms-link-notice .icon,.page-cms-help .icon{width:18px;height:18px}.cms-link-notice strong,.page-cms-help strong{font-size:12px;color:#087a50}.cms-link-notice p,.page-cms-help p{margin:4px 0 0;font-size:11px;color:#526173;line-height:1.5}.cms-status-box{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.linked-menu-chips{display:flex;flex-wrap:wrap;gap:7px}.linked-menu-chips a{padding:6px 9px;border:1px solid #cbd9e8;border-radius:999px;background:#f7faff;font-size:10px;font-weight:800;color:#244678}.linked-menu-chips.compact{margin-top:5px}.linked-menu-chips.compact a{padding:4px 7px;font-size:9px}.page-list-target{display:grid;gap:4px}.page-link-panel,.page-revision-panel{margin-top:14px}.empty-state.compact{padding:12px}.revision-list{display:grid;gap:8px}.revision-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:11px}.revision-list span{display:grid;gap:2px}.revision-list strong{font-size:11px;color:var(--navy)}.revision-list small{font-size:10px;color:var(--muted)}.admin-preview-bar{position:relative;z-index:20;background:#fff7da;border-bottom:1px solid #ead184;color:#6d5600;padding:9px max(20px,calc((100% - 1180px)/2));display:flex;gap:12px;align-items:center;font-size:11px}.admin-preview-bar strong{font-size:11px}.admin-preview-bar span{color:#816d24}.admin-preview-bar a{margin-left:auto;font-weight:900;color:#173f9d}.media-upload-row{display:flex;gap:10px;align-items:center}.media-upload-row input{flex:1}.media-library-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.media-library-card{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;min-width:0}.media-library-thumb{aspect-ratio:4/3;background:#eef2f6;display:grid;place-items:center;overflow:hidden}.media-library-thumb img{width:100%;height:100%;object-fit:cover}.media-library-body{padding:11px;display:grid;gap:5px}.media-library-body strong{font-size:11px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.media-library-body>span{font-size:9px;color:var(--muted)}.media-library-body code{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.media-library-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:3px}.media-library-actions form{margin:0}html[data-theme="dark"] .cms-overview-grid>div,html[data-theme="dark"] .page-template-strip,html[data-theme="dark"] .media-library-card{background:#111e31;border-color:#2c3b50}html[data-theme="dark"] .cms-overview-grid strong,html[data-theme="dark"] .menu-target-stack strong,html[data-theme="dark"] .cms-parent-note strong,html[data-theme="dark"] .revision-list strong,html[data-theme="dark"] .media-library-body strong{color:#eef4fb}html[data-theme="dark"] .cms-parent-note{background:#0d1827;border-color:#33445a}html[data-theme="dark"] .section-anchor-input,html[data-theme="dark"] .slug-input-row{background:#101d30;border-color:#33445a}html[data-theme="dark"] .section-anchor-input span,html[data-theme="dark"] .slug-input-row span{background:#0d1827;border-color:#33445a}html[data-theme="dark"] .cms-link-notice,html[data-theme="dark"] .page-cms-help{background:#10271f;border-color:#214b3b}html[data-theme="dark"] .cms-link-notice p,html[data-theme="dark"] .page-cms-help p{color:#b6c4d4}html[data-theme="dark"] .revision-list>div{border-color:#2c3b50}@media(max-width:1050px){.media-library-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.cms-overview-grid{grid-template-columns:1fr 1fr}.menu-page-select-row{grid-template-columns:1fr}.media-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-preview-bar{flex-wrap:wrap}.admin-preview-bar a{margin-left:0}}@media(max-width:480px){.cms-overview-grid,.media-library-grid{grid-template-columns:1fr}.media-upload-row{align-items:stretch;flex-direction:column}.media-upload-row .btn{width:100%}}
/* V36 dashboard quick actions: 6 cards arranged compactly */
@media(min-width:1181px){.librarian-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v37: Public Gallery + librarian-friendly album editor */
.gallery-public-hero{padding:70px 0 42px;background:linear-gradient(180deg,#f7fbff 0%,#fff 100%);border-bottom:1px solid var(--line)}
.gallery-public-heading{max-width:820px;margin-top:22px}.gallery-public-heading h1{margin:6px 0 10px;font-size:clamp(34px,5vw,58px);line-height:1.02;color:var(--navy)}.gallery-public-heading>p{max-width:720px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.gallery-public-section{padding:42px 0 72px}.gallery-album-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.gallery-album-card{min-width:0;border:1px solid var(--line);border-radius:20px;background:#fff;overflow:hidden;box-shadow:0 14px 34px rgba(35,52,78,.06);transition:transform .18s ease,box-shadow .18s ease}.gallery-album-card:hover{transform:translateY(-3px);box-shadow:0 18px 42px rgba(35,52,78,.10)}
.gallery-album-cover{position:relative;display:block;aspect-ratio:4/3;background:#edf2f7;overflow:hidden}.gallery-album-cover img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}.gallery-album-card:hover .gallery-album-cover img{transform:scale(1.025)}.gallery-album-placeholder{width:100%;height:100%;display:grid;place-items:center;color:#8a99aa}.gallery-album-placeholder .icon{width:44px;height:44px}.gallery-photo-count{position:absolute;right:12px;bottom:12px;padding:7px 10px;border-radius:999px;background:rgba(15,30,50,.82);color:#fff;font-size:11px;font-weight:900;backdrop-filter:blur(5px)}
.gallery-album-body{padding:18px 18px 20px;display:grid;gap:10px}.gallery-album-meta,.gallery-detail-meta{display:flex;flex-wrap:wrap;gap:10px 14px;color:var(--muted);font-size:11px;font-weight:700}.gallery-album-meta span,.gallery-detail-meta span{display:inline-flex;align-items:center;gap:5px}.gallery-album-meta .icon,.gallery-detail-meta .icon{width:14px;height:14px}.gallery-album-body h2{font-size:19px;line-height:1.25;margin:0;color:var(--navy)}.gallery-album-body h2 a{color:inherit}.gallery-album-body p{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.gallery-detail-hero{padding-bottom:36px}.gallery-detail-meta{margin-top:16px;color:#526173}.gallery-description{max-width:920px;margin:0 auto 26px;padding:22px 24px;border:1px solid var(--line);border-radius:18px;background:#fff}.gallery-photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.gallery-photo-card{position:relative;appearance:none;border:0;padding:0;border-radius:14px;overflow:hidden;background:#edf2f7;aspect-ratio:4/3;cursor:zoom-in;box-shadow:0 6px 18px rgba(27,45,70,.07)}.gallery-photo-card img{width:100%;height:100%;object-fit:cover;transition:transform .2s ease}.gallery-photo-card:hover img,.gallery-photo-card:focus-visible img{transform:scale(1.035)}.gallery-photo-card:focus-visible{outline:3px solid rgba(23,63,157,.28);outline-offset:2px}.gallery-photo-card>span{position:absolute;left:0;right:0;bottom:0;padding:24px 12px 10px;background:linear-gradient(transparent,rgba(0,0,0,.72));color:#fff;text-align:left;font-size:11px;line-height:1.4}.gallery-back-actions{margin-top:28px;display:flex;justify-content:center}
.gallery-lightbox[hidden]{display:none!important}.gallery-lightbox{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:24px}.gallery-lightbox-backdrop{position:absolute;inset:0;background:rgba(6,13,23,.9);backdrop-filter:blur(5px)}.gallery-lightbox-panel{position:relative;z-index:1;width:min(1180px,94vw);height:min(84vh,860px);display:grid;grid-template-columns:60px minmax(0,1fr) 60px;align-items:center}.gallery-lightbox-panel figure{margin:0;height:100%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.gallery-lightbox-panel img{display:block;max-width:100%;max-height:calc(84vh - 70px);object-fit:contain;border-radius:8px;box-shadow:0 18px 60px rgba(0,0,0,.35)}.gallery-lightbox-panel figcaption{max-width:800px;color:#fff;text-align:center;font-size:13px;line-height:1.5}.gallery-lightbox-close,.gallery-lightbox-nav{appearance:none;border:0;background:rgba(255,255,255,.11);color:#fff;cursor:pointer;display:grid;place-items:center}.gallery-lightbox-close{position:absolute;right:0;top:0;width:42px;height:42px;border-radius:999px;font-size:28px;z-index:2}.gallery-lightbox-nav{width:46px;height:58px;border-radius:14px;font-size:34px;justify-self:center}.gallery-lightbox-nav:hover,.gallery-lightbox-close:hover{background:rgba(255,255,255,.2)}body.gallery-lightbox-open{overflow:hidden}

.gallery-public-control{margin-bottom:14px}.gallery-admin-album-cell{display:flex;align-items:center;gap:11px;min-width:250px}.gallery-admin-album-cell img,.gallery-admin-thumb-placeholder{width:66px;height:48px;border-radius:9px;object-fit:cover;background:#edf2f6;flex:0 0 auto}.gallery-admin-thumb-placeholder{display:grid;place-items:center;color:#8291a5}.gallery-admin-thumb-placeholder .icon{width:20px;height:20px}.gallery-admin-album-cell>div{display:grid;gap:3px;min-width:0}.gallery-admin-album-cell strong{font-size:11px;color:var(--navy)}.gallery-admin-album-cell small{font-size:9px;color:var(--muted);max-width:280px}.gallery-admin-info{display:grid;gap:6px;color:#667085;font-size:10px}.gallery-admin-info span{display:flex;align-items:center;gap:5px}.gallery-admin-info .icon{width:13px;height:13px}.gallery-editor-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.gallery-editor-guide>div{border:1px solid var(--line);border-radius:13px;background:#fff;padding:12px 14px;display:grid;gap:3px}.gallery-editor-guide strong{font-size:11px;color:var(--navy)}.gallery-editor-guide span{font-size:10px;color:var(--muted);line-height:1.45}.gallery-upload-box{padding:14px;border:1px dashed #b9c8d7;border-radius:13px;background:#f8fafc}.gallery-cover-preview{max-height:240px;object-fit:cover}.gallery-photo-editor-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:24px 0 12px}.gallery-photo-editor-heading h3{margin:0 0 3px;color:var(--navy);font-size:15px}.gallery-photo-admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.gallery-photo-admin-card{position:relative;border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;padding-bottom:11px;min-width:0}.gallery-photo-admin-card>img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eef2f6}.gallery-photo-admin-card>label{display:grid;gap:5px;padding:9px 10px 0;font-size:10px;font-weight:800;color:#475467}.gallery-photo-admin-card input[type=text],.gallery-photo-admin-card input:not([type]){font-size:11px}.gallery-photo-admin-drag{position:absolute;top:8px;left:8px;z-index:2;width:34px;height:30px;border-radius:9px;background:rgba(15,30,50,.78);color:#fff;display:grid;place-items:center;cursor:grab}.gallery-photo-delete{display:flex!important;align-items:center;grid-template-columns:auto 1fr!important;gap:7px!important;color:#a23d3d!important}.gallery-photo-delete input{width:auto}.gallery-photo-empty{margin:0 0 16px}.gallery-publish-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line);flex-wrap:wrap}.gallery-publish-row .form-actions{margin:0}.gallery-preview-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px}.gallery-preview-panel strong{font-size:12px;color:var(--navy)}
html[data-theme="dark"] .gallery-public-hero{background:linear-gradient(180deg,#0d1726,#101b2b);border-color:#26354a}html[data-theme="dark"] .gallery-album-card,html[data-theme="dark"] .gallery-description,html[data-theme="dark"] .gallery-editor-guide>div,html[data-theme="dark"] .gallery-photo-admin-card{background:#111e31;border-color:#2c3b50}html[data-theme="dark"] .gallery-album-body h2,html[data-theme="dark"] .gallery-admin-album-cell strong,html[data-theme="dark"] .gallery-editor-guide strong,html[data-theme="dark"] .gallery-photo-editor-heading h3,html[data-theme="dark"] .gallery-preview-panel strong{color:#eef4fb}html[data-theme="dark"] .gallery-upload-box{background:#0d1827;border-color:#3a4c64}
@media(max-width:1050px){.gallery-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-photo-grid,.gallery-photo-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.gallery-public-hero{padding:46px 0 30px}.gallery-public-section{padding:28px 0 52px}.gallery-album-grid{grid-template-columns:1fr}.gallery-photo-grid,.gallery-photo-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-editor-guide{grid-template-columns:1fr}.gallery-lightbox{padding:12px}.gallery-lightbox-panel{width:100%;height:90vh;grid-template-columns:42px minmax(0,1fr) 42px}.gallery-lightbox-nav{width:36px;height:50px}.gallery-lightbox-panel img{max-height:calc(90vh - 80px)}.gallery-publish-row{align-items:flex-start;flex-direction:column}.gallery-publish-row .form-actions{width:100%}}
@media(max-width:440px){.gallery-photo-grid,.gallery-photo-admin-grid{grid-template-columns:1fr 1fr;gap:8px}.gallery-photo-admin-card>label{padding-left:8px;padding-right:8px}.gallery-public-heading h1{font-size:34px}.gallery-lightbox-panel{grid-template-columns:34px minmax(0,1fr) 34px}.gallery-lightbox-nav{width:30px;height:44px;font-size:28px}}

/* V38 — Team & Workflow */
.bulk-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px;padding:12px 14px;border:1px solid #dfe6ee;border-radius:14px;background:#f8fafc}.bulk-toolbar>span{font-size:13px;color:#475467;margin-right:auto}.bulk-toolbar select{min-width:180px;max-width:260px;padding:9px 11px;border:1px solid #d0d5dd;border-radius:10px;background:#fff;color:#1d2939}.bulk-check{width:42px;text-align:center}.bulk-check input{width:17px;height:17px;accent-color:var(--primary)}
.workflow-dashboard-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:18px;margin:18px 0}.attention-list{display:grid;gap:8px}.attention-list a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #e4e7ec;border-radius:12px;color:#344054;text-decoration:none}.attention-list a:hover{border-color:#b8c7d9;background:#f8fafc}.attention-list strong{font-size:19px;color:var(--navy)}
.activity-feed{display:grid;gap:4px}.activity-row{display:grid;grid-template-columns:38px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f6}.activity-row:last-child{border-bottom:0}.activity-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#eef4ff;color:var(--navy);font-weight:800}.activity-row div{display:grid;gap:2px}.activity-row strong{font-size:13px}.activity-row span:not(.activity-avatar){font-size:13px;color:#475467}.activity-row small{font-size:11px;color:#98a2b3}
.role-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px}.role-summary-grid>div{padding:16px;border:1px solid #e4e7ec;border-radius:14px;background:#fff;display:grid;gap:5px}.role-summary-grid span{font-size:12px;color:#667085}.role-summary-grid strong{font-size:25px;color:var(--navy)}.role-guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 18px}.role-guide>div{padding:14px 16px;border-radius:14px;background:#f8fafc;border:1px solid #e4e7ec;display:grid;gap:4px}.role-guide strong{color:var(--navy)}.role-guide span{font-size:13px;color:#667085;line-height:1.55}
[data-theme="dark"] .bulk-toolbar,[data-theme="dark"] .role-guide>div,[data-theme="dark"] .attention-list a{background:#172033;border-color:#344054;color:#d0d5dd}[data-theme="dark"] .bulk-toolbar select,[data-theme="dark"] .role-summary-grid>div{background:#101828;border-color:#344054;color:#f2f4f7}[data-theme="dark"] .activity-row{border-color:#344054}[data-theme="dark"] .activity-avatar{background:#23314d;color:#eaf0ff}[data-theme="dark"] .role-summary-grid strong,[data-theme="dark"] .attention-list strong,[data-theme="dark"] .role-guide strong{color:#f2f4f7}
@media(max-width:900px){.workflow-dashboard-grid,.role-guide{grid-template-columns:1fr}.role-summary-grid{grid-template-columns:1fr 1fr}.bulk-toolbar{align-items:stretch}.bulk-toolbar>span{width:100%;margin:0}.bulk-toolbar select,.bulk-toolbar .btn{max-width:none;flex:1 1 180px}}
@media(max-width:560px){.role-summary-grid{grid-template-columns:1fr}.bulk-toolbar select,.bulk-toolbar .btn{width:100%;flex-basis:100%}}


/* V38.1 - Accessible show/hide password control on admin login */
.password-input-wrap { position:relative; }
.password-input-wrap > input { padding-right:46px; }
.password-toggle {
  position:absolute;
  top:50%;
  right:7px;
  transform:translateY(-50%);
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  padding:0;
}
.password-toggle:hover { background:rgba(11,122,83,.08); color:var(--primary); }
.password-toggle:focus-visible { outline:2px solid var(--primary); outline-offset:1px; }
.password-eye { width:20px; height:20px; display:inline-flex; }
.password-eye svg { width:20px; height:20px; }
.password-eye-hide { display:none; }
.password-toggle[aria-pressed="true"] .password-eye-show { display:none; }
.password-toggle[aria-pressed="true"] .password-eye-hide { display:inline-flex; }
html[data-theme="dark"] .password-toggle:hover { background:rgba(255,255,255,.08); }

/* V40 — Statistik Koleksi Dinamis */
.collection-stats-hero{padding:54px 0 34px;background:linear-gradient(180deg,#f7fafc 0%,#fff 100%);border-bottom:1px solid var(--line)}
.collection-stats-heading{max-width:840px;margin-top:24px}.collection-stats-heading h1{margin:7px 0 12px;color:var(--navy);font-size:clamp(34px,5vw,58px);line-height:1.03;letter-spacing:-.035em}.collection-stats-heading>p{max-width:780px;margin:0;color:var(--muted);font-size:15px;line-height:1.75}.collection-stats-updated{display:inline-flex;align-items:center;gap:5px;margin-top:15px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#667085;font-size:11px}.collection-stats-updated strong{color:var(--navy)}
.collection-stats-section{padding:34px 0 70px;background:#f3f4f6}.collection-chart-stack{display:grid;gap:30px}.collection-chart-card{--collection-chart-border:#fff;--collection-chart-text:#344054;--collection-chart-grid:#d0d5dd;overflow:hidden;padding:0 34px 34px;border:1px solid #e6e8ec;border-radius:5px;background:#fff;box-shadow:0 8px 26px rgba(16,24,40,.045)}
.collection-chart-title{padding:25px 12px 13px;text-align:center}.collection-chart-title h2{margin:0;color:#101828;font-size:clamp(27px,3vw,38px);font-weight:800;line-height:1.15;letter-spacing:-.025em}.collection-chart-body{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(285px,.75fr);gap:34px;align-items:center;min-height:410px}.collection-chart-visual{position:relative;min-width:0;height:390px}.collection-chart-visual canvas{display:block;width:100%!important;height:100%!important}.collection-chart-visual canvas[hidden]{display:none!important}.collection-chart-fallback{display:grid;place-items:center;width:100%;height:100%}.collection-chart-fallback[hidden]{display:none!important}.collection-chart-empty{display:grid;place-items:center;min-height:220px;margin:8px 0 0;border:1px dashed #d0d5dd;border-radius:14px;background:#f9fafb;color:#667085;font-size:13px;text-align:center}
.collection-chart-legend{min-width:0;padding:18px 8px}.collection-chart-legend ul{display:grid;gap:9px;margin:0;padding:0;list-style:none}.collection-chart-legend li{display:grid;grid-template-columns:16px minmax(0,1fr);gap:8px;align-items:start;min-height:22px;color:#101828;font-size:16px;line-height:1.25}.collection-chart-legend li[hidden]{display:none!important}.collection-chart-swatch{width:15px;height:15px;margin-top:2px;border-radius:50%;background:var(--chart-color);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.collection-chart-legend-label{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}.collection-legend-pager{display:flex;align-items:center;gap:7px;margin-top:15px;padding-left:1px;color:#2339d5;font-size:14px;font-weight:700}.collection-legend-pager[hidden]{display:none!important}.collection-legend-pager button{display:grid;place-items:center;width:25px;height:25px;border:0;background:transparent;color:#2339d5;font-size:19px;line-height:1;cursor:pointer}.collection-legend-pager button:disabled{opacity:.35;cursor:default}.collection-legend-pager button:hover:not(:disabled){background:#eef2ff;border-radius:7px}.collection-stats-note{display:flex;align-items:flex-start;gap:10px;margin-top:20px;padding:13px 15px;border:1px solid #dfe8ee;border-radius:14px;background:#fff;color:#667085}.collection-stats-note .icon{width:18px;height:18px;color:var(--primary);flex:0 0 auto}.collection-stats-note p{margin:0;font-size:11px;line-height:1.55}
.collection-native-pie{position:relative;width:min(330px,78vw);aspect-ratio:1;border-radius:50%;box-shadow:8px 8px 0 rgba(51,102,204,.12)}.collection-native-pie.is-doughnut:after{content:"";position:absolute;inset:31%;border-radius:50%;background:#fff}.collection-native-bars{display:grid;width:100%;gap:15px}.collection-native-bar-row{display:grid;grid-template-columns:minmax(90px,170px) minmax(0,1fr) 82px;gap:12px;align-items:center}.collection-native-bar-row>span{overflow:hidden;color:#344054;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.collection-native-bar-track{overflow:hidden;height:28px;border-radius:3px;background:#f2f4f7}.collection-native-bar-track i{display:block;height:100%;min-width:0}.collection-native-bar-row strong{color:#344054;font-size:12px;text-align:right;font-variant-numeric:tabular-nums}

.collection-stats-admin-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.collection-stats-admin-intro strong{display:block;color:var(--navy);font-size:13px}.collection-stats-admin-intro p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.collection-stats-visibility{margin:0}.collection-stats-admin-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.collection-stats-admin-heading h3{margin:0 0 3px;color:var(--navy)}.collection-chart-builder-panel{overflow:visible}.collection-chart-admin-list{display:grid;gap:16px}.collection-chart-admin{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fbfcfd}.collection-chart-admin.sortable-ghost,.collection-chart-item.sortable-ghost{opacity:.45;background:#eef4ff}.collection-chart-admin-head{display:grid;grid-template-columns:38px minmax(0,1fr) auto 34px;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);background:#f7f9fb}.collection-chart-drag,.collection-item-drag{display:grid;place-items:center;width:32px;height:34px;border:0;border-radius:9px;background:#e9eef4;color:#667085;cursor:grab;font-weight:800;user-select:none}.collection-chart-admin-title{min-width:0}.collection-chart-admin-title strong{display:block;overflow:hidden;color:#1d2939;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.collection-chart-admin-title span{display:block;margin-top:2px;color:#98a2b3;font-size:10px}.collection-chart-active,.collection-item-active{display:flex;align-items:center;gap:6px;color:#475467;font-size:11px;font-weight:700;white-space:nowrap}.collection-chart-active input[type=checkbox],.collection-item-active input[type=checkbox],.collection-color-auto input{width:16px;height:16px;accent-color:var(--primary)}.collection-chart-remove,.collection-item-remove{display:grid;place-items:center;width:31px;height:31px;border:1px solid #f1caca;border-radius:9px;background:#fff;color:#b42318;font-size:19px;line-height:1;cursor:pointer}.collection-chart-remove:hover,.collection-item-remove:hover{background:#fff5f5}.collection-chart-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,.35fr) minmax(170px,.35fr);gap:12px;padding:14px}.collection-chart-settings-grid .form-field{margin:0}.collection-chart-settings-grid .full{grid-column:auto}.collection-chart-items-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}.collection-chart-items-head strong{display:block;color:#344054;font-size:12px}.collection-chart-items-head span{display:block;margin-top:2px;color:#98a2b3;font-size:10px}.collection-chart-item-list{display:grid;gap:8px;padding:12px}.collection-chart-item{display:grid;grid-template-columns:34px minmax(210px,1.35fr) minmax(110px,.42fr) minmax(205px,.72fr) auto 34px;gap:9px;align-items:end;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff}.collection-chart-item .form-field{margin:0}.collection-item-color>label{display:block;margin-bottom:6px;color:#344054;font-size:10px;font-weight:700}.collection-item-color-controls{display:flex;align-items:center;gap:8px;min-height:40px}.collection-color-auto{display:flex;align-items:center;gap:6px;color:#475467;font-size:10px;font-weight:700;white-space:nowrap}.collection-item-color input[type=color]{width:40px;height:34px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}.collection-item-color input[type=color]:disabled{opacity:.35;cursor:not-allowed}.collection-item-active{height:40px;padding:0 3px}.collection-chart-items-empty{margin:0 12px 12px}.collection-chart-items-empty[hidden],.collection-chart-admin-empty[hidden]{display:none!important}.collection-stats-admin-foot{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.collection-stats-admin-foot .form-actions{margin:0}

html[data-theme="dark"] .collection-stats-hero{background:linear-gradient(180deg,#0d1726,#101b2b);border-color:#26354a}html[data-theme="dark"] .collection-stats-section{background:#0c1522}html[data-theme="dark"] .collection-stats-updated,html[data-theme="dark"] .collection-chart-card,html[data-theme="dark"] .collection-stats-note{background:#111e31;border-color:#2c3b50}html[data-theme="dark"] .collection-chart-card{--collection-chart-border:#111e31;--collection-chart-text:#cbd5e1;--collection-chart-grid:#2c3b50}html[data-theme="dark"] .collection-stats-heading h1,html[data-theme="dark"] .collection-chart-title h2{color:#eef4fb}html[data-theme="dark"] .collection-chart-legend li{color:#e5edf7}html[data-theme="dark"] .collection-chart-empty{background:#101b2b;border-color:#34445b;color:#9fb0c4}html[data-theme="dark"] .collection-native-pie.is-doughnut:after{background:#111e31}html[data-theme="dark"] .collection-native-bar-track{background:#26354a}html[data-theme="dark"] .collection-native-bar-row>span,html[data-theme="dark"] .collection-native-bar-row strong{color:#d6e1ed}html[data-theme="dark"] .collection-chart-admin,html[data-theme="dark"] .collection-chart-item{background:#111e31;border-color:#2c3b50}html[data-theme="dark"] .collection-chart-admin-head{background:#101b2b;border-color:#2c3b50}html[data-theme="dark"] .collection-chart-items-head{background:#101b2b;border-color:#2c3b50}html[data-theme="dark"] .collection-chart-admin-title strong,html[data-theme="dark"] .collection-chart-items-head strong,html[data-theme="dark"] .collection-item-color>label{color:#eef4fb}html[data-theme="dark"] .collection-chart-drag,html[data-theme="dark"] .collection-item-drag{background:#26354a;color:#cbd5e1}html[data-theme="dark"] .collection-chart-remove,html[data-theme="dark"] .collection-item-remove{background:#172033;border-color:#6e3b3b}html[data-theme="dark"] .collection-item-color input[type=color]{background:#172033;border-color:#34445b}

@media(max-width:980px){.collection-chart-card{padding:0 24px 28px}.collection-chart-body{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.collection-chart-visual{height:350px}.collection-chart-item{grid-template-columns:34px minmax(0,1fr) 130px 34px}.collection-item-label{grid-column:2}.collection-item-value{grid-column:3}.collection-item-color{grid-column:2/4}.collection-item-active{grid-column:2/4;height:auto;padding:4px 0}.collection-item-drag{grid-row:1/3}.collection-item-remove{grid-column:4;grid-row:1/3}.collection-chart-settings-grid{grid-template-columns:1fr 1fr}.collection-chart-settings-grid .full{grid-column:1/3}}
@media(max-width:760px){.collection-stats-hero{padding:42px 0 28px}.collection-stats-section{padding:24px 0 52px}.collection-chart-stack{gap:18px}.collection-chart-card{padding:0 16px 22px;border-radius:12px}.collection-chart-title{padding:20px 4px 8px}.collection-chart-title h2{font-size:26px}.collection-chart-body{grid-template-columns:1fr;min-height:0;gap:8px}.collection-chart-visual{height:330px}.collection-chart-legend{padding:4px 8px 8px}.collection-chart-legend ul{grid-template-columns:1fr 1fr;gap:8px 15px}.collection-chart-legend li{font-size:14px}.collection-legend-pager{justify-content:center;padding-left:0}.collection-native-pie{width:min(300px,72vw)}.collection-native-bar-row{grid-template-columns:minmax(75px,105px) minmax(0,1fr) 62px}.collection-stats-admin-intro,.collection-stats-admin-heading,.collection-chart-items-head,.collection-stats-admin-foot{align-items:flex-start;flex-direction:column}.collection-stats-admin-foot .form-actions,.collection-stats-admin-foot .btn{width:100%}.collection-chart-settings-grid{grid-template-columns:1fr}.collection-chart-settings-grid .full{grid-column:auto}.collection-chart-admin-head{grid-template-columns:34px minmax(0,1fr) 34px}.collection-chart-active{grid-column:2}.collection-chart-remove{grid-column:3;grid-row:1/3}.collection-chart-drag{grid-row:1/3}.collection-chart-item{grid-template-columns:32px minmax(0,1fr) 32px}.collection-item-label,.collection-item-value,.collection-item-color,.collection-item-active{grid-column:2}.collection-item-drag{grid-column:1;grid-row:1/5}.collection-item-remove{grid-column:3;grid-row:1/5}.collection-item-color-controls{flex-wrap:wrap}}
@media(max-width:480px){.collection-stats-heading h1{font-size:34px}.collection-chart-card{padding-inline:12px}.collection-chart-title h2{font-size:23px}.collection-chart-visual{height:285px}.collection-chart-legend ul{grid-template-columns:1fr}.collection-chart-legend li{font-size:13px}.collection-native-bar-row{grid-template-columns:82px minmax(0,1fr) 52px;gap:7px}.collection-native-bar-row>span,.collection-native-bar-row strong{font-size:10px}.collection-chart-admin-head{padding:10px}.collection-chart-settings-grid,.collection-chart-item-list{padding:10px}.collection-chart-items-head{padding:10px}.collection-chart-item{padding:9px}}


/* v41: Studi Perpustakaan reservation */
.study-reservation-page { min-height:100vh; background:#f7f9fb; }
.study-reservation-main { padding-top:calc(var(--announcement-offset, 56px) + 76px); }
.study-reservation-hero { padding:58px 0 52px; background:linear-gradient(135deg,#f4fbf7 0%,#f6f8fc 58%,#eef2fb 100%); border-bottom:1px solid var(--line); }
.study-reservation-breadcrumb { display:flex; gap:9px; align-items:center; margin-bottom:20px; color:var(--muted); font-size:12px; font-weight:800; }
.study-reservation-breadcrumb span { color:var(--primary); }
.study-reservation-hero-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr); gap:40px; align-items:end; }
.study-reservation-hero h1 { margin:8px 0 14px; max-width:760px; font-size:clamp(38px,5vw,58px); line-height:1.06; color:var(--navy); }
.study-reservation-hero p { max-width:720px; margin:0; color:var(--muted); font-size:16px; line-height:1.75; }
.study-reservation-hero-note { display:flex; gap:14px; padding:18px; border:1px solid rgba(11,122,83,.13); border-radius:18px; background:rgba(255,255,255,.76); box-shadow:0 16px 38px rgba(24,52,83,.07); }
.study-reservation-hero-note strong, .study-reservation-hero-note span { display:block; }
.study-reservation-hero-note strong { color:var(--navy); margin-bottom:5px; }
.study-reservation-hero-note span { color:var(--muted); font-size:12px; line-height:1.55; }
.study-reservation-hero-icon { width:46px; height:46px; flex:0 0 auto; display:grid !important; place-items:center; border-radius:14px; background:#eaf7f1; color:var(--primary) !important; }
.study-reservation-hero-icon .icon { width:22px; height:22px; }
.study-reservation-section { padding:54px 0 86px; }
.study-reservation-layout { display:grid; grid-template-columns:minmax(280px,.72fr) minmax(0,1.28fr); gap:28px; align-items:start; }
.study-reservation-info { display:grid; gap:18px; position:sticky; top:96px; }
.study-info-card, .study-reservation-form-card { background:#fff; border:1px solid var(--line); border-radius:22px; box-shadow:0 16px 46px rgba(23,43,77,.06); }
.study-info-card { padding:24px; }
.study-info-card.compact { padding:20px 22px; }
.study-info-card-head { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.study-info-card-head > span { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; background:#eef8f4; color:var(--primary); }
.study-info-card-head .icon { width:23px; height:23px; }
.study-info-card h2 { margin:3px 0 0; font-size:22px; }
.study-info-services { display:grid; gap:0; }
.study-info-service { padding:16px 0; border-top:1px solid var(--line); }
.study-info-service strong { display:block; color:var(--navy); font-size:12px; letter-spacing:.02em; }
.study-info-service p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.study-info-line { display:flex; gap:13px; align-items:flex-start; padding:11px 0; }
.study-info-line > span { width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center; border-radius:11px; background:#f4f7fb; color:var(--navy); }
.study-info-line .icon { width:18px; height:18px; }
.study-info-line strong { display:block; color:var(--navy); font-size:13px; }
.study-info-line p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.study-reservation-form-card { padding:30px; }
.study-form-heading { margin-bottom:24px; }
.study-form-heading h2 { margin:6px 0 8px; font-size:27px; }
.study-form-heading p { margin:0; color:var(--muted); font-size:13px; }
.study-form-alert { margin:0 0 20px; }
.study-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.study-form-grid .form-field input, .study-form-grid .form-field textarea, .study-form-grid .form-field select { min-height:46px; }
.study-form-grid .form-field textarea { min-height:126px; }
.required-mark { color:#d92d20; }
.study-time-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.study-service-choices { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.study-service-choice { position:relative; display:block; cursor:pointer; }
.study-service-choice > input { position:absolute; opacity:0; pointer-events:none; }
.study-service-choice-box { min-height:118px; display:flex; flex-direction:column; gap:7px; padding:16px; border:1px solid #dce3e9; border-radius:14px; background:#fff; transition:.18s ease; }
.study-service-choice-box strong { color:var(--navy); font-size:12px; line-height:1.35; }
.study-service-choice-box small { color:var(--muted); font-size:11px; line-height:1.55; }
.study-service-choice:hover .study-service-choice-box { border-color:#b7d9ca; transform:translateY(-1px); }
.study-service-choice > input:checked + .study-service-choice-box { border-color:var(--primary); background:#f1faf6; box-shadow:0 0 0 3px rgba(11,122,83,.08); }
.study-service-choice > input:focus-visible + .study-service-choice-box { outline:3px solid rgba(11,122,83,.18); outline-offset:2px; }
.study-agreement { display:flex !important; align-items:flex-start; gap:12px; padding:15px 16px; border:1px solid #dce3e9; border-radius:14px; background:#fafcfd; cursor:pointer; }
.study-agreement input { width:18px !important; min-height:18px !important; margin-top:2px; accent-color:var(--primary); }
.study-agreement span { display:grid; gap:4px; }
.study-agreement strong { color:var(--navy); font-size:13px; }
.study-agreement small { color:var(--muted); font-size:11px; line-height:1.55; }
.study-form-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.study-form-footer p { margin:0; color:var(--muted); font-size:11px; }
.study-submit-button { gap:9px; }
.study-submit-button .icon { width:17px; height:17px; }
.study-honeypot { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.study-submit-success { display:flex; gap:20px; padding:8px; align-items:flex-start; }
.study-submit-success-icon { width:58px; height:58px; flex:0 0 auto; display:grid; place-items:center; border-radius:18px; background:#ecfdf3; color:#087a4d; }
.study-submit-success-icon .icon { width:28px; height:28px; }
.study-submit-success h2 { margin:5px 0 8px; font-size:28px; }
.study-submit-success p { margin:0 0 20px; color:var(--muted); line-height:1.7; }
.study-reservation-code { display:inline-grid; gap:4px; padding:12px 15px; margin-bottom:20px; border:1px dashed #a7c9ba; border-radius:12px; background:#f5fbf8; }
.study-reservation-code span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.1em; font-weight:900; }
.study-reservation-code strong { color:var(--primary); font-size:18px; letter-spacing:.04em; }
.study-service-unavailable { text-align:center; padding:44px 20px; }
.study-service-unavailable > span { width:62px; height:62px; margin:0 auto 16px; display:grid; place-items:center; border-radius:18px; background:#f1f4f8; color:var(--navy); }
.study-service-unavailable h2 { margin:0 0 8px; }
.study-service-unavailable p { max-width:520px; margin:0 auto; color:var(--muted); line-height:1.65; }
html[data-theme="dark"] .study-reservation-page { background:#0b1320; }
html[data-theme="dark"] .study-reservation-hero { background:linear-gradient(135deg,#0f1b27 0%,#111a29 60%,#111a2c 100%); }
html[data-theme="dark"] .study-reservation-hero-note,
html[data-theme="dark"] .study-info-card,
html[data-theme="dark"] .study-reservation-form-card,
html[data-theme="dark"] .study-service-choice-box { background:#111b29; border-color:#243246; }
html[data-theme="dark"] .study-service-choice > input:checked + .study-service-choice-box { background:#10291f; border-color:#2fa879; }
html[data-theme="dark"] .study-agreement { background:#101926; border-color:#2a394c; }
html[data-theme="dark"] .study-info-line > span { background:#172335; color:#dbe7ff; }
html[data-theme="dark"] .study-reservation-code { background:#10251c; border-color:#326b54; }
@media (max-width: 980px) {
  .study-reservation-main { padding-top:calc(var(--announcement-offset, 56px) + 68px); }
  .study-reservation-hero-grid, .study-reservation-layout { grid-template-columns:1fr; }
  .study-reservation-info { position:static; grid-template-columns:1fr 1fr; }
  .study-info-card:first-child { grid-column:1/-1; }
}
@media (max-width: 680px) {
  .study-reservation-hero { padding:38px 0; }
  .study-reservation-hero h1 { font-size:36px; }
  .study-reservation-section { padding:34px 0 64px; }
  .study-reservation-info, .study-form-grid, .study-service-choices, .study-time-grid { grid-template-columns:1fr; }
  .study-info-card:first-child { grid-column:auto; }
  .study-reservation-form-card { padding:20px; border-radius:18px; }
  .study-form-heading h2 { font-size:22px; }
  .study-form-footer { align-items:stretch; flex-direction:column; }
  .study-submit-button { width:100%; justify-content:center; }
  .study-submit-success { flex-direction:column; padding:0; }
}

/* v41: Studi Perpustakaan admin */
.study-admin-summary { grid-template-columns:repeat(5,1fr); }
.study-admin-stat-link { text-decoration:none; transition:.18s ease; }
.study-admin-stat-link:hover { transform:translateY(-2px); border-color:#c7d6df; box-shadow:0 10px 26px rgba(18,48,90,.07); }
.study-admin-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.study-admin-panel-head h3 { margin:0 0 4px; }
.study-admin-eyebrow { display:block; color:var(--primary); font-size:10px; font-weight:900; letter-spacing:.12em; margin-bottom:5px; }
.study-admin-detail { border-top:3px solid var(--primary); }
.study-admin-detail-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.study-admin-detail-item { display:grid; gap:5px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fafcfd; }
.study-admin-detail-item.full { grid-column:1/-1; }
.study-admin-detail-item > span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.study-admin-detail-item > strong { color:var(--navy); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.study-admin-participants { display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.study-admin-participants > span { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); font-size:11px; }
.study-admin-participants b { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:#eef7f3; color:var(--primary); font-size:9px; }
.study-admin-status-form { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.study-admin-status { display:inline-flex; align-items:center; min-height:27px; padding:0 9px; border-radius:999px; font-size:10px; font-weight:900; white-space:nowrap; }
.study-admin-status.is-pending { background:#fff7e6; color:#9a6700; }
.study-admin-status.is-approved { background:#ecfdf3; color:#027a48; }
.study-admin-status.is-rejected { background:#fef3f2; color:#b42318; }
.study-admin-status.is-completed { background:#eef4ff; color:#3538cd; }
.study-admin-filter { display:flex; gap:6px; flex-wrap:wrap; }
.study-admin-cell-sub { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.4; }
.study-admin-settings { margin-top:24px; }
.study-admin-toggle { display:flex !important; align-items:flex-start; gap:12px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fafcfd; cursor:pointer; }
.study-admin-toggle input { width:18px !important; min-height:18px; margin-top:2px; accent-color:var(--primary); }
.study-admin-toggle span { display:grid; gap:3px; }
.study-admin-toggle strong { color:var(--navy); font-size:12px; }
.study-admin-toggle small { color:var(--muted); font-size:10px; line-height:1.5; }
.study-admin-service-settings { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.study-admin-service-settings > label { display:flex; gap:10px; align-items:flex-start; padding:13px; border:1px solid var(--line); border-radius:12px; background:#fafcfd; cursor:pointer; }
.study-admin-service-settings input { width:17px !important; min-height:17px; margin-top:2px; accent-color:var(--primary); }
.study-admin-service-settings span { display:grid; gap:4px; }
.study-admin-service-settings strong { color:var(--navy); font-size:11px; }
.study-admin-service-settings small { color:var(--muted); font-size:10px; line-height:1.45; }
html[data-theme="dark"] .study-admin-detail-item,
html[data-theme="dark"] .study-admin-toggle,
html[data-theme="dark"] .study-admin-service-settings > label { background:#0f1926; border-color:#2b3a4e; }
html[data-theme="dark"] .study-admin-participants > span { background:#111b29; border-color:#2b3a4e; }
@media (max-width: 1100px) {
  .study-admin-summary { grid-template-columns:repeat(3,1fr); }
  .study-admin-detail-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .study-admin-summary, .study-admin-detail-grid, .study-admin-service-settings { grid-template-columns:1fr; }
  .study-admin-detail-item.full { grid-column:auto; }
  .study-admin-panel-head { flex-direction:column; }
}


/* v42: Tracking status reservasi Studi Perpustakaan */
.study-success-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.study-success-actions form { margin:0; }
.study-tracking-layout { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr); gap:28px; align-items:start; }
.study-tracking-search { position:sticky; top:96px; }
.tracking-search-form { display:grid; gap:14px; }
.tracking-search-form .form-field input { min-height:50px; text-transform:uppercase; letter-spacing:.035em; font-weight:800; }
.tracking-search-form .btn { justify-content:center; }
.tracking-privacy-note { margin:16px 0 0; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; line-height:1.6; }
.tracking-help { align-self:start; }
.tracking-result-card { padding:30px; border-top:4px solid #d0d5dd; }
.tracking-result-card.is-pending { border-top-color:#fdb022; }
.tracking-result-card.is-approved { border-top-color:#12b76a; }
.tracking-result-card.is-rejected { border-top-color:#f04438; }
.tracking-result-card.is-completed { border-top-color:#6172f3; }
.tracking-result-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.tracking-result-head h2 { margin:6px 0 0; color:var(--navy); font-size:25px; letter-spacing:.025em; overflow-wrap:anywhere; }
.tracking-status { display:inline-flex; align-items:center; min-height:34px; padding:0 12px; border-radius:999px; font-size:11px; font-weight:900; white-space:nowrap; }
.tracking-status.is-pending { background:#fff7e6; color:#9a6700; }
.tracking-status.is-approved { background:#ecfdf3; color:#027a48; }
.tracking-status.is-rejected { background:#fef3f2; color:#b42318; }
.tracking-status.is-completed { background:#eef4ff; color:#3538cd; }
.tracking-result-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:20px; }
.tracking-result-item { display:grid; gap:5px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fafcfd; }
.tracking-result-item span, .tracking-admin-note > span { color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.tracking-result-item strong { color:var(--navy); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.tracking-admin-note { margin-top:14px; padding:16px; border:1px solid #b7e4ce; border-radius:14px; background:#f3fbf7; }
.tracking-admin-note.is-muted { border-color:var(--line); background:#fafcfd; }
.tracking-admin-note p { margin:6px 0 0; color:var(--ink); font-size:12px; line-height:1.65; }
.tracking-result-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; padding-top:20px; border-top:1px solid var(--line); }
.tracking-print-footer { display:none; margin-top:28px; padding-top:14px; border-top:1px solid #d0d5dd; color:#667085; font-size:10px; text-align:center; }
html[data-theme="dark"] .tracking-result-item, html[data-theme="dark"] .tracking-admin-note.is-muted { background:#0f1926; border-color:#2b3a4e; }
html[data-theme="dark"] .tracking-admin-note { background:#10251c; border-color:#326b54; }
@media (max-width: 900px) {
  .study-tracking-layout { grid-template-columns:1fr; }
  .study-tracking-search { position:static; }
}
@media (max-width: 620px) {
  .tracking-result-head { flex-direction:column; }
  .tracking-result-grid { grid-template-columns:1fr; }
  .tracking-result-actions, .study-success-actions { align-items:stretch; flex-direction:column; }
  .tracking-result-actions .btn, .study-success-actions .btn, .study-success-actions form, .study-success-actions form .btn { width:100%; justify-content:center; }
}
@media print {
  body { background:#fff !important; }
  body > * { visibility:hidden !important; }
  .tracking-result-card, .tracking-result-card * { visibility:visible !important; }
  .tracking-result-card { position:absolute; left:0; top:0; width:100%; max-width:none; border:1px solid #d0d5dd !important; border-top-width:4px !important; border-radius:0; box-shadow:none !important; background:#fff !important; color:#101828 !important; }
  .tracking-no-print { display:none !important; }
  .tracking-result-item, .tracking-admin-note { background:#fff !important; color:#101828 !important; border-color:#d0d5dd !important; break-inside:avoid; }
  .tracking-result-item strong, .tracking-admin-note p, .tracking-result-head h2 { color:#101828 !important; }
  .tracking-print-footer { display:block; visibility:visible !important; }
}

/* ===== V42 Document Manager ===== */
.document-public-page{min-height:60vh}.document-page-heading{max-width:760px}.document-search-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,260px) auto;gap:12px;align-items:center;margin:24px 0 30px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.document-search-bar .search-input{margin:0}.document-search-bar select{min-height:48px}.document-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.document-card{display:flex;flex-direction:column;min-height:280px;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:var(--shadow-sm)}.document-card-top,.document-card-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}.document-file-badge,.document-security-badge,.document-category-label{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:700}.document-file-badge{padding:6px 9px;border-radius:9px;background:color-mix(in srgb,var(--primary) 12%,transparent);color:var(--primary)}.document-security-badge{color:var(--primary)}.document-security-badge svg{width:15px;height:15px}.document-card-body{padding:18px 0;flex:1}.document-category-label{margin-bottom:8px;color:var(--muted)}.document-card h2{font-size:1.08rem;line-height:1.35;margin:0 0 8px}.document-card p{margin:0;color:var(--muted);line-height:1.6}.document-card-meta{padding-top:14px;border-top:1px solid var(--line);font-size:.82rem;color:var(--muted)}.document-download-btn{margin-top:15px;width:100%;justify-content:center}.document-pagination{display:flex;justify-content:center;gap:8px;margin-top:28px}.document-pagination a{display:grid;place-items:center;min-width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font-weight:700}.document-pagination a.is-active{background:var(--primary);border-color:var(--primary);color:#fff}.document-empty{margin-top:24px}.document-admin-scan,.document-audit-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:.76rem;font-weight:700;background:var(--soft);color:var(--muted)}.document-admin-scan.is-clean,.document-audit-status.is-success{background:rgba(23,142,88,.12);color:#177c53}.document-admin-scan.is-infected,.document-admin-scan.is-error,.document-audit-status[class*="blocked"]{background:rgba(192,47,47,.12);color:#a92f2f}.document-admin-scan.is-unavailable{background:rgba(188,130,0,.14);color:#8b6500}.document-current-file{display:flex;flex-wrap:wrap;gap:10px 18px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}.document-admin-split{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:18px}.document-audit-agent{max-width:340px;white-space:normal;word-break:break-word}.admin-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.admin-row-actions form{margin:0}
@media (max-width:980px){.document-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.document-admin-split{grid-template-columns:1fr}}
@media (max-width:680px){.document-search-bar{grid-template-columns:1fr}.document-grid{grid-template-columns:1fr}.document-card{min-height:0}}
