/* News Digest Site - mobile-first style */
:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-alt: #eef1f8;
  --text: #111827;
  --muted: #4b5563;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --border: #d6dbe7;
  --ok: #0f766e;
  --shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2c;
  --surface-alt: #1a2640;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --primary-soft: #1d355f;
  --border: #2a3b5f;
  --ok: #2dd4bf;
  --shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.site-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.site-top {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.top-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.updated-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.nav a {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-weight: 600;
}

.nav a.active {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
}

button.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-weight: 600;
}

.hero, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.hero h1 { margin: 0 0 0.5rem 0; font-size: 1.4rem; }
.hero p { margin: 0.35rem 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.story-card {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 0.8rem;
}

.story-card h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.story-card p {
  margin: 0.35rem 0 0 0;
  color: var(--muted);
}

.section-link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.section-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  padding: 0.8rem;
}

.section-link strong { display: block; margin-bottom: 0.2rem; }

.filter-controls {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.filter-controls input, .filter-controls button {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}

.filter-controls input {
  flex: 1 1 220px;
  min-width: 180px;
}

.filter-controls button {
  cursor: pointer;
  font-weight: 600;
}

.filter-controls button.active {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.filter-status {
  color: var(--muted);
  font-size: 0.86rem;
  margin: -0.35rem 0 0.8rem;
}

.reddit-section {
  margin-bottom: 1.1rem;
}

.reddit-row {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 0.55rem;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  background: rgba(15, 118, 110, 0.16);
  color: var(--ok);
  margin-right: 0.25rem;
}

.freshness {
  display: inline-block;
  font-size: 0.76rem;
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--border);
  color: var(--muted);
  margin-left: 0.35rem;
}

.why-harsh {
  margin-top: 0.45rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-brief {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.quick-brief li {
  margin-bottom: 0.35rem;
}

.long-summary {
  margin: 0;
  padding-left: 1.2rem;
}

.long-summary li {
  margin-bottom: 0.45rem;
}

.comment-tip {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-bullets {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-bullets li {
  margin-bottom: 0.25rem;
}

footer {
  margin: 1.3rem 0 0.8rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.86rem;
}

@media (min-width: 760px) {
  .hero h1 { font-size: 1.75rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
