/* SoloBrief brand CSS — off-white background, amber accent, Lora serif headings */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg-primary: #FAFAF8;
  --bg-secondary: #F5F3EF;
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A47;
  --text-muted: #6B6B67;
  --accent: #E8A045;
  --accent-hover: #C8852F;
  --accent-light: #FEF3E2;
  --border: #E8E6E1;
  --border-strong: #D4D0C8;
  --max-content: 700px;
  --radius: 6px;
}

/* ── Base ────────────────────────────────────────────────── */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: 2rem; line-height: 1.25; }
h2 { font-size: 1.45rem; line-height: 1.3; margin-top: 2.2rem; }
h3 { font-size: 1.2rem; line-height: 1.35; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── PaperMod header/nav overrides ───────────────────────── */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.logo a, .logo span {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  color: var(--text-primary);
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Article body ────────────────────────────────────────── */
.post-content {
  max-width: var(--max-content);
  color: var(--text-primary);
  font-size: 1.02rem;
  line-height: 1.75;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.93rem;
}

.post-content th {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.post-content td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
  color: var(--text-secondary);
}

.post-content tr:nth-child(even) td {
  background: var(--bg-secondary);
}

/* Highlight the recommended product column */
.post-content td:nth-child(2),
.post-content th:nth-child(2) {
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* ── Verdict / Quick Summary Box ─────────────────────────── */
.verdict-box {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.75rem 0;
}

.verdict-box strong {
  color: var(--accent-hover);
}

.verdict-box table {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.verdict-box th, .verdict-box td {
  background: transparent;
  border-color: #E8C590;
  padding: 0.45rem 0.65rem;
}

/* ── Affiliate disclosure bar ────────────────────────────── */
.affiliate-disclosure {
  background: var(--bg-secondary);
  border-left: 3px solid var(--border-strong);
  padding: 0.7rem 1rem;
  margin: 0 0 1.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ── Affiliate CTA button ────────────────────────────────── */
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.5rem 0;
  transition: background 0.18s ease;
  letter-spacing: 0.01em;
}

.cta-button:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* ── Info / tip callout ──────────────────────────────────── */
.callout-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

/* ── Star rating ─────────────────────────────────────────── */
.star-rating {
  color: var(--accent);
  font-size: 1.05em;
}

/* ── Home page hero (PaperMod homeInfoParams) ────────────── */
.home-info-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.25rem;
}

.home-info-container h1 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

/* ── Post list cards ─────────────────────────────────────── */
.post-entry {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}

.post-entry:hover {
  border-color: var(--accent);
}

.post-entry .entry-header h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* ── Tags ────────────────────────────────────────────────── */
.post-tags a {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Newsletter signup widget ────────────────────────────── */
.newsletter-cta {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0 1.5rem;
  max-width: var(--max-content);
}

.newsletter-cta h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.newsletter-cta p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ── Sticky Table of Contents (desktop sidebar) ─────────── */
@media (min-width: 1280px) {
  /* Pull ToC out of content flow into left gutter */
  .post-single .toc {
    position: sticky;
    top: 4.5rem;
    float: left;
    clear: left;
    width: 210px;
    /* Shift left: past content left edge + gap */
    margin-left: calc(-210px - 2rem);
    margin-right: 0;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    /* Keep it visible when open */
    z-index: 10;
  }

  .post-single .toc summary {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    cursor: default;
    list-style: none;
    margin-bottom: 0.5rem;
  }

  /* Force open on desktop — redundant closed state isn't useful on sidebar */
  .post-single .toc[open] summary::before { content: none; }

  .post-single .toc ul {
    padding-left: 0.75rem;
    margin: 0;
  }

  .post-single .toc li {
    margin-bottom: 0.25rem;
  }

  .post-single .toc a {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-decoration: none;
    line-height: 1.45;
    display: block;
  }

  .post-single .toc a:hover {
    color: var(--accent);
  }

  /* Active section highlight — set by scroll observer JS */
  .post-single .toc a.toc-active {
    color: var(--accent);
    font-weight: 600;
  }
}

/* ── Accordion ───────────────────────────────────────────── */
.sb-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.25rem 0;
  overflow: hidden;
}

.sb-accordion-title {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.93rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.sb-accordion-title::before {
  content: "+";
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.sb-accordion[open] .sb-accordion-title::before {
  content: "-";
}

.sb-accordion-body {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.sb-accordion-body table {
  margin: 0.5rem 0;
}

/* ── YouTube Lite Embed ──────────────────────────────────── */
.yt-lite {
  position: relative;
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
  aspect-ratio: 16 / 9;
  background: #000 center / cover no-repeat;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.yt-lite iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.18);
  transition: background 0.15s;
}

.yt-lite:hover .yt-overlay {
  background: rgba(0,0,0,0.08);
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.92;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}

.yt-lite:hover .yt-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

.yt-title {
  position: absolute;
  bottom: 0.75rem;
  left: 0.9rem;
  right: 0.9rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* ── Pros / Cons Grid ────────────────────────────────────── */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
}

.pros-block,
.cons-block {
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.pros-block {
  background: #f0faf2;
  border: 1px solid #b7dfc0;
}

.cons-block {
  background: #fdf6f0;
  border: 1px solid #f0cca8;
}

.pros-title {
  color: #2d7a46;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  font-family: inherit;
}

.cons-title {
  color: #b85c1a;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  font-family: inherit;
}

.pros-block ul,
.cons-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.pros-block li,
.cons-block li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.pros-block li::marker { color: #2d7a46; }
.cons-block li::marker { color: #b85c1a; }

/* ── FAQ Section ─────────────────────────────────────────── */
.faq-section {
  margin: 2rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
}

.faq-a {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.65;
}

/* ── Tables: horizontal scroll on overflow ───────────────── */
.post-content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  .post-content table {
    font-size: 0.82rem;
  }

  .post-content th,
  .post-content td {
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
  }

  .verdict-box {
    padding: 0.9rem 1rem;
  }

  .verdict-box th,
  .verdict-box td {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
  }

  .home-info-container {
    padding: 1.25rem 1.1rem;
  }

  .home-info-container h1 {
    font-size: 1.35rem;
  }

  .sb-accordion-body {
    padding: 0.75rem 0.85rem 0.9rem;
  }

  .cta-button {
    display: block;
    text-align: center;
  }

  .newsletter-cta {
    padding: 1.1rem 1rem;
  }

}

/* ── Verdict box: ensure it never overflows on narrow screens ── */
.verdict-box {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
}

.verdict-box table {
  min-width: 0;
  width: 100%;
}

/* ── Secondary / outline CTA button ─────────────────────────── */
.cta-button-outline {
  display: inline-block;
  background: transparent;
  color: var(--accent) !important;
  border: 2px solid var(--accent);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.5rem 0;
  transition: background 0.18s ease, color 0.18s ease;
  letter-spacing: 0.01em;
}

.cta-button-outline:hover {
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
}

/* ── Blockquote ──────────────────────────────────────────────── */
.post-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  margin: 1.75rem 0;
  padding: 0.9rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.98rem;
}

.post-content blockquote p {
  margin: 0;
}

/* ── Inline code ─────────────────────────────────────────────── */
.post-content code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.12em 0.38em;
  font-size: 0.88em;
  color: var(--text-primary);
  word-break: break-word;
}

/* Don't double-style code inside pre blocks */
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.post-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

/* ── Heading anchor hover links ──────────────────────────────── */
.post-content h2[id],
.post-content h3[id] {
  position: relative;
}

.post-content h2[id]:hover::after,
.post-content h3[id]:hover::after {
  content: " #";
  color: var(--accent);
  font-size: 0.75em;
  font-weight: 400;
  opacity: 0.7;
  font-family: monospace;
}

/* ── Focus-visible states (keyboard navigation) ──────────────── */
a:focus-visible,
.cta-button:focus-visible,
.cta-button-outline:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove default focus ring for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── Skip-to-content link (accessibility) ────────────────────── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
}

.skip-to-content:focus {
  top: 0;
}

/* ── Reading progress bar ────────────────────────────────────── */
#sb-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9998;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Article header / meta bar ───────────────────────────────── */
.post-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.post-meta a {
  color: var(--text-muted);
  text-decoration: underline;
}

.post-meta a:hover {
  color: var(--accent);
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
  #sb-progress,
  .header,
  .footer,
  .toc,
  .newsletter-cta,
  .affiliate-disclosure,
  nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .post-content {
    max-width: 100%;
  }

  h1, h2, h3 {
    color: #000;
    page-break-after: avoid;
  }

  .cta-button,
  .cta-button-outline {
    display: inline;
    border: none;
    background: none;
    color: #000 !important;
    padding: 0;
    font-weight: normal;
    font-size: inherit;
  }

  /* Show URLs after links in print */
  .cta-button::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }

  .verdict-box {
    border: 1px solid #999;
    background: #f5f5f5;
  }

  img {
    max-width: 100%;
  }
}

/* ============================================================
   Homepage enhancements (2026-05-31): trust strip + browse-by-type
   ============================================================ */

.home-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0;
  max-width: var(--max-content);
  margin: 0.5rem auto 1.5rem;
  padding: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: center;
}

.home-trust li {
  display: inline-flex;
  align-items: center;
}

.home-trust li:not(:first-child)::before {
  content: "\00B7";
  margin: 0 0.9rem;
  color: var(--border-strong);
}

.home-browse {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: var(--max-content);
  margin: 1.75rem auto 0;
}

.browse-card {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.browse-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.06);
}

.browse-card strong {
  display: block;
  font-family: "Lora", Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.browse-card:hover strong {
  color: var(--accent-hover);
}

.browse-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 560px) {
  .home-browse {
    grid-template-columns: 1fr;
  }
}
