/*
 * 44BITS NEWS — central stylesheet.
 * Inherits the 44bits.io design tokens (dark GitHub-style header, teal #20c997
 * accent, GitHub-blue links, 768px reading column, Mac-window code blocks) and
 * adds news-specific components: date-grouped headline lists and the article
 * source box. Single file, no framework. Fingerprinted as site.<hash>.css —
 * update the hash in assets/includes/head.html when this file changes
 * (docs/operations.md).
 */
:root {
  --color-text: #24292e;
  --color-muted: #586069;
  --color-faint: #6a737d;
  --color-border: #e1e4e8;
  --color-border-soft: #eaecef;
  --color-subtle: #f6f8fa;
  --color-background: #ffffff;
  --color-link: #0366d6;
  --color-accent: #20c997;
  --color-accent-dark: #1ba882;
  --color-header: #24292e;
  --color-footer: #1a1a1a;
  --content-width: 768px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-serif: "Noto Serif KR", "Noto Serif CJK KR", serif;
  --font-mono: "JetBrains Mono", "SF Mono", SFMono-Regular, Consolas,
    "Liberation Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===================== Header (dark brand bar) ===================== */
.site-header {
  background-color: var(--color-header);
  color: #fff;
  padding: 12px 0;
  margin-bottom: 40px;
}
.site-header .header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.site-header .site-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.site-header .site-title:hover { text-decoration: none; color: #fff; }
.site-header .site-title .site-title-suffix { color: var(--color-accent); }
.site-header .site-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.site-header .site-nav a { color: rgba(255, 255, 255, 0.8); font-size: 14px; }
.site-header .site-nav a:hover { color: #fff; text-decoration: none; }

/* ===================== Shared column ===================== */
.site-main { width: 100%; min-width: 0; max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }

.home-hero { margin: 8px 0 32px; }
.home-hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 8px; }
.home-hero p { color: var(--color-muted); font-size: 16px; }

/* ===================== News list (home / monthly archive) ===================== */
.news-day { margin-bottom: 36px; }
.news-day-date {
  font-size: 14px; font-weight: 700; color: var(--color-muted);
  letter-spacing: 0.02em; padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 16px 0; border-bottom: 1px solid var(--color-border-soft); }
.news-item:last-child { border-bottom: none; }
.news-item-link {
  display: flex; align-items: flex-start; gap: 16px;
  color: inherit; text-decoration: none;
}
.news-item-link:hover { text-decoration: none; }
.news-item-link:hover .news-item-title { color: var(--color-link); }
.news-item-thumbnail {
  flex: 0 0 128px; width: 128px; height: 80px;
  object-fit: cover; object-position: center;
  border: 1px solid var(--color-border-soft); border-radius: 6px;
  background: var(--color-subtle);
}
.news-item-body { flex: 1 1 auto; min-width: 0; }
.news-item-title {
  font-size: 19px; font-weight: 600; line-height: 1.4;
  color: #0d0d0d; word-break: keep-all; margin-bottom: 4px;
}
.news-item-summary { font-size: 15px; color: var(--color-muted); line-height: 1.6; word-break: keep-all; }
.news-item-meta { margin-top: 6px; font-size: 13px; color: var(--color-faint); }
.news-item-meta .meta-separator { margin: 0 6px; }

.archive-link { margin: 40px 0 30px; text-align: center; }
.archive-link a {
  display: inline-block; padding: 10px 20px; border: 1px solid var(--color-border);
  border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--color-text);
  background: #fff; transition: all 0.2s;
}
.archive-link a:hover { background: var(--color-subtle); border-color: #d1d5da; text-decoration: none; }

/* ===================== Archive index (/archive/) ===================== */
.archive-year { margin-bottom: 32px; }
.archive-year h2 {
  font-size: 20px; font-weight: 600; padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.archive-months { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.archive-months a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--color-border);
  border-radius: 16px; font-size: 14px; color: var(--color-text); background: #fff;
}
.archive-months a:hover { background: var(--color-subtle); text-decoration: none; }

/* ===================== Article page ===================== */
/* 기사 본문은 .site-main의 읽기 폭(768px - 좌우 20px = 728px)을 그대로 쓴다.
   예전에는 640px로 한 번 더 좁혀서, 헤더 타이틀보다 44px 안쪽에서 시작해
   blog·podcast 상세 페이지와 축이 어긋났다. */
.article { width: 100%; min-width: 0; margin: 0 auto 60px; }
.article-header {
  margin-top: 20px; margin-bottom: 36px;
  padding-bottom: 20px; border-bottom: 1px solid var(--color-border);
}
.article-title {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 600; line-height: 1.32;
  letter-spacing: -0.015em;
  margin-bottom: 10px; color: var(--color-text); word-break: keep-all;
  text-wrap: balance;
}
.article-meta { font-size: 14px; color: var(--color-muted); }
.article-meta a { color: var(--color-muted); }
.article-meta a:hover { color: var(--color-link); }
.article-meta .article-author { font-weight: 600; color: #1f2937; }
.article-meta .meta-separator { margin: 0 8px; }

/* ---- Article content: Korean long-form reading typography ---- */
.article-content {
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.75;
  letter-spacing: 0;
  font-kerning: normal;
  font-stretch: normal;
  color: var(--color-text);
  overflow-wrap: break-word;
}
.article-content a { overflow-wrap: break-word; word-break: break-word; }
.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
  font-family: var(--font-sans);
  margin-top: 48px; margin-bottom: 16px; font-weight: 600;
  line-height: 1.25; word-break: keep-all;
  text-wrap: balance;
}
.article-content h2 { font-size: 1.32em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
.article-content h3 { font-size: 1.1em; }
@media (min-width: 768px) {
  .article-content h2 { font-size: 1.452em; }
  .article-content h3 { font-size: 1.3em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
}

.article-content p {
  margin-bottom: 1.5em; font-size: 1.125em; line-height: 1.8;
  letter-spacing: -0.015em;
  text-justify: inter-character;
  text-wrap: pretty;
}
@media (min-width: 768px) { .article-content p { word-break: keep-all; } }
@media (max-width: 767px) { .article-content p { font-size: 1.125em; line-height: 1.8; } }

/* Default article typesetting and comparison overrides: ?typeset=pretty|justify|kp. */
@media screen and (min-width: 768px) {
  html[data-typeset="justify"] .article-content > p {
    text-align: justify;
    text-align-last: left;
    text-wrap: wrap;
  }

  html[data-typeset="kp"] .article-content > p.kp-rendered {
    text-wrap: wrap;
  }
  .kp-line {
    display: block;
    white-space: nowrap;
  }
  .kp-line-justified { text-align: left; }
  .kp-line-fallback { text-align: left; }
  .kp-line a,
  .kp-line code { word-spacing: normal; }
}
.kp-ruler {
  position: absolute;
  left: -100000px;
  visibility: hidden;
  white-space: nowrap;
}
.kp-token-measure,
.kp-space-measure {
  display: inline-block;
  white-space: pre;
}
@media print {
  .kp-line { display: inline; white-space: normal; word-spacing: normal !important; }
  .kp-line::after { content: " "; }
}

.article-content blockquote {
  padding: 0 1em; color: var(--color-faint);
  border-left: 0.25em solid #dfe2e5; margin: 0 0 16px 0;
}
.article-content blockquote > :first-child { margin-top: 0; }
.article-content blockquote > :last-child { margin-bottom: 0; }

.article-content ul, .article-content ol { padding-left: 2em; margin-bottom: 16px; }
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content ul ul { list-style-type: circle; }
.article-content li { margin-bottom: 4px; }
.article-content li + li { margin-top: 0.25em; }

/* A restrained editorial digest, distinct from the reported article text. */
.article-content .ai-summary {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  column-gap: 20px;
  margin: 28px 0 34px;
  padding: 18px 0 16px;
  background: transparent;
  border-top: 2px solid var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.article-content .ai-summary-label {
  margin-top: 2px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.article-content .ai-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-content .ai-summary li {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: #374151;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.015em;
}
.article-content .ai-summary li + li { margin-top: 8px; }
.article-content .ai-summary li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 4px;
  height: 4px;
  background: #6b7280;
  border-radius: 50%;
}

@media (max-width: 767px) {
  .article-content .ai-summary {
    display: block;
    margin: 24px 0 30px;
    padding: 15px 0 14px;
  }
  .article-content .ai-summary-label { margin: 0 0 10px; }
  .article-content .ai-summary li { font-size: 14px; line-height: 1.65; }
  .article-content .ai-summary li + li { margin-top: 7px; }
}

/* Long source documents shown in one selected language at a time. */
.article-content .letter-box {
  margin: 48px 0 32px;
  padding: 0 24px 24px;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-text);
  background: #fbfbfa;
}
.article-content .letter-box-header {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--color-border);
}
.article-content .letter-box h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.article-content .letter-box .letter-box-note {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}
.letter-language-switch {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.letter-language-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font: 600 14px/1.4 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
}
.letter-language-button + .letter-language-button { border-left: 0; }
.article-content .letter-language-button:hover { background: var(--color-subtle); text-decoration: none; }
.letter-language-button.is-active {
  border-color: var(--color-text);
  background: var(--color-text);
  color: #fff;
}
.article-content .letter-language-button.is-active:hover { color: #fff; }
.letter-language-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}
.article-content .letter-version[hidden] { display: none; }
.article-content .letter-version h3 {
  margin: 26px 0 18px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--color-border-soft);
}
.article-content .letter-version p {
  font-size: 1em;
  line-height: 1.75;
}
@media (max-width: 767px) {
  .article-content .letter-box {
    margin: 40px 0 28px;
    padding: 0 16px 18px;
  }
  .letter-language-switch { width: 100%; }
  .letter-language-button { flex: 1 1 50%; padding: 8px; }
}

.article-content sup { color: var(--color-faint); font-size: 0.72em; }

/* Inline code */
.article-content code {
  padding: 0.2em 0.4em; margin: 0; font-size: 85%;
  background-color: rgba(27, 31, 35, 0.05); border-radius: 3px;
  font-family: var(--font-mono);
}

/* Code blocks — Mac window style (same as 44bits.io) */
.article-content pre {
  position: relative; overflow: hidden; font-size: 85%; line-height: 1.45;
  background-color: var(--color-subtle); border-radius: 8px;
  margin: 1.25rem auto; border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.article-content pre code {
  display: block; padding: 4rem 1.5rem 2rem; margin: 0; overflow-x: auto;
  line-height: 1.6; word-wrap: normal; background-color: transparent;
  border: 0; white-space: pre; font-family: var(--font-mono);
  font-size: 0.875rem; color: var(--color-text);
}
.article-content pre::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5rem;
  background: #e5e7eb; border-bottom: 1px solid #d1d5db;
}
.article-content pre::after {
  content: ""; position: absolute; top: 0.75rem; left: 1rem;
  width: 0.75rem; height: 0.75rem; border-radius: 50%;
  background: #ef4444; box-shadow: 1.25rem 0 0 #eab308, 2.5rem 0 0 #22c55e;
}
@media (max-width: 767px) {
  .article-content pre { margin: 1.25rem 0; font-size: 80%; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
  .article-content pre code { padding: 1rem 0.875rem; font-size: 0.8125rem; }
  .article-content pre::before, .article-content pre::after { display: none; }
  .site-header { margin-bottom: 20px; }
  .article-header { margin-top: 8px; }
}

/* Syntax highlighting — Pandoc/skylighting tokens, GitHub-light palette */
.article-content .sourceCode { background: transparent; }
.article-content code span.kw, .article-content code span.cf { color: #d73a49; }
.article-content code span.dt { color: #e36209; }
.article-content code span.dv, .article-content code span.bn, .article-content code span.fl { color: #005cc5; }
.article-content code span.st, .article-content code span.ch, .article-content code span.vs { color: #032f62; }
.article-content code span.co { color: #6a737d; font-style: italic; }
.article-content code span.fu { color: #6f42c1; }
.article-content code span.bu { color: #e36209; }
.article-content code span.va { color: #e36209; }
.article-content code span.at { color: #e36209; }
.article-content code span.pp { color: #d73a49; }
.article-content code span.op { color: var(--color-text); }
.article-content code span.ot { color: #005cc5; }
.article-content code span.ex { color: #6f42c1; }
.article-content code span.er { color: #b31d28; }
.article-content code span.cn { color: #005cc5; }

/* Tables — GitHub style */
.article-content table { display: block; width: 100%; overflow: auto; margin-bottom: 16px; border-collapse: collapse; }
.article-content table th { font-weight: 600; padding: 6px 13px; border: 1px solid #dfe2e5; background-color: var(--color-subtle); }
.article-content table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
.article-content table tr { background-color: #fff; border-top: 1px solid #c6cbd1; }
.article-content table tr:nth-child(2n) { background-color: var(--color-subtle); }

.article-content img { max-width: 100%; box-sizing: content-box; background-color: #fff; }
.article-content hr { height: 0.25em; padding: 0; margin: 24px 0; background-color: var(--color-border); border: 0; }
.article-content figure { margin: 16px 0; text-align: center; }
.article-content figure img { display: inline-block; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border-radius: 4px; }
.article-content figcaption { font-size: 14px; color: var(--color-muted); margin-top: 8px; text-align: center; }

/* Article data tables and charts */
.article-content .data-figure {
  margin: 28px 0 32px;
  padding: 20px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  background: #f7f8fa;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
}
.article-content .data-figure .data-title {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.4;
  text-wrap: balance;
}
.data-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.article-content .data-table {
  display: table;
  min-width: 560px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}
.article-content .data-table th,
.article-content .data-table td { padding: 9px 10px; vertical-align: middle; }
.article-content .data-table th:first-child,
.article-content .data-table td:first-child { text-align: left; }
.article-content .data-table th:not(:first-child),
.article-content .data-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.article-content .data-table td:last-child { font-weight: 600; }
.data-chart { font-family: var(--font-sans); }
.chart-group + .chart-group { margin-top: 18px; }
.chart-group-title { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.chart-item + .chart-item { margin-top: 8px; }
.chart-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.4;
}
.chart-label strong { font-variant-numeric: tabular-nums; }
.chart-track { height: 12px; overflow: hidden; background: #e4e7ec; border-radius: 999px; }
.chart-bar { display: block; height: 100%; min-width: 2px; border-radius: inherit; }
.chart-bar.is-previous { background: #667085; }
.chart-bar.is-current { background: #087f6d; }
.chart-legend { display: flex; gap: 16px; margin-bottom: 16px; font-size: 13px; color: var(--color-muted); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { width: 10px; height: 10px; border-radius: 2px; }
.chart-swatch.is-previous { background: #667085; }
.chart-swatch.is-current { background: #087f6d; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.metric-card { padding: 12px; background: #fff; border: 1px solid var(--color-border-soft); border-radius: 8px; }
.metric-name { display: block; margin-bottom: 6px; font-size: 12px; color: var(--color-muted); }
.metric-value { display: block; font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 1.4; }
.metric-change { display: block; margin-top: 3px; font-size: 12px; color: #08705f; }
.article-content .data-figure figcaption {
  margin-top: 16px;
  text-align: left;
  line-height: 1.55;
}
.data-source { display: block; margin-top: 4px; }

@media (max-width: 767px) {
  .article-content .data-figure { margin-inline: 0; padding: 16px; }
  .metric-grid { grid-template-columns: 1fr; }
  .article-content .data-table { min-width: 520px; }
}

/* ---- Inline citations and source preview ---- */
.article-content sup.citation {
  color: inherit;
  font-size: 1em;
  line-height: 0;
  margin-left: 0.08em;
  vertical-align: super;
}
.citation-ref {
  position: relative;
  display: inline-block;
  padding: 0 0.12em;
  border-radius: 3px;
  color: var(--color-link);
  font-size: 0.68em;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.citation-ref::before {
  content: "";
  position: absolute;
  inset: -9px -5px;
}
.citation-ref:hover { background: #eaf3ff; text-decoration: none; }
.citation-ref:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}
.citation-ref:target {
  background: #fff4c2;
  outline: 2px solid #e2bd43;
  outline-offset: 3px;
  scroll-margin-top: 24px;
}

.citation-dialog {
  position: fixed;
  width: min(380px, calc(100vw - 32px));
  max-width: none;
  margin: 0;
  padding: 18px;
  overflow: visible;
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid #d0d7de;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(31, 35, 40, 0.22);
}
.citation-dialog::backdrop { background: rgba(31, 35, 40, 0.08); }
.citation-dialog-handle { display: none; }
.citation-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.citation-dialog-label { color: var(--color-muted); font-size: 13px; font-weight: 700; }
.citation-dialog-close {
  width: 32px;
  height: 32px;
  margin: -8px -8px -8px 0;
  border: 0;
  border-radius: 6px;
  color: var(--color-muted);
  background: transparent;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.citation-dialog-close:hover { color: var(--color-text); background: var(--color-subtle); }
.citation-dialog-close:focus-visible,
.citation-dialog-actions a:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.citation-dialog-meta { color: var(--color-muted); font-size: 13px; font-weight: 600; }
.citation-dialog-title { margin-top: 5px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.citation-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-soft);
}
.citation-dialog-actions a { font-size: 14px; font-weight: 600; cursor: pointer; }
.citation-dialog-open {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 6px 12px;
  color: #fff;
  background: var(--color-link);
  border-radius: 6px;
}
.citation-dialog-open:hover { color: #fff; background: #0257b8; text-decoration: none; }

/* ---- Source box (원문 출처) ---- */
.article-sources {
  margin-top: 3rem; padding: 1.25rem 1.5rem;
  background: var(--color-subtle); border: 1px solid var(--color-border); border-radius: 8px;
}
.article-sources h2 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--color-muted); margin-bottom: 12px;
}
.article-sources ul { list-style: none; margin: 0; padding: 0; }
.article-sources li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 -6px 8px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 15px;
  line-height: 1.5;
  scroll-margin-top: 20px;
}
.article-sources li:last-child { margin-bottom: 0; }
.article-sources li:target { background: #fff4c2; }
.article-sources .source-index {
  flex: 0 0 2.2em;
  color: var(--color-faint);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.75;
}
.article-sources .source-backlink { text-decoration: none; }
.article-sources .source-backlink:hover { color: var(--color-link); text-decoration: underline; }
.article-sources .source-backlink:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
  border-radius: 2px;
}
.article-sources .source-entry { min-width: 0; }
.article-sources .source-name { font-weight: 600; }
.article-sources li time { color: var(--color-faint); font-size: 13px; margin-left: 8px; white-space: nowrap; }

@media (max-width: 767px) {
  .citation-dialog {
    inset: auto 0 0 !important;
    width: 100%;
    max-height: min(60dvh, 520px);
    padding: 10px 20px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 0;
    border-top: 1px solid var(--color-border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(31, 35, 40, 0.2);
  }
  .citation-dialog::backdrop { background: rgba(31, 35, 40, 0.42); }
  .citation-dialog-handle {
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 2px;
    background: #d0d7de;
  }
  .citation-dialog-close { width: 44px; height: 44px; margin: -10px -12px -10px 0; }
  .citation-dialog-meta { font-size: 14px; }
  .citation-dialog-title { font-size: 16px; line-height: 1.6; }
  .citation-dialog-actions { display: block; }
  .citation-dialog-actions a {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  .citation-dialog[open] { animation: citation-sheet-in 180ms ease-out; }
}
@keyframes citation-sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media print {
  .citation-dialog { display: none !important; }
  .citation-ref { color: inherit; text-decoration: none; }
}

/* ===================== Footer (shared 44BITS footer — keep in sync with
   www.44bits.io / podcast.44bits.io; site-specific blocks go in .footer-extra) */
.site-footer { background-color: var(--color-footer); color: #e0e0e0; margin-top: 4rem; font-size: 0.85rem; }
.footer-extra {
  max-width: var(--content-width); margin: 0 auto; padding: 1.5rem 20px;
  border-bottom: 1px solid #2e2e2e;
}
.footer-content {
  max-width: var(--content-width); margin: 0 auto; padding: 0.9rem 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px 16px; flex-wrap: wrap;
}
.footer-links { margin: 0; }
.footer-links a { color: #b0b0b0; text-decoration: none; margin-right: 1rem; }
.footer-links a:last-child { margin-right: 0; }
.footer-links a:hover { color: var(--color-accent); }
/* 44BITS 형제 사이트(블로그·뉴스·팟캐스트)는 헤더와 같은 녹색으로 — 한 브랜드라는 걸
   드러내는 표시. 외부 채널(X·YouTube)과 RSS는 회색 그대로 둔다. */
.footer-links a.footer-brand { color: var(--color-accent); }
.footer-links a.footer-brand:hover { color: var(--color-accent); text-decoration: underline; }
.footer-copyright { margin: 0; padding: 0; border: 0; color: #888; }
.footer-copyright a { color: var(--color-accent); text-decoration: none; font-weight: 500; }
.footer-copyright a:hover { color: var(--color-accent-dark); text-decoration: underline; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 767px) {
  .article-title { font-size: 26px; }
  .footer-extra, .footer-content { padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 480px) {
  .site-header .header-inner { padding: 0 15px; }
  .site-main { padding: 0 15px; }
  .home-hero h1 { font-size: 24px; }
  .news-item-link { gap: 12px; }
  .news-item-thumbnail { flex-basis: 104px; width: 104px; height: 70px; }
  .news-item-title { font-size: 17px; line-height: 1.4; }
  .news-item-summary { font-size: 14px; line-height: 1.5; }
}
