/* 화제 고정 페이지와 지난 화제 목록(collector/pages.py가 만든다).
   색·글꼴·요약 문장·근거 글 목록·칩은 style.css의 것을 그대로 쓰고, 여기에는 읽기 좋은 한 열 배치만 더한다. */

.page .top,
.page .foot { max-width: calc(760px + 56px); }

.page .foot { padding-top: 8px; }

.page .brand {
  color: inherit;
  text-decoration: none;
}

/* 언어: 홈의 단추 묶음과 같은 모양의 링크 둘 */
.page-lang a {
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  font: 700 0.7rem/1.5 var(--sans);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: color 200ms ease;
}

.page-lang a:hover,
.page-lang a[aria-current="page"] { color: var(--ink); }

.page-lang:has(a[hreflang="en"][aria-current="page"])::before { translate: 100% 0; }

/* 한 열 본문 */
.doc {
  max-width: calc(760px + 56px);
  margin: 0 auto;
  padding: 28px 28px 56px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.crumbs a {
  color: inherit;
  text-decoration: none;
}

.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--faint); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }

.doc-card {
  margin-top: 14px;
  padding: 28px 32px 30px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.doc-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.doc-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.doc-title {
  margin: 14px 0 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.035em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.doc-title-page { margin-top: 18px; }

.doc-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.doc-card .sheet-summary { margin-top: 22px; }
.doc-card .sheet-summary li { font-size: 1.02rem; }
.doc-card .sheet-label { margin-top: 30px; }

a.cite { text-decoration: none; }

/* 근거 글 목록: 요약 창과 같은 회색 면. 고정 페이지에서는 제목을 자르지 않는다. */
.doc-sources {
  margin-bottom: 0;
  list-style: none;
}

.doc-sources li { scroll-margin-top: 24px; }
.doc-sources li + li .sheet-source { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 7%, transparent); }
.doc-sources li:target .sheet-source { animation: cited 1.6s ease-out; }

.doc-sources .sheet-source { padding: 12px 16px; }

.doc-sources .sheet-source-title {
  overflow: visible;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.doc-more { margin-top: 30px; }
.doc-more .sheet-label { margin-top: 0; }

a.chip { text-decoration: none; }

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.doc-link .icon { transition: transform 140ms ease; }
.doc-link:hover .icon { transform: translateX(3px); }

/* 지난 화제 목록 */
.doc-lead {
  max-width: 60ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  word-break: keep-all;
}

.doc-empty {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.index-group { margin-top: 30px; }
.index-group .sheet-label { margin: 0 0 8px 4px; }

.index-list {
  margin: 0;
  padding: 4px 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  list-style: none;
}

.index-list li + li .index-item { box-shadow: inset 0 1px 0 var(--line); }

.index-item {
  display: grid;
  gap: 3px;
  padding: 15px 20px 16px;
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.index-list li:first-child .index-item { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.index-list li:last-child .index-item { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.index-item:hover { background: var(--hover); }

.index-label {
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.index-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.index-sub {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 560px) {
  .doc { padding: 20px 16px 44px; }
  .page .top { padding-right: 16px; padding-left: 16px; }
  .doc-card { padding: 22px 18px 24px; border-radius: var(--radius-card); }
  .doc-title { font-size: 1.45rem; }
  .doc-sources .sheet-source { padding: 11px 12px; }
  .index-item { padding: 14px 16px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .doc-sources li:target .sheet-source { animation: none; }
}
