/* Site UI improvements — ricepuritytest-online.com (17 Oct 2026)
   Fix 5: mobile menu · Fix 6: accent contrast · Fix 7: minimum text size · Fix 8: compact quiz on phones */

/* ---------- Fix 6: accessible accent for small text & buttons; large display text keeps the brand orange ---------- */
:root { --accent: #984819; --accent-display: #C2622A; }
.nav-logo span, h1 em, .hero h1 em, .hero-stat-num, .sidebar-score-num, .age-score, .result-score-big, .fp-score { color: var(--accent-display); }
.fp-score { color: #fff; background: var(--accent-display); }

/* ---------- Fix 7: minimum 12px text, roomier footer links ---------- */
.cat-sidebar-title, .sidebar-score-label, .age-label, .country-label, .featured-label, .pc-read, .pch-read, .char-count { font-size: 12px !important; }
.tag { font-size: 12px !important; }
footer a { display: inline-block; padding: 6px 2px; }
footer p { line-height: 1.9; }

/* ---------- Fix 5: mobile menu ---------- */
.nav-toggle, .nav-cta-m { display: none; }
nav.nav-collapsed .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: 6px; border: 1px solid var(--warm, #F0EAE0); border-radius: 12px;
  background: transparent; color: var(--ink, #1A1208); font-size: 20px; line-height: 1; cursor: pointer;
}
nav.nav-collapsed .nav-toggle:focus-visible { outline: 3px solid #1A1208; outline-offset: 2px; }
nav.nav-collapsed { gap: 10px; }
nav.nav-collapsed .nav-logo { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
nav.nav-collapsed .nav-right { display: flex; align-items: center; margin-left: auto; flex-shrink: 0; }
nav.nav-collapsed .nav-cta-m {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 50px;
  background: var(--accent); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
nav.nav-collapsed.menu-open ul {
  display: flex !important; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
  margin: 0; padding: 8px 5vw 16px; list-style: none; background: var(--cream, #FAF7F2);
  border-bottom: 1px solid var(--warm, #F0EAE0); box-shadow: 0 12px 24px rgba(26,18,8,.08); z-index: 200;
}
nav.nav-collapsed.menu-open ul li { width: 100%; }
nav.nav-collapsed.menu-open ul a {
  display: flex; align-items: center; min-height: 48px; padding: 0 4px; font-size: 16px; color: var(--ink, #1A1208);
  border-bottom: 1px solid var(--warm, #F0EAE0); text-decoration: none;
}
nav.nav-collapsed.menu-open ul li:last-child a { border-bottom: 0; }
nav.nav-collapsed.menu-open ul a.nav-cta { justify-content: center; margin-top: 10px; border-radius: 50px; color: #fff !important; }
@media (max-width: 420px) {
  nav.nav-collapsed { padding-left: 4vw; padding-right: 4vw; gap: 8px; }
  nav.nav-collapsed .nav-logo { font-size: 16px; }
  nav.nav-collapsed .nav-toggle { width: 40px; height: 40px; margin-left: 6px; font-size: 18px; }
  nav.nav-collapsed .nav-score-pill { padding: 5px 10px !important; font-size: 12px !important; }
  nav.nav-collapsed .nav-score-pill .nav-score-val { font-size: 15px !important; }
  nav.nav-collapsed .nav-cta-m { height: 34px; padding: 0 11px; font-size: 12.5px; }
}
@media (max-width: 370px) {
  nav.nav-collapsed .nav-logo { font-size: 15px; }
}
@media (max-width: 340px) {
  nav.nav-collapsed .nav-logo { font-size: 12.5px !important; }
  nav.nav-collapsed .nav-score-pill { padding: 5px 8px !important; }
  nav.nav-collapsed .nav-cta-m { padding: 0 9px; font-size: 12px; }
}

/* ---------- Fix 8: compact quiz on phones + start button ---------- */
.start-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; padding: 12px 26px; border-radius: 50px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background .2s;
}
.start-btn:hover { background: var(--ink, #1A1208); }
.start-btn:focus-visible { outline: 3px solid #1A1208; outline-offset: 3px; }
#mainContent { scroll-margin-top: 130px; }
@media (max-width: 600px) {
  nav { transition: transform .2s ease; }
  body.nav-up nav { transform: translateY(-100%); }
  .sticky-bar { transition: top .2s ease; }
  body.nav-up .sticky-bar { top: 0 !important; }
  .sticky-bar { padding-top: 6px !important; padding-bottom: 6px !important; }
  .sticky-bar .score-bubble { width: 40px !important; height: 40px !important; font-size: 15px !important; }
  #mainContent { scroll-margin-top: 70px; }
}
@media (prefers-reduced-motion: reduce) { nav, .sticky-bar { transition: none !important; } }


/* ---------- Fix 11: related articles (17 Oct 2026) ---------- */
.related-posts { margin: 44px 0 28px; }
.related-posts h2 { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 900; color: var(--ink, #1A1208); margin: 0 0 16px; }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rp-card { display: flex; flex-direction: column; background: var(--card, #fff); border: 1px solid var(--warm, #F0EAE0); border-radius: 14px; overflow: hidden; text-decoration: none !important; color: var(--ink, #1A1208) !important; transition: transform .2s, box-shadow .2s; }
.rp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(26,18,8,.08); }
.rp-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: 0 !important; border-radius: 0 !important; }
.rp-title { display: block; padding: 12px 14px 6px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.rp-more { display: block; margin-top: auto; padding: 0 14px 14px; font-size: 13px; font-weight: 600; color: var(--accent); }
.rp-card:focus-visible { outline: 3px solid #1A1208; outline-offset: 2px; }
@media (max-width: 700px) {
  .rp-grid { grid-template-columns: 1fr; gap: 12px; }
  .rp-card { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto 1fr; }
  .rp-card img { grid-row: 1 / span 2; height: 100%; aspect-ratio: auto; }
  .rp-title { padding: 10px 12px 4px; font-size: 14px; }
  .rp-more { padding: 0 12px 10px; }
}

/* Bug fix: end-of-post CTA heading was dark on the dark box (17 Oct 2026) */
.cta-box h3 { color: #fff; }

/* ---------- Fix 12: score-range guides ---------- */
.result-guide { display: inline-flex; align-items: center; min-height: 44px; margin: -16px 0 32px; padding: 0 22px; border: 1.5px solid var(--accent); border-radius: 50px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.result-guide:hover { background: var(--accent); color: #fff; }
.result-guide:focus-visible { outline: 3px solid #1A1208; outline-offset: 3px; }
.quick-facts { list-style: none !important; margin: 24px 0 !important; padding: 18px 22px !important; background: #fff; border: 1px solid var(--warm, #F0EAE0); border-left: 4px solid var(--accent); border-radius: 12px; }
.quick-facts li { margin: 6px 0; }
.range-list li { margin: 6px 0; }

/* ---------- Fix 15/16: featured badge + sources ---------- */
.featured-post .fp-score { top: 20px !important; bottom: auto !important; }
.sources li { margin: 6px 0; font-size: 15px; }
.sources-note { font-size: 14px; color: var(--muted, #6b5d4f); }

/* ---------- Fix 14: quick answer, key takeaways, tables ---------- */
.quick-answer { margin: 28px 0 8px; padding: 18px 22px; background: #FBF1E8; border-left: 4px solid var(--accent); border-radius: 12px; }
.quick-answer p { margin: 0; }
.quick-answer .qa-label { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.key-takeaways { margin: 20px 0 28px; padding: 18px 22px; background: #fff; border: 1px solid var(--warm, #F0EAE0); border-radius: 12px; }
.key-takeaways h2 { margin-top: 0 !important; font-size: 20px !important; }
.key-takeaways ul { margin: 0; padding-left: 20px; }
.key-takeaways li { margin: 6px 0; }
.table-wrap { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 420px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--warm, #F0EAE0); vertical-align: top; }
.data-table thead th { background: #1A1208; color: #FAF7F2; font-weight: 600; }
.data-table tbody tr:nth-child(even) { background: #FBF7F1; }
