/* ===========================================
   AITasks.live — shared stylesheet
   =========================================== */

:root {
  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --bg-subtle: #f5f4f1;
  --ink: #18181b;
  --ink-soft: #52525b;
  --ink-faint: #a1a1aa;
  --rule: #ececea;
  --rule-strong: #d4d4d0;

  --tag-purple-bg: #f3eefc; --tag-purple-fg: #6d28d9; --tag-purple-bd: #e2d4f7;
  --tag-red-bg: #fdecec;    --tag-red-fg: #be1d1d;    --tag-red-bd: #f5cccc;
  --tag-blue-bg: #ebf2fd;   --tag-blue-fg: #1d4ed8;   --tag-blue-bd: #d0dffb;
  --tag-green-bg: #eaf5ec;  --tag-green-fg: #166534;  --tag-green-bd: #cfe5d3;
  --tag-amber-bg: #fbf3e0;  --tag-amber-fg: #92400e;  --tag-amber-bd: #f0e0b5;
  --tag-neutral-bg: #f3f3f1;--tag-neutral-fg: #4b4b50;--tag-neutral-bd: #e2e1dc;

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --mono: 'DM Mono', 'SF Mono', Menlo, monospace;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.wrap-prose { max-width: 680px; margin: 0 auto; padding: 0 32px; }

/* ---------- TOP NAV ---------- */
.topnav {
  border-bottom: 1px solid var(--rule);
  padding: 18px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.topnav .inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topnav a { color: var(--ink-soft); text-decoration: none; }
.topnav a:hover { color: var(--ink); }
.topnav .brand { color: var(--ink); font-weight: 500; }

/* ---------- TOP STRIP ---------- */
.top-strip {
  text-align: center;
  padding: 40px 24px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 28px 24px 56px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin-bottom: 24px;
  color: var(--ink);
}
.hero .subhead {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- ARTICLE HEADER (for /what-is-rlhf, /mercor-vs-outlier, etc.) ---------- */
.article-header {
  text-align: center;
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--rule);
}
.article-header .kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.article-header .kicker .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-faint);
}
.article-header h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 auto 20px;
  max-width: 720px;
  color: var(--ink);
}
.article-header .dek {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 20px;
  font-style: italic;
}
.article-header .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.article-header .meta .sep { opacity: 0.4; margin: 0 8px; }

/* ---------- STATS ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 8px 0 48px;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.stat .num {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.stat .label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- NOTIFY STRIP ---------- */
.notify-strip {
  background: var(--bg-subtle);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 56px;
}
.notify-strip-content { flex: 1; min-width: 0; }
.notify-strip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.notify-strip-title { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.notify-strip-prefix { font-family: var(--mono); color: var(--ink-faint); font-size: 12px; }
.notify-strip-desc { font-size: 13px; color: var(--ink-soft); }
.notify-strip-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }
.notify-btn {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 5px;
  border: 1px solid var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.notify-btn:hover { opacity: 0.85; }

/* ---------- SECTION ---------- */
section { padding: 0 24px 56px; }
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin-bottom: 20px;
  color: var(--ink);
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--ink);
}
p { margin-bottom: 14px; color: var(--ink-soft); font-size: 15px; }
p:last-child { margin-bottom: 0; }
p strong { color: var(--ink); font-weight: 600; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

/* ---------- PROSE (article body) ---------- */
.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.prose h2 {
  font-size: 30px;
  margin-top: 56px;
  margin-bottom: 16px;
  color: var(--ink);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 21px;
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--ink);
}
.prose p { font-size: 16px; line-height: 1.7; margin-bottom: 18px; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 22px 0; padding-left: 0; list-style: none; }
.prose li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 10px;
  padding-left: 22px;
  position: relative;
}
.prose ul > li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-faint);
  font-family: var(--mono);
}
.prose ol { counter-reset: ol-counter; }
.prose ol > li { counter-increment: ol-counter; }
.prose ol > li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 13px;
  top: 3px;
}
.prose blockquote {
  border-left: 2px solid var(--ink);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- COMPARISON TABLE ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  border: 1px solid var(--rule);
}
.compare th, .compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.55;
}
.compare th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg-subtle);
  font-weight: 500;
  border-right: 1px solid var(--rule);
}
.compare td {
  color: var(--ink-soft);
  border-right: 1px solid var(--rule);
}
.compare td:last-child, .compare th:last-child { border-right: none; }
.compare tr:last-child td { border-bottom: none; }
.compare .row-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg-subtle);
  font-weight: 500;
  width: 160px;
}

/* ---------- PLATFORM LIST ---------- */
.platforms { border-top: 1px solid var(--rule); margin-top: 24px; }
.platform-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.platform-name-cell { display: flex; flex-direction: column; gap: 8px; }
.platform-name { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); line-height: 1.2; }
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  width: fit-content;
}
.tag-purple { background: var(--tag-purple-bg); color: var(--tag-purple-fg); border: 1px solid var(--tag-purple-bd); }
.tag-red    { background: var(--tag-red-bg);    color: var(--tag-red-fg);    border: 1px solid var(--tag-red-bd); }
.tag-blue   { background: var(--tag-blue-bg);   color: var(--tag-blue-fg);   border: 1px solid var(--tag-blue-bd); }
.tag-green  { background: var(--tag-green-bg);  color: var(--tag-green-fg);  border: 1px solid var(--tag-green-bd); }
.tag-amber  { background: var(--tag-amber-bg);  color: var(--tag-amber-fg);  border: 1px solid var(--tag-amber-bd); }
.tag-neutral{ background: var(--tag-neutral-bg);color: var(--tag-neutral-fg);border: 1px solid var(--tag-neutral-bd); }
.platform-desc { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- CATEGORY LIST ---------- */
.category-list { margin-top: 24px; border-top: 1px solid var(--rule); }
.category-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.category-row .term {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.category-row .def { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 24px; border-top: 1px solid var(--rule); }
.faq-item { padding: 20px 4px; border-bottom: 1px solid var(--rule); }
.faq-item h3 { font-size: 17px; margin-bottom: 8px; }
.faq-item p { font-size: 14px; margin: 0; }

/* ---------- KEY TAKEAWAYS BOX ---------- */
.takeaways {
  background: var(--bg-subtle);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 26px;
  margin: 32px 0;
}
.takeaways .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.takeaways ul { margin: 0; }
.takeaways li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 8px;
}
.takeaways li:last-child { margin-bottom: 0; }

/* ---------- RELATED ROW ---------- */
.related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.related a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg-elev);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.related a:hover { border-color: var(--rule-strong); }
.related .kind {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.related .title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- TALLY ---------- */
.tally-section { padding: 24px 24px 40px; }
.tally-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 32px 28px;
  text-align: center;
}
.tally-card h2 { font-size: 24px; margin-bottom: 8px; }
.tally-card .lead { font-size: 14px; color: var(--ink-soft); max-width: 440px; margin: 0 auto 22px; }
.tally-placeholder {
  max-width: 380px;
  margin: 0 auto;
  padding: 22px 16px;
  border: 1px dashed var(--rule-strong);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 32px 24px 48px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
}
footer .sep { display: inline-block; margin: 0 10px; opacity: 0.4; }
footer a { color: var(--ink-faint); text-decoration: none; }
footer a:hover { color: var(--ink-soft); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .wrap, .wrap-prose { padding: 0 20px; }
  .platform-row, .category-row { grid-template-columns: 1fr; gap: 8px; }
  .notify-strip { flex-direction: column; align-items: flex-start; }
  .notify-btn { width: 100%; text-align: center; }
  .stats { gap: 12px; }
  .stat .num { font-size: 32px; }
  .related { grid-template-columns: 1fr; }
  .compare th, .compare td { padding: 12px 12px; font-size: 13.5px; }
  .compare .row-label { width: auto; }
}

/* ---------- ENTRANCE ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeIn 0.7s ease forwards;
}
.fade-in:nth-child(2) { animation-delay: 0.08s; }
.fade-in:nth-child(3) { animation-delay: 0.16s; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
