/* Tire Guide: the index and the article pages. Built by scripts/build-guide.mjs. */

.guide-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-5);
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
  align-items: start;
}
@media (max-width: 900px) {
  /* minmax(0, 1fr), not 1fr: a plain 1fr column grows to fit its widest
     child, so the comparison table's minimum width pushed the whole page
     wider than the phone and left a blank strip down the right. */
  .guide-wrap { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
}

.guide-crumbs {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: #6b6862;
}
.guide-crumbs a { color: inherit; }
.guide-crumbs a:hover { color: var(--text); }
.guide-crumbs span { margin: 0 0.3rem; }
.guide-crumbs span:last-child { margin: 0; }

.guide-article { max-width: 70ch; }
.guide-article h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); text-wrap: balance; }
.guide-meta { font-size: 0.85rem; color: #6b6862; margin: 0 0 var(--space-3); }

/* The answer first, in a box: what a reader skimming, or an assistant
   quoting, should take away even if they read nothing else. */
.guide-answer {
  background: #FFF6E6;
  border: 1px solid #FFD9A0;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
}
.guide-answer strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9A5B00;
  margin-bottom: 0.3rem;
}
.guide-answer p { margin: 0; font-size: 1.08rem; line-height: 1.55; }

.guide-body { font-size: 1.04rem; line-height: 1.7; }
.guide-body h2 { font-size: 1.45rem; margin-top: var(--space-4); }
.guide-body h3 { font-size: 1.15rem; margin-top: var(--space-3); }
.guide-body p, .guide-body ul, .guide-body ol { margin: 0 0 var(--space-2); }
.guide-body ul, .guide-body ol { padding-left: 1.3rem; }
.guide-body ul { list-style: disc; }
.guide-body ol { list-style: decimal; }
.guide-body li { margin-bottom: 0.35rem; }
.guide-body a, .guide-answer a, .guide-faq a { color: #B36A00; text-decoration: underline; text-underline-offset: 2px; }
.guide-body blockquote {
  margin: var(--space-3) 0;
  padding: 0.2rem 0 0.2rem var(--space-2);
  border-left: 3px solid var(--accent);
  font-style: italic;
}

/* Comparison tables: scroll sideways on a phone rather than squash. */
.guide-table { overflow-x: auto; margin: var(--space-3) 0; border: 1px solid var(--surface-border); border-radius: 12px; }
.guide-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--surface-border); line-height: 1.45; }
.guide-table thead th { background: #2F2E2E; color: #fff; font-size: 0.85rem; letter-spacing: 0.02em; }
.guide-table thead th:last-child { background: var(--accent); color: #2F2E2E; }
.guide-table tbody th { background: var(--surface); font-weight: 600; width: 26%; }
.guide-table tbody tr:last-child th, .guide-table tbody tr:last-child td { border-bottom: 0; }
/* On a phone the three columns fit the screen at a smaller size instead of
   making people swipe sideways through the table. */
@media (max-width: 560px) {
  .guide-table table { min-width: 0; font-size: 0.8rem; }
  .guide-table th, .guide-table td { padding: 0.55rem 0.5rem; }
  .guide-table thead th { font-size: 0.75rem; }
  .guide-table tbody th { width: 28%; }
}

.guide-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111;
}
.guide-video iframe, .guide-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.guide-faq, .guide-transcript { margin-top: var(--space-4); }
.guide-faq h2, .guide-transcript h2 { font-size: 1.3rem; }
.guide-faq details, .guide-transcript details {
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 0.6rem;
}
.guide-faq summary, .guide-transcript summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
}
.guide-faq summary:focus-visible, .guide-transcript summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-faq details p { margin: 0; padding: 0 1rem 1rem; line-height: 1.6; }
.guide-transcript-text { padding: 0 1rem 1rem; max-height: 28rem; overflow-y: auto; line-height: 1.65; }
.guide-transcript-text p { margin: 0 0 0.6rem; }
.guide-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: #9A5B00;
  margin-right: 0.35rem;
}

.guide-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #2F2E2E;
  color: #fff;
}
.guide-cta strong { display: block; font-size: 1.1rem; }
.guide-cta span { display: block; opacity: 0.8; font-size: 0.92rem; margin-top: 0.2rem; }

.guide-related {
  position: sticky;
  top: 90px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--surface);
}
@media (max-width: 900px) { .guide-related { position: static; } }
.guide-related h2 { font-size: 1rem; margin-bottom: var(--space-2); }
.guide-related ul { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: grid; gap: 0.75rem; }
.guide-related a { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.guide-related a:hover { color: #B36A00; }
.guide-related li span { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #9A5B00; }
.guide-all { font-size: 0.9rem; color: #B36A00 !important; }

/* The index. */
.guide-index { padding-top: var(--space-2); padding-bottom: var(--space-6); max-width: 860px; }
/* The site gives every section a tall top and bottom; these are just groups. */
.guide-index > section { padding: 0; }
.guide-index h2 { font-size: 1.25rem; margin-top: var(--space-4); }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.guide-list a {
  display: block;
  position: relative;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guide-list a:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.guide-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-list strong { display: block; font-size: 1.08rem; margin-bottom: 0.25rem; padding-right: 4rem; }
.guide-list span { display: block; font-size: 0.92rem; color: #5d5a54; line-height: 1.5; }
.guide-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #2F2E2E;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .guide-list a { transition: none; }
}
