:root {
  --bg: #fff;
  --fg: #000;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #f5f5f5;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
main:focus { outline: none; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
a { color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; }
.brand img { border-radius: 7px; }
.links { display: flex; gap: 2px; overflow-x: auto; }
.links a, .linkbtn {
  font: inherit; font-size: 15px; color: #404040; background: none; border: 0;
  padding: 8px 12px; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.links a[data-nav] { color: #000; font-weight: 500; }
.links a:hover { background: var(--soft); }
.links a[aria-current="page"] { background: var(--soft); }
/* Coming-soon items: deliberately faint so Question bank stands out */
.linkbtn { color: #b3b3b3; }
.linkbtn:hover { background: none; color: #737373; }
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .links { width: 100%; margin: 0 -12px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 500; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #000; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--soft); }
.btn.primary { background: #000; color: #fff; border-color: #000; }
.btn.primary:hover { background: #262626; }
.btn.sm { padding: 6px 14px; font-size: 14px; }

/* Home */
.hero { text-align: center; padding: 72px 0 24px; }
.hero img { width: 76px; height: 76px; border-radius: 18px; }
h1 { font-size: clamp(32px, 6vw, 48px); letter-spacing: -0.02em; line-height: 1.1; margin: 22px 0 12px; font-weight: 600; }
.lead { color: var(--muted); font-size: 18px; max-width: 32em; margin: 0 auto 28px; }
.stats { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
h2 { font-size: 18px; font-weight: 600; margin: 44px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; cursor: pointer;
}
.card:hover { background: var(--soft); }
.card strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.card span { color: var(--muted); font-size: 14px; }

/* Breadcrumb + page head */
.crumbs { margin: 28px 0 8px; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #a3a3a3; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: #000; }
.crumbs [aria-current] { color: #000; overflow-wrap: anywhere; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.pagehead h1 { font-size: 28px; margin: 0; overflow-wrap: anywhere; }
.pagehead p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.search {
  width: 100%; max-width: 280px; padding: 9px 16px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}

/* File list */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.ico { color: var(--muted); display: flex; flex: none; }
.main { flex: 1; min-width: 0; }
.name { font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.name:hover { text-decoration: underline; }
.sub { display: block; color: var(--muted); font-size: 13px; }
.acts { display: flex; gap: 8px; flex: none; }
a.row { color: inherit; text-decoration: none; }
a.row:hover { background: var(--soft); }
a.row .chev { color: #a3a3a3; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .acts { width: 100%; padding-left: 32px; }
}

/* Viewer */
.pdf { width: 100%; height: 78vh; min-height: 480px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.player { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.player audio { width: 100%; }
.note { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* States, dialog, footer */
.state { color: var(--muted); text-align: center; padding: 64px 0; }
.foot { color: var(--muted); font-size: 14px; padding-top: 24px; padding-bottom: 32px; margin-top: 64px; border-top: 1px solid var(--line); }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: calc(100% - 40px); max-width: 360px; text-align: center; }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog h2 { margin: 0 0 6px; font-size: 20px; }
dialog p { margin: 0 0 20px; color: var(--muted); }
