@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400 700;
  font-display: swap;
  src: url('IBMPlexMono-Regular.ttf') format('ttf')
}

@font-face {
  font-family: 'Libre Franklin';
  font-weight: 100 900;
  font-display: swap;
  src: url('LibreFranklin-VariableFont_wght.ttf') format('ttf')
}

:root { --swrap-h: 52px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: 'Libre Franklin', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #152a47;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Header */
.cc-header-wrap { border-bottom: 1px solid #e2e8f0; background: #fff; }
.cc-header {
  max-width: 1200px; margin: 0 auto; padding: 24px 20px 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.cc-logo { height: 32px; }
.cc-htxt h1 { font-size: 20px; font-weight: 700; color: #152a47; line-height: 1.2; }
.cc-htxt p { font-size: 14px; color: #64748b; margin-top: 2px; }

.cc-twrap { max-width: 1200px; margin: 0 auto; padding: 16px 20px 32px; width: 100%; flex: 1; }

.cc-swrap {
  position: sticky; top: 0; z-index: 100;
  background: #f5f7fa; padding: 10px 0;
  transition: box-shadow 0.2s;
}
.cc-swrap.stuck { box-shadow: 0 4px 16px -2px rgba(21,42,71,0.1); }
.cc-swrap-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.cc-sbox { position: relative; }
.cc-sbox > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.cc-sinput {
  width: 100%; padding: 10px 38px; border-radius: 8px;
  border: 1px solid #dde2e9; background: #fff; color: #152a47;
  font-size: 14px; font-family: inherit; outline: none; transition: border 0.15s, box-shadow 0.15s;
}
.cc-sinput:focus { border-color: #b8c9e0; box-shadow: 0 0 0 3px rgba(46,95,138,0.08); }
.cc-sinput::placeholder { color: #94a3b8; }
.cc-sx {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  background: #f1f5f9; border: none; border-radius: 4px; padding: 4px; cursor: pointer;
  color: #64748b; display: none; line-height: 0; transition: all 0.15s;
}
.cc-sx.vis { display: flex; }
.cc-sx:hover { background: #e2e8f0; color: #334155; }

/* Filter row */
.cc-frow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.cc-fbtn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid #dde2e9; background: #fff; color: #64748b; font-size: 12px;
  font-family: inherit; cursor: pointer; white-space: nowrap; transition: all 0.15s; font-weight: 500;
  height: 32px;
}
.cc-fbtn:hover { border-color: #cbd5e1; background: #f8fafc; }
.cc-fbtn.active { border-color: var(--type-border); background: var(--type-bg); color: var(--type-text); }

.cc-tc { font-size: 10px; opacity: 0.4; margin-left: 2px; }
.cc-sep { height: 24px; width: 1px; background: #e2e8f0; flex-shrink: 0; }

.cc-ofbtn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid #dde2e9; background: #fff; color: #64748b; font-size: 12px;
  font-family: inherit; cursor: pointer; font-weight: 500; transition: all 0.15s;
  height: 32px;
}
.cc-ofbtn.on { border-color: #b8c9e0; color: #2e5f8a; background: #eef4fa; }
.cc-ofbtn:hover { border-color: #cbd5e1; background: #f8fafc; }
.cc-ofbtn.on:hover { border-color: #a0b8d4; background: #e4edf6; }

.cc-clr {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid #dfc2c6; background: #f5eced; color: #7a3a42; font-size: 12px;
  font-family: inherit; cursor: pointer; transition: all 0.15s; font-weight: 500;
  height: 32px; visibility: hidden; pointer-events: none;
}
.cc-clr.vis { visibility: visible; pointer-events: auto; }
.cc-clr:hover { background: #eedce0; border-color: #d4adb4; }

/* Topbar: count left, sort + per-page right */
.cc-topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
  flex-wrap: wrap; gap: 8px;
}
.cc-cnt { font-size: 13px; color: #64748b; }
.cc-topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-legend { font-size: 11px; color: #94a3b8; display: inline-flex; align-items: center; gap: 4px; }
.cc-legend svg { flex-shrink: 0; }
.cc-pp, .cc-sortctl {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b;
}
.cc-sortctl { display: none; }
.cc-pp select, .cc-sortctl select {
  padding: 5px 8px; border-radius: 6px; border: 1px solid #dde2e9;
  background: #fff; color: #152a47; font-size: 12px; font-family: inherit;
  cursor: pointer; outline: none; transition: border-color 0.15s; height: 32px;
}
.cc-pp select:hover, .cc-sortctl select:hover { border-color: #cbd5e1; }
.cc-sort-dir {
  padding: 5px 10px; border-radius: 6px; border: 1px solid #dde2e9;
  background: #fff; color: #152a47; font-size: 12px; font-family: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s;
  height: 32px;
}
.cc-sort-dir:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Multi-select dropdown */
.cc-ms { position: relative; }
.cc-dd {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 230px; max-height: 340px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  z-index: 200; box-shadow: 0 10px 40px rgba(0,0,0,0.12); display: none; flex-direction: column;
}
.cc-dd.open { display: flex; }
.cc-dd-i {
  width: calc(100% - 16px); margin: 8px 8px 4px; padding: 7px 10px; border-radius: 6px;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #152a47; font-size: 13px;
  font-family: inherit; outline: none;
}
.cc-dd-i:focus { border-color: #b8c9e0; }
.cc-dd-c {
  padding: 5px 12px; margin: 0 8px 4px; background: none; border: none;
  color: #7a3a42; font-size: 12px; cursor: pointer; text-align: left;
  border-bottom: 1px solid #f1f5f9; font-family: inherit; transition: color 0.15s;
  display: none;
}
.cc-dd-c.vis { display: block; }
.cc-dd-c:hover { color: #5e2830; }
.cc-dd-list { overflow-y: auto; max-height: 260px; padding: 0 4px 4px; }
.cc-dd-o {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px;
  cursor: pointer; color: #475569; font-size: 13px;
}
.cc-dd-o:hover { background: #f8fafc; }
.cc-dd-o input { width: 15px; height: 15px; accent-color: #3d7ab5; }
.cc-dd-cnt { font-size: 11px; opacity: 0.35; }
.cc-dd-empty { padding: 12px; color: #9ca3af; font-size: 13px; display: none; }

/* ===== DESKTOP TABLE ===== */
.cc-tbl {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid #dde2e9; border-radius: 10px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cc-tbl thead th {
  padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: #64748b;
  background: #f8fafb; border-bottom: 2px solid #e2e8f0;
  cursor: pointer; user-select: none; white-space: nowrap; transition: color 0.15s;
  font-family: inherit; position: sticky; top: var(--swrap-h); z-index: 10;
}
.cc-tbl thead th:first-child { border-radius: 10px 0 0 0; }
.cc-tbl thead th:last-child { border-radius: 0 10px 0 0; }
.cc-tbl thead th:hover { color: #152a47; }
.cc-tbl thead th.on { color: #2e5f8a; }
.cc-tbl thead th .th-in { display: inline-flex; align-items: center; gap: 5px; }
.cc-tbl thead .th-type { width: 130px; }
.cc-tbl thead .th-author { width: 190px; }
.cc-tbl thead .th-date { width: 100px; text-align: right; }
.cc-tbl thead .th-date .th-in { justify-content: flex-end; }

.cc-tbl tbody tr.dr { cursor: pointer; transition: background 0.1s; }
.cc-tbl tbody tr.dr:hover { background: #f8fafc; }
.cc-tbl tbody tr.dr.exp { background: #f6f8fb; }
.cc-tbl tbody tr.dr td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; font-size: 14px; vertical-align: middle; }
.cc-tbl tbody .td-type { width: 130px; }
.cc-tbl tbody .td-author { width: 190px; color: #64748b; font-size: 13px; }
.cc-tbl tbody .td-date { width: 100px; color: #94a3b8; font-size: 13px; text-align: right; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }

.cc-tn { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cc-tt { font-weight: 600; color: #152a47; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-star { flex-shrink: 0; display: inline-flex; align-items: center; margin-top: 1px; }
.cc-badge {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid; line-height: 1.4;
}

/* Detail */
.cc-tbl tbody tr.xr td { padding: 14px 14px 20px 14px; border-bottom: 1px solid #f1f5f9; background: #f6f8fb; }
.cc-det { padding-left: 33px; animation: ccS 0.18s ease; }
@keyframes ccS { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }

.cc-det-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 4px; }
.cc-desc { font-size: 14px; color: #475569; line-height: 1.65; margin-bottom: 16px; padding: 10px 14px; background: #fff; border-radius: 6px; border: 1px solid #e9edf3; }
.cc-det-authors { font-size: 13px; color: #475569; margin-bottom: 14px; }
.cc-det-authors .cc-det-label { display: inline; margin-right: 6px; margin-bottom: 0; }
.cc-mr { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.cc-mg { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cc-mg .cc-det-label { margin-right: 3px; margin-bottom: 0; }
.cc-chip { padding: 2px 8px; border-radius: 4px; background: #e4e9f0; color: #3e4a5e; font-size: 11px; border: 1px solid #d0d8e2; }
.cc-chip-l { background: #eef4fa; color: #2e5f8a; text-decoration: none; border: 1px solid #b8c9e0; transition: background 0.15s; cursor: pointer; }
.cc-chip-l:hover { background: #e0ebf4; }
.cc-chip-m { background: #e8ecf2; color: #5a6578; border-color: #d0d8e2; }
.cc-vl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: #2e5f8a; text-decoration: none; font-weight: 600; transition: color 0.15s;
}
.cc-vl:hover { color: #1e4a6e; }

.cc-empty td { text-align: center; padding: 56px 20px !important; color: #94a3b8; }

/* ===== MOBILE CARDS ===== */
.cc-mobile { display: none; }

.cc-mcard {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 8px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-mcard:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.cc-mcard-btn {
  display: block; width: 100%; padding: 14px 16px; background: none; border: none;
  cursor: pointer; text-align: left; font-family: inherit; color: inherit;
}
.cc-mcard.exp .cc-mcard-btn { border-bottom: 1px solid #f1f5f9; }
.cc-mcard-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.cc-mcard-top > svg { margin-top: 4px; color: #94a3b8; }
.cc-mcard-top .cc-star { margin-top: 4px; }
.cc-mcard-top .cc-tt { white-space: normal; line-height: 1.35; font-size: 15px; }
.cc-mcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-mcard-auth { font-size: 13px; color: #64748b; }
.cc-mcard-date { font-size: 12px; color: #94a3b8; font-family: 'IBM Plex Mono', monospace; }
.cc-mcard-dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }

.cc-mcard .cc-det { padding: 14px 16px 16px; animation: ccS 0.18s ease; }
.cc-mcard .cc-desc { font-size: 14px; }

/* Pagination */
.cc-pages { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 20px; flex-wrap: wrap; }
.cc-pb {
  padding: 7px 14px; border-radius: 6px; border: 1px solid #dde2e9;
  background: #fff; color: #64748b; font-size: 13px; font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.cc-pb:hover:not(:disabled) { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
.cc-pb:disabled { opacity: 0.3; cursor: default; }
.cc-pn {
  min-width: 34px; height: 34px; border-radius: 6px; border: 1px solid #dde2e9;
  background: #fff; color: #64748b; font-size: 13px; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 6px; transition: all 0.15s;
}
.cc-pn:hover:not(.on) { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
.cc-pn.on { border-color: #b8c9e0; background: #eef4fa; color: #2e5f8a; font-weight: 700; }

/* Footer */
.cc-footer { border-top: 1px solid #e2e8f0; background: #fff; margin-top: 8px; }
.cc-footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 20px 16px;
}
.cc-footer-info { font-size: 10px; color: #94a3b8; line-height: 1.5; }
.cc-footer-info span { display: block; }
.cc-footer-info span a { color: #64748b; text-decoration: underline; }
.cc-footer-info span a:hover { color: #2e5f8a; }
.cc-footer-links { display: inline-flex; gap: 12px; margin-top: 6px; }
.cc-footer-links a { font-size: 10px; color: #64748b; text-decoration: underline; }
.cc-footer-links a:hover { color: #2e5f8a; }

/* ===== TABLET ===== */
@media (max-width: 860px) {
  .cc-tbl { display: none; }
  .cc-mobile { display: block; }
  .cc-sortctl { display: inline-flex; }
  .cc-header { padding: 20px 16px 16px; }
  .cc-swrap-inner { padding: 0 16px; }
  .cc-twrap { padding: 14px 16px 24px; }
  .cc-footer-inner { padding: 14px 16px; }
  .cc-cnt { font-size: 12px; }
  .cc-legend { font-size: 10px; }
  .cc-mcard-auth { font-size: 12px; }
}

/* ===== PHONE ===== */
@media (max-width: 480px) {
  .cc-header { padding: 16px 14px 14px; gap: 8px; }
  .cc-logo { height: 26px; }
  .cc-htxt h1 { font-size: 17px; }
  .cc-htxt p { font-size: 13px; }
  .cc-swrap-inner { padding: 0 14px; }
  .cc-twrap { padding: 12px 14px 20px; }
  .cc-sinput { font-size: 14px; padding: 10px 38px; }
  .cc-frow { gap: 5px; }
  .cc-fbtn, .cc-ofbtn, .cc-clr { font-size: 11px; padding: 5px 9px; height: 28px; }
  .cc-topbar { gap: 6px; }
  .cc-topbar-right { gap: 6px; }
  .cc-sort-dir { height: 28px; font-size: 11px; padding: 4px 8px; }
  .cc-sortctl select, .cc-pp select { height: 28px; font-size: 11px; }
  .cc-cnt { font-size: 11px; }
  .cc-legend { font-size: 9px; }
  .cc-mcard-btn { padding: 12px 14px; }
  .cc-mcard-top .cc-tt { font-size: 14px; }
  .cc-mcard-auth { font-size: 11px; }
  .cc-mcard-date { font-size: 11px; }
  .cc-mcard .cc-det { padding: 12px 14px 14px; }
  .cc-det-label { font-size: 9px; }
  .cc-det-authors { font-size: 12px; }
  .cc-desc { font-size: 13px; padding: 10px 12px; }
  .cc-chip { font-size: 10px; }
  .cc-vl { font-size: 12px; }
  .cc-footer-inner { padding: 12px 14px; }
  .cc-footer-info { font-size: 9px; }
  .cc-footer-links a { font-size: 9px;  }
  .cc-pages { gap: 3px; }
  .cc-pb { padding: 6px 10px; font-size: 12px; }
  .cc-pn { min-width: 30px; height: 30px; font-size: 12px; }
}
