/* Shared site header and partner card styles. Loaded after page-specific styles. */
/* Unified guide header. Variables stay scoped to the header so page themes
   can keep their own values. This stylesheet is loaded on home and guides. */

.guide-header {
  --rr-header-color: #1e90ff;
  --rr-header-bg: linear-gradient(100deg, #1687e8 0%, #33a8f2 36%, #f6d95a 100%);
  --rr-header-text: #ffffff;
  --rr-yellow: #ffe066;
}

:root[data-theme="dark"] .guide-header {
  --rr-header-color: #08294d;
  --rr-header-bg: linear-gradient(90deg, #08294d 0%, #59480a 100%);
  --rr-header-text: #f8fbff;
  --rr-yellow: #f6d86b;
}

.guide-menu-toggle {
  display: none;
}

.guide-header {
  width: 100%;
  position: relative;
  background-color: var(--rr-header-color);
  background-image: var(--rr-header-bg);
  color: var(--rr-header-text);
  padding: 24px 24px 32px;
}

.guide-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding-right: 104px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--rr-header-text);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.55rem;
  line-height: 1.1;
  min-width: max-content;
}

.guide-brand img {
  width: 108px;
  height: 108px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(8, 38, 72, 0.25);
}

.guide-nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.guide-nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1.2;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.guide-nav-links a:focus,
.guide-nav-links a:hover {
  border-bottom-color: #fff;
}

.guide-nav-links a[aria-current="page"] {
  border-bottom-color: var(--rr-yellow);
}

.guide-theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--rr-header-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.guide-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
}

.guide-theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

@media print {
  .guide-header {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .guide-header {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .guide-header {
    padding: 16px 16px 22px;
  }

  .guide-nav {
    width: 100%;
    min-width: 0;
  }

  .guide-nav {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .guide-nav {
    flex-direction: column;
    gap: 18px;
    max-width: 100%;
    min-width: 0;
    padding-right: 0;
  }

  .guide-brand {
    gap: 14px;
    font-size: 1.35rem;
    max-width: 100%;
  }

  .guide-brand img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
  }

  .guide-nav-links {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .guide-nav-links a {
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.98rem;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .guide-nav-links a:focus,
  .guide-nav-links a:hover {
    border-color: #fff;
  }

  .guide-theme-toggle {
    top: 0;
    right: 0;
    min-height: 40px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .guide-header {
    padding: 16px 14px 24px;
  }

  .guide-nav {
    width: min(100%, 350px);
    max-width: 350px;
    margin-left: 0;
    margin-right: 0;
  }

  .guide-brand {
    font-size: 1.22rem;
    min-width: 0;
  }

  .guide-brand img {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }

  .guide-nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guide-nav-links a {
    justify-content: center;
    width: 100%;
  }

  .guide-theme-toggle {
    width: auto;
  }
}

@media (max-width: 720px) {
  .guide-nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .guide-brand img { width: 56px; height: 56px; border-radius: 14px; }
  .guide-brand { font-size: 1.15rem; }
  .guide-theme-toggle { position: static; order: 2; min-height: 44px; }
  .guide-menu-toggle { display: inline-flex; order: 1; min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; font: inherit; font-weight: 900; }
  .guide-nav-links { display: none; order: 3; width: 100%; }
  .guide-nav-links.is-open { display: grid; }
  .guide-header { padding: 12px 14px 18px; }
}

/* Partner product cards (rrp-). Anatomy:
   Reusable multi-network card pattern. Anatomy:
   article.rrp-card[data-merchant]
     .rrp-card-media > img[loading="lazy"][data-img-cover]
     .rrp-card-body: .rrp-merchant (.rrp-dot + "at <Merchant>"),
       .rrp-verdict (.rrp-verdict-deal variant), h3 title,
       .rrp-price (+ <time data-rrp-asof> stamp), a.rrp-cta (tracked merchant
       link), .rrp-likebar (More like this / Not for me), .rrp-disc
       (per-card "How we earn" disclosure -> /methodology).
   data-price-checked is optional and contains a record-backed check date.
   assets/home-app.js renders that date and can hide stale dated cards.
   Image rules for this component
   are enforced by scripts/image-budget-qa.js (npm run images:budget:qa). */
.rrp-fresh-picks { margin-top: 26px; }
.rrp-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.rrp-section-head h2 { margin: 0; font-size: 1.4rem; color: var(--rr-ink); }
.rrp-section-head span { color: var(--rr-muted); font-size: .92rem; }
.rrp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.rrp-card { background: var(--rr-surface); border: 1px solid var(--rr-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.rrp-card[hidden] { display: none; }
.rrp-card-media { aspect-ratio: 2 / 1; background: #fff; }
.rrp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rrp-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rrp-merchant { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--rr-ink); }
.rrp-dot { width: 22px; height: 22px; border-radius: 6px; background: #08294d; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; flex: none; }
.rrp-verdict { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; background: #e7f6ee; color: #0e7a3d; border: 1px solid #bfe6cf; }
.rrp-verdict-deal { background: #fff4cf; color: #7a5b00; border-color: #ecd27a; }
.rrp-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; color: var(--rr-ink); }
.rrp-price { font-size: 1.15rem; font-weight: 800; color: var(--rr-ink); }
.rrp-price small { color: var(--rr-muted); font-weight: 600; font-size: .75rem; }
.rrp-cta { margin-top: auto; background: #1687e8; color: #fff; text-align: center; text-decoration: none; font-weight: 800; padding: 11px; border-radius: 10px; }
.rrp-likebar { display: flex; gap: 8px; }
.rrp-likebar button { flex: 1; border: 1px solid var(--rr-line); background: var(--rr-surface); color: var(--rr-ink); border-radius: 8px; padding: 7px 6px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.rrp-likebar button[data-rrp-feedback="more"] { border-color: #1687e8; color: #1687e8; }
.rrp-likebar button[data-rrp-feedback="more"][aria-pressed="true"] { background: #1687e8; color: #fff; }
.rrp-disc { margin: 0; font-size: .72rem; color: var(--rr-muted); line-height: 1.45; }
.rrp-disc strong { color: var(--rr-ink); }
