/* Weekly Insights pages (issue #93). Static, frozen per-GW pages under
   /weekly/. Leans on the design tokens defined in gafferlab.css (:root),
   which is linked before this file on every weekly page. */

body.weekly-insights {
  margin: 0;
  background: var(--background, #faf7f2);
  color: var(--text, #1c1917);
  font-family: var(--font-body, 'Space Grotesk', system-ui, sans-serif);
  line-height: 1.55;
}

.wk-hero {
  background: linear-gradient(160deg, var(--primary, #2563eb), var(--tier-gem, #7c3aed));
  color: #f9fafb;
  padding: 3rem 1.25rem 2.5rem;
}
.wk-hero-inner { max-width: 860px; margin: 0 auto; }
.wk-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  opacity: 0.85;
}
.wk-hero h1 {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0.35rem 0 0.5rem;
}
.wk-hero-sub { margin: 0; max-width: 46rem; opacity: 0.92; }
.wk-hero-sub a { color: inherit; }

.wk-crumbs {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.wk-crumbs a { color: var(--primary, #2563eb); text-decoration: none; }
.wk-crumbs a:hover { text-decoration: underline; }

.wk-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}
.wk-section h2 {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  border-bottom: 1px solid var(--border, #e5e1d8);
  padding-bottom: 0.4rem;
}
.wk-section h3 { margin-top: 1.6rem; }
.wk-meta { color: var(--text-secondary, #6b6459); font-size: 0.85rem; font-weight: normal; }

.wk-tier { text-transform: capitalize; }
.wk-tier-essential { color: var(--tier-essential, #b45309); }
.wk-tier-strong { color: var(--tier-strong, #2563eb); }
.wk-tier-differential { color: var(--tier-gem, #7c3aed); }

.wk-cards { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.wk-card {
  background: var(--surface, #fffdf8);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 0.8rem 1rem;
}
.wk-card-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.wk-card-slim { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.wk-badge { color: var(--text-secondary, #6b6459); font-size: 0.82rem; }
.wk-price, .wk-points { margin-left: auto; font-weight: 700; }
.wk-reason { margin: 0.45rem 0 0; font-size: 0.9rem; color: var(--text-secondary, #6b6459); }

.wk-list, .wk-captains { padding-left: 1.2rem; }
.wk-list li, .wk-captains li { margin: 0.3rem 0; }
.wk-up { color: var(--success, #3f6212); font-weight: 700; }
.wk-down { color: var(--danger, #9f1239); font-weight: 700; }

.wk-columns { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; }
@media (min-width: 640px) { .wk-columns { grid-template-columns: 1fr 1fr; } }

/* GW-in-numbers analytics table (issue #95) — compact, card-toned. */
.wk-table-wrap { overflow-x: auto; }
.wk-table {
  border-collapse: collapse;
  margin-top: 0.6rem;
  min-width: 22rem;
  background: var(--surface, #fcfbf7);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 0.9rem;
}
.wk-table th, .wk-table td {
  padding: 0.4rem 0.9rem;
  text-align: right;
  border-bottom: 1px solid var(--border, #e4e0d3);
}
.wk-table th:first-child { text-align: left; font-weight: 600; }
.wk-table thead th { color: var(--text-secondary, #3d453f); font-size: 0.82rem; }
.wk-table tbody tr:last-child th,
.wk-table tbody tr:last-child td { border-bottom: none; }

.wk-archive { list-style: none; padding: 0; }
.wk-archive li { margin: 0.4rem 0; }
.wk-archive a { color: var(--primary, #2563eb); font-weight: 600; text-decoration: none; }
.wk-archive a:hover { text-decoration: underline; }
.wk-tags { color: var(--text-secondary, #6b6459); font-size: 0.82rem; }

.wk-footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  color: var(--text-secondary, #6b6459);
  font-size: 0.85rem;
  border-top: 1px solid var(--border, #e5e1d8);
}
.wk-footer a { color: var(--primary, #2563eb); }

@media (prefers-color-scheme: dark) {
  body.weekly-insights {
    background: var(--background, #16130f);
    color: var(--text, #ece7dd);
  }
  .wk-card { box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
}

/* Subject links (#359): a name on a weekly page points into the live app.
   Same rule as the app's own `.subject-link` — colour inherited so a list of
   names does not read as a wall of blue, the affordance being the hover
   underline and the focus ring. These pages are three directories deep, so
   the href itself is written by src/subject_links.py. */
.subject-link {
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
}

.subject-link:hover { text-decoration: underline; }

.subject-link:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  text-decoration: underline;
}
