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

/* ─── Variables ─── */
:root {
  --black:      #111;
  --rule-light: #ddd;
  --gray-mid:   #6b6b6b;
  --gray-light: #999;
  --bg:         #fff;
  --bg-warm:    #f7f4ef;
  --accent:     #326891;
  --content-w:  1000px;
  --max-w:      1000px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Base ─── */
html { font-size: 16px; background: var(--bg); color: var(--black); -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); line-height: 1.5; }
a { color: inherit; text-decoration: none; }

/* ─── Header ─── */
.site-header {
  padding: 0.6rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-light);
  margin-bottom: 0.5rem;
}
.header-date {
  font-size: 0.7rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
  display: block;
}
.site-title:hover { text-decoration: none; }
.header-nav {
  display: flex;
  gap: 1.25rem;
  justify-content: flex-end;
  align-items: center;
}
.header-nav a {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-mid);
}
.header-nav a:hover { color: var(--black); border-bottom: 1px solid var(--black); }
/* ─── Main ─── */
.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

/* ─── Feed (단일 컬럼 리스트) ─── */
.feed {
  max-width: var(--content-w);
  margin: 0 auto;
  border-top: 3px solid var(--black);
}

.feed-empty {
  padding: 2rem 0;
  color: var(--gray-mid);
  font-size: 0.875rem;
}

.feed-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-light);
}

.feed-item__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.feed-item__source {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-mid);
  font-weight: 600;
}
.feed-item__source:hover { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }

.feed-item__date {
  font-size: 0.68rem;
  color: var(--gray-light);
  margin-left: auto;
}

.feed-item__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}
.feed-item__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed-item__excerpt {
  font-size: 0.85rem;
  color: var(--gray-mid);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2rem 0 0;
  max-width: var(--content-w);
  margin: 0 auto;
}
.pagination a, .pagination span {
  display: inline-block;
  min-width: 2rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  border: 1px solid var(--rule-light);
  margin-left: -1px;
  color: var(--gray-mid);
}
.pagination a:hover { background: var(--bg-warm); color: var(--black); }
.pagination .active { background: var(--black); color: #fff; border-color: var(--black); }
.pagination [aria-disabled="true"] { color: var(--rule-light); cursor: default; }

/* ─── Source list ─── */
.page-header {
  border-top: 3px solid var(--black);
  padding-top: 0.75rem;
  margin: 0 auto 1.5rem;
  max-width: var(--content-w);
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}
.page-header p { font-size: 0.85rem; color: var(--gray-mid); margin-top: 0.35rem; }

.source-search {
  display: flex;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--black);
  max-width: var(--content-w);
}
.source-search input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: transparent;
  outline: none;
}
.source-search button {
  padding: 0.55rem 1.25rem;
  background: var(--black);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.source-search button:hover { background: #333; }

.source-list { border-top: 1px solid var(--rule-light); max-width: var(--content-w); margin: 0 auto; }
.source-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-light);
  text-decoration: none;
}
.source-item:hover .source-item__name { text-decoration: underline; text-underline-offset: 2px; }
.source-item__logo {
  width: 36px; height: 36px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-mid);
  overflow: hidden;
}
.source-item__logo img { width: 100%; height: 100%; object-fit: cover; }
.source-item__body { flex: 1; min-width: 0; }
.source-item__name { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--black); }
.source-item__desc { font-size: 0.8rem; color: var(--gray-mid); margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-item__meta { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; flex-shrink: 0; }
.badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--rule-light);
  padding: 0.15rem 0.5rem;
  color: var(--gray-mid);
}
.badge.podcast { border-color: var(--accent); color: var(--accent); }

/* ─── Source detail header ─── */
.source-header {
  border-top: 3px solid var(--black);
  padding: 1rem 0 1.25rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule-light);
  max-width: var(--content-w);
}
.source-header__eyebrow { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-mid); margin-bottom: 0.5rem; }
.source-header__eyebrow a:hover { text-decoration: underline; }
.source-header__name { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; line-height: 1.2; }
.source-header__desc { font-size: 0.875rem; color: var(--gray-mid); margin-top: 0.5rem; line-height: 1.5; }
.source-header__links { margin-top: 0.75rem; display: flex; gap: 1rem; font-size: 0.75rem; }
.source-header__links a { color: var(--accent); }
.source-header__links a:hover { text-decoration: underline; }

/* ─── Article detail ─── */
.article-layout { max-width: var(--content-w); margin: 0 auto; }
.article-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-mid);
  border-top: 3px solid var(--black);
  padding-top: 0.5rem;
  margin-bottom: 0.75rem;
}
.article-eyebrow a:hover { text-decoration: underline; }
.article-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 0.85rem;
}
.article-meta {
  font-size: 0.75rem;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  margin-bottom: 1.75rem;
}
.article-meta a { color: var(--accent); }
.article-meta a:hover { text-decoration: underline; }
.article-meta-dot { color: var(--rule-light); }

.lang-tabs {
  display: inline-flex;
  border: 1px solid var(--black);
  margin-bottom: 1.75rem;
}
.lang-tabs button {
  padding: 0.35rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--gray-mid);
  border-right: 1px solid var(--black);
}
.lang-tabs button:last-child { border-right: none; }
.lang-tabs button.active { background: var(--black); color: #fff; }

.article-body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #222;
}
.article-body p { margin-bottom: 1.4rem; }
.article-body p:last-child { margin-bottom: 0; }

/* ─── Transcript (speaker diarization) ─── */
.transcript {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.turn {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.turn__label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 0.2rem;
  white-space: nowrap;
}

.turn__label--speaker1 { color: var(--black); }
.turn__label--speaker2 { color: var(--accent); }

.turn__text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #222;
  margin: 0;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--rule-light);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { font-size: 0.72rem; color: var(--gray-mid); }
.footer-logo { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; }

/* ─── Utility ─── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .site-header { padding: 0.5rem 1rem; }
  .header-top { grid-template-columns: 1fr; gap: 0.5rem; text-align: center; }
  .header-date { display: none; }
  .header-nav { justify-content: center; }
  .site-title { font-size: 2rem; }
  .main-content { padding: 1rem 1rem 2rem; }
  .article-title { font-size: 1.65rem; }
  .site-footer { flex-direction: column; gap: 0.5rem; padding: 1rem; }
}
