/* Review site stylesheet. Source of truth: assets/site.css (tools/build.py copies it to site/assets/).
   Mobile-first. Light + dark via prefers-color-scheme. One web font: Source Serif 4 (reading text);
   interface text uses the system UI font. Spacing on a 4px grid. */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;

  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1c2321;
  --text-muted: #4c5653;
  --border: #dcd8ce;
  --border-strong: #a9a293;

  --accent: #0c5c55; /* links, buttons, focus: interactive only */
  --accent-hover: #084741;
  --on-accent: #ffffff;
  --accent-soft: #e5f0ed; /* verdict box */
  --accent-line: #0c5c55;

  --note-soft: #fbf3e1; /* callouts */
  --note-line: #a86c12;
  --pro: #1d6b3c;
  --con: #a2352a;

  --font-read:
    "Source Serif 4", "Iowan Old Style", Georgia, Cambria, "Times New Roman",
    serif;
  --font-ui:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 68ch;
  --wide: 72rem;
  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1a1f1e;
    --surface-2: #222927;
    --text: #e5ebe8;
    --text-muted: #a7b2ae;
    --border: #2e3735;
    --border-strong: #56635f;

    --accent: #6cc6b8;
    --accent-hover: #93dacd;
    --on-accent: #0a1f1c;
    --accent-soft: #16302c;
    --accent-line: #4fb3a4;

    --note-soft: #2b2416;
    --note-line: #d6a142;
    --pro: #7fd09c;
    --con: #f3958a;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: var(--text);
    --border: var(--border-strong);
  }
}

/* ------------------------------------------------------------------ base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-read);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  outline: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-read);
  line-height: 1.2;
  color: var(--text);
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.55rem + 2.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}
h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.8vw, 1.7rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}
h3 {
  font-size: 1.2rem;
  font-weight: 650;
  margin: 1.75rem 0 0.5rem;
}
h4 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol,
dl,
blockquote {
  margin: 0 0 1.1rem;
}
ul,
ol {
  padding-left: 1.4rem;
}
li + li {
  margin-top: 0.35rem;
}
strong,
b {
  font-weight: 650;
}
small {
  font-size: 0.875em;
}
sup,
sub {
  line-height: 0;
}
code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
blockquote {
  border-left: 3px solid var(--border-strong);
  padding-left: 1rem;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color 150ms ease,
    text-decoration-thickness 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: 0.75rem;
  color: var(--on-accent);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + var(--gutter) + var(--gutter-r));
  margin-inline: auto;
  padding-inline: var(--gutter) var(--gutter-r);
}

/* ------------------------------------------------------------------ header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
}
.site-header__inner {
  max-width: calc(var(--wide) + var(--gutter) + var(--gutter-r));
  margin-inline: auto;
  padding: 0.5rem var(--gutter-r) 0 var(--gutter);
  display: flex;
  flex-direction: column;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--font-read);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  align-self: flex-start;
}
.brand img {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}
.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  margin-inline: calc(var(--gutter) * -1) calc(var(--gutter-r) * -1);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 var(--gutter-r) 0 var(--gutter);
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 2rem),
    transparent
  );
  mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
}
.site-nav ul::-webkit-scrollbar {
  display: none;
}
.site-nav li {
  margin: 0;
  flex: none;
}
.site-nav li:last-child {
  padding-right: 1.5rem;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}
.site-nav a[aria-current] {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.site-nav a:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 60rem) {
  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
  }
  .site-nav {
    margin: 0;
  }
  .site-nav ul {
    padding: 0;
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
  }
  .site-nav li:last-child {
    padding-right: 0;
  }
  .site-nav a {
    min-height: 64px;
  }
}

/* ------------------------------------------------------------------ article */
.article {
  width: 100%;
  max-width: calc(var(--measure) + var(--gutter) + var(--gutter-r));
  margin-inline: auto;
  padding: 1.25rem var(--gutter-r) 4rem var(--gutter);
}

.breadcrumbs {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.breadcrumbs li {
  margin: 0;
  color: var(--text-muted);
}
.breadcrumbs li + li::before {
  content: "/";
  content: "/" / "";
  margin: 0 0.5rem;
  color: var(--border-strong);
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  padding-block: 0.6rem;
}
.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.breadcrumbs [aria-current] {
  color: var(--text);
}

.disclosure-line {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.article__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.dek {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}
.byline {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 0.35rem;
}
.byline a {
  color: inherit;
  font-weight: 600;
  text-decoration-color: var(--border-strong);
}
.byline a:hover {
  color: var(--accent);
}
.byline span[aria-hidden] {
  margin-inline: 0.35rem;
  color: var(--text-muted);
}
.method-note {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  scroll-margin-top: 1rem;
}

/* Quick verdict */
.verdict {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent-line) 30%, transparent);
  border-left: 4px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.verdict p:last-child {
  margin-bottom: 0;
}
.verdict__label,
.verdict .verdict__label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

/* Key facts */
.facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.75rem 0;
}
.facts > div + div {
  border-top: 1px solid var(--border);
}
.facts dt {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.facts dd {
  margin: 0;
}
@media (min-width: 36rem) {
  .facts > div {
    grid-template-columns: minmax(8rem, 32%) 1fr;
    gap: 1rem;
    align-items: baseline;
  }
}

/* Pros / cons */
.proscons {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
}
@media (min-width: 40rem) {
  .proscons {
    grid-template-columns: 1fr 1fr;
  }
}
.proscons > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--pro);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem 0.5rem;
}
.proscons > div:nth-child(2) {
  border-top-color: var(--con);
}
.proscons h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
}
.proscons ul {
  list-style: none;
  padding: 0;
  font-size: 1rem;
  line-height: 1.55;
}
.proscons li {
  position: relative;
  padding-left: 1.75rem;
}
.proscons li::before {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  color: var(--surface);
  background: var(--pro);
  content: "+";
  content: "+" / "";
}
.proscons > div:nth-child(2) li::before {
  background: var(--con);
  content: "\2212";
  content: "\2212" / "";
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* scroll shadows: show there is more to the right on narrow screens */
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 2rem 100%
      no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 2rem 100%
      no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / 0.18), transparent)
      left / 0.75rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / 0.18), transparent)
      right / 0.75rem 100% no-repeat scroll,
    var(--surface);
  -webkit-overflow-scrolling: touch;
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.compare caption {
  caption-side: top;
  text-align: left;
  font-weight: 650;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  left: 0;
}
.compare th,
.compare td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  min-width: 9rem;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  background: var(--surface-2);
  font-weight: 650;
  font-size: 0.875rem;
}
.compare tbody tr:last-child > * {
  border-bottom: 0;
}
.compare tbody th {
  font-weight: 600;
}
.compare tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 8rem;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--border);
}
.compare thead tr > :first-child {
  background: var(--surface-2);
}

/* Callout */
.callout {
  background: var(--note-soft);
  border-left: 4px solid var(--note-line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  font-size: 1rem;
}
.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

/* Offer call to action */
.cta {
  margin: 1.75rem 0 2rem;
}
.cta .offer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
}
.cta .offer-link::after {
  content: "\2197";
  content: "\2197" / "";
  font-weight: 400;
}
.cta .offer-link:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.cta .offer-link:active {
  filter: brightness(0.92);
}
@media (max-width: 30rem) {
  .cta .offer-link {
    display: flex;
    width: 100%;
  }
}

/* Offer not linked (not an approved partner yet): plain text, clearly not a button */
.cta .offer-off {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}

/* FAQ */
.faq {
  margin-top: 3rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.faq h2 {
  margin-top: 1.5rem;
}
.faq__item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.faq__item:last-child {
  border-bottom: 0;
}
.faq__item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}
.faq__item p {
  margin: 0;
}

/* Sources */
.sources {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
}
.sources h2 {
  font-family: var(--font-read);
  margin-top: 1.5rem;
}
.sources > p {
  color: var(--text-muted);
}
.sources ol {
  padding-left: 1.5rem;
}
.sources li {
  overflow-wrap: anywhere;
}
.sources li + li {
  margin-top: 0.5rem;
}
.sources__accessed {
  color: var(--text-muted);
  white-space: nowrap;
}

/* Related */
.related {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.related h2 {
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------------ cards, hubs, home */
.cards {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}
.cards > li + li {
  margin-top: 0;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.06);
}
.card:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}
.card__title a {
  color: var(--text);
  text-decoration: none;
}
.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card__title a:focus-visible {
  outline: none;
}
.card:hover .card__title a {
  color: var(--accent);
}
.card__dek {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.card__meta {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: auto 0 0;
}

.hub {
  padding-top: 1.25rem;
  padding-bottom: 4rem;
}
.hub__header {
  max-width: 44rem;
  margin-bottom: 2rem;
}
.hub .card__title {
  font-size: 1.2rem;
}

.empty {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.home {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}
.home-intro {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}
.home-intro h1 {
  font-size: clamp(2.1rem, 1.6rem + 2.6vw, 3.1rem);
}
.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.home-cat {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.home-cat__head {
  max-width: 44rem;
  margin-bottom: 1.25rem;
}
.home-cat__head h2 {
  margin: 0 0 0.35rem;
}
.home-cat__head h2 a {
  color: var(--text);
  text-decoration: none;
}
.home-cat__head h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.home-cat__head h2 a::after {
  content: " \2192";
  content: " \2192" / "";
  color: var(--accent);
  font-weight: 400;
}
.home-cat__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.site-footer__inner {
  max-width: calc(var(--wide) + var(--gutter) + var(--gutter-r));
  margin-inline: auto;
  padding: 2rem var(--gutter-r) max(2rem, env(safe-area-inset-bottom))
    var(--gutter);
}
.site-footer__brand {
  font-family: var(--font-read);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.site-footer__note {
  max-width: 44rem;
}
.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.site-footer__links li {
  margin: 0;
}
.site-footer__links a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--text);
  text-decoration-color: var(--border-strong);
}
.site-footer__links a:hover {
  color: var(--accent);
}
.site-footer__legal {
  margin: 0;
}

/* ------------------------------------------------------------------ preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .related,
  .skip-link {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .sources a::after {
    content: " (" attr(href) ")";
  }
}

/* ------------------------------------------------------------------ small-screen + header refinements */
@media (min-width: 60rem) {
  .brand { align-self: center; }
}
/* On phones the current-page crumb repeats the H1 directly below it and wraps awkwardly. */
@media (max-width: 39.99rem) {
  .breadcrumbs li[aria-current] { display: none; }
}
