/* v1.8 주기동 탭(주간기술동향 글별 요약 · 이력 연관 · 예상 질문) — DESIGN 토큰만 사용, rem/em 크기(글자 32px 까지 줄바꿈으로 수용) */

/* ---- 목록(사이드바 / 모바일 첫 화면) */
.weekly-list-view .wk-search { padding: 4px 16px 10px; }
.weekly-list-view .wk-search .field { min-width: 0; }
.weekly-list-view .wk-search input { width: 100%; text-overflow: ellipsis; }
.wk-list { list-style: none; margin: 0; padding: 0 8px 24px; display: flex; flex-direction: column; gap: 6px; }
.wk-card { display: block; padding: 10px 12px 11px; border-radius: var(--radius-ctl); color: var(--label); text-decoration: none; background: var(--surface); box-shadow: var(--shadow-1); border: var(--hairline) solid transparent; transition: background var(--dur-micro); -webkit-user-select: none; user-select: none; }
@media (hover: hover) { .wk-card:hover { background: var(--surface-2); } }
.wk-card:active { background: var(--fill-3); }
.wk-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wk-card.on { background: var(--accent-tint); border-color: var(--accent); box-shadow: none; }
.wk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: var(--t-cap); color: var(--label-2); font-variant-numeric: tabular-nums; line-height: 1.4; }
.wk-meta .wk-issue { font-weight: 700; color: var(--accent-fg); }
.wk-pdf, .wk-nopdf { display: inline-flex; align-items: center; padding: 0 .45em; min-height: 1.5em; border-radius: var(--radius-xxs); font-size: var(--t-cap2); font-weight: 700; letter-spacing: .02em; background: var(--green-tint); color: var(--green-text); }
.wk-nopdf { background: var(--fill-3); color: var(--label-2); font-weight: 600; }
.wk-card .wk-title { margin: 3px 0 4px; font-size: var(--t-sub); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; word-break: keep-all; }
.wk-card .wk-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; font-size: var(--t-foot); color: var(--label-2); }
.wk-card .wk-authors { min-width: 0; overflow-wrap: anywhere; }
.wk-card .wk-qn { display: inline-flex; align-items: center; gap: 4px; flex: none; font-variant-numeric: tabular-nums; }
.wk-list .wk-noresult { text-align: center; padding: 24px 16px; }
.wk-empty.compact { padding: 32px 16px; }
.wk-retry-p { margin-top: 12px; }

/* ---- 상세 */
.weekly-view .wk-detail { container-type: inline-size; max-width: var(--content-max, 46rem); margin: 0 auto; padding: 8px 20px 48px; }
.wk-head { padding: 8px 0 4px; }
.wk-h1 { margin: 6px 0 6px; font-size: var(--t-title); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; word-break: keep-all; }
.wk-head .wk-authors { font-size: var(--t-foot); color: var(--label-2); }
.wk-head .wk-authors a { color: var(--accent-fg); }
.wk-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.wk-tags .tag-chip { max-width: 100%; min-height: 1.6em; line-height: 1.6; font-size: var(--t-cap); padding: 0 .7em; }
.wk-sec { margin-top: 22px; }
.wk-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--t-head); font-weight: 700; color: var(--label); }
.wk-h .wk-n { min-width: 1.6em; padding: 0 .45em; border-radius: var(--radius-pill); background: var(--fill-3); color: var(--label-2); font-size: var(--t-cap); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.wk-abstract { margin: 0; font-size: var(--t-body); line-height: var(--lh-answer); overflow-wrap: anywhere; }
.wk-points, .wk-ipcol ul { margin: 0; padding-left: 1.2em; font-size: var(--t-sub); line-height: var(--lh-body); }
.wk-points li, .wk-ipcol li { margin: 0 0 6px; overflow-wrap: anywhere; }
.wk-points li::marker { color: var(--accent-fg); }

/* 외워 둘 수치: 표 — 좁은 폭(≈36em 미만, 큰 글자·모바일)에서는 행을 카드처럼 세로로 쌓는다 */
.wk-num { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: var(--radius-ctl); overflow: hidden; box-shadow: var(--shadow-1); font-size: var(--t-foot); table-layout: fixed; }
.wk-num th, .wk-num td { padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.45; border-bottom: var(--hairline) solid var(--separator); overflow-wrap: anywhere; word-break: keep-all; }
.wk-num thead th { background: var(--surface-2); color: var(--label-2); font-weight: 600; font-size: var(--t-cap); }
.wk-num thead th:nth-child(1) { width: 30%; } .wk-num thead th:nth-child(2) { width: 30%; }
.wk-num tbody th { font-weight: 600; color: var(--label); }
.wk-num td.v { font-weight: 700; color: var(--study-fg); font-variant-numeric: tabular-nums; }
.wk-num td.note { color: var(--label-2); }
.wk-num tbody tr:last-child > * { border-bottom: 0; }
@container (max-width: 36em) {
  .wk-num, .wk-num tbody, .wk-num tr, .wk-num th, .wk-num td { display: block; width: auto; }
  .wk-num thead { display: none; }
  .wk-num tr { padding: 8px 12px; border-bottom: var(--hairline) solid var(--separator); }
  .wk-num tbody tr:last-child { border-bottom: 0; }
  .wk-num th, .wk-num td, .wk-num tbody tr:last-child > * { padding: 1px 0; border-bottom: 0; }
}

.wk-ip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16em), 1fr)); gap: 10px; }
.wk-ipcol { background: var(--surface); border-radius: var(--radius-ctl); padding: 10px 12px 6px; box-shadow: var(--shadow-1); min-width: 0; }
.wk-ipcol h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: var(--t-foot); font-weight: 700; color: var(--label-2); }
.wk-ipcol:first-child h3 svg { color: var(--orange-text); }
.wk-ipcol:last-child h3 svg { color: var(--accent-fg); }

/* 내 이력 연관 포인트: 강조 카드(학습색 막대 + 옅은 채움) */
.wk-career { background: var(--study-tint); border-radius: var(--radius-card); padding: 12px 14px 8px; border-left: 4px solid var(--study); }
.wk-career .wk-h { color: var(--study-fg); }
.wk-career-list { list-style: none; margin: 0; padding: 0; }
.wk-career-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font-size: var(--t-sub); line-height: var(--lh-body); }
.wk-proj { flex: none; display: inline-flex; align-items: center; min-height: 1.6em; padding: 0 .6em; border-radius: var(--radius-pill); background: var(--surface); color: var(--study-fg); font-size: var(--t-cap); font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-1); }
.wk-point { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; color: var(--label); }

/* 예상 질문 */
.wk-qs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wk-q { background: var(--surface); border-radius: var(--radius-ctl); box-shadow: var(--shadow-1); overflow: hidden; }
.wk-qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; background: none; color: var(--label); font: inherit; text-align: left; cursor: default; }
@media (hover: hover) { .wk-qhead:hover { background: var(--fill-4); } }
.wk-qhead:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wk-qno { font-weight: 700; color: var(--label-2); font-variant-numeric: tabular-nums; font-size: var(--t-sub); }
.wk-qtext { flex: 1 1 12em; min-width: 0; font-size: var(--t-sub); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; word-break: keep-all; }
.wk-chev { display: inline-flex; color: var(--label-3); transition: transform var(--dur-micro); margin-left: auto; }
.wk-q.open .wk-chev { transform: rotate(180deg); }
.wk-q.deleted .wk-qhead { color: var(--label-2); }
.wk-q.deleted .wk-qtext { font-weight: 500; text-decoration: line-through; text-decoration-color: var(--label-3); }
.wk-q.deleted { background: var(--fill-4); box-shadow: none; }
.badge.wk-del { background: var(--gray-tint); color: var(--gray-text); }
.wk-qbody { padding: 2px 14px 12px; border-top: var(--hairline) solid var(--separator); }
.wk-ans { margin-top: 10px; }
.wk-ans p { margin: 0; font-size: var(--t-sub); line-height: var(--lh-body); overflow-wrap: anywhere; }
.wk-k { font-size: var(--t-cap); font-weight: 700; color: var(--label-2); margin-bottom: 4px; letter-spacing: .01em; }
.wk-ans .struct .v { font-size: var(--t-sub); line-height: var(--lh-answer); overflow-wrap: anywhere; }
.wk-ans .struct .legend { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wk-fu { margin: 0; padding-left: 1.3em; font-size: var(--t-sub); line-height: var(--lh-body); }
.wk-fu li { margin: 0 0 6px; }
.wk-fu .fq { font-weight: 600; overflow-wrap: anywhere; }
.wk-fu .fa { color: var(--label-2); overflow-wrap: anywhere; }
.wk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wk-actions .btn { text-decoration: none; height: auto; min-height: 36px; padding-top: .2em; padding-bottom: .2em; white-space: normal; text-align: center; }
.wk-err { padding: 10px 0; color: var(--red-text); font-size: var(--t-sub); }

@media (max-width: 899px) {
  .weekly-view .wk-detail { padding: 4px 16px 40px; }
  .wk-list { padding: 0 12px 24px; }
}
