/* KHÁNH BẢO EDU – giao diện public (CSS thuần, không cần build)
   Phong cách: Modern Educational Minimal – tươi sáng, thân thiện với học sinh.
   Navy #0F2D5C giữ vai trò màu thương hiệu (logo, tiêu đề); màu nhấn tươi dùng cho tương tác. */
:root {
  /* Thương hiệu & màu chính */
  --brand: #0F2D5C;
  --primary: #3563E9;
  --primary-600: #2447C9;
  --primary-50: #EEF3FF;
  --primary-100: #DCE6FF;
  --violet: #6A4BE6;
  --sun: #FFC53D;

  /* Trung tính */
  --text: #1E293B;
  --muted: #5B6B82;
  --border: #E3E8F4;
  --bg: #F6F8FF;
  --surface: #FFFFFF;

  /* Trạng thái */
  --success: #0F8A5F;
  --success-bg: #E6FCF5;
  --warning: #B45309;
  --warning-bg: #FFF4DB;

  /* Tông màu mặc định (trang không thuộc khối lớp nào) */
  --tone: #3563E9;
  --tone-soft: #EEF3FF;
  --tone-ink: #2447C9;
  --tone-symbol: "∑";

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 45, 92, .05), 0 2px 6px rgba(15, 45, 92, .05);
  --shadow: 0 6px 20px rgba(53, 99, 233, .10), 0 2px 6px rgba(15, 45, 92, .05);
  --header-h: 68px;
  --sidebar-w: 292px;
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Tông màu theo khối lớp (gán theo thứ tự hiển thị) ---------- */
.tone-1 { --tone: #FF6B6B; --tone-soft: #FFF0F0; --tone-ink: #C92A2A; --tone-symbol: "+"; }
.tone-2 { --tone: #FF922B; --tone-soft: #FFF4E6; --tone-ink: #C2410C; --tone-symbol: "÷"; }
.tone-3 { --tone: #FAB005; --tone-soft: #FFF9DB; --tone-ink: #A16207; --tone-symbol: "%"; }
.tone-4 { --tone: #12B886; --tone-soft: #E6FCF5; --tone-ink: #087F5B; --tone-symbol: "π"; }
.tone-5 { --tone: #15AABF; --tone-soft: #E3FAFC; --tone-ink: #0B7285; --tone-symbol: "√"; }
.tone-6 { --tone: #4C6EF5; --tone-soft: #EDF2FF; --tone-ink: #364FC7; --tone-symbol: "∑"; }
.tone-7 { --tone: #845EF7; --tone-soft: #F3F0FF; --tone-ink: #5F3DC4; --tone-symbol: "∫"; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% -80px, rgba(132, 94, 247, .10), transparent 70%),
    radial-gradient(700px 380px at -10% 0, rgba(53, 99, 233, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
img { max-width: 100%; }
h1, h2, h3 { color: var(--brand); line-height: 1.3; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid rgba(53, 99, 233, .45); outline-offset: 2px; border-radius: 8px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--brand); font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.brand:hover { color: var(--brand); }
.brand-mark {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 14px rgba(106, 75, 230, .30);
  transform: rotate(-6deg);
}
.brand-text { font-size: 17px; }
.brand-text small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.header-search { flex: 1; max-width: 520px; margin-left: auto; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 2px solid var(--border); border-radius: 999px; padding: 4px 4px 4px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(53, 99, 233, .15); }
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 0; font: inherit; font-size: 15px; color: inherit; outline: none; }
.search-box button {
  border: 0; background: var(--primary); color: #fff; border-radius: 999px; padding: 8px 18px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.search-box button:hover { background: var(--primary-600); }
.menu-toggle {
  display: none; border: 2px solid var(--border); background: #fff; border-radius: var(--radius-sm);
  width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--brand);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.sidebar {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
  background: rgba(255, 255, 255, .7); border-right: 1px solid var(--border);
  padding: 22px 14px 32px;
}
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 44px) 56px; }
.content { max-width: 1060px; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.nav-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 10px 12px; }
.nav-back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tone-ink);
  background: var(--tone-soft); padding: 6px 12px; border-radius: 999px; margin: 0 6px 12px;
}
.nav-back:hover { color: var(--tone-ink); filter: brightness(.97); }
.nav-heading { font-size: 16px; font-weight: 800; color: var(--brand); margin: 4px 10px 12px; line-height: 1.4; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li + li { margin-top: 3px; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--primary-50); color: var(--primary-600); }
.nav-link.is-active { background: var(--tone-soft); color: var(--tone-ink); font-weight: 700; box-shadow: inset 4px 0 0 var(--tone); }
.nav-link.is-disabled { color: #97A3B6; cursor: not-allowed; }
.nav-link.is-disabled:hover { background: transparent; color: #97A3B6; }
.nav-link .chev { flex: none; opacity: .55; }
.nav-grade { display: flex; align-items: center; gap: 10px; }
.nav-dot {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; flex: none;
  background: var(--tone-soft); color: var(--tone-ink); font-weight: 800; font-size: 15px;
}
.nav-dot::before { content: var(--tone-symbol); }
.nav-sub { list-style: none; margin: 4px 0 10px 24px; padding: 0 0 0 10px; border-left: 2px dashed var(--tone); }
.nav-sub .nav-link { font-size: 14px; padding: 7px 10px; }
.tag-updating {
  flex: none; font-size: 11px; font-weight: 700; color: var(--warning); background: var(--warning-bg);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

.drawer-backdrop { display: none; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb li + li::before { content: "›"; color: #A5B0C2; margin: 0 4px; font-weight: 700; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current] { color: var(--tone-ink); font-weight: 700; }

/* ---------- Page heading ---------- */
.page-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin: 0 0 8px; }
.page-lead { color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.page-hero {
  position: relative; overflow: hidden;
  background: var(--tone-soft); border-radius: 24px; padding: clamp(20px, 3vw, 32px);
  margin-bottom: 24px; border: 1px solid rgba(15, 45, 92, .04);
}
.page-hero::after {
  content: var(--tone-symbol); position: absolute; right: 18px; top: 50%; transform: translateY(-50%) rotate(-8deg);
  font-size: 120px; font-weight: 800; line-height: 1; color: var(--tone); opacity: .18; pointer-events: none;
}
.page-hero .page-title, .page-hero .page-lead { position: relative; z-index: 1; max-width: 80%; }
.page-hero .page-lead { margin: 0; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--tone-ink); background: #fff;
  border-radius: 999px; padding: 3px 12px; margin-bottom: 10px; position: relative; z-index: 1;
}

/* ---------- Prev / Next ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.pager a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius); background: var(--surface); min-width: 0; color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.pager a::before {
  content: "←"; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--tone-soft); color: var(--tone-ink); font-weight: 800;
}
.pager a.next { grid-column: 2; flex-direction: row-reverse; text-align: right; }
.pager a.next::before { content: "→"; }
.pager a:hover { border-color: var(--tone); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.pager a > span { display: flex; flex-direction: column; min-width: 0; }
.pager small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.pager strong { color: var(--brand); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Viewer ---------- */
.viewer {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden; border-top: 5px solid var(--tone);
}
.viewer-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: #FBFCFF; }
.viewer-toolbar .zoom-level { min-width: 52px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-frame { overflow: auto; max-height: 85vh; background: #fff; }
.viewer-frame.is-fit { max-height: none; }
.viewer-frame img { display: block; width: 100%; height: auto; margin: 0 auto; }
.viewer-html iframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.viewer-empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.viewer-empty::before { content: "🛠️"; display: block; font-size: 40px; margin-bottom: 8px; }

/* ---------- Buttons / actions ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--border); background: var(--surface); color: var(--brand);
  border-radius: 999px; padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; line-height: 1.2; text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary-600); transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%); border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(53, 99, 233, .28);
}
.btn-primary:hover { color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(53, 99, 233, .36); }
.btn-icon { padding: 6px 12px; border-width: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.action-feedback { font-size: 14px; font-weight: 600; color: var(--success); align-self: center; min-height: 1em; }
.qr-panel {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 8px 0 0; padding: 18px;
  border: 2px dashed var(--primary-100); border-radius: var(--radius); background: var(--surface);
}
.qr-panel[hidden] { display: none; }
.qr-panel svg { width: 180px; height: 180px; flex: none; border-radius: 12px; }
.qr-panel p { margin: 0; color: var(--muted); font-size: 15px; max-width: 320px; }

/* ---------- Description / sections ---------- */
.lesson-description {
  margin: 14px 0 0; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--tone-soft); color: var(--text); border-left: 4px solid var(--tone);
}
.section { margin-top: 40px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; margin: 0 0 16px; }
.section-title::before { content: ""; width: 8px; height: 24px; border-radius: 4px; background: linear-gradient(var(--sun), var(--tone)); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.card:hover { border-color: var(--tone); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }
.card-title { color: var(--brand); font-weight: 700; font-size: 16px; }
.card-meta { font-size: 13px; color: var(--muted); }
.card-text { font-size: 14px; color: var(--text); margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.is-disabled { background: rgba(255, 255, 255, .6); border-style: dashed; }
.card.is-disabled .card-title { color: #8A97AB; }

/* Thẻ khối lớp */
.grade-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grade-card { gap: 10px; padding: 20px; overflow: hidden; border-color: transparent; background: var(--surface); box-shadow: var(--shadow-sm); }
.grade-card::after {
  content: var(--tone-symbol); position: absolute; right: -6px; bottom: -28px;
  font-size: 110px; font-weight: 800; line-height: 1; color: var(--tone); opacity: .12; pointer-events: none;
}
.grade-card .grade-badge {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--tone-soft); color: var(--tone-ink); font-size: 26px; font-weight: 800;
}
.grade-card .grade-badge::before { content: var(--tone-symbol); }
.grade-card .card-title { font-size: 22px; font-weight: 800; }
.grade-card .grade-go { margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--tone-ink); }
.grade-card:hover .grade-go { text-decoration: underline; }

/* Danh sách đánh số (chương, bài) */
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row-card { flex-direction: row; align-items: center; gap: 16px; }
.row-card .num {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--tone-soft); color: var(--tone-ink); font-weight: 800; font-size: 17px;
}
.row-card .row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.row-card .row-go { flex: none; font-weight: 700; font-size: 14px; color: var(--tone-ink); white-space: nowrap; }
.row-card.is-disabled .num { background: #F1F4F9; color: #97A3B6; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.progress-bar { flex: 1; max-width: 220px; height: 8px; border-radius: 999px; background: #EEF1F7; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--tone), var(--sun)); }

/* ---------- Hero trang chủ ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(420px 220px at 90% 10%, rgba(255, 197, 61, .35), transparent 70%),
    linear-gradient(135deg, #2F5BE0 0%, #4B55E8 45%, #6A4BE6 100%);
  border-radius: 28px; padding: clamp(28px, 5vw, 56px); margin-bottom: 36px;
  box-shadow: 0 18px 40px rgba(74, 85, 232, .28);
}
.hero-body { position: relative; z-index: 1; max-width: 640px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); color: #fff;
  border-radius: 999px; padding: 5px 14px; margin-bottom: 16px;
}
.hero h1 { color: #fff; margin: 0 0 12px; font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; line-height: 1.2; }
.hero h1 .hl { color: var(--sun); white-space: nowrap; }
.hero p { margin: 0 0 22px; font-size: clamp(16px, 1.8vw, 18px); color: rgba(255, 255, 255, .92); }
.hero-search { max-width: 540px; }
.hero-search .search-box { border-color: transparent; padding: 6px 6px 6px 18px; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.hero-search .search-box input { font-size: 16px; padding: 9px 0; }
.hero-search .search-box button { padding: 11px 22px; font-size: 15px; background: var(--sun); color: var(--brand); }
.hero-search .search-box button:hover { background: #FFB703; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-art span {
  position: absolute; font-weight: 800; color: #fff; opacity: .16; line-height: 1;
  animation: float 7s ease-in-out infinite;
}
.hero-art span:nth-child(1) { right: 6%; top: 10%; font-size: 96px; }
.hero-art span:nth-child(2) { right: 24%; top: 58%; font-size: 64px; animation-delay: -2s; }
.hero-art span:nth-child(3) { right: 4%; bottom: 6%; font-size: 72px; animation-delay: -4s; }
.hero-art span:nth-child(4) { right: 38%; top: 6%; font-size: 44px; animation-delay: -1s; }
.hero-art span:nth-child(5) { right: 18%; top: 30%; font-size: 52px; opacity: .22; color: var(--sun); animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* ---------- Search results ---------- */
.search-summary { color: var(--muted); margin: 0 0 16px; }
.search-summary strong { color: var(--primary-600); }
.result {
  padding: 16px 20px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface);
  border-left: 6px solid var(--tone); transition: box-shadow .15s, transform .15s;
}
.result:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.result h2 { font-size: 18px; margin: 0 0 2px; }
.result h2 a { color: var(--brand); }
.result h2 a:hover { color: var(--primary); }
.result .card-meta { margin-bottom: 4px; }
.result .card-meta .chip { display: inline-block; font-weight: 700; color: var(--tone-ink); background: var(--tone-soft); border-radius: 999px; padding: 1px 10px; margin-right: 4px; }
.result p { margin: 0; font-size: 15px; }
.empty-state {
  padding: 36px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--border);
  border-radius: var(--radius); background: rgba(255, 255, 255, .7);
}
.empty-state::before { content: "🔍"; display: block; font-size: 36px; margin-bottom: 6px; }

/* ---------- Notice ---------- */
.notice { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; margin: 0 0 16px; }
.notice-warning { background: var(--warning-bg); border-color: #FCD9A8; color: var(--warning); }
.notice-info { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-600); }
.preview-banner { position: sticky; top: var(--header-h); z-index: 30; background: var(--sun); color: var(--brand); text-align: center; font-weight: 700; font-size: 14px; padding: 6px 12px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 26px 0 0; }
.pagination a, .pagination span { display: inline-block; min-width: 40px; text-align: center; padding: 7px 12px; border: 2px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; }
.pagination .is-current span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .is-disabled span { color: #CBD5E1; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px;
  padding: 20px; text-align: center; position: relative;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 4px;
  background: linear-gradient(90deg, #FF6B6B, #FF922B, #FAB005, #12B886, #15AABF, #4C6EF5, #845EF7);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; place-items: center; flex: none; }
  .brand-text small { display: none; }
  .site-header { padding: 0 12px; gap: 10px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(86vw, 320px); height: 100%;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: none;
    padding-top: 18px; background: #fff; border-radius: 0 22px 22px 0;
  }
  body.drawer-open .sidebar { transform: translateX(0); box-shadow: 0 10px 40px rgba(15, 23, 42, .25); }
  body.drawer-open { overflow: hidden; }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .45); }
  body.drawer-open .drawer-backdrop { display: block; }
  .main { padding: 18px 16px 44px; }
}
@media (max-width: 560px) {
  .brand-text { display: none; }
  .search-box { padding-left: 12px; }
  .search-box svg { display: none; }
  .search-box button { padding: 8px 14px; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { grid-column: 1; }
  .pager strong { white-space: normal; }
  .page-hero .page-title, .page-hero .page-lead { max-width: 100%; }
  .page-hero::after { font-size: 80px; opacity: .12; }
  .row-card .row-go { display: none; }
  .hero-art span:nth-child(2), .hero-art span:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar, .card, .btn, .pager a, .result { transition: none; }
  .hero-art span { animation: none; }
}
@media print {
  body { background: #fff; }
  .site-header, .sidebar, .actions, .pager, .site-footer, .viewer-toolbar { display: none !important; }
  .layout { display: block; }
}
