/* TheBicycles.ca: editorial buying-guide design. Spruce ink, warm paper, maple red ONLY on buy buttons.
   Fonts: Fraunces (headings) + Atkinson Hyperlegible (body). Light mode only. rem everywhere. */
:root {
  --ink: #10342a;
  --ink-2: #0b261e;
  --paper: #faf7f0;
  --card: #ffffff;
  --text: #1c2723;
  --muted: #52605a;
  --line: #e2dccb;
  --tint: #eef0e6;
  --link: #17614a;
  --accent: #b91c2c;
  --accent-d: #961423;
  --narrow: 52rem;
  --wide: 70rem;
  --radius: 0.6rem;
  --head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --header-h: 4rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(18px, 17px + 0.3vw, 19.5px); -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); line-height: 1.65; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 0.18rem solid var(--ink); outline-offset: 0.15rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 1.25rem; }

h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); margin: 2.4rem 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 1.8rem 0 0.5rem; }
h4 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }

/* ---------- header ---------- */
.site-header { background: var(--ink); color: #f3efe4; position: sticky; top: 0; z-index: 50; }
.site-header__bar { max-width: var(--wide); margin-inline: auto; padding-inline: 1.25rem; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: relative; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; color: #f3efe4; text-decoration: none; }
.logo__mark { color: #f3efe4; flex: none; }
.logo__word { font-family: var(--head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.logo__tld { font-weight: 600; color: #c9d8c8; }
.nav-toggle { display: none; background: none; border: 0.1rem solid #3a5f52; border-radius: 0.4rem; width: 2.75rem; height: 2.75rem; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 1.25rem; height: 0.14rem; background: #f3efe4; position: relative; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -0.4rem; }
.nav-toggle__bars::after { position: absolute; top: 0.4rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a, .sub-toggle { color: #f3efe4; text-decoration: none; font: inherit; font-size: 0.95rem; padding: 0.6rem 0.8rem; border-radius: 0.4rem; display: block; background: none; border: 0; cursor: pointer; }
.site-nav a:hover, .sub-toggle:hover, .site-nav a[aria-current="page"] { background: #1d4a3c; color: #fff; }
.sub-toggle::after { content: ""; display: inline-block; width: 0.4rem; height: 0.4rem; margin-left: 0.4rem; border-right: 0.12rem solid currentColor; border-bottom: 0.12rem solid currentColor; transform: translateY(-0.15rem) rotate(45deg); }
.has-sub { position: relative; }
.sub { display: none !important; position: absolute; top: 100%; left: 0; min-width: 16rem; background: var(--ink-2); padding: 0.4rem !important; border-radius: 0.5rem; flex-direction: column; align-items: stretch !important; box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.25); }
.sub-toggle[aria-expanded="true"] + .sub, .has-sub:hover .sub, .has-sub:focus-within .sub { display: flex !important; }

@media (max-width: 52em) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--ink-2); display: none; padding: 0.5rem 1.25rem 1rem; box-shadow: 0 0.8rem 1.2rem rgba(0, 0, 0, 0.25); }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a, .sub-toggle { padding: 0.8rem 0.5rem; width: 100%; text-align: left; border-bottom: 0.06rem solid #214a3c; border-radius: 0; }
  .sub-toggle::after { display: none; }
  .sub { display: flex !important; position: static; box-shadow: none; background: transparent; padding: 0 0 0 1rem !important; min-width: 0; }
  .sub a { font-size: 0.9rem; }
  .sub-toggle { cursor: default; color: #c9d8c8; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 0.2rem; border-bottom: 0; }
}

/* ---------- article ---------- */
.article-head { padding-top: 2.25rem; }
.article-head h1 { max-width: 22ch; }
.byline { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.25rem; }
.byline a { color: var(--muted); }
.byline__sep { padding-inline: 0.35rem; color: var(--line); }
.article-hero { margin: 0 0 1.25rem; }
.article-hero img { width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.article-grid { display: block; padding-block: 1.25rem 3rem; }
.toc-rail { margin-bottom: 1.25rem; }
.toc { background: var(--card); border: 0.06rem solid var(--line); border-radius: var(--radius); padding: 0.2rem 1rem; font-size: 0.92rem; }
.toc summary { font-family: var(--head); font-weight: 700; color: var(--ink); cursor: pointer; padding: 0.7rem 0; }
.toc ol { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.toc li { margin: 0.35rem 0; line-height: 1.35; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose { max-width: none; }
.prose > * { max-width: var(--narrow); }
.prose p, .prose li { overflow-wrap: break-word; }
.prose img { border-radius: var(--radius); margin: 1.4rem auto; }
.prose blockquote { margin: 1.4rem 0; padding: 0.2rem 1.1rem; border-left: 0.25rem solid var(--ink); background: var(--tint); border-radius: 0 var(--radius) var(--radius) 0; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.35rem 0; }
.table-wrap { overflow-x: auto; max-width: 100%; margin: 1.5rem 0; border: 0.06rem solid var(--line); border-radius: var(--radius); background: var(--card); }
.prose > .table-wrap, .prose > .finder, .prose > .picks, .prose > figure, .prose > .wp-block-table { max-width: 100%; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.93rem; line-height: 1.45; }
th, td { padding: 0.65rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 0.06rem solid var(--line); }
thead th { background: var(--ink); color: #f3efe4; font-weight: 700; border-bottom: 0; white-space: nowrap; }
tbody tr:nth-child(even) { background: #faf8f2; }
tbody th { font-weight: 700; color: var(--ink); }
@media (min-width: 70em) {
  .article-grid.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 15.5rem; gap: 3rem; align-items: start; }
  .article-grid.has-toc .toc-rail { grid-column: 2; grid-row: 1; position: sticky; top: 5rem; margin: 0; max-height: calc(100vh - 6rem); overflow: auto; }
  .article-grid.has-toc .article-col { grid-column: 1; grid-row: 1; min-width: 0; }
  .toc summary { pointer-events: none; list-style: none; }
  .toc summary::-webkit-details-marker { display: none; }
}

/* comments */
.comments { max-width: var(--narrow); margin-top: 3rem; border-top: 0.06rem solid var(--line); }
.comments__list { list-style: none; padding: 0; margin: 0; }
.comment { background: var(--card); border: 0.06rem solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0.9rem 0; }
.comment__meta { margin: 0 0 0.3rem; font-size: 0.9rem; color: var(--muted); }
.comment__meta strong { color: var(--text); }
.comment__text p { margin: 0.3rem 0; overflow-wrap: anywhere; }

/* ---------- pages ---------- */
.page-wrap { padding-block: 2.25rem 3.5rem; }
.page-wrap--wide .listing__intro { color: var(--muted); }
.contact-email { font-family: var(--head); font-size: 1.35rem; color: var(--ink); overflow-wrap: anywhere; }
.contact-form { margin-top: 1.5rem; max-width: 36rem; }
.contact-form__field { margin: 0 0 1rem; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.contact-form .req { font-weight: 400; color: var(--muted); font-size: 0.85em; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 0.08rem solid #8a958e; border-radius: 0.4rem; background: #fff; color: var(--text); }
.contact-form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.btn { display: inline-block; font: inherit; font-weight: 700; background: var(--ink); color: #fff; border: 0; border-radius: 0.45rem; padding: 0.8rem 1.6rem; cursor: pointer; text-decoration: none; min-height: 2.75rem; }
.btn:hover { background: var(--ink-2); color: #fff; }
.contact-form__status { min-height: 1.5rem; font-weight: 700; }
.contact-form__status.is-ok { color: #14693f; }
.contact-form__status.is-error { color: #9a1c1c; }

/* ---------- home ---------- */
.home-hero { background: linear-gradient(180deg, #e9ecdf 0%, var(--paper) 100%); padding: 2.75rem 0 1.5rem; }
.home-hero h1 { max-width: 20ch; }
.lede { font-size: 1.2rem; max-width: 48ch; color: #2c3a33; margin: 0 0 1.75rem; }
.feature-cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.feature-card { display: block; background: var(--card); border: 0.06rem solid var(--line); border-radius: 0.8rem; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 0.2rem 0.8rem rgba(16, 52, 42, 0.07); transition: box-shadow 0.15s; }
.feature-card:hover { box-shadow: 0 0.5rem 1.4rem rgba(16, 52, 42, 0.16); color: var(--text); }
.feature-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-card__body { padding: 1.1rem 1.3rem 1.4rem; }
.feature-card h2 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.feature-card p { margin: 0 0 0.8rem; color: var(--muted); }
.feature-card__cta { color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.home-section { padding-block: 1.5rem 1rem; }
.home-section h2:first-child { margin-top: 1.5rem; }
.home-welcome { padding-bottom: 3.5rem; }
.home-welcome .prose img { max-width: min(100%, 24rem); }
.post-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 0.06rem solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); }
.post-card:hover { border-color: var(--ink); color: var(--text); }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card__body { display: block; padding: 0.9rem 1.1rem 1.1rem; }
.post-card h3 { margin: 0 0 0.4rem; font-size: 1.15rem; color: var(--ink); }
.post-card__desc { display: block; color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.post-card__date { display: block; margin-top: 0.6rem; font-size: 0.82rem; color: var(--muted); }
@media (min-width: 40em) { .post-grid { grid-template-columns: repeat(2, 1fr); } .feature-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62em) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- components ---------- */
.picks { margin: 2.2rem 0; padding: 1.25rem; background: var(--tint); border: 0.06rem solid var(--line); border-radius: 0.8rem; max-width: 100%; }
.prose > .picks { max-width: 100%; }
.picks h2 { margin-top: 0; }
.picks__note { color: var(--muted); margin: 1rem 0 0; font-size: 0.88rem; line-height: 1.5; }
.article-hero--inline { margin: 1.5rem 0; }
.picks__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.pick { background: var(--card); border: 0.06rem solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pick__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin: 0 !important; border-radius: 0 !important; }
.pick__body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.pick__name { margin: 0; font-size: 1.15rem; }
.pick__best { margin: 0; font-size: 0.95rem; }
.chips { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chips li { margin: 0 !important; line-height: 1.35; background: var(--tint); border: 0.06rem solid var(--line); border-radius: 2rem; padding: 0.15rem 0.65rem; font-size: 0.82rem; }
.pick__price { margin: 0.2rem 0 0; font-weight: 700; color: var(--ink); margin-top: auto; padding-top: 0.4rem; }
.btn-buy { display: block; width: 100%; text-align: center; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; padding: 0.85rem 1rem; border-radius: 0.45rem; min-height: 2.75rem; }
.btn-buy:hover { background: var(--accent-d); color: #fff; }
@media (min-width: 46em) { .picks__grid { grid-template-columns: repeat(3, 1fr); } .picks__grid:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, 1fr); } }

.faq { margin: 2.2rem 0; }
.faq__item { background: var(--card); border: 0.06rem solid var(--line); border-radius: var(--radius); margin: 0.6rem 0; }
.faq__item summary { cursor: pointer; font-weight: 700; padding: 0.85rem 1.1rem; color: var(--ink); }
.faq__a { padding: 0 1.1rem 0.9rem; }
.faq__a > :first-child { margin-top: 0; }

.callout { margin: 1.6rem 0; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--tint); border: 0.06rem solid var(--line); border-left: 0.3rem solid var(--ink); }
.callout--note { background: #f6f1e1; border-left-color: #8a6d1b; }
.callout__title { margin: 0 0 0.35rem; font-family: var(--head); font-weight: 700; color: var(--ink); }
.callout__body > :first-child { margin-top: 0; }
.callout__body > :last-child { margin-bottom: 0; }

.finder { margin: 2.2rem 0; max-width: 100%; }
.finder h2 { margin-top: 0; }
.finder__controls { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.5rem; }
.finder__controls input, .finder__controls select { font: inherit; padding: 0.55rem 0.7rem; border: 0.08rem solid #8a958e; border-radius: 0.4rem; background: #fff; max-width: 100%; }
.finder__controls label { font-size: 0.92rem; font-weight: 700; }
.finder__count { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0; }
.finder__table { min-width: 44rem; }
.finder__sort { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.finder__sort::after { content: " \2195"; opacity: 0.6; }
th[aria-sort="ascending"] .finder__sort::after { content: " \2191"; opacity: 1; }
th[aria-sort="descending"] .finder__sort::after { content: " \2193"; opacity: 1; }
.finder tr[hidden] { display: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #dfe7dc; margin-top: 2rem; padding: 2rem 0 2.25rem; font-size: 0.93rem; }
.site-footer a { color: #fff; }
.site-footer__disclosure { max-width: 60ch; margin: 0 0 1rem; }
.site-footer__links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.site-footer__copy { margin: 0; color: #b8c7bd; }
@media print { .site-header, .site-footer, .toc-rail { display: none; } }

.table-wrap td:first-child { min-width: 5.5rem; }
.table-wrap table:not(:has(tr > :nth-child(3))) { min-width: 0; }
.prose > .picks:first-child { margin-top: 0; }

