/* RoadReadyHub brand layer on top of Astra. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --rrh-green: #0E4B3B;
  --rrh-green-dark: #0A3A2D;
  --rrh-amber: #F2A900;
  --rrh-bg: #F7F8F5;
  --rrh-surface: #FFFFFF;
  --rrh-soft: #EEF2EE;
  --rrh-ink: #1A2420;
  --rrh-text: #4A5550;
  --rrh-line: #DDE2DC;
  --rrh-head: "Familjen Grotesk", "Arial Narrow", Arial, sans-serif;
  --rrh-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Base */
body,
.ast-separate-container,
.ast-plain-container,
.ast-page-builder-template {
  background: var(--rrh-bg);
}
body,
button,
input,
select,
textarea {
  font-family: var(--rrh-body);
  color: var(--rrh-text);
}
body {
  font-size: 17px;
  line-height: 1.65;
}
@media (min-width: 922px) {
  body { font-size: 18px; }
}

h1, h2, h3, h4, h5, h6,
.entry-content :where(h1, h2, h3, h4, h5, h6),
.entry-title,
.entry-title a {
  font-family: var(--rrh-head);
  color: var(--rrh-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}
h1, .entry-content h1, .entry-title { font-size: clamp(30px, 24px + 1.6vw, 42px); }
h2, .entry-content h2 { font-size: clamp(24px, 21px + 0.8vw, 28px); margin-top: 1.8em; }
h3, .entry-content h3 { font-size: clamp(19px, 18px + 0.3vw, 21px); margin-top: 1.5em; }
.entry-content > :first-child { margin-top: 0; }

a { color: var(--rrh-green); }
a:hover, a:focus { color: var(--rrh-green-dark); }
.entry-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--rrh-amber);
  outline-offset: 2px;
}

.entry-content p,
.entry-content ul,
.entry-content ol { margin-bottom: 1.1em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content strong { color: var(--rrh-ink); }

/* Header and wordmark */
.ast-primary-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar {
  background: var(--rrh-surface);
  border-bottom: 1px solid var(--rrh-line);
}
.site-title { margin: 0; line-height: 1; }
.site-title a { text-decoration: none; }
.rrh-wordmark {
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--rrh-ink);
  white-space: nowrap;
}
.rrh-ready { position: relative; display: inline-block; }
.rrh-ready::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -0.2em;
  height: 0.1em;
  background: repeating-linear-gradient(90deg, var(--rrh-amber) 0 0.42em, transparent 0.42em 0.66em);
}
.rrh-hub { color: var(--rrh-green); }
@media (max-width: 544px) {
  .rrh-wordmark { font-size: 22px; }
}

.main-header-menu .menu-link,
.ast-builder-menu-mobile .main-navigation .menu-link {
  font-family: var(--rrh-head);
  font-weight: 500;
  font-size: 16px;
  color: var(--rrh-ink);
}
.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current-menu-ancestor > .menu-link {
  color: var(--rrh-green);
}
@media (min-width: 922px) {
  .main-header-menu .current-menu-item > .menu-link,
  .main-header-menu .current-menu-ancestor > .menu-link {
    box-shadow: inset 0 -3px 0 var(--rrh-amber);
  }
}

/* Buttons */
.wp-block-button__link,
.ast-button,
.button,
input[type="submit"],
.search-submit {
  background: var(--rrh-green);
  border: 2px solid var(--rrh-green);
  color: #FFFFFF;
  border-radius: 2px;
  font-family: var(--rrh-head);
  font-weight: 700;
}
.wp-block-button__link:hover,
.ast-button:hover,
.button:hover,
input[type="submit"]:hover {
  background: var(--rrh-green-dark);
  border-color: var(--rrh-green-dark);
  color: #FFFFFF;
}
.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--rrh-green);
}

/* Article trust elements */
.rrh-answer {
  background: var(--rrh-surface);
  border-left: 4px solid var(--rrh-amber);
  padding: 18px 22px;
  margin: 0 0 1.6em;
  color: var(--rrh-ink);
}
.rrh-answer > :last-child,
.rrh-answer .wp-block-group__inner-container > :last-child { margin-bottom: 0; }

.rrh-checked {
  font-size: 14px;
  margin: 0 0 1.4em;
  color: var(--rrh-text);
}
.rrh-checked strong { color: var(--rrh-ink); }

.rrh-author {
  margin-top: 2.5em;
  padding-top: 1.25em;
  border-top: 2px solid var(--rrh-ink);
  display: grid;
  gap: 6px;
}
.rrh-author-label {
  font-family: var(--rrh-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rrh-green);
}
.rrh-author .rrh-author-name {
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--rrh-ink);
  text-decoration: none;
  justify-self: start;
}
.rrh-author .rrh-author-name:hover { color: var(--rrh-green); }
.rrh-author p { font-size: 15px; margin: 0; max-width: 68ch; }

.rrh-updated { font-size: 14px; color: var(--rrh-text); }

/* Tables */
.wp-block-table { overflow-x: auto; }
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  background: var(--rrh-surface);
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--rrh-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.entry-content thead th {
  background: var(--rrh-soft);
  color: var(--rrh-ink);
  font-family: var(--rrh-head);
}

/* Category labels and meta */
.entry-meta,
.ast-blog-single-element.entry-meta { font-size: 14px; }
.ast-terms-link a,
.cat-links a {
  font-family: var(--rrh-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rrh-green);
  border: 1px solid var(--rrh-green);
  padding: 2px 8px;
  text-decoration: none;
}

/* Homepage topic list */
.rrh-intro { font-size: 19px; max-width: 62ch; }
.rrh-topics:not(:has(> .wp-block-group__inner-container)),
.rrh-topics > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 40px;
}
.entry-content .rrh-topics,
.entry-content .rrh-topics .rrh-topic,
.entry-content .rrh-topics > .wp-block-group__inner-container { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.entry-content .rrh-topics { margin: 1em 0 2.4em; padding-top: 0; }
.entry-content .rrh-topics .rrh-topic { margin: 0; border-top: 2px solid var(--rrh-ink); padding-top: 12px; }

/* Keep the seven-item menu on one line on laptop widths */
@media (min-width: 922px) {
  .main-header-menu { flex-wrap: nowrap; }
  .main-header-menu .menu-link { white-space: nowrap; padding-left: 0.75em; padding-right: 0.75em; }
}
@media (min-width: 922px) and (max-width: 1180px) {
  .main-header-menu .menu-link { font-size: 15px; padding-left: 0.5em; padding-right: 0.5em; }
  .rrh-wordmark { font-size: 22px; }
}
.rrh-topic h3 { margin: 0 0 6px; }
.rrh-topic h3 a { color: var(--rrh-ink); text-decoration: none; }
.rrh-topic h3 a:hover { color: var(--rrh-green); text-decoration: underline; }
.rrh-topic p { margin: 0; font-size: 16px; }

/* Footer */
.site-below-footer-wrap[data-section="section-below-footer-builder"] {
  background: var(--rrh-ink);
  border-top: 4px solid var(--rrh-green);
}
.site-below-footer-wrap,
.site-below-footer-wrap p,
.ast-footer-copyright {
  color: #C9D2CD;
  font-size: 14px;
}
.site-below-footer-wrap a { color: #FFFFFF; }
.site-below-footer-wrap a:hover { color: var(--rrh-amber); }
.rrh-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0 0 8px;
}

/* Content group and table fixes */
.entry-content .wp-block-group.rrh-answer { padding: 18px 22px; margin: 0 0 1.6em; }
.entry-content .wp-block-group.rrh-faq { padding: 0; margin-top: 2em; }
.entry-content .wp-block-group.rrh-answer p { margin-bottom: 0; }
.entry-content figure.wp-block-table { margin: 0 0 1.4em; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content figure.wp-block-table table { width: 100%; min-width: 520px; table-layout: auto; }
.entry-content figure.wp-block-table td, .entry-content figure.wp-block-table th { overflow-wrap: break-word; }
/* ===== Custom header and footer ===== */
.rrh-wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Top strip (desktop only) */
.rrh-topbar { background: var(--rrh-green); color: #D5E4DD; font-size: 13.5px; line-height: 1.3; }
.rrh-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.rrh-topbar-note { margin: 0; }
.rrh-topbar ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.rrh-topbar a { color: #FFFFFF; text-decoration: none; }
.rrh-topbar a:hover, .rrh-topbar a:focus-visible { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--rrh-amber); text-underline-offset: 3px; }

/* Main bar */
.rrh-header { position: relative; z-index: 999; }
.rrh-bar { background: var(--rrh-surface); border-bottom: 1px solid var(--rrh-line); }
.rrh-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.rrh-brand { display: inline-flex; align-items: center; padding: 8px 0; text-decoration: none; }
.rrh-brand .rrh-wordmark { font-size: 26px; }

.rrh-nav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rrh-nav-list li { margin: 0; }
.rrh-nav-list a {
  display: block;
  padding: 23px 10px 21px;
  font-family: var(--rrh-head);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--rrh-ink);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -3px 0 transparent;
}
.rrh-nav-list a:hover { color: var(--rrh-green); box-shadow: inset 0 -3px 0 var(--rrh-line); }
.rrh-nav-list .current-menu-item > a,
.rrh-nav-list .current-post-ancestor > a,
.rrh-nav-list .current-menu-parent > a,
.rrh-nav-list .current-category-ancestor > a { color: var(--rrh-green); box-shadow: inset 0 -3px 0 var(--rrh-amber); }

@media (min-width: 1024px) and (max-width: 1180px) {
  .rrh-nav-list a { padding-left: 7px; padding-right: 7px; font-size: 15px; }
  .rrh-brand .rrh-wordmark { font-size: 22px; }
}

/* Menu button (mobile and tablet) */
.rrh-header .rrh-menu-toggle,
.rrh-drawer .rrh-drawer-close {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  background: transparent;
  color: var(--rrh-ink);
  border: 1.5px solid var(--rrh-ink);
  border-radius: 2px;
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.rrh-drawer .rrh-drawer-close { display: inline-flex; }
.rrh-header .rrh-menu-toggle:hover,
.rrh-header .rrh-menu-toggle:focus,
.rrh-drawer .rrh-drawer-close:hover,
.rrh-drawer .rrh-drawer-close:focus { background: var(--rrh-soft); color: var(--rrh-ink); border-color: var(--rrh-ink); }
.rrh-burger { display: grid; gap: 4px; width: 18px; }
.rrh-burger span { display: block; height: 2px; background: currentColor; }
.rrh-close-icon { font-size: 20px; line-height: 1; }

@media (max-width: 1023px) {
  .rrh-topbar, .rrh-nav { display: none; }
  .rrh-header .rrh-menu-toggle { display: inline-flex; }
  .rrh-header { position: sticky; top: 0; }
  .rrh-bar-inner { min-height: 60px; }
  .rrh-brand .rrh-wordmark { font-size: 23px; }
  body.admin-bar .rrh-header { top: 46px; }
}
@media (max-width: 600px) {
  body.admin-bar .rrh-header { top: 0; }
}
@media (min-width: 783px) and (max-width: 1023px) {
  body.admin-bar .rrh-header { top: 32px; }
}

/* Drawer */
.rrh-drawer { position: fixed; inset: 0; z-index: 100000; background: rgba(16, 23, 20, 0.55); opacity: 0; transition: opacity 0.2s ease; }
.rrh-drawer.is-open { opacity: 1; }
.rrh-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--rrh-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(24px);
  transition: transform 0.2s ease;
  padding-bottom: 32px;
}
.rrh-drawer.is-open .rrh-drawer-panel { transform: none; }
.rrh-drawer-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 0 20px;
  background: var(--rrh-surface);
  border-bottom: 1px solid var(--rrh-line);
}
.rrh-drawer-head .rrh-wordmark { font-size: 21px; }
.rrh-drawer-label {
  margin: 26px 20px 8px;
  font-family: var(--rrh-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rrh-green);
}
.rrh-drawer-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rrh-line); }
.rrh-drawer-list li { margin: 0; }
.rrh-drawer-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 20px;
  background: var(--rrh-surface);
  border-bottom: 1px solid var(--rrh-line);
  font-family: var(--rrh-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--rrh-ink);
  text-decoration: none;
}
.rrh-drawer-list a::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--rrh-green);
  border-right: 2px solid var(--rrh-green);
  transform: rotate(45deg);
}
.rrh-drawer-list a:hover { background: var(--rrh-soft); color: var(--rrh-green); }
.rrh-drawer-list .current-menu-item > a,
.rrh-drawer-list .current-post-ancestor > a,
.rrh-drawer-list .current-menu-parent > a { box-shadow: inset 4px 0 0 var(--rrh-amber); color: var(--rrh-green); }
.rrh-drawer-list.is-small a { min-height: 50px; font-family: var(--rrh-body); font-weight: 400; font-size: 17px; }
.rrh-drawer-contact { margin: 26px 20px 0; font-size: 15px; color: var(--rrh-text); }
.rrh-drawer-contact a { color: var(--rrh-green); font-weight: 700; }
html.rrh-lock, html.rrh-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .rrh-drawer, .rrh-drawer-panel { transition: none; }
}

/* Footer */
.rrh-footer { margin-top: 64px; background: var(--rrh-ink); color: #C3CDC8; border-top: 4px solid var(--rrh-green); font-size: 15px; }
.rrh-footer a { color: #FFFFFF; text-decoration: none; }
.rrh-footer a:hover, .rrh-footer a:focus-visible { color: var(--rrh-amber); text-decoration: underline; text-underline-offset: 3px; }
.rrh-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.rrh-footer-brand .rrh-wordmark { font-size: 26px; color: #FFFFFF; }
.rrh-footer-brand .rrh-hub { color: var(--rrh-amber); }
.rrh-footer-brand p { margin: 14px 0 0; max-width: 38ch; }
.rrh-footer-brand .rrh-footer-mail { display: inline-block; margin-top: 4px; font-weight: 700; }
.rrh-footer-heading { margin: 0 0 12px; font-family: var(--rrh-head); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #FFFFFF; }
.rrh-footer-list { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rrh-footer-list li { margin: 0; }
.rrh-footer-list a { display: inline-block; padding: 6px 0; }
.rrh-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.rrh-footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 18px; padding-bottom: 18px; font-size: 13.5px; }
.rrh-footer-bottom p { margin: 0; }

@media (max-width: 1023px) {
  .rrh-footer-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .rrh-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .rrh-footer { margin-top: 48px; }
  .rrh-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 40px; padding-bottom: 32px; }
  .rrh-footer-topics { grid-column: 1 / -1; }
  .rrh-footer-topics .rrh-footer-list { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .rrh-footer-list a { display: block; padding: 10px 0; }
  .rrh-footer-bottom-inner { flex-direction: column; }
}
/* keep clear of the back-to-top button */
.rrh-footer-bottom-inner { padding-right: 64px; }
#ast-scroll-top { background-color: var(--rrh-green); color: #FFFFFF; border-radius: 2px; }

/* Infographic images */
.entry-content figure.rrh-infographic { margin: 1.8em 0 2em; }
.entry-content figure.rrh-infographic img { display: block; width: 100%; height: auto; border: 1px solid var(--rrh-line); }
.entry-content figure.rrh-infographic figcaption { margin-top: 10px; font-size: 14px; color: var(--rrh-text); text-align: left; }

/* Article featured image */
.entry-content .rrh-hero-image { margin: 0 0 1.2em; }
.entry-content .rrh-hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
