:root {
  --ink: #172742;
  --muted: #70809a;
  --line: #dce9f1;
  --surface: #fff;
  --background: #f6f9fc;
  --primary: #0ca0be;
  --primary-dark: #057b9b;
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--background); }
a { color: inherit; }
.index-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(1200px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 900; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid var(--primary); border-radius: 9px; color: var(--primary); font-size: 24px; line-height: 1; transform: rotate(-8deg); }
.back-link { color: var(--primary-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { text-decoration: underline; }
.index-main { width: min(1200px, calc(100% - 36px)); margin: 0 auto; padding: 14px 0 48px; }
.intro-panel { padding: 28px 30px; border: 1px solid #d5e9f0; border-radius: 20px; background: linear-gradient(135deg, #effbfc, #fff); box-shadow: 0 12px 30px rgba(46, 91, 125, .06); }
.eyebrow { color: var(--primary-dark); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
h1 { margin: 9px 0 8px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.055em; }
.intro-panel p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.summary { margin-top: 16px; color: var(--primary-dark); font-size: 14px; font-weight: 850; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 14px; }
.search-box { flex: 1; }
.search-box input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid #cfe2ec; border-radius: 11px; color: var(--ink); background: #fff; font: inherit; font-size: 14px; outline: none; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12, 160, 190, .12); }
.toolbar-status { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.category-list { display: grid; gap: 18px; }
.category-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 24px rgba(52, 82, 119, .04); }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 18px 21px; border-bottom: 1px solid #eaf1f5; background: #fbfdff; }
.category-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.045em; }
.category-count { color: var(--primary-dark); font-size: 13px; font-weight: 800; white-space: nowrap; }
.folder-group { padding: 13px 21px 2px; }
.folder-group + .folder-group { border-top: 1px solid #edf3f7; }
.folder-heading { margin: 0 0 7px; color: #55708d; font-size: 13px; font-weight: 850; }
.file-list { margin: 0; padding: 0 0 10px; list-style: none; }
.file-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f0f4f7; }
.file-item:last-child { border-bottom: 0; }
.file-type { display: inline-grid; min-height: 27px; place-items: center; border-radius: 7px; color: #147c98; background: #e9f7fb; font-size: 10px; font-weight: 900; }
.file-type.pdf { color: #c53f4b; background: #fff0f1; }
.file-name { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.45; }
.file-meta { margin-top: 2px; color: #8a99aa; font-size: 11px; line-height: 1.45; }
.file-actions { display: flex; gap: 6px; }
.file-actions a { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d5e5ed; border-radius: 8px; color: var(--primary-dark); background: #fbfeff; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.file-actions a:hover, .file-actions a:focus-visible { border-color: #91d2df; background: #effbfd; }
.empty-card, .loading-card, .error-card { padding: 27px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: #fff; text-align: center; }
.error-card { color: #a34f57; background: #fff8f8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.index-footer { display: flex; justify-content: space-between; gap: 18px; width: min(1200px, calc(100% - 36px)); margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid #dce8ef; color: #71849a; font-size: 12px; line-height: 1.6; }
.index-footer a { color: var(--primary-dark); font-weight: 750; }

@media (max-width: 700px) {
  .index-header, .index-main, .index-footer { width: min(100% - 24px, 1200px); }
  .index-header { align-items: flex-start; padding-top: 17px; }
  .brand { font-size: 15px; }
  .back-link { font-size: 12px; }
  .intro-panel { padding: 23px 20px; }
  .toolbar { display: grid; gap: 8px; }
  .toolbar-status { min-height: 18px; }
  .category-heading { align-items: flex-start; flex-direction: column; gap: 5px; padding: 16px; }
  .folder-group { padding-right: 16px; padding-left: 16px; }
  .file-item { grid-template-columns: 39px minmax(0, 1fr); gap: 9px; }
  .file-actions { grid-column: 2; }
  .file-actions a { flex: 0 0 auto; }
  .index-footer { display: grid; gap: 7px; font-size: 13px; }
}
