/* ICARUS — 아카이브 페이지 보조 스타일 (style.css 이후 로드)
   방향: 각진 형태(radius 0–4px), 헤어라인, 절제된 라벨 타이포 */

.archive-main { position: relative; }

/* style.css의 .toolbar-inner padding 단축 속성이 .container 좌우 여백을 덮어쓰는 것을 복구 */
.toolbar .toolbar-inner.container { padding-inline: var(--gutter); }

/* ---------- 툴바: 텍스트 탭 바 + 밑줄 인디케이터 ---------- */
.toolbar { margin-bottom: 0; }
.toolbar .toolbar-inner { padding-block: 0; align-items: stretch; gap: 0 32px; }
.filter-chips { min-width: 0; gap: 28px; margin: 0; padding: 0; align-items: stretch; }
.fchip {
  position: relative; height: 56px; padding: 0; border-radius: 0; background: none;
  font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em;
  transition: color var(--dur-2);
}
.fchip::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--text-1); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-3) var(--ease-out-expo);
}
.fchip:hover { background: none; color: var(--text-1); }
.fchip[aria-pressed="true"] { background: none; color: var(--text-1); font-weight: 600; }
.fchip[aria-pressed="true"]::after { transform: scaleX(1); }
.fchip .count {
  font-family: var(--font-label, inherit); font-size: 12px; font-weight: 500;
  margin-left: 6px; opacity: 0.7; font-variant-numeric: tabular-nums;
}
.fchip:focus-visible { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 2px; }

.toolbar-right { align-items: center; gap: 12px; padding-block: 9px; }
.fchip.award-toggle { height: 38px; padding: 0 2px; display: inline-flex; align-items: center; gap: 6px; }
.fchip.award-toggle::after { bottom: 0; }
.fchip.award-toggle[aria-pressed="true"] { color: var(--text-1); background: none; box-shadow: none; }

.field { border-radius: 2px; box-shadow: none; }
.field:focus { box-shadow: none; border-color: var(--text-1); }
.search .field { width: 240px; }

/* ---------- 결과 문장 ---------- */
.result-line { padding-top: 48px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 48px; }
.result-line p b { color: var(--text-1); }
.reset-btn {
  font-family: var(--font-label, inherit); font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--text-2);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}

/* ---------- 피처드 ---------- */
.featured-wrap[hidden] { display: none; }
.featured .card-thumb, .featured .card-thumb > svg { border-radius: 2px; }
.featured .overline { color: var(--text-3); }
.featured .link-arrow { margin-top: 8px; color: var(--text-1); }
.featured:hover .link-arrow svg { transform: translateX(4px); }
.featured .card-summary { -webkit-line-clamp: 4; }
.featured:hover .card-title { color: var(--text-1); }

/* ---------- 카드 ---------- */
.archive-main .card-thumb { border-radius: 2px; border: 0; }
.archive-main .card:hover .card-title { color: var(--text-1); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.archive-main .card-thumb .badge {
  border-radius: 2px; background: rgba(3, 8, 20, 0.72); color: #e6eefc;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.archive-main .card-thumb .badge.award { color: #f2d48f; }
/* 썸네일 좌상단 배지와 일러스트 코너 라벨("ICARUS / KAIST") 겹침 방지 */
.archive-main .card-thumb > svg > g[font-family] > text:first-child { display: none; }
.cards[hidden] { display: none; }

/* ---------- 빈 상태 ---------- */
.empty[hidden] { display: none; }
.empty svg { width: 48px; height: 48px; margin: 0 auto 20px; color: var(--grey-300); }
.empty .btn { margin-top: 24px; }

/* ---------- 상세 다이얼로그 ---------- */
.detail { background: #fff; color: var(--text-1); border-radius: 4px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5); }
.detail-close { border-radius: 2px; background: rgba(3, 8, 20, 0.7); -webkit-backdrop-filter: none; backdrop-filter: none; }
.detail .chips { margin-top: -8px; }
.detail .chip {
  border-radius: 2px; height: 30px; padding: 0 10px; background: none;
  transition: border-color var(--dur-2), color var(--dur-2);
}
.detail .chip:hover { border-color: var(--text-1); color: var(--text-1); }
.detail-body .card-meta .badge { margin-left: 4px; border-radius: 2px; }
.detail .sources a { color: var(--text-1); text-decoration-color: var(--line-strong); }
.detail .sources a:hover { text-decoration-color: currentColor; }
.detail-nav { padding-top: 24px; border-top: 1px solid var(--line); }
.detail-nav .btn { max-width: 48%; border-radius: 2px; }
.detail-nav .btn:hover svg { transform: none; }

/* ---------- 모바일 ---------- */
@media (max-width: 900px) {
  .toolbar .toolbar-inner { flex-wrap: wrap; }
  .filter-chips { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  .fchip { height: 48px; }
  .toolbar-right { width: 100%; padding-block: 10px; }
}
@media (max-width: 640px) {
  .toolbar { margin-bottom: 0; }
  .filter-chips { gap: 22px; }
  .toolbar-right { flex-wrap: nowrap; }
  .toolbar-right select.field { flex: none; width: 108px; }
  .result-line { padding-top: 32px; margin-bottom: 32px; }
  .result-line p { font-size: 18px; }
  .featured { margin-bottom: 48px; padding-bottom: 48px; }
  .detail { border-radius: 0; }
}
