/* ============================================================
   SpectraLight buyer-guide stylesheet (guide.css)
   Loaded on pages with guideCss in their front matter: the
   buyer guides (src/guide-pages.njk) and their hub
   (src/guide-hub.njk). It sits on top of store.css and only
   adds what that file has no part for: the short answer, the
   ranked picks beside the store's listing card, the spec table,
   the long read, the verdict and the hub's guide cards.
   Data: /guide-content through src/_data/guidePages.js.
   ============================================================ */

.guide-page { --guide-text: #3a444f; }

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

/* Links inside running text (the site-wide rule leaves a link the colour of its paragraph). */
.guide-hero .sm-lead a,
.guide-answer a,
.guide-notice a,
.guide-prose a,
.guide-pick__text p a,
.guide-pick__fit a,
.guide-note a,
.guide-factors .sm-why__text a,
.guide-article p a,
.guide-article li a,
.guide-table--plain a,
.guide-page .store-faq__a a,
.guide-verdict p a {
  color: var(--sm-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(26, 115, 232, 0.35);
  text-underline-offset: 3px;
}
.guide-hero .sm-lead a:hover,
.guide-answer a:hover,
.guide-notice a:hover,
.guide-prose a:hover,
.guide-pick__text p a:hover,
.guide-pick__fit a:hover,
.guide-note a:hover,
.guide-factors .sm-why__text a:hover,
.guide-article p a:hover,
.guide-article li a:hover,
.guide-table--plain a:hover,
.guide-page .store-faq__a a:hover,
.guide-verdict p a:hover { text-decoration-color: currentColor; }

/* ---- Hero ---- */
.guide-hero .sm-h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.guide-hero .sm-lead { color: var(--guide-text); max-width: 60ch; }
.guide-hero .sm-btn-row { margin-top: 1.4rem; }

/* ---- The short answer, the notice, the intro ---- */
.guide-measure { max-width: 74ch; }
.guide-label {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sm-accent);
}
.guide-answer {
  padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.1rem, 2.8vw, 1.7rem);
  background: #eef4fe;
  border-radius: var(--sm-radius);
  box-shadow: inset 0 0 0 1.5px rgba(26, 115, 232, 0.35);
}
.guide-answer__text {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--sm-ink);
}
.guide-notice {
  margin-top: 1rem;
  padding: clamp(1rem, 2.2vw, 1.3rem) clamp(1.1rem, 2.8vw, 1.7rem);
  background: #fff7ed;
  border-radius: var(--sm-radius);
  box-shadow: inset 0 0 0 1.5px rgba(180, 83, 9, 0.35);
}
.guide-notice .guide-label { color: #b45309; }
.guide-notice__text { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--sm-ink); }
.guide-prose { margin-top: clamp(1.3rem, 3vw, 1.9rem); }
.guide-prose:first-child { margin-top: 0; }
.guide-prose .sm-h2 { margin-bottom: 0.9rem; }
.guide-prose > p { margin: 0 0 1rem; font-size: 1.04rem; line-height: 1.7; color: var(--guide-text); }
.guide-prose > p:last-child { margin-bottom: 0; }
.guide-prose strong,
.guide-answer strong,
.guide-notice strong { color: var(--sm-ink); font-weight: 600; }
.guide-prose button.sm-link { font-size: inherit; line-height: inherit; vertical-align: baseline; text-decoration: underline; text-decoration-color: rgba(26, 115, 232, 0.35); text-underline-offset: 3px; }

/* "On this page" / the hub's group links: a row of quiet pills */
.guide-toc { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: clamp(1.3rem, 3vw, 1.9rem); }
.guide-toc a {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  background: var(--sm-alt);
  border-radius: 980px;
  color: var(--sm-ink);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.guide-toc a:hover { background: var(--sm-ink); color: #fff; }

/* ---- The ranked picks: the store's listing card beside the reasons ---- */
.guide-picks-section .sm-head__sub { font-size: 1rem; }
.guide-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.guide-pick {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "card head" "card text";
  column-gap: clamp(1.25rem, 3vw, 2.25rem);
  row-gap: 0.75rem;
  margin: 0;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  background: #fff;
  border-radius: var(--sm-radius);
}
.guide-pick--top { box-shadow: inset 0 0 0 2px var(--sm-accent); }
.guide-pick__head { grid-area: head; min-width: 0; }
.guide-pick__card { grid-area: card; min-width: 0; }
.guide-pick__text { grid-area: text; min-width: 0; }
.guide-pick__card .sm-card { background: var(--sm-alt); }
.guide-pick__award {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sm-accent-2);
}
.guide-pick__rank {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--sm-ink);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}
.guide-pick--top .guide-pick__rank { background: var(--sm-accent); }
.guide-pick__name {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--sm-ink);
}
.guide-pick__name a { color: inherit; text-decoration: none; }
.guide-pick__name a:hover { color: var(--sm-accent); }
.guide-pick__text > p { margin: 0 0 0.9rem; font-size: 1rem; line-height: 1.65; color: var(--guide-text); }
.guide-pick__text strong { color: var(--sm-ink); font-weight: 600; }
.guide-pick__fit { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.1rem 0 1.1rem; }
.guide-pick__fit > div { margin: 0; padding: 0.85rem 1rem; background: var(--sm-alt); border-radius: 12px; }
.guide-pick__fit dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sm-ink);
}
.guide-pick__fit dt::before { content: ""; flex: 0 0 auto; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #1d7a46; }
.guide-pick__fit-mind dt::before { background: #b45309; }
.guide-pick__fit dd { margin: 0; font-size: 0.94rem; line-height: 1.5; color: var(--guide-text); }
.guide-note {
  max-width: 74ch;
  margin-top: 1rem;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  background: #fff;
  border-radius: var(--sm-radius);
}
.guide-note h3 { margin: 0 0 0.6rem; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--sm-ink); }
.guide-note p { margin: 0 0 0.8rem; font-size: 1rem; line-height: 1.65; color: var(--guide-text); }
.guide-note p:last-child { margin-bottom: 0; }

/* ---- What matters: white band, grey cards (the store's "why" cards), two to a row ---- */
.guide-factors-section { background: #fff; }
.guide-factors-section .sm-head__sub { max-width: 74ch; }
.guide-factors.sm-why__grid { grid-template-columns: repeat(2, 1fr); }
.guide-factors .sm-why__card { background: var(--sm-alt); }
.guide-factors .sm-why__card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.guide-factors .sm-why__k { font-weight: 700; color: var(--sm-accent-2); }
.guide-factors .sm-why__title { font-size: 1.15rem; }
.guide-factors .sm-why__text { font-size: 0.98rem; line-height: 1.6; color: var(--guide-text); }

/* ---- Tables: they scroll inside their own box, never the page ---- */
.guide-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--sm-radius);
  box-shadow: inset 0 0 0 1px var(--sm-line);
}
.guide-table {
  width: 100%;
  min-width: calc(8rem + var(--guide-cols, 3) * 9rem);
  margin: 0;
  border: 0;
  border-collapse: collapse;
  letter-spacing: normal;
  font-size: 0.93rem;
  line-height: 1.45;
  color: var(--guide-text);
}
.guide-table th,
.guide-table td {
  width: auto;
  height: auto;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--sm-line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}
.guide-table tr { background: transparent; }
.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table thead th {
  background: var(--sm-alt);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sm-ink);
  vertical-align: bottom;
}
.guide-table thead th a { color: inherit; text-decoration: none; }
.guide-table thead th a:hover { color: var(--sm-accent); }
.guide-table tbody th { width: 8rem; font-weight: 600; color: var(--sm-ink); }
.guide-table:not(.guide-table--plain) tbody th,
.guide-table:not(.guide-table--plain) thead th:first-child { position: sticky; left: 0; z-index: 1; }
.guide-table:not(.guide-table--plain) tbody th { background: #fff; }
.guide-table__price td { font-size: 1.05rem; font-weight: 600; color: var(--sm-ink); }
.guide-table__price td a { color: var(--sm-accent); font-size: 0.93rem; font-weight: 500; }
.guide-table__buy .sm-link { font-size: 0.93rem; }
.guide-table--plain { min-width: calc(9rem + var(--guide-cols, 2) * 8rem); }
.guide-table--plain tbody th { width: auto; }
.guide-article .guide-table-scroll { margin: 1.2rem 0 1.4rem; }

/* ---- The longer read ---- */
.guide-article > h2 { margin: clamp(2rem, 4vw, 2.75rem) 0 0.9rem; }
.guide-article > h2:first-child { margin-top: 0; }
.guide-article > p { margin: 0 0 1rem; font-size: 1.04rem; line-height: 1.7; color: var(--guide-text); }
.guide-article strong { color: var(--sm-ink); font-weight: 600; }
.guide-article > ul { margin: 0 0 1.1rem; padding: 0 0 0 1.25rem; list-style: disc; }
.guide-article > ul li { margin: 0 0 0.6rem; padding-left: 0.2rem; font-size: 1.02rem; line-height: 1.65; color: var(--guide-text); }
.guide-article > ul li::marker { color: var(--sm-accent); }
.guide-steps { list-style: none; margin: 0; padding: 0; counter-reset: guide-step; display: grid; gap: 0.6rem; }
.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  margin: 0;
  padding: 0.95rem 1.1rem 0.95rem 3.4rem;
  background: var(--sm-alt);
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--guide-text);
}
.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: 1rem;
  top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--sm-ink);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
}

/* ---- Questions: the store's accordion, with answers in the guide's darker text ---- */
.guide-page .store-faq__a p { color: var(--guide-text); }

/* ---- The verdict ---- */
.guide-verdict-section { padding-top: 0; }
.guide-verdict {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  background: var(--sm-alt);
  border-radius: var(--sm-radius);
}
.guide-verdict .sm-h2 { margin-bottom: 0.9rem; }
.guide-verdict > p { margin: 0 0 1rem; font-size: 1.04rem; line-height: 1.7; color: var(--guide-text); }
.guide-verdict > p.guide-label { margin: 0 0 0.45rem; font-size: 0.74rem; line-height: 1.3; color: var(--sm-accent); }
.guide-verdict strong { color: var(--sm-ink); font-weight: 600; }
.guide-verdict .sm-btn-row { margin-top: 1.4rem; }

/* ---- Related guides ---- */
.guide-related .guide-related__all { color: var(--sm-accent); }
.guide-related .guide-related__all:hover { color: #fff; }

/* ---- The hub: every guide, by group ---- */
.guide-hub-groups { padding-top: 0; }
.guide-hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.guide-hub-list li { margin: 0; min-width: 0; }
.guide-hub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.05rem 1.15rem 1.1rem;
  background: var(--sm-alt);
  border-radius: 14px;
  color: var(--sm-ink);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.guide-hub-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08); color: var(--sm-ink); }
.guide-hub-card__title { font-size: 1.04rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.guide-hub-card__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--guide-text);
}
.guide-hub-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: auto;
  padding-top: 0.7rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--sm-accent-2);
}
.guide-hub-card:hover .guide-hub-card__meta { text-decoration: underline; }

/* ---- Responsive ---- */
@media screen and (max-width: 980px) {
  .guide-hub-list { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 760px) {
  .guide-pick { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "head" "card" "text"; row-gap: 0.9rem; }
  /* The store card turns on its side: picture left, name, price and Buy right. */
  .guide-pick__card .sm-card { flex-direction: row; align-items: center; gap: 0.9rem; padding: 0.7rem 0.8rem; }
  .guide-pick__card .sm-card__media { flex: 0 0 34%; max-width: 150px; margin-bottom: 0; }
  .guide-pick__card .sm-card__cta { margin-top: 0; padding-top: 0.5rem; }
  .guide-pick__card .sm-card:hover { transform: none; }
}
@media screen and (max-width: 560px) {
  .guide-factors.sm-why__grid { grid-template-columns: 1fr; }
  .guide-pick__fit { grid-template-columns: 1fr; }
  .guide-hub-list { grid-template-columns: 1fr; }
  .guide-table th,
  .guide-table td { padding: 0.7rem 0.8rem; }
  .guide-table { min-width: calc(6.5rem + var(--guide-cols, 3) * 8.5rem); }
  .guide-table tbody th { width: 6.5rem; }
  .guide-table--plain { min-width: calc(6rem + var(--guide-cols, 2) * 6.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .guide-toc a, .guide-hub-card { transition: none; }
}
