/* ============================================================
   Daily AI Insights — Archive Pages
   Standalone CSS (does not import style.css to avoid app-shell layout)
   ============================================================ */

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

html, body { overflow-x: hidden; }

:root {
  --bg:         #0d0d0f;
  --bg-2:       #141416;
  --bg-3:       #1a1a1e;
  --bg-4:       #222228;
  --border:     #2a2a30;
  --orange:     #4f8ef7;
  --orange-dim: #3570d4;
  --text:       #eeeef2;
  --text-muted: #8888a0;
  --text-dim:   #4a4a60;
  --radius:     14px;
  --radius-sm:  8px;
  --font:       'Inter', -apple-system, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────── */

.daily-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.header-logo:hover { text-decoration: none; }

.logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.header-back,
.header-title {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Main content ───────────────────────────────────────────── */

.daily-main {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── Article header ─────────────────────────────────────────── */

.article-header {
  margin-bottom: 40px;
}

.article-date {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* ── Story cards ────────────────────────────────────────────── */

.story-section h2,
.script-section h2,
.on-this-day h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.story-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.story-card:hover {
  border-color: var(--orange-dim);
  background: var(--bg-3);
  text-decoration: none;
}

.story-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.story-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.story-source {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Full analysis (script) ─────────────────────────────────── */

.script-section {
  margin-bottom: 48px;
}

.script-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.25em;
}

/* ── On This Day ────────────────────────────────────────────── */

.on-this-day {
  margin-bottom: 48px;
}

.otd-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.otd-image {
  width: 200px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.otd-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ── CTA banner ─────────────────────────────────────────────── */

.cta-banner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  margin-top: 48px;
}

.cta-banner h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-banner p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
}

.cta-btn:hover {
  background: var(--orange-dim);
  text-decoration: none;
}

/* ── Archive index ──────────────────────────────────────────── */

.archive-intro {
  margin-bottom: 40px;
}

.archive-intro h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.archive-intro p {
  font-size: 16px;
  color: var(--text-muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.archive-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
  overflow: hidden;
}

.archive-card:hover {
  border-color: var(--orange-dim);
  background: var(--bg-3);
  text-decoration: none;
}

.archive-date {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.archive-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 8px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.archive-card ul {
  list-style: none;
  padding: 0;
}

.archive-card li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.archive-card li::before {
  content: "→ ";
  color: var(--text-dim);
}

/* ── Footer ─────────────────────────────────────────────────── */

.daily-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.daily-footer p {
  font-size: 13px;
  color: var(--text-dim);
}

.daily-footer a {
  color: var(--text-muted);
}

.daily-footer a:hover {
  color: var(--orange);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 700px) {
  .story-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 26px;
  }

  .archive-intro h1 {
    font-size: 26px;
  }

  .daily-main {
    padding: 32px 16px 48px;
  }

  .cta-banner {
    padding: 32px 20px;
  }

  .otd-card {
    flex-direction: column;
  }

  .otd-image {
    width: 100%;
  }
}
