/* ==========================================================================
   Site stylesheet — editorial light theme, plain CSS, no build step required.
   ========================================================================== */

:root {
  --ink: #15181f;
  --ink-2: #4d5566;
  --ink-3: #626c7c;
  --line: #e4e7ee;
  --line-soft: #eef0f5;
  --bg: #ffffff;
  --bg-soft: #f6f7fa;
  --bg-tint: #fafbfd;
  --brand: #0b5fc4;
  --brand-dark: #084a9b;
  --brand-soft: #e9f1fd;
  --accent: #0b7a5b;
  --accent-soft: #e6f5f0;
  --ad-bg: #fafbfc;
  --ad-line: #d6dbe4;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -14px rgba(16, 24, 40, .22);
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Keyboard focus is visible on every interactive element, not just the search field. */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.28; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.15rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.18rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.3em; }
li { margin-bottom: .45em; }
strong { font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: .92em; }

/* The [hidden] attribute has to beat the display values declared on the components below, because
   the article filter sets element.hidden directly. A plain UA-level rule loses to any author rule
   that sets display on the same element, so this one is explicit. */
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  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: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn--ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* ------------------------------------------------------------ cookie bar */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px -18px rgba(16, 24, 40, .4);
}
.cookie-bar__inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
}
.cookie-bar__text { margin: 0; font-size: .88rem; color: var(--ink-2); max-width: 720px; }
.cookie-bar__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* -------------------------------------------------------------- masthead */
.masthead { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }

/* Row 1 — navigation only. The header deliberately carries no logo or wordmark. */
.masthead__bar { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 6px; }
.masthead__bar .nav { flex: 1; }

.nav__list { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__list a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: .92rem; font-weight: 500;
}
.nav__list a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav__list a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.nav-toggle {
  display: none; width: 42px; height: 38px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; cursor: pointer; padding: 9px 10px; flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-2); margin-bottom: 4px; border-radius: 2px; }
.nav-toggle span:last-child { margin-bottom: 0; }

/* Row 2 — the site-wide search module (AdSense for Search / related-searches pattern).
   The search box spans the full content width, and the keyword row stays on one line. */
.masthead__afs { padding-bottom: 12px; }
.masthead__afs .searchbar { max-width: none; }

.masthead__chips { margin-top: 9px; }
/* The keyword row sits centred under the search box, in the related-searches pattern used by
   search result pages. It wraps rather than clipping if labels ever grow. */
.masthead__chips .chips__row { gap: 6px; justify-content: center; }

.chip--sm {
  padding: 5px 10px; font-size: .78rem; font-weight: 600; box-shadow: none;
  background: var(--bg-soft); border-color: var(--line); white-space: nowrap;
}
.chip--sm .chip__arrow { font-size: .78rem; }

/* Keep the search box reachable while scrolling, but stop the keyword row from eating the
   viewport. Toggled by main.js on scroll. */
.masthead.is-condensed .masthead__chips { display: none; }
.masthead.is-condensed .masthead__afs { padding-bottom: 10px; }

/* Anchor targets must clear the sticky header. */
h1[id], h2[id], h3[id], h4[id] { scroll-margin-top: 150px; }

/* ------------------------------------------------------------- searchbar */
.searchbar { position: relative; display: flex; gap: 10px; max-width: 720px; }
.searchbar__input {
  flex: 1; min-width: 0; padding: 12px 16px; font: inherit; font-size: .98rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft);
  color: var(--ink);
}
.searchbar__input:focus { outline: 2px solid var(--brand); outline-offset: 1px; background: #fff; }
.searchbar__btn {
  flex-shrink: 0; padding: 12px 22px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; font: inherit; font-size: .95rem;
  font-weight: 600; cursor: pointer;
}
.searchbar__btn:hover { background: var(--brand-dark); }
.searchbar__suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 90;
  margin: 0; padding: 6px; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 320px; overflow: auto;
}
.searchbar__suggest li { margin: 0; }
.searchbar__suggest a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-size: .93rem; }
.searchbar__suggest a:hover, .searchbar__suggest a.is-focus { background: var(--bg-soft); text-decoration: none; }
.searchbar__suggest small { display: block; color: var(--ink-3); font-size: .78rem; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 34px 0 8px; }
.hero__eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: .76rem;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { max-width: 780px; }
.hero__lede { font-size: 1.08rem; color: var(--ink-2); max-width: 700px; margin-bottom: 22px; }

/* The headline band. It carries no search box of its own: the search module lives in the sticky
   header, so every page shows exactly one search box and one keyword row. */
.hero--lead { background: var(--bg-tint); border-bottom: 1px solid var(--line); padding: 32px 0 30px; }
.hero--lead h1 { max-width: 840px; }
.hero--lead .hero__lede { margin-bottom: 0; }

/* ---------------------------------------------------------------- chips */
.chips__row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.chip__arrow { color: var(--ink-3); font-size: .95rem; }
.chip[data-product-url=""] .chip__arrow::after { content: ""; }

/* ------------------------------------------------------------------- ads */
.ad-slot {
  margin: 26px 0; padding: 10px; border: 1px dashed var(--ad-line);
  border-radius: var(--radius); background: var(--ad-bg);
}
.ad-slot__label {
  margin: 0 0 8px; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.ad-slot__body {
  display: grid; place-items: center; min-height: 90px; padding: 18px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 8px;
  color: var(--ink-3); text-align: center;
}
.ad-slot__placeholder { font-size: .82rem; max-width: 460px; }
.ad-slot__note { margin: 8px 0 0; font-size: .74rem; color: var(--ink-3); }
.ad-slot--leaderboard .ad-slot__body { min-height: 100px; }
.ad-slot--in-article .ad-slot__body { min-height: 250px; }
.ad-slot--sidebar .ad-slot__body { min-height: 250px; }
.ad-slot--search-top { border-style: solid; background: #fff; }
.ad-slot--search-top .ad-slot__label { color: var(--brand); }

/* ------------------------------------------------------------ ad unit box */
.adunit {
  margin: 26px 0; padding: 16px; border-radius: var(--radius);
  background: var(--bg-tint); border: 1px solid var(--line);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.adunit__tag {
  font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px;
}
.adunit__title { font-weight: 700; margin: 0 0 2px; }
.adunit__meta { margin: 0; font-size: .84rem; color: var(--ink-3); }

/* ----------------------------------------------------------------- cards */
.section { padding: 40px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section__head h2 { margin: 0; }
.section__head a { font-size: .9rem; font-weight: 600; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: #cfd6e2; box-shadow: var(--shadow); }
.card__media {
  display: block; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--bg-soft); background-image: linear-gradient(135deg, #f2f4f8 0%, #e7ecf3 100%);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card__cat { margin: 0 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.card__title { font-size: 1.06rem; margin: 0 0 8px; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--brand); text-decoration: none; }
.card__excerpt { margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); flex: 1; }
.card__meta { margin: 0; font-size: .78rem; color: var(--ink-3); }

/* ------------------------------------------------------------ page layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; padding: 32px 0 48px; }
.layout--full { grid-template-columns: minmax(0, 1fr); }

.crumbs-wrap { padding-top: 22px; }
.crumbs { margin-bottom: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--ink-3); }
.crumbs li { margin: 0; display: flex; gap: 8px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--ink-3); }

/* ---------------------------------------------------------------- article */
.article__header { padding-bottom: 6px; }
.article__cat { margin: 0 0 10px; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.article__title { font-size: 2.05rem; margin-bottom: 14px; }
.article__lede { font-size: 1.06rem; color: var(--ink-2); }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 6px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: .82rem; color: var(--ink-3); }
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* The reading measure. 640px at the default 17px body size is roughly 75 characters per line.
   Everything the column carries directly - the heading, the standfirst, the prose, the contents
   list, the ad slots and a product page's photograph - lines up on it. The related-articles grid
   below keeps the full column width, because it is a three-column card layout rather than prose. */
.article__title,
.article__lede,
.article__body,
.article > .toc,
.article > .ad-slot,
.article > .figure--page,
.layout > div > .ad-slot { max-width: 640px; }
.article__body h2 { margin-top: 2em; padding-top: .2em; }
.article__body h3 { margin-top: 1.6em; }
.article__body > p:first-of-type { font-size: 1.05rem; }
.article__body ul li::marker, .article__body ol li::marker { color: var(--ink-3); }

.callout {
  margin: 1.6em 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--brand-soft); border-left: 4px solid var(--brand);
}
.callout p:last-child { margin-bottom: 0; }
.callout--warn { background: #fff7e8; border-left-color: #d98a00; }
.callout__title { font-weight: 700; margin: 0 0 6px; }

.figure { margin: 1.8em 0; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.figure figcaption { margin-top: 8px; font-size: .82rem; color: var(--ink-3); line-height: 1.5; }

.table-wrap { margin: 1.8em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
caption { caption-side: top; text-align: left; padding: 12px 14px 0; font-size: .82rem; color: var(--ink-3); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--bg-soft); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: var(--bg-tint); }
td strong, th strong { font-weight: 700; }

.spec { margin: 1.2em 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-tint); }
.spec h4 { margin: 0 0 10px; font-size: .95rem; }
.spec dl { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .88rem; }
.spec dt { color: var(--ink-3); }
.spec dd { margin: 0; }

.toc { margin: 1.6em 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-tint); }
.toc h2 { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .92rem; }
.toc li { margin-bottom: .3em; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--brand); }

.keytakeaways { margin: 1.6em 0; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); }
.keytakeaways h2 { font-size: 1rem; margin: 0 0 10px; color: #0a6b50; }
.keytakeaways ul { margin: 0; padding-left: 1.2em; }
.keytakeaways li { color: #14483a; }

.productblock { margin: 2em 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.productblock__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.productblock__head h3 { margin: 0; }
.productblock__price { font-size: .88rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.productblock__fit { margin: 0 0 10px; font-size: .86rem; color: var(--ink-3); }
.productblock__fit strong { color: var(--ink-2); }

.todo {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: .82em;
  font-weight: 600; background: #fff2d8; color: #8a5a00; border: 1px solid #f0d69a;
}

/* Figures — self-activating image positions -------------------------------
   Each figure ships with an <img> that already points at its final path plus a labelled
   placeholder. The img is shown by default so the figure works even before any script runs;
   only when the image genuinely fails to load (onerror adds .is-missing) does the placeholder
   take its place. The legacy .has-image class is still accepted so the existing inline
   onload handler does not need to change. */
.figure--slot .figure__img { display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--line); }
.figure--slot.has-image .figure__img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.figure--slot .figure__slot,
.figure--slot.has-image .figure__slot { display: none; }
.figure--slot.is-missing .figure__img { display: none; }
.figure--slot.is-missing .figure__slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 190px; padding: 26px 22px; text-align: center;
  border: 1px dashed var(--ad-line); border-radius: var(--radius); background: var(--bg-tint);
}
.figure__slot-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--brand); border-radius: 999px; padding: 2px 10px;
}
.figure__slot-brief { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); max-width: 560px; }
.figure__slot-path {
  margin: 0; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); word-break: break-all;
}

.howto {
  margin: 1.6em 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.howto h3 { margin: 0 0 8px; font-size: .95rem; }
.howto ol { margin: 0; padding-left: 1.2em; font-size: .9rem; }

.promo-note {
  margin: 1.2em 0; padding: 12px 16px; font-size: .85rem; color: var(--ink-2);
  background: var(--bg-soft); border-radius: 8px; border: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------- sidebar */
.sidebar { position: relative; }
.sidebar__block { margin-bottom: 32px; }
.sidebar__block h2 { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.sidebar__list { list-style: none; margin: 0; padding: 0; }
.sidebar__list li { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.sidebar__list li:last-child { border-bottom: 0; }
.sidebar__list a { font-size: .92rem; font-weight: 500; color: var(--ink); display: block; }
.sidebar__list a:hover { color: var(--brand); text-decoration: none; }
.sidebar__list small { display: block; color: var(--ink-3); font-size: .78rem; margin-top: 2px; }

.sticky { position: sticky; top: 132px; }

/* --------------------------------------------------------------- related */
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.related h2 { margin-bottom: 20px; }

/* ------------------------------------------------------------ hero panels */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; }
.panel h2 { font-size: 1.05rem; }
.panel--accent { background: var(--accent-soft); border-color: #c8e8dd; }

.prose h2 { margin-top: 1.9em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { margin-bottom: 1.2em; }

/* --------------------------------------------------------------- product */
.producthero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; padding: 30px 0 10px; }
.buyslot { margin: 22px 0; padding: 18px 20px; border: 2px dashed var(--brand); border-radius: var(--radius); background: var(--brand-soft); }
.buyslot__title { margin: 0 0 6px; font-weight: 700; color: var(--brand-dark); }
.buyslot__text { margin: 0 0 14px; font-size: .88rem; color: var(--ink-2); }
.buyslot__pending { margin: 12px 0 0; font-size: .8rem; color: var(--ink-3); }
.buyslot__pending code { background: #fff; padding: 1px 5px; border-radius: 4px; }
/* While no retail URL is configured the call to action is a non-interactive placeholder
   rather than an anchor pointing at "#". */
.buyslot .btn--pending { background: #fff; color: var(--ink-2); border-color: var(--ad-line);
  cursor: default; }
.buyslot .btn--pending:hover { background: #fff; color: var(--ink-2); }

/* ---------------------------------------------------------------- search */
.serp { margin: 0; padding: 0; list-style: none; }
.serp li { margin: 0 0 22px; }
.serp__path { font-size: .8rem; color: var(--ink-3); margin: 0 0 2px; word-break: break-all; }
.serp__title { margin: 0 0 4px; font-size: 1.12rem; }
.serp__desc { margin: 0; font-size: .92rem; color: var(--ink-2); }
.serp__tag { font-size: .74rem; color: var(--brand); font-weight: 600; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-tint); color: var(--ink-2); }

.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filterbar a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; color: var(--ink-2); background: #fff; }
.filterbar a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.filterbar a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------- footer */
.sitefoot { margin-top: 56px; padding: 44px 0 30px; background: #12161d; color: #b9c1cf; }
.sitefoot a { color: #dfe5ee; }
.sitefoot a:hover { color: #fff; }
.sitefoot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.sitefoot__brand { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.sitefoot__text { font-size: .86rem; color: #8e97a8; margin: 0; }
.sitefoot h2 { color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot li { margin-bottom: 8px; font-size: .88rem; }
.sitefoot__bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid #262c37; font-size: .8rem; color: #8e97a8; }
.sitefoot__bottom p { margin: 0 0 8px; }
.sitefoot__note { max-width: 820px; font-size: .78rem; color: #7e8798; }
.sitefoot__disclosure { max-width: 800px; }

/* -------------------------------------------------- category cards (home) */
/* Flexible by design: the grid fits however many categories are configured, without a layout
   change. The 190px minimum puts the five current categories on a single row at the full
   1080px content width, while six or more wrap into a second row rather than squeezing. */
.grid--cats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.catcard {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 18px 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.catcard:hover { border-color: #cfd6e2; box-shadow: var(--shadow); }
.catcard__link { display: block; color: inherit; }
.catcard__link:hover { text-decoration: none; }
.catcard__name { font-size: 1.06rem; margin: 0 0 8px; }
.catcard__link:hover .catcard__name { color: var(--brand); }
.catcard__lead { margin: 0 0 14px; font-size: .87rem; color: var(--ink-2); flex: 1; line-height: 1.55; }
.catcard__meta {
  margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--brand);
}
.catcard__latest {
  margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: .8rem; color: var(--ink-3); line-height: 1.5;
}
.catcard__latest a { color: var(--ink-2); }

/* Category hero reuses the home hero band but is shorter, because the breadcrumb sits above it. */
.hero--cat { padding: 26px 0 26px; }
.hero--cat h1 { max-width: 720px; }

/* Anchors inside card and article labels keep the label colour until hovered. */
.card__cat a, .article__cat a, .crumbs a { color: inherit; }
.card__cat a:hover, .article__cat a:hover, .crumbs a:hover { color: var(--brand); }
.crumbs a:hover { text-decoration: none; }

/* Sidebar: the "all guides in this category" link and the compact plain list. */
.sidebar__more { margin: 12px 0 0; font-size: .86rem; font-weight: 600; }
.sidebar__list--plain a { font-size: .88rem; font-weight: 400; }

/* --------------------------------------------------- category hero + page image */
/* A category page with a pooled photograph puts the headline beside it. A category with no
   supplied photograph renders the headline alone, so the two-column grid is only emitted when
   there is something to fill column two. */
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 34px; align-items: center;
}
.hero__grid .hero__lede { max-width: 600px; }
.hero__grid .figure--page { margin: 0; }

/* One photograph per category page and per product landing page, drawn from that category's pool.
   A fixed ratio keeps portrait and square sources from changing the height of the block. */
.figure--page { margin: 0 0 24px; }
.figure--page .figure__img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.hero--cat .figure--page .figure__img { aspect-ratio: 4 / 3; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .producthero { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sitefoot__grid { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  h1 { font-size: 1.72rem; }
  .article__title { font-size: 1.6rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--cats { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; }
  .nav.is-open { display: block; }
  .masthead__bar { flex-wrap: wrap; }
  .nav__list { flex-direction: column; gap: 2px; padding-bottom: 8px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar__btn { width: 100%; }
  /* Keep the mobile header short: the keyword row scrolls sideways instead of stacking.
     justify-content must be flex-start here: a centred scroll container pushes its first items
     past the start edge, where they cannot be reached by scrolling. */
  .masthead__chips .chips__row {
    flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .masthead__chips .chips__row::-webkit-scrollbar { display: none; }
  h1[id], h2[id], h3[id], h4[id] { scroll-margin-top: 12px; }
  .spec dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .spec dt { margin-top: 8px; }
  .sitefoot__grid { grid-template-columns: minmax(0, 1fr); }
  .cookie-bar__inner { flex-wrap: wrap; }
  .cookie-bar__text { min-width: 0; }
  .cookie-bar__actions { width: 100%; }
  .cookie-bar__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .masthead, .sitefoot, .ad-slot, .adunit, .cookie-bar, .sidebar, .related, .filterbar { display: none !important; }
}
