/*
Theme Name: SmartLivingHut
Theme URI: https://www.smartlivinghut.com/
Description: The SmartLivingHut publication theme: fast, mobile-first and editorial. Requires the SmartLivingHut Core plugin.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Author: SmartLivingHut
License: Private use
Text Domain: smartlivinghut
*/

/* Self-hosted variable fonts (SIL Open Font License, see fonts/). No third-party font requests. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
:root {
  --font-bricolage: "Bricolage Grotesque";
  --font-source-serif: "Source Serif 4";
}

/*
 * SmartLivingHut design system.
 *
 * Palette: slate charcoal ink on off-white paper, warm linen as the secondary
 * neutral, moss green as the single accent.
 * Type: Bricolage Grotesque for headlines and interface; Source Serif 4 for
 * long-form reading.
 * Rules of thumb: left-aligned, generous whitespace, hairlines instead of
 * shadows, no decorative motion.
 */

:root {
  --ink: #1f2529;
  --ink-2: #485157;
  --ink-3: #5d676d;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --linen: #ece7dc;
  --line: #d9d4c7;
  --moss: #2a6447;
  --moss-dark: #1d4a34;
  --fern: #dde9e0;
  --mist: #dde4e6;
  --sand: #f0e4cf;
  --sun: #a86f0c;
  --danger: #a3342b;

  --font-display: var(--font-bricolage), "Segoe UI", system-ui, sans-serif;
  --font-serif: var(--font-source-serif), Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --step-5: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);

  --wrap: 76rem;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --radius: 6px;
  --radius-lg: 14px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 1rem;
}

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  background: #000;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--linen);
}
.btn--accent {
  background: var(--moss);
  border-color: var(--moss);
}
.btn--accent:hover {
  background: var(--moss-dark);
  border-color: var(--moss-dark);
}
.btn--small {
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem;
  font-size: var(--step--1);
}

.text-link {
  font-weight: 600;
  color: var(--moss);
  text-decoration: underline;
}
.text-link:hover {
  color: var(--moss-dark);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.logo svg {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
}
.logo span span {
  color: var(--moss);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 550;
}
.icon-btn:hover {
  background: var(--linen);
}
.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Country selector: a native <details> so it works without JavaScript. */
.country {
  position: relative;
}
.country > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.country > summary::-webkit-details-marker {
  display: none;
}
.country > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.15rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.country__prefix {
  display: none;
  color: var(--ink-3);
  font-weight: 400;
}
@media (min-width: 40rem) {
  .country__prefix {
    display: inline;
  }
}
@media (max-width: 22.5rem) {
  /* Very narrow phones: search moves into the menu. */
  .header-tools > .icon-btn {
    display: none;
  }
}
@media (max-width: 26rem) {
  .logo {
    font-size: 1.1rem;
  }
  .logo svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  .header-top {
    gap: 0.4rem;
  }
  .header-tools {
    gap: 0;
  }
  .country > summary {
    padding: 0 0.6rem;
  }
}
.country__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 60;
  min-width: 15rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 12px 32px -12px rgb(31 37 41 / 0.28);
}
.country__menu p {
  padding: 0.35rem 0.6rem 0.5rem;
  color: var(--ink-2);
  font-size: var(--step--1);
}
.country__menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.country__menu button:hover {
  background: var(--linen);
}
html[data-country="us"] .country__menu button[data-set-country="us"],
html[data-country="uk"] .country__menu button[data-set-country="uk"] {
  font-weight: 650;
  background: var(--fern);
}

/* Primary navigation with mega menus (desktop). */
.nav {
  display: none;
}
.mobile-nav {
  display: block;
}

/* The full menu needs about 1,100px; below that the drawer is used. */
@media (min-width: 72rem) {
  .nav {
    display: block;
    border-top: 1px solid var(--line);
  }
  .mobile-nav {
    display: none;
  }
}

.nav__list {
  display: flex;
  gap: 0.15rem;
  margin: 0 -0.7rem;
  padding: 0;
  list-style: none;
}
.nav__item > a {
  display: block;
  padding: 0.8rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav__item > a:hover,
.nav__item:focus-within > a,
.nav__item > a[aria-current="page"] {
  border-bottom-color: var(--moss);
}
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  visibility: hidden;
  opacity: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -28px rgb(31 37 41 / 0.35);
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}
.nav__item:hover > .mega,
.nav__item:focus-within > .mega {
  visibility: visible;
  opacity: 1;
  transition-delay: 0.08s, 0.08s;
}
.mega__inner {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 2.4fr;
  gap: 3rem;
  padding-block: 2rem 2.25rem;
}
.mega__intro h2 {
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}
.mega__intro p {
  color: var(--ink-2);
  margin-bottom: 1rem;
  max-width: 34ch;
}
.mega__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.mega__cols h3 {
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-bottom: 0.6rem;
}
.mega__cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mega__cols li {
  padding: 0.3rem 0;
  color: var(--ink-2);
}
.mega__cols li a {
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}
.mega__cols li a:hover {
  text-decoration: underline;
}
.mega__topics {
  columns: 2;
  column-gap: 1.5rem;
  font-size: 0.95rem;
}

/* Mobile navigation drawer. */
.mobile-nav > summary {
  list-style: none;
}
.mobile-nav > summary::-webkit-details-marker {
  display: none;
}
.mobile-nav__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  padding: 0.5rem var(--gutter) 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mobile-nav__panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-nav__panel li a {
  display: block;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step-1);
  font-weight: 550;
  text-decoration: none;
}
.mobile-nav[open] .icon-open,
.mobile-nav:not([open]) .icon-close {
  display: none;
}

/* ── Sections and grids ──────────────────────────────────────────────────── */

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.section + .section {
  border-top: 1px solid var(--line);
}
.section--tint {
  background: var(--linen);
  border-top: 0 !important;
}
.section--tint + .section {
  border-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.section-head h2 {
  font-size: var(--step-4);
}
.section-head p {
  flex-basis: 100%;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: var(--step-1);
}

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
@media (min-width: 40rem) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 62rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Article cards ───────────────────────────────────────────────────────── */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cover {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--linen);
}
.cover > img,
.cover > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__kicker {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--moss);
}
.card__title {
  font-size: var(--step-2);
  line-height: 1.18;
}
.card__title a {
  text-decoration: none;
}
/* The whole card is clickable, but only the title is in the tab order. */
.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.card:hover .card__title a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.card__excerpt {
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  font-size: var(--step--1);
  color: var(--ink-3);
}

.card--lead .card__title {
  font-size: var(--step-4);
}
.card--lead .card__excerpt {
  font-size: var(--step-1);
}

.card--row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: start;
}
.card--row .cover {
  aspect-ratio: 1;
  border-radius: var(--radius);
}
.card--row .card__title {
  font-size: var(--step-1);
}
.card--row > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lead-grid {
  display: grid;
  gap: 2rem;
}
.lead-grid__side {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
@media (min-width: 62rem) {
  .lead-grid {
    grid-template-columns: 1.35fr 1fr;
    gap: 3.5rem;
  }
  .lead-grid__side > * + * {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
  }
}

/* ── Home: hero ──────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4.5rem);
}
.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 {
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.hero__lede {
  margin-top: 1.25rem;
  max-width: 44ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.hero__art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--linen);
}
.hero__art svg {
  width: 100%;
  height: auto;
}
@media (min-width: 58rem) {
  .hero__grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 3.5rem;
  }
}

/* ── Home: solve a problem ───────────────────────────────────────────────── */

.problems {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.problem {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.25rem 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.problem svg {
  width: 2.5rem;
  height: 2.5rem;
  grid-row: span 2;
  color: var(--moss);
}
.problem h3 {
  font-size: var(--step-2);
}
.problem h3 a {
  text-decoration: none;
}
.problem h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.problem:hover h3 a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.problem p {
  grid-column: 2;
  color: var(--ink-2);
}
@media (min-width: 44rem) {
  .problems {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
  }
}
@media (min-width: 68rem) {
  .problems {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Home: category strips, popular list ─────────────────────────────────── */

.strip {
  display: grid;
  gap: 1.75rem;
}
.strip__intro h2 {
  font-size: var(--step-4);
  margin-bottom: 0.6rem;
}
.strip__intro p {
  color: var(--ink-2);
  margin-bottom: 1rem;
  max-width: 40ch;
}
@media (min-width: 62rem) {
  .strip {
    grid-template-columns: 17rem 1fr;
    gap: 3.5rem;
  }
}

.ranked {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
  display: grid;
  gap: 0 3rem;
}
.ranked li {
  position: relative;
  counter-increment: rank;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.ranked li::before {
  content: counter(rank);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--moss);
  font-variant-numeric: tabular-nums;
}
.ranked a {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.ranked a:hover {
  text-decoration: underline;
}
.ranked span {
  grid-column: 2;
  font-size: var(--step--1);
  color: var(--ink-3);
}
@media (min-width: 48rem) {
  .ranked {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Newsletter ──────────────────────────────────────────────────────────── */

.newsletter {
  background: var(--ink);
  color: #fff;
}
.newsletter__grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.newsletter h2 {
  font-size: var(--step-4);
  margin-bottom: 0.6rem;
}
.newsletter p {
  color: #d5dadc;
  max-width: 46ch;
}
.newsletter-form {
  display: grid;
  gap: 0.6rem;
}
.newsletter-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.newsletter-form input[type="email"] {
  flex: 1 1 14rem;
  min-height: 3rem;
  padding: 0.6rem 1rem;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}
.newsletter-form .btn {
  min-height: 3rem;
  background: var(--fern);
  border-color: var(--fern);
  color: var(--ink);
}
.newsletter-form .btn:hover {
  background: #fff;
  border-color: #fff;
}
.newsletter-form small {
  color: #b9c0c3;
}
.newsletter-form small a {
  color: #fff;
}
.form-note {
  font-size: var(--step--1);
  font-weight: 550;
}
.form-note--ok {
  color: #bfe6cd;
}
.form-note--error {
  color: #ffc2bb;
}
.hp-field {
  position: absolute;
  left: -200vw;
}
@media (min-width: 58rem) {
  .newsletter__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Inline newsletter box inside articles (light variant). */
.newsletter--inline {
  margin-block: 3rem;
  border-radius: var(--radius-lg);
}
.newsletter--inline .newsletter__grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.newsletter--inline h2 {
  font-size: var(--step-3);
}

/* ── Social follow ───────────────────────────────────────────────────────── */

.follow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.follow a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 550;
  text-decoration: none;
}
.follow a:hover {
  border-color: var(--ink);
}
.follow svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 0;
  background: var(--linen);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.footer-about p {
  margin-top: 0.75rem;
  color: var(--ink-2);
  max-width: 38ch;
}
.footer-col h2 {
  font-size: var(--step-0);
  margin-bottom: 0.6rem;
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col li a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-col li a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-base {
  display: grid;
  gap: 0.75rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: var(--step--1);
}
.footer-base button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  cursor: pointer;
}
@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}

/* ── Page heads, breadcrumbs ─────────────────────────────────────────────── */

.crumbs {
  padding-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--line);
}
.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}

.page-head {
  padding-block: 1.5rem clamp(2rem, 4vw, 3rem);
}
.page-head h1 {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 18ch;
}
.page-head__lede {
  margin-top: 1rem;
  max-width: 58ch;
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--ink-2);
}
.page-head__body {
  margin-top: 1rem;
  max-width: 68ch;
  color: var(--ink-2);
}
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.topic-list li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--step--1);
  color: var(--ink-2);
}

.empty {
  padding: 2.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
  max-width: 44rem;
}
.empty h2 {
  font-size: var(--step-2);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
}

/* ── Article page ────────────────────────────────────────────────────────── */

.article-head {
  padding-block: 1.25rem 2rem;
  max-width: 54rem;
}
.article-head__kicker {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-weight: 600;
  color: var(--moss);
  text-decoration: none;
}
.article-head__kicker:hover {
  text-decoration: underline;
}
.article-head h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.article-head__lede {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 60ch;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.byline a {
  color: var(--ink);
  font-weight: 600;
}
.byline dl {
  display: contents;
}
.byline div {
  display: flex;
  gap: 0.35rem;
}
.byline dt {
  color: var(--ink-3);
}
.byline dd {
  margin: 0;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.share a,
.share button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  cursor: pointer;
}
.share a:hover,
.share button:hover {
  border-color: var(--ink);
}
.share svg {
  width: 1rem;
  height: 1rem;
}

.article-cover {
  margin-bottom: 2.5rem;
}
.article-cover .cover {
  aspect-ratio: 21 / 9;
}
@media (max-width: 40rem) {
  .article-cover .cover {
    aspect-ratio: 3 / 2;
  }
}

.article-layout {
  display: grid;
  /* minmax(0, …) lets wide tables scroll inside the column instead of stretching the page. */
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding-bottom: 4rem;
}
.article-main {
  min-width: 0;
  max-width: 46rem;
}
.article-aside {
  display: none;
}
@media (min-width: 66rem) {
  .article-layout {
    grid-template-columns: minmax(0, 46rem) 1fr;
    gap: 4.5rem;
  }
  .article-aside {
    display: block;
  }
  .article-aside__sticky {
    position: sticky;
    top: 1.5rem;
    display: grid;
    gap: 2rem;
    max-width: 19rem;
    margin-left: auto;
  }
  .toc--inline {
    display: none;
  }
}

.notice {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--moss);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--fern);
  font-size: 0.95rem;
}
.notice--sponsored {
  border-left-color: var(--sun);
  background: var(--sand);
}
.notice strong {
  font-weight: 650;
}

.toc h2 {
  font-size: var(--step-0);
  margin-bottom: 0.6rem;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.toc li a {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc li a:hover {
  color: var(--ink);
  border-left-color: var(--ink);
}
.toc--inline {
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.toc--inline summary {
  font-weight: 650;
  cursor: pointer;
}
.toc--inline ol {
  margin-top: 0.75rem;
}

/* Long-form reading typography. */
.prose {
  font-family: var(--font-serif);
  font-size: clamp(1.09rem, 1.03rem + 0.3vw, 1.2rem);
  line-height: 1.68;
  color: #2a3135;
  overflow-wrap: break-word;
}
.prose > * + *,
.prose-chunk > * + *,
.prose-only > * + * {
  margin-top: 1.15em;
}
.prose h2 {
  margin-top: 2.2em;
  font-size: var(--step-3);
  color: var(--ink);
}
.prose h3 {
  margin-top: 1.8em;
  font-size: var(--step-2);
  color: var(--ink);
}
.prose h4 {
  margin-top: 1.6em;
  font-size: var(--step-1);
}
.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.6em;
}
.prose a:not(.btn) {
  color: var(--moss-dark);
  font-weight: 500;
  text-decoration: underline;
}
.prose a:not(.btn):hover {
  color: var(--ink);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.45em;
}
.prose li::marker {
  color: var(--moss);
  font-family: var(--font-display);
  font-weight: 650;
}
.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--moss);
  color: var(--ink-2);
  font-style: italic;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2.5em;
}
.prose figure {
  margin-inline: 0;
}
.prose img {
  border-radius: var(--radius-lg);
}
.prose figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--ink-3);
}
.prose code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--linen);
}
/* Checklists: Markdown task lists become tickable boxes. */
.prose li:has(> input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.3em;
  padding-left: 2.1em;
  text-indent: -2.1em;
}
.prose input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.75em 0 0;
  vertical-align: -0.2em;
  accent-color: var(--moss);
}

.table-scroll {
  /* Positioned so visually hidden labels inside the table cannot widen the page. */
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.table-scroll table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.4;
}
.table-scroll th,
.table-scroll td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table-scroll thead th {
  font-weight: 650;
  background: var(--linen);
  white-space: nowrap;
}
.table-scroll tbody tr:last-child > * {
  border-bottom: 0;
}

/* ── Commerce: comparison table and product card ─────────────────────────── */

.commerce {
  margin-block: 2rem;
  font-family: var(--font-display);
}
.commerce + * {
  margin-top: 2rem;
}
/* Product blocks sit inside article text; reset the reading-flow heading margins. */
.prose .commerce h3,
.prose .commerce h4 {
  margin-top: 0;
}
.prose .commerce .product__name {
  margin: 0.1rem 0 0.4rem;
}
.prose .commerce li + li {
  margin-top: 0.25rem;
}

.compare th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 11rem;
  max-width: 14rem;
  background: var(--surface);
  font-weight: 650;
  box-shadow: 1px 0 0 var(--line);
}
.compare th[scope="row"] small {
  display: block;
  font-weight: 400;
  color: var(--ink-3);
}
.compare td {
  min-width: 7rem;
}
.compare__hint {
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}
@media (min-width: 46rem) {
  .compare__hint {
    display: none;
  }
}

.rating {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-weight: 650;
  white-space: nowrap;
}
.rating small {
  font-weight: 400;
  color: var(--ink-3);
}
.rating svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--sun);
  align-self: center;
}

.product {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.product__top {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
}
.product__image {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--linen);
  overflow: hidden;
}
.product__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product__image svg {
  position: absolute;
  inset: 25%;
  width: 50%;
  height: 50%;
  color: var(--ink-3);
}
.product__brand {
  font-size: var(--step--1);
  color: var(--ink-3);
}
.product__name {
  font-size: var(--step-2);
  margin: 0.1rem 0 0.4rem;
}
.product__best {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--fern);
  color: var(--moss-dark);
  font-size: var(--step--1);
  font-weight: 600;
}
.product__desc {
  color: var(--ink-2);
}
.product__features {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.product__features li + li {
  margin-top: 0.2rem;
}
.proscons {
  display: grid;
  gap: 1.25rem;
  padding: 1.1rem clamp(1.1rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.proscons h4 {
  font-size: var(--step-0);
  margin-bottom: 0.4rem;
}
.proscons ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.proscons li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink-2);
}
.proscons li + li {
  margin-top: 0.3rem;
}
.proscons li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.proscons .pros li::before {
  content: "+";
  color: var(--moss);
}
.proscons .cons li::before {
  content: "−";
  color: var(--danger);
}
.product__specs {
  margin: 0;
  padding: 1.1rem clamp(1.1rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem 1.5rem;
  font-size: 0.95rem;
}
.product__specs dt {
  color: var(--ink-3);
  font-size: var(--step--1);
}
.product__specs dd {
  margin: 0;
  font-weight: 550;
}
.product__buy {
  padding: 1.1rem clamp(1.1rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.product__note {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}
@media (min-width: 40rem) {
  .product__top {
    grid-template-columns: 13rem 1fr;
  }
  .proscons {
    grid-template-columns: 1fr 1fr;
  }
}

/* Offers: one block per market; countryCss hides the non-matching ones. */
.offers__label {
  margin-bottom: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
}
html[data-country] .offers__label {
  display: none;
}
.offers__market + .offers__market {
  margin-top: 1rem;
}
.offers__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.offers__list li {
  display: grid;
  gap: 0.25rem;
}
.offers__price {
  font-size: var(--step--1);
  color: var(--ink-2);
}
.offers__price strong {
  color: var(--ink);
  font-size: var(--step-0);
}
.offers__none {
  font-size: 0.95rem;
  color: var(--ink-2);
}
.offers__choose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.95rem;
}
.offers--compact .offers__list li {
  gap: 0.15rem;
}
.offers--compact .offers__choose span {
  flex-basis: 100%;
}

/* ── FAQ, author box, cluster box ────────────────────────────────────────── */

.faq {
  margin-top: 3.5rem;
}
.faq > h2,
.related > h2,
.sources > h2 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--moss);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details > div {
  padding-bottom: 1.25rem;
  max-width: 62ch;
}

.sources {
  margin-top: 3rem;
  font-size: 0.95rem;
}
.sources ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
}
.sources li + li {
  margin-top: 0.3rem;
}
.sources a {
  color: var(--moss-dark);
  overflow-wrap: anywhere;
}

.author-box {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.1rem;
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--linen);
}
.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--moss);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-box h2 {
  font-size: var(--step-1);
}
.author-box__role {
  font-size: var(--step--1);
  color: var(--ink-3);
}
.author-box p + p {
  margin-top: 0.4rem;
}
.author-box__bio {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.cluster {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 0.95rem;
}
.cluster h2 {
  font-size: var(--step-0);
  margin-bottom: 0.5rem;
}
.cluster ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cluster li {
  padding: 0.3rem 0;
}
.cluster a {
  text-decoration: none;
  font-weight: 550;
}
.cluster a:hover {
  text-decoration: underline;
}

.related {
  padding-block: 3.5rem;
  border-top: 1px solid var(--line);
}

.eval-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
}
.eval-badge svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--moss);
}

/* ── Ads: reserved height prevents layout shift ──────────────────────────── */

.ad {
  margin-block: 2rem;
  text-align: center;
  font-family: var(--font-display);
}
.ad__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.ad ins {
  display: block;
  min-height: 250px;
}
.ad--header ins {
  min-height: 90px;
}
.ad--sidebar ins {
  min-height: 600px;
}

/* ── Forms (contact, search) ─────────────────────────────────────────────── */

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}
.field label {
  font-weight: 600;
}
.field input,
.field select,
.field textarea,
.search-form input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--ink-3);
  border-radius: var(--radius);
  background: var(--surface);
}
.field textarea {
  min-height: 10rem;
  resize: vertical;
}
.field small {
  color: var(--ink-3);
}
.contact-form {
  max-width: 36rem;
}
.contact-form .form-note--ok {
  color: var(--moss-dark);
}
.contact-form .form-note--error {
  color: var(--danger);
}

.search-form {
  display: flex;
  gap: 0.6rem;
  max-width: 40rem;
  margin-top: 1.5rem;
}
.search-form input {
  border-radius: 999px;
  padding-inline: 1.2rem;
}
.search-group {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.search-group > h2 {
  font-size: var(--step-2);
  margin-bottom: 1.25rem;
}
.result-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 48rem;
}
.result-list h3 {
  font-size: var(--step-1);
}
.result-list p {
  color: var(--ink-2);
}
.result-list small {
  color: var(--ink-3);
}

/* ── Cookie consent ──────────────────────────────────────────────────────── */

.consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 34rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 18px 48px -16px rgb(31 37 41 / 0.4);
  font-size: 0.95rem;
}
.consent h2 {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.consent p {
  color: var(--ink-2);
}
.consent__choices {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
}
.consent__choices label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.consent__choices input {
  margin-top: 0.3rem;
  accent-color: var(--moss);
}
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ── Print: checklists and guides print cleanly ──────────────────────────── */

@media print {
  .site-header,
  .site-footer,
  .article-aside,
  .newsletter,
  .related,
  .share,
  .ad,
  .consent,
  .crumbs {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .prose a {
    color: inherit;
    text-decoration: none;
  }
}

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

/* ── Price history and price alerts ──────────────────────────────────────── */

.offers__history {
  font-size: var(--step--1);
  color: var(--ink-2);
}
.offers__history summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.offers__history table {
  margin-top: 0.4rem;
  border-collapse: collapse;
}
.offers__history th,
.offers__history td {
  padding: 0.15rem 1rem 0.15rem 0;
  font-weight: 400;
  text-align: left;
}
.offers__history td {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.alert-form {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}
.alert-form summary {
  font-weight: 600;
  color: var(--moss-dark);
  cursor: pointer;
}
.alert-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.alert-form input[type="email"] {
  flex: 1 1 13rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--ink-3);
  border-radius: 999px;
  background: var(--surface);
}
.alert-form__note {
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}
.alert-form__note--error {
  color: var(--danger);
  font-weight: 600;
}

/* ── Exit prompt (desktop only, small corner panel) ──────────────────────── */

.exit-prompt {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  width: min(24rem, calc(100vw - 2.5rem));
  padding: 1.4rem 1.5rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 48px -16px rgb(31 37 41 / 0.55);
}
.exit-prompt h2 {
  font-size: var(--step-2);
  margin-bottom: 0.35rem;
}
.exit-prompt p {
  color: #d5dadc;
  margin-bottom: 0.9rem;
}
.exit-prompt__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.exit-prompt__close:hover {
  background: #343c41;
}

/* ── Tools: calculators, quizzes, finder ─────────────────────────────────── */

.tool-layout {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 4rem;
}
@media (min-width: 62rem) {
  .tool-layout {
    grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
}
.tool,
.quiz {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.tool-group {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
@media (min-width: 30rem) {
  .tool-group:not(.tool-group--list) {
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  }
}
.tool-group legend,
.quiz legend {
  padding: 0;
  margin-bottom: 0.6rem;
  font-size: var(--step-1);
  font-weight: 650;
}
.tool-field {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  min-width: 0;
}
.tool-field input,
.tool-field select {
  width: 100%;
  min-width: 0;
}
.tool-field label {
  font-weight: 550;
  font-size: 0.95rem;
}
.tool-field small {
  color: var(--ink-3);
}
.tool-field__input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ink-3);
  border-radius: var(--radius);
  background: var(--surface);
}
.tool-field__input:focus-within {
  outline: 3px solid var(--moss);
  outline-offset: 2px;
}
.tool-field__input input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: none;
  outline: none;
}
.tool-field__input span {
  padding-right: 0.75rem;
  color: var(--ink-3);
  font-size: var(--step--1);
  white-space: nowrap;
}
.tool-field > input,
.tool-field > select {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--ink-3);
  border-radius: var(--radius);
  background: var(--surface);
}
.tool-remove {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger);
  text-decoration: underline;
  cursor: pointer;
}
.tool-check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.tool-check input {
  accent-color: var(--moss);
}
.tool-result {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--fern);
}
.tool-result dl {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}
.tool-result dt {
  font-size: var(--step--1);
  color: var(--ink-2);
}
.tool-result dd {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 650;
  line-height: 1.25;
}
.tool-result dd span {
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--ink-2);
}
.tool-result ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.quiz fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.quiz__option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0;
}
.quiz__option input {
  margin-top: 0.25rem;
  accent-color: var(--moss);
  width: 1.1rem;
  height: 1.1rem;
}
.quiz select,
.quiz input[type="number"] {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--ink-3);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: plan;
}
.plan li {
  counter-increment: plan;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.plan li::before {
  content: counter(plan);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  color: var(--moss);
}
.plan h3 {
  font-size: var(--step-1);
  margin-bottom: 0.25rem;
}
.plan p {
  color: var(--ink-2);
}
.result-head h2 {
  font-size: var(--step-4);
  margin-bottom: 0.5rem;
}
.result-block {
  margin-top: 2.5rem;
}
.result-block > h2 {
  font-size: var(--step-3);
  margin-bottom: 0.75rem;
}
.checks-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
}
.checks-list li + li {
  margin-top: 0.35rem;
}

.tool-cards {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
@media (min-width: 44rem) {
  .tool-cards {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
  }
}
@media (min-width: 68rem) {
  .tool-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.picked {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.picked button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--step--1);
}
.save-profile {
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--ink-3);
  border-radius: var(--radius-lg);
}
.save-profile p {
  margin-bottom: 0.75rem;
  color: var(--ink-2);
}

/* ── Touch screens (phones and tablets) ──────────────────────────────────── */

/* iOS Safari zooms the page when a focused field's text is under 16px. */
.alert-form input[type="email"],
.search-form input,
.newsletter-form input[type="email"] {
  font-size: 1rem;
}

/* Apple's guideline is a 44pt touch target. Small controls grow on touch devices only. */
@media (pointer: coarse) {
  .btn--small,
  .share a,
  .share button {
    min-height: 2.75rem;
  }
  .toc--inline summary,
  .alert-form summary,
  .offers__history summary {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }
  .toc--inline summary::before,
  .alert-form summary::before,
  .offers__history summary::before {
    content: "+";
    margin-right: 0.5rem;
    font-weight: 700;
    color: var(--moss);
  }
  .toc--inline[open] > summary::before,
  .alert-form[open] > summary::before,
  .offers__history[open] > summary::before {
    content: "−";
  }
  .footer-base button,
  .picked button,
  .tool-remove {
    min-height: 2.75rem;
    padding-inline: 0.25rem;
  }
  .footer-col li a,
  .mega__cols li a,
  .crumbs a,
  .cluster a {
    padding-block: 0.6rem;
  }
  .prose li:has(> input[type="checkbox"]) {
    min-height: 2.75rem;
    padding-block: 0.5rem;
    cursor: pointer;
  }
  .prose input[type="checkbox"] {
    width: 1.5em;
    height: 1.5em;
  }
  .quiz__option {
    min-height: 2.75rem;
    align-items: center;
  }
  .quiz__option input {
    margin-top: 0;
  }
}

/* Phones: keep the pinned product column narrow so more of the table shows. */
@media (max-width: 40rem) {
  .compare th[scope="row"] {
    min-width: 8.5rem;
    max-width: 9.5rem;
  }
  .compare td {
    min-width: 6.5rem;
  }
  .table-scroll th,
  .table-scroll td {
    padding: 0.7rem 0.75rem;
  }
}
@media (max-width: 22.5rem) {
  .logo {
    font-size: 1rem;
    gap: 0.35rem;
  }
}

/* ── WordPress additions ─────────────────────────────────────────────────── */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.prose .alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption-text,
.prose .wp-element-caption {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--ink-3);
}
.prose img { max-width: 100%; height: auto; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* "Shop for this on Amazon" box */
.shop {
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--fern);
  font-family: var(--font-display);
}
.shop > h2 { margin: 0 0 0.75rem; font-size: var(--step-1); }
.shop__market + .shop__market { margin-top: 1rem; }
.shop__list { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; margin: 0; padding: 0; list-style: none; }
.shop__note { margin: 0.75rem 0 0; color: var(--ink-2); font-size: var(--step--1); }

/* Unsubscribe / alert confirmation buttons */
.message-form { margin-top: 1.5rem; }
