/* NovelStartUp — design tokens
   Warm ivory + navy, not the cream+terracotta AI-tell combo.
   Red/green (--up/--down) reserved exclusively for price direction — never brand decoration. */
:root {
  --bg: #F7F4EC;
  --text: #211F1C;
  --muted: #6B6558;
  --accent: #1B2A4A;
  --accent-hover: #2A3F66;
  --up: #00c805;
  --down: #ff3b30;
  --rule: #E4E0D5;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
@media (max-width: 640px) {
  .site-header { position: static; }
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.main-nav a:hover { color: var(--accent); }

/* ---------- Category pill (replaces the tracked-out-caps-eyebrow default) ---------- */
.category-pill {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.category-pill.small { font-size: 0.7rem; padding: 3px 9px; }

/* ---------- Homepage ---------- */
.lead-story {
  max-width: 780px;
  margin: 48px auto 40px;
  padding: 0 24px;
}
.lead-story h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 20px;
}
.lead-image { border-radius: 4px; margin-bottom: 16px; }
.lead-byline { color: var(--muted); font-size: 0.9rem; }

.article-list {
  max-width: 780px;
  margin: 0 auto 60px;
  padding: 0 24px;
  border-top: 1px solid var(--rule);
}
.article-row {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.row-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.row-content h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 8px;
  line-height: 1.3;
}
.row-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- Article page ---------- */
.article-page {
  max-width: 680px;
  margin: 48px auto;
  padding: 0 24px;
}
.article-page h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 20px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.article-meta .dot { color: var(--rule); }
.hero-image {
  border-radius: 6px;
  margin-bottom: 32px;
  max-width: 480px;
}
.article-body {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
}
.article-body p { margin: 0 0 1.4em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 2em 0 0.6em;
}

.share-btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 5px 14px;
  cursor: pointer;
  margin-left: auto;
}
.share-btn:hover { background: var(--accent); color: var(--bg); }

/* ---------- Newsletter ---------- */
.newsletter-box {
  margin-top: 48px;
  padding: 28px;
  background: #EFEADB;
  border-radius: 6px;
  text-align: center;
}
.newsletter-box h3 { font-family: var(--serif); margin: 0 0 8px; }
.newsletter-box p { color: var(--muted); margin: 0 0 16px; font-family: var(--sans); }
.newsletter-box form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.newsletter-box input[type="email"] {
  font-family: var(--sans);
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  min-width: 240px;
}
.newsletter-box button {
  font-family: var(--sans);
  font-weight: 600;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
}
.newsletter-box button:hover { background: var(--accent-hover); }

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 680px;
  margin: 48px auto;
  padding: 0 24px;
  font-family: var(--sans);
}
.legal-page h1 { font-family: var(--serif); font-size: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent);
  color: var(--bg);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.footer-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin: 0 0 12px;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  opacity: 0.9;
  font-size: 0.92rem;
}
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(247,244,236,0.15);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ---------- Price direction (used inline in article body where relevant) ---------- */
.price-up { color: var(--up); font-weight: 600; }
.price-down { color: var(--down); font-weight: 600; }

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .header-inner { padding: 14px 16px; }
  .main-nav { gap: 16px; }
  .lead-story h1 { font-size: 1.9rem; }
  .article-page h1 { font-size: 1.7rem; }
  .article-row { flex-direction: column; }
  .row-thumb { width: 100%; height: 180px; }
}
