/* --- Custom Properties (Light Mode) --- */
:root {
  --color-bg: #ffffff;
  --color-surface: #f9fafb;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #d1d5db;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-danger: #dc2626;
  --color-success: #16a34a;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111827;
    --color-surface: #1f2937;
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
    --color-border: #374151;
    --color-primary: #3b82f6;
    --color-primary-hover: #60a5fa;
    --color-accent: #f59e0b;
    --color-accent-hover: #fbbf24;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.3);
  }
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 1rem; }
.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}
.main-nav a:hover { color: var(--color-primary); }

.search-form { margin-left: auto; }
.search-form input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.875rem;
  width: 200px;
}
.search-form input:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }

/* Main */
.main-content { padding: 2rem 1rem; min-height: 60vh; }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
}
.hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.hero p { color: var(--color-text-muted); font-size: 1.125rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 0.9375rem;
  transition: background 0.15s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: var(--color-accent); color: #111827; }
.btn-secondary:hover { background: var(--color-accent-hover); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.0625rem; }

/* Sections */
.section { margin-bottom: 2.5rem; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.section-header h1, .section-header h2 { font-size: 1.5rem; font-weight: 700; }
.section-link { color: var(--color-primary); text-decoration: none; font-weight: 500; font-size: 0.875rem; }
.section-link:hover { text-decoration: underline; }
.section-subtitle { color: var(--color-text-muted); margin-top: 0.25rem; }

/* Deal Grid */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}

/* Cards are anchors, so every child is inline by default -- the spans are made
   block here rather than in the markup. */
.deal-card {
  position: relative;
  display: flex;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.deal-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* The accent rule is what stops a grid of text-only cards reading as a wall. */
.deal-accent {
  flex-shrink: 0;
  width: 4px;
  background: linear-gradient(var(--color-primary), var(--color-accent));
}

.deal-body {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  padding: 1rem 1.125rem;
  flex: 1;
}

.deal-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.deal-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.deal-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.deal-cta {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  margin-top: auto;
  padding-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.deal-card:hover .deal-cta .icon { transform: translateX(3px); }
.deal-cta .icon { transition: transform 0.15s ease; }

.deal-category {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Bounties */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.offer-card {
  display: flex;
  gap: 0.875rem;
  padding: 1.125rem;
  text-decoration: none;
  color: inherit;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.offer-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.offer-mark {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: #111827;
  font-size: 1.25rem;
  font-weight: 800;
}

.offer-body { display: flex; flex-direction: column; gap: 0.3125rem; flex: 1; }

.offer-provider {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.offer-title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.offer-desc { font-size: 0.875rem; line-height: 1.55; color: var(--color-text-muted); }
.offer-fine { font-size: 0.75rem; color: var(--color-text-muted); }

/* Category Chips */
.category-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.category-chip {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s;
}
.category-chip:hover, .category-chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Detail Page */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
}

.detail-image {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-image img { max-width: 100%; max-height: 400px; object-fit: contain; }

.detail-info { display: flex; flex-direction: column; gap: 1rem; }
.detail-info h1 { font-size: 1.75rem; font-weight: 700; }
.detail-desc { font-size: 1rem; color: var(--color-text-muted); line-height: 1.6; }
.detail-price { font-size: 2rem; }
.detail-badge { font-size: 0.875rem; padding: 0.25rem 0.5rem; }
.detail-pricing { margin: 0.5rem 0; }
.deal-expiry { font-size: 0.8125rem; color: var(--color-text-muted); }

.offer-icon-lg { width: 64px; height: 64px; font-size: 2rem; border-radius: 16px; }
.offer-provider { font-size: 0.875rem; color: var(--color-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.offer-payout-lg { font-size: 1.5rem; font-weight: 700; color: var(--color-accent); }
.offer-desc { font-size: 1rem; color: var(--color-text-muted); line-height: 1.6; }

/* Filter Form */
.filter-form { display: flex; gap: 0.5rem; align-items: center; }
.filter-form input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.875rem;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}
.affiliate-disclosure {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: var(--color-text-muted); text-decoration: none; font-size: 0.8125rem; }
.footer-links a:hover { color: var(--color-primary); }

/* --- Affiliate disclosure ------------------------------------------------ */
/* Shown next to the paid links themselves, not only in the footer, so the
   material connection is disclosed where the reader acts on it. */
.link-disclosure {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  max-width: 60ch;
}

.deal-cta {
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.footer-legal {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* --- Long-form pages (privacy policy) ------------------------------------ */
.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.prose h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.prose h2 { font-size: 1.125rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.prose p { margin-bottom: 0.875rem; line-height: 1.65; color: var(--color-text); }
.prose a { color: var(--color-primary); }

.prose-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* --- Contact form -------------------------------------------------------- */
.contact-section { max-width: 40rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

.field { display: flex; flex-direction: column; gap: 0.375rem; }

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.field .optional { font-weight: 400; color: var(--color-text-muted); }

.field input,
.field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
}

.field textarea { resize: vertical; min-height: 8rem; }

.field-error { font-size: 0.8125rem; color: var(--color-danger); }

.form-errors {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: 8px;
}

.form-success {
  padding: 1.5rem;
  border: 1px solid var(--color-success);
  border-radius: 12px;
  background-color: var(--color-surface);
}

.form-success h2 { font-size: 1.125rem; margin-bottom: 0.375rem; }
.form-success p { font-size: 0.9375rem; color: var(--color-text-muted); }

.form-note { font-size: 0.8125rem; color: var(--color-text-muted); }
.form-note a { color: var(--color-primary); }

/* Honeypot: removed from view and from the accessibility tree, but still a
   real focusable text input in the DOM for bots to fill in. Not display:none
   -- some bots skip fields they can tell are hidden that way. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Daily operations page (staff only) ---------------------------------- */
.ops-page { max-width: 52rem; margin: 0 auto; padding-bottom: 3rem; }

.ops-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ops-header h1 { font-size: 1.625rem; font-weight: 700; }
.ops-lede { font-size: 0.9375rem; color: var(--color-text-muted); max-width: 46ch; margin-top: 0.375rem; }

.ops-summary {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  border-left-width: 4px;
  margin-bottom: 2rem;
}

.ops-summary h2 { font-size: 1.125rem; font-weight: 700; }
.ops-summary p { font-size: 0.9375rem; color: var(--color-text-muted); margin-top: 0.25rem; }
.ops-summary-ok { border-left-color: var(--color-success); }
.ops-summary-attention { border-left-color: var(--color-primary); }
.ops-summary-blocked { border-left-color: var(--color-danger); }

.ops-generated { font-size: 0.75rem; margin-top: 0.75rem; }

.ops-group { margin-bottom: 2.25rem; }
.ops-group h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.25rem; }
.ops-blurb { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; max-width: 60ch; }

.ops-checks { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.ops-check {
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background-color: var(--color-surface);
}

.ops-check-head { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.ops-check-title { font-size: 0.9375rem; font-weight: 600; }

.ops-badge,
.ops-cadence {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.1875rem 0.4375rem;
  border-radius: 5px;
  flex-shrink: 0;
}

/* Status is never colour alone -- each badge carries its own word, so the page
   still reads correctly in greyscale or with a colour vision deficiency. */
.ops-badge-ok { background-color: var(--color-success); color: #fff; }
.ops-badge-attention { background-color: var(--color-primary); color: #fff; }
.ops-badge-blocked { background-color: var(--color-danger); color: #fff; }
.ops-cadence { background-color: var(--color-border); color: var(--color-text); }

.ops-count {
  margin-left: auto;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ops-detail { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.375rem; line-height: 1.55; }

.ops-action {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.ops-rules, .ops-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.ops-rules li, .ops-links li { font-size: 0.875rem; line-height: 1.55; padding-left: 1rem; position: relative; }
.ops-rules li::before, .ops-links li::before { content: "--"; position: absolute; left: 0; color: var(--color-text-muted); }
.ops-links a { color: var(--color-primary); font-weight: 600; }

.ops-check code, .ops-blurb code, .ops-rules code {
  font-size: 0.8125rem;
  padding: 0.0625rem 0.25rem;
  border-radius: 4px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
}

/* --- Ops goals ----------------------------------------------------------- */
.ops-goal {
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background-color: var(--color-surface);
  margin-bottom: 1rem;
}

.ops-goal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.ops-goal-head h4 { font-size: 1rem; font-weight: 700; }
.ops-goal-summary { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.1875rem; max-width: 52ch; }

.ops-goal-progress { display: flex; align-items: center; gap: 0.5rem; }
.ops-goal-fraction { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ops-bar {
  height: 6px;
  border-radius: 3px;
  background-color: var(--color-border);
  overflow: hidden;
  margin: 0.875rem 0;
}

.ops-bar-fill { height: 100%; background-color: var(--color-success); }

.ops-next { font-size: 0.875rem; margin-bottom: 0.875rem; }
.ops-next-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background-color: var(--color-primary);
  color: #fff;
  margin-right: 0.375rem;
}

.ops-steps { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.ops-step { display: flex; gap: 0.625rem; font-size: 0.875rem; line-height: 1.5; }

/* The mark carries a literal X, so completion never depends on colour or on a
   background image failing to load. */
.ops-step-mark {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.ops-step-done .ops-step-mark {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.ops-step-body { display: flex; flex-direction: column; }
.ops-step-done .ops-step-text { color: var(--color-text-muted); text-decoration: line-through; }
.ops-step-detail { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.125rem; }

.ops-auto-tag {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.0625rem 0.3125rem;
  border-radius: 4px;
  background-color: var(--color-border);
  color: var(--color-text-muted);
  margin-left: 0.25rem;
  vertical-align: middle;
}

.ops-goal-detail { margin-top: 1rem; }
.ops-goal-detail summary {
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-primary);
}
.ops-goal-body { font-size: 0.875rem; line-height: 1.65; margin-top: 0.625rem; max-width: 68ch; }
.ops-goal-body p { margin-bottom: 0.75rem; color: var(--color-text-muted); }

/* --- Icons ---------------------------------------------------------------- */
/* Stroke-only sprite symbols, so they inherit currentColor and need no
   light/dark variants. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-sm { width: 0.9375rem; height: 0.9375rem; }
.icon-lg { width: 1.75rem; height: 1.75rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 1rem 3rem;
  margin-bottom: 2.5rem;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(60rem 20rem at 50% -6rem,
      color-mix(in srgb, var(--color-primary) 16%, transparent), transparent),
    var(--color-surface);
  border: 1px solid var(--color-border);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hero h1 {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0.875rem;
}

.hero-em {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 46ch;
  margin: 0 auto 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.hero .link-disclosure { margin-top: 1.5rem; font-size: 0.75rem; }

/* --- Category chips ------------------------------------------------------- */
.category-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.category-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }

.category-chip.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Respect a reduced-motion preference: the lift and arrow nudge are decorative,
   and motion sensitivity is not a reason to lose the interface. */
@media (prefers-reduced-motion: reduce) {
  .deal-card, .offer-card, .deal-cta .icon { transition: none; }
  .deal-card:hover, .offer-card:hover { transform: none; }
  .deal-card:hover .deal-cta .icon { transform: none; }
}

/* --- Guides --------------------------------------------------------------- */
.guide { max-width: 44rem; margin: 0 auto; }

.guide-head { margin-bottom: 1.5rem; }
.guide-head h1 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.guide-reviewed { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* The answer block leads the page and is visually unmistakable, because it is
   the part a reader arriving mid-task needs and the part that gets quoted. */
.guide-answer {
  padding: 1.25rem 1.375rem;
  margin-bottom: 1.75rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  background-color: var(--color-surface);
}

.guide-question {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.guide-answer-body p { font-size: 1.0625rem; line-height: 1.6; font-weight: 500; }
.guide-answer-body p + p { margin-top: 0.625rem; }

.guide-body p { font-size: 1rem; line-height: 1.7; margin-bottom: 0.875rem; }

.guide-toc {
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.guide-toc-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.guide-toc ol { margin: 0; padding-left: 1.125rem; }
.guide-toc li { font-size: 0.875rem; margin-bottom: 0.25rem; }
.guide-toc a { color: var(--color-primary); }

.guide-section { margin-bottom: 2.25rem; scroll-margin-top: 5rem; }
.guide-section h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.guide-lead { font-size: 1rem; line-height: 1.65; font-weight: 500; margin-bottom: 0.875rem; }

/* --- The pick, inside a section ------------------------------------------- */
.pick {
  padding: 1.125rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--color-accent) 10%, transparent), transparent) ,
    var(--color-surface);
}

.pick-head { display: flex; align-items: center; gap: 0.4375rem; margin-bottom: 0.5rem; }

.pick-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-hover);
}

.pick-title { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.pick-why { font-size: 0.9375rem; line-height: 1.6; color: var(--color-text-muted); margin: 0.375rem 0 0.875rem; }

.pick-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5625rem 1rem;
  border-radius: 8px;
  background-color: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
}

.pick-cta:hover { background-color: var(--color-primary-hover); }
.pick-cta .icon { transition: transform 0.15s ease; }
.pick-cta:hover .icon { transform: translateX(3px); }

/* --- Guide index and interlinking ----------------------------------------- */
.cluster { margin-bottom: 2rem; }
.cluster-pillar { font-size: 1.1875rem; font-weight: 700; }
.cluster-pillar a { color: var(--color-text); text-decoration: none; }
.cluster-pillar a:hover { color: var(--color-primary); }
.cluster-question { font-size: 0.875rem; color: var(--color-text-muted); margin: 0.1875rem 0 0.75rem; }

.cluster-children { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--color-border); }
.cluster-children li { display: flex; flex-direction: column; }
.cluster-children a { font-size: 0.9375rem; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.cluster-children span { font-size: 0.8125rem; color: var(--color-text-muted); }

.guide-related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.guide-related h2 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.75rem; }
.guide-related-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.guide-related-list li { display: flex; flex-direction: column; }
.guide-related-list a { font-size: 0.9375rem; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.guide-related-list span { font-size: 0.8125rem; color: var(--color-text-muted); }

.guide-uplink { margin-top: 1.25rem; font-size: 0.875rem; color: var(--color-text-muted); }
.guide-uplink a { color: var(--color-primary); }

@media (prefers-reduced-motion: reduce) {
  .pick-cta .icon { transition: none; }
  .pick-cta:hover .icon { transform: none; }
}
