/* Headlines use a subset of Playfair Display (SIL Open Font License, see fonts/OFL.txt), renamed as the licence asks. */
@font-face { font-family: "Splurge Serif"; src: url("fonts/splurge-serif-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --bg: #faf8f5; --text: #232120; --muted: #6b6560; --accent: #8a6d3b; --line: #e5dfd6; --card: #fff;
  --notice-bg: #f3ede2; --on-accent: #fff; --shadow: 0 1px 2px rgba(35, 33, 32, .06), 0 6px 20px rgba(35, 33, 32, .07);
  --serif: "Splurge Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171514; --text: #ece7e1; --muted: #a39b92; --accent: #c9a96a; --line: #332f2b; --card: #1f1c1a; --notice-bg: #2a2520;
    --on-accent: #171514; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.65 Georgia, "Times New Roman", serif; }
header.site, footer.site, main.wide { max-width: 70rem; }
header.site, footer.site, main { margin: 0 auto; padding: 0 16px; }
main { max-width: 46rem; }
header.site { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
header.site a { color: var(--text); text-decoration: none; }
.brand { font: 500 1.45rem/1.2 var(--serif); letter-spacing: .01em; }
header.site nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
header.site nav a { font: 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; }
header.site nav a:hover { color: var(--accent); }
header.site nav svg { display: block; margin-top: -1px; }
@media (max-width: 420px) { header.site nav { gap: 6px 14px; } }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.18; }
h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: .35em 0 .3em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 .45em; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow, .meta, .label, .share { display: block; font: 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }
.meta, .share { text-transform: none; letter-spacing: 0; font-size: 14px; }
.eyebrow a { color: var(--accent); text-decoration: none; }
.lede { font-size: 1.2rem; color: var(--muted); }
.notice { background: var(--notice-bg); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 20px 0; font: 14px/1.5 var(--sans); }
.intro { padding: 20px 0 4px; max-width: 46rem; }
.intro .lede { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chips a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: 14px/1.2 var(--sans); text-decoration: none; }
.chips a:hover { border-color: var(--accent); }
.chips span { color: var(--muted); margin-left: 2px; }

.search input { width: 100%; max-width: 34rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: 17px/1.3 var(--sans); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#count { margin-top: 10px; }

/* Illustrations */
.hero { margin: 22px 0 6px; }
.hero-img, .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--notice-bg); }
.hero-img { border-radius: 10px; }
.hero figcaption { font: 12px/1.4 var(--sans); color: var(--muted); margin-top: 6px; }
img.product { max-width: 100%; height: auto; }

/* Cards */
.grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 24px; }
article .grid { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 18px; }
.card, .feature { display: flex; flex-direction: column; height: 100%; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover, .feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; flex: 1; }
.card-title { font: 500 1.2rem/1.25 var(--serif); }
.card:hover .card-title, .feature:hover .feature-title { color: var(--accent); }
.card-desc { font: 15px/1.5 var(--sans); color: var(--muted); }
.feature { margin-top: 20px; }
.feature .card-body { padding: 20px 22px 24px; gap: 10px; justify-content: center; }
.feature-title { font: 500 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--serif); }
.more { font: 600 14px/1 var(--sans); color: var(--accent); margin-top: 4px; }
@media (min-width: 760px) {
  .feature { display: grid; grid-template-columns: 1.5fr 1fr; }
  .feature .thumb { height: 100%; }
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 52px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; }
.section-head a { font: 14px/1 var(--sans); text-decoration: none; white-space: nowrap; }

/* Buttons and buy boxes */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font: 600 15px/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; box-shadow: var(--shadow);
  transition: filter .15s, transform .15s; }
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button .icon { flex: none; }
.button-secondary { background: transparent; color: var(--accent); box-shadow: none; }
.button-secondary:hover { background: var(--notice-bg); filter: none; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 28px 0; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); }
.buy-box p { margin: 0; }
.buy-info { min-width: 0; flex: 1 1 14rem; }
.product-name { font: 500 1.2rem/1.3 var(--serif); margin-top: 2px !important; }
.buy-box .rating { font: 14px/1.5 var(--sans); color: var(--muted); }
.buy-cta { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.buy-note { font: 12px/1.3 var(--sans); color: var(--muted); }
@media (max-width: 560px) { .buy-cta { width: 100%; } }

/* Reviews and guides */
.proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 32px; }
.proscons h2 { font-size: 1.15rem; }
.pick { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 6px; scroll-margin-top: 16px; }
.pick h2 { margin-top: .35em; }
.pick .label { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pick-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 13px/1 var(--sans); letter-spacing: 0; }
.pick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 18px 0 0; }
.glance { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px 4px; margin: 28px 0; }
.compare { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font: 15px/1.4 var(--sans); }
.compare th { text-align: left; font: 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.compare td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare tr:last-child td { border-bottom: 0; }
.compare td a:not(.button) { font: 500 16px/1.3 var(--serif); }
.compare td span { display: block; color: var(--muted); font-size: 13px; }
.compare .num { color: var(--accent); font-weight: 600; width: 1.5em; }
.compare .act { text-align: right; white-space: nowrap; }
.compare .button { padding: 8px 14px; font-size: 14px; box-shadow: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) {
  .compare thead { display: none; }
  .compare tr { display: grid; grid-template-columns: 1.6em 1fr; gap: 2px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .compare tr:last-child { border-bottom: 0; }
  .compare td { padding: 0; border: 0; }
  .compare td:nth-child(3), .compare .act { grid-column: 2; text-align: left; }
  .compare .act { margin-top: 8px; }
}
.share { margin: 32px 0 0; }

/* The buy bar that follows the reader on phones once the first buy box has scrolled away */
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); transform: translateY(110%); transition: transform .2s; }
.sticky-buy.show { transform: none; }
.sticky-name { min-width: 0; font: 14px/1.3 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-buy .button { flex: none; padding: 10px 16px; white-space: nowrap; }
@media (min-width: 760px) { .sticky-buy { display: none; } }

footer.site { margin-top: 64px; padding-top: 16px; padding-bottom: 88px; border-top: 1px solid var(--line); font: 14px/1.5 var(--sans); color: var(--muted); }
@media (min-width: 760px) { footer.site { padding-bottom: 32px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
