/* RoadReadyHub homepage. Loaded on the front page only. */

.home .site-content > .ast-container {
  max-width: none;
  padding: 0;
  display: block;
}

.rrh-home { color: var(--rrh-text); }
.rrh-home h1, .rrh-home h2, .rrh-home h3 { margin: 0; }
.rrh-home p { margin: 0; }
.rrh-home a { text-decoration: none; }

.rrh-section { padding: 64px 0; }
.rrh-section-head { display: grid; gap: 8px; margin-bottom: 32px; max-width: 62ch; }
.rrh-section-head h2 { font-size: clamp(26px, 22px + 1vw, 34px); }
.rrh-eyebrow {
  font-family: var(--rrh-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rrh-green);
}

/* ---------- Hero ---------- */
.rrh-hero { background: var(--rrh-surface); border-bottom: 1px solid var(--rrh-line); padding: 56px 0 60px; }
.rrh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.rrh-hero-copy { display: grid; gap: 18px; }
.rrh-hero h1 {
  font-size: clamp(34px, 24px + 2.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.rrh-hero-lead { font-size: 19px; line-height: 1.6; max-width: 52ch; }

.rrh-search { display: flex; max-width: 540px; margin-top: 6px; }
.rrh-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--rrh-ink);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  background: #FFFFFF;
  color: var(--rrh-ink);
  font-family: var(--rrh-body);
  font-size: 17px;
}
.rrh-search input[type="search"]::placeholder { color: #6B756F; }
.rrh-search input[type="search"]:focus { outline: 3px solid var(--rrh-amber); outline-offset: 0; }
.rrh-home .rrh-search button {
  height: 54px;
  margin: 0;
  padding: 0 22px;
  border: 2px solid var(--rrh-ink);
  border-radius: 0 2px 2px 0;
  background: var(--rrh-ink);
  color: #FFFFFF;
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.rrh-home .rrh-search button:hover,
.rrh-home .rrh-search button:focus { background: var(--rrh-green); border-color: var(--rrh-green); color: #FFFFFF; }

.rrh-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14.5px; }
.rrh-popular-label { font-family: var(--rrh-head); font-weight: 700; color: var(--rrh-ink); margin-right: 2px; }
.rrh-popular a {
  display: inline-block;
  padding: 6px 11px;
  border: 1px solid var(--rrh-line);
  border-radius: 2px;
  background: var(--rrh-bg);
  color: var(--rrh-ink);
}
.rrh-popular a:hover { border-color: var(--rrh-green); color: var(--rrh-green); }

/* Road-sign panel */
.rrh-sign {
  background: var(--rrh-green);
  border-radius: 8px;
  padding: 10px;
  color: #FFFFFF;
}
.rrh-sign-inner {
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 5px;
  padding: 22px 24px 18px;
}
.rrh-sign-title {
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 6px;
}
.rrh-facts { list-style: none; margin: 0; padding: 0; }
.rrh-facts li { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.rrh-facts li:first-child { border-top: 0; }
.rrh-facts a {
  display: grid;
  grid-template-columns: 7.2ch minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  color: #FFFFFF;
}
.rrh-fact-value {
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--rrh-amber);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rrh-fact-unit { font-size: 18px; margin-left: 2px; }
.rrh-fact-label { font-size: 16px; line-height: 1.35; }
.rrh-fact-arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid #FFFFFF;
  border-right: 2px solid #FFFFFF;
  transform: rotate(45deg);
  opacity: 0.7;
}
.rrh-facts a:hover .rrh-fact-label,
.rrh-facts a:focus-visible .rrh-fact-label { text-decoration: underline; text-underline-offset: 3px; }
.rrh-facts a:hover .rrh-fact-arrow { opacity: 1; }
.rrh-sign-note { margin-top: 10px; font-size: 13px; color: #CFE0D8; }

/* ---------- Route ---------- */
.rrh-route { background: var(--rrh-bg); }
.rrh-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rrh-step;
}
.rrh-steps::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 22px;
  right: 22px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--rrh-amber) 0 18px, transparent 18px 30px);
}
.rrh-step { position: relative; margin: 0; display: grid; gap: 8px; align-content: start; }
.rrh-step-num {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  background: var(--rrh-ink);
  color: #FFFFFF;
  border: 3px solid var(--rrh-bg);
  border-radius: 50%;
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.rrh-step:last-child .rrh-step-num { background: var(--rrh-green); }
.rrh-step h3 { font-size: 20px; line-height: 1.2; }
.rrh-step p { font-size: 16px; line-height: 1.55; }
.rrh-step-link { font-family: var(--rrh-head); font-weight: 700; font-size: 15px; color: var(--rrh-green); }
.rrh-step-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Topics ---------- */
.rrh-topics-band { background: var(--rrh-surface); border-top: 1px solid var(--rrh-line); border-bottom: 1px solid var(--rrh-line); }
.rrh-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rrh-topic-tile { margin: 0; border-top: 3px solid var(--rrh-ink); padding-top: 14px; display: grid; gap: 8px; align-content: start; }
.rrh-topic-tile h3 { font-size: 21px; line-height: 1.2; }
.rrh-topic-tile h3 a { color: var(--rrh-ink); }
.rrh-topic-tile h3 a:hover { color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
.rrh-topic-tile p { font-size: 15.5px; line-height: 1.5; }
.rrh-topic-count { font-family: var(--rrh-head); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rrh-green); }
.rrh-topic-tile.is-soon { border-top-color: var(--rrh-line); }
.rrh-topic-tile.is-soon .rrh-topic-count { color: #6B756F; }
.rrh-topic-tile.is-ask { border-top-color: var(--rrh-amber); }

/* ---------- Latest ---------- */
.rrh-latest-band { background: var(--rrh-bg); }
.rrh-latest-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rrh-line); }
.rrh-latest-item {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rrh-line);
}
.rrh-latest-main { display: grid; gap: 6px; max-width: 68ch; }
.rrh-latest-cat { font-family: var(--rrh-head); font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rrh-green); }
.rrh-latest-item h3 { font-size: clamp(20px, 18px + 0.5vw, 24px); line-height: 1.2; }
.rrh-latest-item h3 a { color: var(--rrh-ink); }
.rrh-latest-item h3 a:hover { color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
.rrh-latest-item p { font-size: 16px; }
.rrh-latest-meta { font-size: 14px; color: #5E6863; white-space: nowrap; align-self: end; }

/* ---------- Trust band ---------- */
.rrh-trust { background: var(--rrh-green); color: #DCE8E2; }
.rrh-trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.rrh-trust h2 { color: #FFFFFF; font-size: clamp(28px, 22px + 1.4vw, 40px); line-height: 1.1; max-width: 14ch; }
.rrh-trust .rrh-eyebrow { color: var(--rrh-amber); display: block; margin-bottom: 10px; }
.rrh-trust-copy { display: grid; gap: 16px; font-size: 17px; line-height: 1.65; }
.rrh-trust-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.rrh-trust-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid #FFFFFF;
  border-radius: 2px;
  color: #FFFFFF;
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 15px;
}
.rrh-trust-links a.is-primary { background: #FFFFFF; color: var(--rrh-green); }
.rrh-trust-links a:hover { background: var(--rrh-amber); border-color: var(--rrh-amber); color: var(--rrh-ink); }
.rrh-trust-small { font-size: 14px; color: #BFD3CA; }

.rrh-home + .rrh-footer, .rrh-footer { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .rrh-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .rrh-hero h1 { max-width: 18ch; }
  .rrh-sign { max-width: 560px; }
  .rrh-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrh-trust-grid { grid-template-columns: 1fr; gap: 24px; }
  .rrh-steps { grid-template-columns: 1fr; gap: 0; }
  .rrh-steps::before {
    top: 22px;
    bottom: 22px;
    left: 21px;
    right: auto;
    width: 4px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--rrh-amber) 0 14px, transparent 14px 24px);
  }
  .rrh-step { grid-template-columns: 46px minmax(0, 1fr); column-gap: 18px; row-gap: 4px; padding-bottom: 26px; }
  .rrh-step:last-child { padding-bottom: 0; }
  .rrh-step-num { grid-row: 1 / span 3; margin-bottom: 0; }
  .rrh-step h3 { padding-top: 10px; }
}
@media (max-width: 640px) {
  .rrh-section { padding: 44px 0; }
  .rrh-hero { padding: 36px 0 40px; }
  .rrh-hero-lead { font-size: 17.5px; }
  .rrh-search input[type="search"] { font-size: 16px; }
  .rrh-home .rrh-search button { padding: 0 16px; }
  .rrh-sign-inner { padding: 16px 16px 14px; }
  .rrh-facts a { grid-template-columns: 6.4ch minmax(0, 1fr) auto; gap: 12px; }
  .rrh-fact-value { font-size: 30px; }
  .rrh-fact-label { font-size: 15px; }
  .rrh-topic-grid { grid-template-columns: 1fr; gap: 24px; }
  .rrh-latest-item { grid-template-columns: 1fr; }
  .rrh-latest-meta { align-self: start; }
}

/* ---------- Blog index and topic pages ---------- */
.blog .site-content > .ast-container,
.category .site-content > .ast-container { max-width: none; padding: 0; display: block; }
.rrh-listing-head { background: var(--rrh-surface); border-bottom: 1px solid var(--rrh-line); padding: 48px 0 30px; }
.rrh-listing-head h1 { font-size: clamp(32px, 24px + 2vw, 48px); line-height: 1.1; margin: 8px 0 12px; }
.rrh-listing-intro { font-size: 18px; max-width: 60ch; }
.rrh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.rrh-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--rrh-line);
  border-radius: 2px;
  background: var(--rrh-bg);
  color: var(--rrh-ink);
  font-family: var(--rrh-head);
  font-weight: 500;
  font-size: 15px;
}
.rrh-chips a:hover { border-color: var(--rrh-green); color: var(--rrh-green); }
.rrh-chips a.is-active { background: var(--rrh-ink); border-color: var(--rrh-ink); color: #FFFFFF; }
.rrh-chip-count { margin-left: 8px; font-size: 13px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.rrh-listing .rrh-latest-band { padding-top: 16px; }
.rrh-row-title { font-size: clamp(20px, 18px + 0.5vw, 24px); line-height: 1.2; margin: 0; }
.rrh-row-title a { color: var(--rrh-ink); }
.rrh-row-title a:hover { color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
.rrh-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.rrh-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rrh-line);
  background: var(--rrh-surface);
  color: var(--rrh-ink);
  font-family: var(--rrh-head);
}
.rrh-pagination .current { background: var(--rrh-ink); border-color: var(--rrh-ink); color: #FFFFFF; }
.rrh-empty { font-size: 17px; }
.rrh-empty a { color: var(--rrh-green); text-decoration: underline; }
.rrh-latest-all { margin-top: 24px; }
.rrh-latest-all a { font-family: var(--rrh-head); font-weight: 700; color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .rrh-listing-head { padding: 32px 0 22px; }
  .rrh-listing-intro { font-size: 16.5px; }
}
/* ---------- Clickable cards ---------- */
.rrh-stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rrh-stretched:focus-visible { outline: none; }
.rrh-stretched:focus-visible::after { outline: 3px solid var(--rrh-amber); outline-offset: 4px; }
.rrh-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--rrh-green);
}
.rrh-read::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

/* Guide rows */
.rrh-latest-item { position: relative; }
.rrh-latest-item.has-thumb {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.rrh-latest-item:not(.has-thumb) { grid-template-columns: minmax(0, 1fr); }
.rrh-latest-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--rrh-soft);
  border: 1px solid var(--rrh-line);
}
.rrh-latest-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.rrh-latest-main { max-width: none; }
.rrh-latest-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; margin-top: 6px; }
.rrh-latest-foot .rrh-latest-meta { align-self: auto; }
.rrh-latest-item:hover .rrh-row-title a,
.rrh-latest-item:hover h3 a { color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
.rrh-latest-item:hover .rrh-latest-thumb img { transform: scale(1.03); }
.rrh-latest-item:hover .rrh-read::after { transform: translateX(3px) rotate(45deg); }
.rrh-home h3.rrh-row-title { font-size: clamp(20px, 18px + 0.5vw, 24px); line-height: 1.2; }

/* Topic tiles */
.rrh-topic-tile.is-link { position: relative; padding-bottom: 6px; }
.rrh-topic-tile.is-link .rrh-read { margin-top: 4px; }
.rrh-topic-tile.is-link:hover { border-top-color: var(--rrh-green); }
.rrh-topic-tile.is-ask.is-link:hover { border-top-color: var(--rrh-amber); }
.rrh-topic-tile.is-link:hover h3 a { color: var(--rrh-green); text-decoration: underline; text-underline-offset: 3px; }
.rrh-topic-tile.is-link:hover .rrh-read::after { transform: translateX(3px) rotate(45deg); }

@media (max-width: 640px) {
  .rrh-latest-item.has-thumb { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .rrh-latest-thumb img, .rrh-read::after { transition: none; }
  .rrh-latest-item:hover .rrh-latest-thumb img { transform: none; }
}