/* Daily Insight Hub — single self-contained stylesheet. System fonts only, no external requests. */
:root {
  --navy: #0f1e3d;
  --gold: #c9a227;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --paper: #f7f5ef;
  --card: #ffffff;
  --border: #e5e0d5;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: #8a6d1a; }
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-height: 44px; }
.brand-logo { width: 44px; height: 44px; flex: none; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: bold; line-height: 1.2; }
.tagline { color: #d8c98a; font-size: 0.9rem; margin: 0; flex-basis: 100%; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.main-nav a {
  color: #fff; text-decoration: none; padding: 10px 12px; min-height: 44px;
  display: inline-flex; align-items: center; border-radius: 4px; font-weight: 600;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-switcher a {
  color: #d8c98a; text-decoration: none; padding: 10px 8px; min-height: 44px;
  display: inline-flex; align-items: center; font-weight: 600;
}
.lang-switcher a.active { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.lang-switcher span { color: #7d8aa5; }

/* Hero */
.hero { background: var(--card); border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 24px 16px 28px; }
.hero-img { width: 100%; border-radius: 8px; margin-bottom: 20px; }
.hero-kicker, .card-kicker {
  color: #8a6d1a; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.8rem; margin: 0 0 8px;
}
.hero-title { font-size: 2.1rem; margin: 0 0 12px; }
.hero-title a, .card-title a { color: var(--navy); text-decoration: none; }
.hero-title a:hover, .card-title a:hover { text-decoration: underline; }
.hero-dek { font-size: 1.1rem; color: #333; max-width: 62ch; }
.hero-meta, .card-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Layout: content + sidebar */
.layout {
  max-width: 1100px; margin: 0 auto; padding: 28px 16px;
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
@media (min-width: 860px) {
  .layout { grid-template-columns: 1fr 300px; }
  .tagline { flex-basis: auto; }
}
.section-title { border-bottom: 3px solid var(--gold); padding-bottom: 8px; margin-bottom: 20px; }

/* Article grid + cards */
.article-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body p { margin: 0; }
.card-title { font-size: 1.25rem; margin: 0; }
.card-dek { color: #333; flex: 1; }
.card-meta { margin-top: auto; }

/* Category cards */
.category-cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
@media (min-width: 600px) {
  .category-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .category-cards { grid-template-columns: repeat(3, 1fr); }
}
.cat-card {
  background: var(--navy); color: #fff; border-radius: 8px; padding: 20px;
  text-decoration: none; display: block; min-height: 44px;
}
.cat-card h3 { color: #fff; margin: 0 0 6px; }
.cat-card p { color: #d8dce6; margin: 0; font-size: 0.95rem; }
.cat-card:hover { background: #16294f; }
.cat-card:hover h3 { color: #fff; }

/* Sidebar */
.sidebar { min-width: 0; }
.sidebar-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 24px;
}
.sidebar-box h2 { font-size: 1.25rem; margin: 0 0 12px; }
.featured-list { list-style: none; margin: 0; padding: 0; }
.featured-list li { border-top: 1px solid var(--border); padding: 12px 0; }
.featured-list li:first-child { border-top: none; padding-top: 0; }
.featured-list a { font-weight: 600; text-decoration: none; display: block; padding: 6px 0; }
.featured-list a:hover { text-decoration: underline; }
.featured-list .card-meta { margin-top: 2px; }

/* Follow / social strip */
.follow-box {
  background: var(--navy); color: #fff; border-radius: 8px; padding: 24px;
  margin: 0 16px 32px; max-width: 1100px;
}
@media (min-width: 1132px) { .follow-box { margin-left: auto; margin-right: auto; } }
.follow-box h2 { color: #fff; }
.follow-box p { color: #d8dce6; margin: 0; }

/* Page content (category / legal) */
.page-intro { font-size: 1.1rem; color: #333; max-width: 68ch; }
.page-head { max-width: 1100px; margin: 0 auto; padding: 28px 16px 32px; }
.page-head h1 { margin-bottom: 8px; }
.legal-body { max-width: 760px; }
.legal-body h2 { margin-top: 1.6em; }
.note-box {
  background: #fff8e1; border: 1px solid var(--gold); border-radius: 8px;
  padding: 16px 18px; margin: 0 0 20px;
}
.note-box p { margin: 0; }

/* Footer */
.site-footer { background: var(--navy); color: #d8dce6; margin-top: 8px; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 32px 16px;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-col h3 { color: #fff; font-size: 1.05rem; margin: 0 0 10px; }
.footer-col p { margin: 0 0 10px; font-size: 0.95rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col a {
  color: #d8dce6; text-decoration: none; display: inline-block;
  padding: 6px 0; min-height: 32px;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand span { font-family: Georgia, "Times New Roman", serif; font-weight: bold; color: #fff; font-size: 1.1rem; }
.footer-social p { margin: 0 0 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px; text-align: center; font-size: 0.85rem; color: #9aa5b8;
}
.footer-bottom p { margin: 0; }

/* Share block (same on every page) */
.share-block { max-width: 1100px; margin: 0 auto; padding: 0 16px 28px; }
.share-label { font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.share-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.share-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; background: var(--navy); color: #fff; text-decoration: none; border-radius: 6px; font-weight: 600; }
.share-links a:hover { background: #16294f; color: #fff; }

/* v3 — read-aloud player + archive widget. System fonts only, no external requests. */

/* Read-aloud player box (inserted after the hero figure on article pages). */
.read-aloud-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; margin: 0 0 20px; max-width: 760px;
}
.read-aloud-title {
  font-family: Georgia, "Times New Roman", serif; color: var(--navy);
  font-weight: 700; font-size: 1.1rem; margin: 0 0 4px;
}
.read-aloud-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.read-aloud-play, .read-aloud-stop {
  min-height: 44px; padding: 10px 18px; border-radius: 6px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
}
.read-aloud-play { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.read-aloud-play:hover { background: #16294f; }
.read-aloud-play:disabled { opacity: 0.6; cursor: default; }
.read-aloud-stop {
  background: transparent; color: var(--navy); border: 1px solid var(--border);
  margin-left: 10px;
}
.read-aloud-stop:hover { background: var(--paper); }
.read-aloud-stop:disabled { opacity: 0.5; cursor: default; }
.read-aloud-play:focus-visible, .read-aloud-stop:focus-visible,
.hero-play:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Circular play button overlaid on the hero image (bottom-left). */
.hero-media { position: relative; }
.hero-play {
  position: absolute; left: 12px; bottom: 12px;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(15, 30, 61, 0.78); color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 2px 3px;
}
.hero-play:hover { background: rgba(15, 30, 61, 0.92); }
.hero-play:disabled { opacity: 0.65; cursor: default; }

/* Archive widget — same box pattern as .sidebar-box. */
.archive-widget {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 24px;
}
.archive-widget h2 { font-size: 1.25rem; margin: 0 0 12px; }
.archive-widget h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--border); padding: 8px 0;
}
.archive-list li:first-child { border-top: none; }
.archive-list a { font-weight: 600; text-decoration: none; display: block; padding: 4px 0; }
.archive-list a:hover { text-decoration: underline; }
.archive-count { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
/* When the widget stands alone directly under <main> (category pages),
   centre it like .follow-box instead of stretching full-width. */
main > .archive-widget { margin: 0 16px 28px; max-width: 1100px; }
@media (min-width: 1132px) {
  main > .archive-widget { margin-left: auto; margin-right: auto; }
}
