/* RoxMag design system — Libre Franklin (headlines), Source Serif 4 (body), Source Sans 3 (UI)
   Noto Sans JP is listed as a fallback in every stack below so Japanese (CJK)
   text renders in a matching weight/rhythm instead of falling back to the
   browser's default system font — Libre Franklin/Source Serif/Source Sans
   don't cover Japanese glyphs. */

:root {
  --bg: #fff;
  --ink: #111;
  --amber: #D9711F;
  --teal: #1F6F5C;
  --border: #E5E5E5;
  --gray-2: #999;
  --gray-3: #666;
  --cream: #F1ECE3;
  --footer: #111;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Serif 4', 'Noto Sans JP', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
}
.ui, nav, button, .btn, .meta, .tabs, .breadcrumb, .masthead, .footer, label, .badge, .pill {
  font-family: 'Source Sans 3', 'Noto Sans JP', -apple-system, sans-serif;
}
h1, h2, h3, h4, .headline, .brand-word {
  font-family: 'Libre Franklin', 'Noto Sans JP', -apple-system, sans-serif;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.serif { font-family: 'Source Serif 4', 'Noto Sans JP', Georgia, serif; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 8px; }
.logo svg { width: 30px; height: 30px; flex-shrink: 0; }
.logo .wordmark { font-family: 'Libre Franklin', 'Noto Sans JP', sans-serif; font-weight: 900; font-size: 22px; letter-spacing: -0.02em; }
.logo .wordmark .rox { color: var(--amber); }
.logo .wordmark .mag { color: var(--ink); }
.footer .logo .wordmark .mag { color: #fff; }

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.masthead .row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.masthead .finder {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--gray-3);
  font-size: 14px;
  background: #fafafa;
}
.masthead .account { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.masthead .account a.signup { color: var(--amber); }

.category-nav {
  border-bottom: 1px solid var(--border);
}
.category-nav .row { display: flex; gap: 26px; overflow-x: auto; padding: 12px 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.category-nav a { white-space: nowrap; color: var(--gray-3); }
.category-nav a:hover, .category-nav a.active { color: var(--ink); }

.disclosure {
  background: #FAF6EF;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--gray-3);
  padding: 8px 0;
  text-align: center;
}
.disclosure a { text-decoration: underline; color: var(--gray-3); }

/* ---------- Homepage 3-col ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.rail h4 { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; color: var(--gray-3); border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.rail li:last-child { border-bottom: none; }
.rail .deal-price { color: var(--amber); font-weight: 700; }

.featured { }
.featured .collage { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; margin-bottom: 16px; }
.featured .collage .ph { background: var(--cream); border-radius: 4px; min-height: 220px; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-size: 12px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.featured .collage .stack { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; }
.featured .collage .stack .ph { min-height: 107px; }
.featured .kicker { color: var(--amber); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; margin-bottom: 8px; }
.featured h2 { font-size: 34px; }
.featured p.dek { color: var(--gray-3); font-size: 17px; }

/* ---------- Latest Guides grid ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 28px 0 6px; }
.section-head h3 { font-size: 22px; }
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 20px 0 40px; }
@media (max-width: 900px) { .guides-grid { grid-template-columns: 1fr; } }
.guide-card .ph { background: var(--cream); border-radius: 4px; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-size: 12px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; margin-bottom: 12px; }
.guide-card .cat-label { color: var(--amber); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; margin-bottom: 6px; }
.guide-card h4 { font-size: 19px; margin-bottom: 6px; }
.guide-card .meta { color: var(--gray-2); font-size: 12px; }

/* ---------- Browse by Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0 44px; }
@media (max-width: 900px) { .category-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .category-grid { grid-template-columns: 1fr; } }
.category-card { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 20px 22px; border-left: 4px solid var(--teal); transition: border-color .15s; }
.category-card:hover { border-color: var(--ink); border-left-color: var(--teal); }
.category-card h4 { font-size: 17px; margin-bottom: 6px; }
.category-card .meta { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 12px; color: var(--gray-2); }
.category-card.is-planned { border-left-color: var(--border); }
.category-card .meta.planned { color: var(--amber); font-style: italic; font-family: 'Source Serif 4', 'Noto Sans JP', Georgia, serif; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: #fff; padding: 48px 0 28px; margin-top: 20px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; padding-bottom: 30px; }
@media (max-width: 800px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h5 { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #999; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 5px 0; font-size: 14px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; color: #ddd; }
.footer .disclosure-block { border-top: 1px solid #333; padding-top: 20px; font-size: 12px; color: #999; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; line-height: 1.6; }

/* ---------- Breadcrumb / rule / H1 ---------- */
.breadcrumb { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 12px; color: var(--gray-3); padding: 18px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.breadcrumb a:hover { text-decoration: underline; }
.thick-rule { border: none; border-top: 5px solid var(--ink); margin: 10px 0 18px; }
.page-h1 { font-size: 46px; max-width: 900px; }
@media (max-width: 700px) { .page-h1 { font-size: 32px; } }

.byline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13px; color: var(--gray-3); padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.byline-row .badge { background: var(--amber); color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.byline-row .share { margin-left: auto; display: flex; gap: 10px; color: var(--gray-2); }

.hero-photo { background: var(--cream); border-radius: 4px; aspect-ratio: 21/9; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13px; margin-bottom: 4px; overflow: hidden; }
.hero-caption { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 11.5px; color: var(--gray-2); margin: 0 0 30px; }
.hero-caption a { color: var(--gray-3); }

/* ---------- Brand marks (real company logos, small — never a stand-in for product photography) ---------- */
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.brand-mark { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; border: 1px solid var(--border); background: #fff; padding: 3px; flex-shrink: 0; }
.brand-mark-sm { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; vertical-align: -4px; margin-right: 6px; background: #fff; }

/* ---------- Guide 2-col ---------- */
.guide-body-grid { display: grid; grid-template-columns: 1fr 300px; gap: 44px; }
@media (max-width: 900px) { .guide-body-grid { grid-template-columns: 1fr; } }
.guide-body-grid .intro p { margin: 0 0 1.2em; font-size: 18px; }
a.plink { color: var(--teal); font-weight: 600; border-bottom: 1px solid rgba(31,111,92,.35); }
a.plink:hover { border-bottom-color: var(--teal); }

.fyi-box { background: var(--cream); border-radius: 6px; padding: 20px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 14px; position: sticky; top: 20px; }
.fyi-box h5 { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: var(--gray-3); margin-bottom: 10px; }
.fyi-box p { margin: 0 0 10px; color: #333; }

.sections-bar { position: sticky; top: 0; z-index: 5; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 30px 0 0; }
.sections-bar .row { display: flex; align-items: center; gap: 22px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 600; padding: 12px 0; overflow-x: auto; }
.sections-bar .label { color: var(--gray-2); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.sections-bar a { white-space: nowrap; color: var(--gray-3); }
.sections-bar a:hover { color: var(--ink); }

/* ---------- Everything we recommend rows ---------- */
.everything { padding: 30px 0; border-bottom: 1px solid var(--border); }
.everything h2 { font-size: 26px; }
.rec-row { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.rec-row .ph { width: 70px; height: 70px; background: var(--cream); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-size: 9px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.rec-row .cat-label { color: var(--teal); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.rec-row h4 { font-size: 17px; margin: 4px 0; }
.rec-row .price-line { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13px; color: var(--gray-3); text-align: right; }
.rec-row .price-line .arrow { color: var(--amber); margin-left: 6px; }

/* ---------- How we tested (cream) ---------- */
.how-tested { background: var(--cream); border-radius: 8px; padding: 34px; margin: 34px 0; }
.how-tested h2 { font-size: 24px; }
.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
@media (max-width: 700px) { .criteria-grid { grid-template-columns: 1fr; } }
.criteria-grid .item h5 { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.criteria-grid .item p { font-size: 15px; color: #333; margin: 0; }

/* ---------- Pick cards ---------- */
.pick-card { border: 1px solid var(--border); border-radius: 8px; padding: 26px; margin-bottom: 22px; position: relative; display: grid; grid-template-columns: 200px 1fr 180px; gap: 24px; }
@media (max-width: 800px) { .pick-card { grid-template-columns: 1fr; } }
.pick-card.top-pick { border: 2px solid var(--teal); }
.pick-card .ribbon { position: absolute; top: -13px; left: 24px; background: var(--teal); color: #fff; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-weight: 700; font-size: 12px; padding: 4px 14px; border-radius: 3px; text-transform: uppercase; letter-spacing: .04em; }
.pick-card .ph { background: var(--cream); border-radius: 4px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-size: 11px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.pick-card h3 { font-size: 22px; margin-bottom: 8px; }
.pick-card .verdict { font-size: 15.5px; color: #222; }
.pick-card .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13px; }
.pick-card .pros-cons ul { margin: 4px 0 0; padding-left: 16px; }
.pick-card .pros-cons .pros { color: var(--teal); }
.pick-card .pros-cons .cons { color: #a33; }
.pick-card .cta-stack { display: flex; flex-direction: column; gap: 8px; }
.btn-cta { background: var(--ink); color: #fff; text-align: center; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-weight: 700; font-size: 14px; padding: 12px 16px; border-radius: 4px; }
.btn-cta:hover { background: #000; }
.btn-cta.secondary { background: #fff; color: var(--ink); border: 1px solid var(--ink); }

/* ---------- Competition / trust ---------- */
.competition, .trust { padding: 30px 0; border-bottom: 1px solid var(--border); }
.competition h2, .trust h2 { font-size: 24px; }
.comp-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comp-item h5 { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 15px; margin: 0 0 6px; }
.comp-item p { margin: 0; color: #333; font-size: 15px; }

/* ---------- Testing-status notice ---------- */
.status-notice { background: #FFF6EC; border: 1px solid #F0D8B8; border-radius: 6px; padding: 16px 20px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 13.5px; color: #6b4a1f; margin-bottom: 24px; }

/* ---------- Category page ---------- */
.tabs-row { display: flex; gap: 8px; padding: 16px 0; overflow-x: auto; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.tabs-row a { padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--gray-3); }
.tabs-row a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.cat-grid { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding: 20px 0 50px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr; } }
.refine { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.refine h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-3); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 10px; margin-top: 22px; }
.refine h4:first-child { margin-top: 0; }
.refine label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; cursor: pointer; }

.guide-list-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 600px) { .guide-list-row { grid-template-columns: 1fr; } }
.guide-list-row .ph { background: var(--cream); border-radius: 4px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: var(--gray-2); font-size: 10px; font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; }
.guide-list-row h3 { font-size: 20px; margin-bottom: 6px; }
.guide-list-row .dek { color: #333; font-size: 15px; margin-bottom: 8px; }
.guide-list-row .meta { font-family: 'Source Sans 3', 'Noto Sans JP', sans-serif; font-size: 12px; color: var(--gray-2); }

/* Push-notification opt-in banner (public/js/push-notifications.js) */
.roxmag-push-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-family: 'Source Sans 3', 'Noto Sans JP', -apple-system, sans-serif;
  font-size: 14px;
  animation: roxmag-push-banner-in .25s ease-out;
}
@keyframes roxmag-push-banner-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.roxmag-push-banner__text { flex: 1; line-height: 1.4; }
.roxmag-push-banner__allow {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.roxmag-push-banner__allow:hover { filter: brightness(1.08); }
.roxmag-push-banner__dismiss {
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.roxmag-push-banner__dismiss:hover { color: #fff; }
@media (max-width: 480px) {
  .roxmag-push-banner { left: 12px; right: 12px; max-width: none; }
}
