/* news-common.css — shared design system for s0l0m0n.com/pages/news/ */

/* ---- Tokens ---- */
:root {
  --bg: #0a0a0a;
  --fg: #f0f0f0;
  --fg2: #ffffff;
  --card: #1c1c1e;
  --card-hover: #2c2c2e;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --muted: #8e8e93;
  --muted2: #8e8e93;
  --muted3: #48484a;
  --shadow: rgba(0,0,0,0.4);
  --btn-bg: #1a1a1a;
  --btn-color: #666;
  --btn-border: #2a2a2a;
  --desc-color: #aeaeb2;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --fg: #1a1a1a;
  --fg2: #1a1a1a;
  --card: #ffffff;
  --card-hover: #f5f5f7;
  --border: #e8e8e8;
  --border-hover: #d0d0d0;
  --muted: #555;
  --muted2: #888;
  --muted3: #999;
  --shadow: rgba(0,0,0,0.12);
  --btn-bg: #f0f0f0;
  --btn-color: #555;
  --btn-border: #ddd;
  --desc-color: #555;
}

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

/* ---- Body ---- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  padding: 40px 20px 60px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ---- Container ---- */
.container { max-width: 720px; margin: 0 auto; position: relative; }

/* ---- Typography ---- */
h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg2);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.5;
}

/* ---- Theme Toggle ---- */
#theme-btn {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  border: none;
  font-size: 16px;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
  color: var(--muted);
  line-height: 1;
}
#theme-btn:hover { background: rgba(255,255,255,0.06); }
[data-theme="light"] #theme-btn:hover { background: rgba(0,0,0,0.06); }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  background: var(--accent-bg);
  color: var(--accent);
}

/* ---- Avatar ---- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Card ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  padding: 20px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--border-hover);
}
a.card {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---- Article Card ---- */
article.card, .article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
article.card:hover, .article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--border-hover);
}
.article a {
  display: flex;
  gap: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}
.article img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--border);
}
.article .no-img {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  
}
.article .text { flex: 1; min-width: 0; }
.article .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg2);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.article .desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--desc-color);
  line-height: 1.5;
  
}

/* ---- Mark as Read Button ---- */
.btn-read {
  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-read:hover {
  border-color: var(--border-hover);
  color: var(--muted);
}
.btn-read.is-read {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Navigation Arrows ---- */
.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.nav-arrow:hover { background: var(--card-hover); color: var(--fg); }
.nav-arrow.disabled { opacity: 0.25; pointer-events: none; cursor: default; }

/* ---- Footer ---- */
/* .footer removed -- all pages use .footer-center now */

/* ---- Source badge small (for header) ---- */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 16px;
  background: var(--accent-bg);
  color: var(--accent);
}

/* ---- Header ---- */
.date-nav {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.date-nav h1 {
  margin-bottom: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.header-index-link {
  font-size: 13px;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}
.header-index-link:hover {
  color: var(--accent);
}
.header { margin-bottom: 40px; }

/* ---- Meta ---- */
.meta { font-size: 14px; color: var(--muted2); }

/* ---- Digest list (index pages) ---- */
.digest-list { display: flex; flex-direction: column; gap: 10px; }

/* ---- Articles list ---- */
.articles { display: flex; flex-direction: column; gap: 12px; }

/* ---- Nav row ---- */
.nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.nav-arrows { display: flex; gap: 8px; }

/* ---- Footer rows (for digest pages) ---- */
.footer-center {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted3);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.footer-center .footer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-center a {
  color: var(--muted3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-center a:hover { color: var(--muted); }
.footer-center .font-size-override { font-size: 13px; }

/* ---- Mark as Read Bottom Button ---- */
.btn-read-bottom {
  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-read-bottom:hover {
  border-color: var(--border-hover);
  color: var(--muted);
}
.btn-read-bottom.is-read {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Loading ---- */
.loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 14px;
}

/* ---- Tablet breakpoint ---- */
@media (max-width: 768px) {
  .article a { gap: 12px; }
  .article img, .article .no-img { width: 100px; height: 67px; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  body { padding: 24px 16px 48px; }
  h1 { font-size: 20px; }
  .card { padding: 16px; }
  .article a { flex-direction: column; gap: 12px; padding: 16px; }
  .article img, .article .no-img { width: 100%; height: auto; aspect-ratio: 16/9; }
  .article .title { font-size: 16px; }
  .footer-center { flex-direction: column; gap: 8px; text-align: center; }
  .nav-arrow { min-width: 44px; min-height: 44px; }
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
}
.footer-nav .btn-read {
  flex-shrink: 0;
}
.footer-nav a {
  color: var(--muted3);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--muted); }


/* ---- Header Meta (article count row) ---- */
.header-meta {
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 12px;
}
/* Fix: VCRU logo invert breaks in light mode */
[data-theme="light"] .article .no-img img { filter: none; }

