/*
 * 이번 주 새 소식 (weekly-digest.js) — 통합 일정 맨 위 카드.
 * 이 기능을 지우려면 이 파일과 weekly-digest.js, index.html 에서 둘을 싣는 두 줄만 지운다.
 * 색은 styles.css 의 변수만 쓴다(밝은·어두운 화면 모두 따라간다).
 */
.wd { margin: 4px 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wd-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  padding: 12px 16px; cursor: pointer; list-style: none;
}
.wd-head::-webkit-details-marker { display: none; }
.wd-head::after { content: "접기 ▴"; margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.wd:not([open]) .wd-head::after { content: "펼치기 ▾"; }
.wd[open] .wd-head { border-bottom: 1px solid var(--line); }
.wd-head h2 { margin: 0; font-size: 16px; }
.wd-range { color: var(--muted); font-size: 12.5px; }

.wd-rows { list-style: none; margin: 0; padding: 0 16px; }
.wd-row {
  display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 2px 14px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.wd-row:first-child { border-top: 0; }
.wd-cat { display: inline-flex; align-items: center; gap: 7px; padding-top: 1px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.wd-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.wd-body { min-width: 0; }
.wd-main { margin: 0; font-size: 14px; }
.wd-row.is-quiet .wd-main { color: var(--muted); }
.wd-when { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
.wd-sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* 눈에 띄는 항목 칩 */
.wd-hl { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 0; }
.wd-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.wd-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  padding: 4px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
}
.wd-chip b, .wd-chip a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wd-chip a { color: var(--text); text-decoration: none; }
.wd-chip a:hover { color: var(--brand); text-decoration: underline; }
.wd-chip-sub { flex: none; color: var(--muted); font-size: 12px; }
.wd-more { align-self: center; color: var(--muted); font-size: 12.5px; }

.wd-go {
  /* 글자는 작게, 누르는 자리는 넉넉히 */
  margin: -8px 0; padding: 8px 0 8px 12px;
  color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.wd-go:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .wd-head, .wd-rows { padding-left: 12px; padding-right: 12px; }
  .wd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .wd-go { grid-column: 2; grid-row: 1; }
  .wd-body { grid-column: 1 / -1; }
  .wd-chip-sub { display: none; } /* 좁은 화면에서는 이름만 — 자세한 것은 각 화면에서 */
}
