@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/bricolage-grotesque-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/bricolage-grotesque-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/bricolage-grotesque-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/assets/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --canvas: #f7f5ee;
  --paper: #fffdf8;
  --ink: #203028;
  --muted: #58635a;
  --rule: #d7dacf;
  --forest: #254537;
  --soft-green: #e6ede2;
  --accent: #a43f29;
  --accent-hover: #87311f;
  --text-muted: var(--muted);
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: var(--font-body);
  --serif: var(--font-display);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --page: 74rem;
  --radius: 0.4rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  color: var(--ink);
  background: var(--canvas);
  font: 100%/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.75rem;
}

body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, p, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
a { color: var(--forest); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus { position: fixed; top: .75rem; left: .75rem; z-index: 5; padding: .6rem 1rem; background: var(--paper); }

.header-inner, .home-hero-banner, .article-hero-inner, .main-wrapper, .footer-inner, .footer-bottom {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  min-width: 0;
  margin-inline: auto;
}

.site-header { position: sticky; top: 0; z-index: 3; background: var(--canvas); border-bottom: 1px solid var(--rule); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.75rem; }
.header-inner { min-height: 4.25rem; padding-block: .55rem; }
.brand-link { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1.12rem; font-weight: 700; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-content: center; gap: 3px; width: 1.7rem; height: 1.7rem; border-radius: .28rem; background: var(--forest); }
.brand-mark::before, .brand-mark::after { content: ''; display: block; width: .85rem; height: 2px; border-radius: 1px; background: var(--paper); transform: rotate(-12deg); }
.brand-mark::after { width: .62rem; }
.header-nav, .footer-nav { display: flex; gap: .35rem clamp(.8rem, 3vw, 2rem); flex-wrap: wrap; }
.header-nav a, .footer-nav a { color: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-nav a { padding-block: .55rem; }
.header-nav a:hover, .footer-nav a:hover { text-decoration: underline; }

.home-hero-banner {
  padding-block: clamp(2.6rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(1.8rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
}

h1, h2, .guide-item-card h3 { font-family: var(--serif); font-weight: 800; letter-spacing: -0.03em; }
.home-hero-banner h1 { font-size: clamp(3.2rem, 6.8vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em; }
.home-hero-banner h1 em { color: var(--accent); }
.home-hero-copy p { max-width: 35ch; margin: 1.5rem 0 1.75rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); }
.home-hero-image, .guide-image { width: 100%; height: auto; object-fit: cover; background: var(--soft-green); }
.home-hero-image { aspect-ratio: 4 / 3; border-radius: var(--radius); }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 2.85rem;
  padding: .65rem 1.05rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  transition: background-color .16s ease;
}
.primary-button:hover { background: var(--accent-hover); color: #fff; }

.main-wrapper { flex: 1 0 auto; padding-bottom: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; letter-spacing: -.03em; }
.guide-catalog { padding-top: clamp(2rem, 4vw, 3.6rem); }
.guide-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem 1rem; margin: 1.2rem 0 1.35rem; }
.category-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.category-filters button {
  border: 1px solid var(--rule);
  border-radius: 20rem;
  background: transparent;
  color: var(--ink);
  min-height: 2.5rem;
  padding: .4rem .8rem;
  cursor: pointer;
  text-align: left;
  font-size: .84rem;
  font-weight: 600;
}
.category-filters button:hover { border-color: var(--forest); }
.category-filters button[aria-pressed='true'] { color: var(--paper); background: var(--forest); border-color: var(--forest); }
.guide-search { position: relative; width: min(100%, 17rem); }
.guide-search::before {
  content: '';
  position: absolute;
  width: .72rem;
  height: .72rem;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  left: .8rem;
  top: .78rem;
  pointer-events: none;
}
.guide-search::after {
  content: '';
  position: absolute;
  width: .34rem;
  height: 1.5px;
  top: 1.51rem;
  left: 1.4rem;
  background: var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.guide-search input { width: 100%; min-height: 2.65rem; padding: .5rem .65rem .5rem 2rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.guides-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; margin-top: 1.2rem; }
.guide-item-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.guide-item-card:hover { color: var(--ink); border-color: var(--forest); }
.guide-image { aspect-ratio: 16 / 9; }
.guide-card-content { display: flex; flex-direction: column; gap: .55rem; flex: 1; padding: clamp(1.1rem, 2.4vw, 1.7rem); }
.guide-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; color: var(--forest); font-family: var(--font-mono); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.guide-card-meta span, .guide-card-summary, .search-no-results { color: var(--muted); }
.guide-item-card h3 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
.guide-card-summary { max-width: 50ch; }
.guide-card-action { display: flex; justify-content: space-between; align-items: center; min-height: 2rem; padding-top: .6rem; margin-top: auto; color: var(--accent); font-size: .86rem; font-weight: 700; }
.search-no-results { padding: 1.3rem; border: 1px solid var(--rule); }

.article-hero-banner { background: var(--soft-green); border-bottom: 1px solid var(--rule); }
.article-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(1.45rem, 3vw, 2.6rem); }
.breadcrumbs { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .55rem; margin-bottom: .75rem; color: var(--muted); font-size: .8rem; }
.article-hero-inner h1 { max-width: 18ch; font-size: clamp(2.4rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; font-weight: 800; }
.article-summary { max-width: 43ch; margin-top: .9rem; font-size: clamp(1rem, 1.6vw, 1.12rem); }
.article-hero-date { margin-top: .8rem; color: var(--muted); font-family: var(--font-mono); font-size: .82rem; }
.ranking-hero { display: block; padding-block: clamp(1.35rem, 3vw, 2.4rem); }
.ranking-hero h1 { max-width: 26ch; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.06; letter-spacing: -.03em; text-wrap: wrap; font-weight: 800; }
.ranking-hero .article-summary { max-width: 62ch; }

.article-jump { display: flex; flex-wrap: wrap; gap: .15rem 1.3rem; padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.article-jump a { color: var(--forest); font-size: .88rem; font-weight: 700; text-decoration: none; padding-block: .55rem; }
.article-jump a:hover { color: var(--accent); text-decoration: underline; }
.top-disclosure-bar, .merchant-link-reminder { color: var(--muted); font-size: .84rem; }
.top-disclosure-bar { margin-top: 1rem; }
.merchant-link-reminder { margin: .65rem 0 .9rem; }
.article-section, .info-card-section, .insufficient-box { margin-top: clamp(1.7rem, 4vw, 3.1rem); }
#ranked-picks { margin-top: 1.5rem; }
.ranked-cards-stack { display: grid; gap: .7rem; margin-top: 1rem; }
.product-rank-card {
  display: grid;
  grid-template-columns: clamp(6.8rem, 12vw, 9.5rem) minmax(0, 1fr) minmax(10rem, 13rem);
  grid-template-areas: 'score content action' 'score details action';
  gap: .7rem clamp(.8rem, 2.8vw, 2rem);
  align-items: start;
  padding: clamp(1rem, 2.4vw, 1.75rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
.product-rank-card.top-ranked { border-top: 3px solid var(--forest); }
.rank-number { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; margin-inline: auto; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); color: var(--forest); font-family: var(--font-display); font-size: .88rem; font-weight: 800; letter-spacing: -.02em; }
.top-ranked .rank-number { background: var(--forest); color: var(--paper); }
.card-content-slot { grid-area: content; display: flow-root; }
.product-thumbnail { float: left; width: clamp(5rem, 11vw, 9rem); height: auto; aspect-ratio: 4 / 3; object-fit: contain; margin: 0 .9rem .5rem 0; }
.card-details { grid-area: details; }
.product-badge { color: var(--forest); font-family: var(--font-mono); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4; }
.card-content-slot h3 { margin-top: .15rem; font-size: clamp(1.3rem, 2.7vw, 1.95rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; }
.product-specs-summary { display: flex; flex-wrap: wrap; gap: .55rem clamp(.8rem, 2.7vw, 2rem); margin-top: .75rem; padding: .6rem 0; border-block: 1px solid var(--rule); }
.product-specs-summary dt, .full-specs dt { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.product-specs-summary dd, .full-specs dd { font-size: .88rem; font-weight: 700; }
.quick-insights { display: grid; gap: .35rem; color: var(--muted); font-size: .92rem; }
.quick-insights strong { color: var(--ink); margin-right: .35rem; }
.product-sources { margin-top: .7rem; color: var(--forest); font-size: .84rem; overflow-wrap: anywhere; }
summary { cursor: pointer; width: fit-content; color: var(--forest); font-weight: 700; }
.product-sources ul, .article-sources ul { margin: .65rem 0 0; padding-left: 1.25rem; }
.product-sources li + li, .article-sources li + li { margin-top: .35rem; }
.full-specs { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .75rem; color: var(--ink); }
.detail-label { margin-top: .75rem; font-weight: 700; color: var(--ink); }
.detail-label + .full-specs { margin-top: .3rem; }
.card-action-slot { grid-area: action; align-self: stretch; display: grid; align-content: center; gap: .45rem; padding-left: clamp(.65rem, 1.5vw, 1.25rem); border-left: 1px solid var(--rule); }
.merchant-name { color: var(--ink); text-align: center; font-weight: 700; font-size: .9rem; }
.score-box { grid-area: score; align-self: stretch; display: grid; align-content: center; gap: .2rem; text-align: center; background: var(--soft-green); border-radius: var(--radius); padding: .7rem .3rem; color: var(--forest); }
.score-caption, .score-status { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.score-caption { color: var(--muted); }
.score-value { margin: .1rem 0; font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; line-height: .9; letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.score-value span { margin-left: .13rem; font-family: var(--font-mono); font-size: .82rem; font-weight: 500; }
.merchant-button { width: 100%; }
.offer-row { display: grid; grid-template-columns: 1fr; gap: .2rem; }
.offer-row .merchant-name { margin: 0; font-weight: 600; font-size: .8rem; }
.offer-row .merchant-button { width: 100%; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 2.85rem; padding: .65rem 1.05rem; border-radius: var(--radius); border: 1.5px solid var(--accent); background: transparent; color: var(--accent); text-decoration: none; font-weight: 700; font-size: .92rem; }
.secondary-button:hover { background: var(--accent); color: #fff; }
.offer-note { margin: 0; font-size: .75rem; color: var(--text-muted); }
.ranking-note { display: grid; align-items: center; gap: clamp(.9rem, 2vw, 1.6rem); padding: clamp(1rem, 2.4vw, 1.6rem); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--soft-green); }
.ranking-note:has(img) { grid-template-columns: minmax(8rem, .3fr) minmax(0, 1fr); }
.ranking-note img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.ranking-note h3 { font: 800 clamp(1.65rem, 2.8vw, 2.25rem)/1.1 var(--serif); letter-spacing: -.025em; margin-bottom: .3rem; }
.ranking-note p { max-width: 52ch; color: var(--muted); }
.ranking-note-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .65rem; font-size: .86rem; font-weight: 700; }

.table-container { max-width: 100%; overflow-x: auto; margin-top: .85rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.table-container table { width: 100%; min-width: 44rem; border-collapse: collapse; font-size: .88rem; }
.table-container :is(th, td) { padding: .65rem .8rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.table-container thead { background: var(--soft-green); color: var(--forest); }
.table-container thead th { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.table-container tr:last-child td, .table-container tbody tr:last-child th { border-bottom: 0; }
.table-score { white-space: nowrap; font-family: var(--font-mono); font-weight: 700; color: var(--forest); }
.table-cta { white-space: nowrap; font-weight: 700; color: var(--forest); }
.info-card-section h2 { margin-bottom: .85rem; }
.info-card-section > p { max-width: 72ch; margin: .7rem 0; }
.info-card-section, .insufficient-box { padding-top: 1rem; border-top: 1px solid var(--rule); }
.info-card-section li, .insufficient-box p { color: var(--muted); }
.article-sources { overflow-wrap: anywhere; }

.site-footer { background: var(--ink); color: var(--paper); margin-top: auto; padding: 2.2rem 0 1.35rem; }
.footer-inner { align-items: flex-start; }
.footer-brand, .footer-brand:hover { color: inherit; }
.footer-brand .brand-mark { background: #486c58; }
.footer-inner p, .footer-bottom { margin-top: .45rem; color: #d3ded3; font-size: .84rem; }
.footer-inner p a { color: inherit; }
.footer-bottom { padding-top: 1rem; margin-top: 1.35rem; border-top: 1px solid #4c6255; }

@media (max-width: 768px) {
  .home-hero-banner { grid-template-columns: minmax(0, 1fr); }
  .home-hero-image { aspect-ratio: 3 / 2; }
  .product-rank-card {
    grid-template-columns: 5.2rem minmax(0, 1fr);
    grid-template-areas: 'score content' 'action action' 'details details';
  }
  .card-action-slot { grid-template-columns: 1fr; align-items: center; padding-left: 0; border-left: 0; }
  .offer-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: .6rem; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 540px) {
  html { scroll-padding-top: 6.25rem; }
  .header-inner { flex-wrap: wrap; column-gap: .7rem; }
  .header-nav { gap: .2rem .75rem; }
  .header-nav a { font-size: .81rem; }
  .home-hero-banner h1 { font-size: clamp(3.6rem, 15vw, 5rem); }
  .home-hero-copy p { margin: 1.05rem 0 1.25rem; }
  .guides-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-search { width: 100%; }
  .article-hero-inner h1 { font-size: clamp(2.55rem, 10.5vw, 3.55rem); }
  .product-rank-card { gap: .7rem; }
  .score-value { font-size: 2.9rem; }
  .ranking-note:has(img) { grid-template-columns: minmax(0, 1fr); }
  .ranking-note img { display: none; }
  .article-jump { gap: 0 .85rem; }
  .article-jump a { font-size: .81rem; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-button { transition: none; }
}
