/* ================================================================
   visuaFUSION Systems Solutions
   Rural Health IT Resources hub page styles
   Version: 26.8.12.1

   Scope: every rule is namespaced under .vf-rhit so nothing leaks
   into the rest of the theme.  Typography intentionally inherits
   from the site theme; only structure, rhythm, and the callout
   components are defined here.

   Install: add to your subtheme stylesheet, or attach as a library
   in THEMENAME.libraries.yml and attach it to the node.
   ================================================================ */

.vf-rhit {
  --vf-rhit-accent: #0f6cb0;          /* primary brand blue */
  --vf-rhit-accent-dark: #0a4e80;
  --vf-rhit-accent-tint: #eef5fb;
  --vf-rhit-rule: #d8dee5;
  --vf-rhit-ink-soft: #52606d;
  --vf-rhit-surface: #f6f8fa;
  --vf-rhit-warm: #fbf7ee;
  --vf-rhit-warm-rule: #e3d7bd;
  --vf-rhit-radius: 3px;
  --vf-rhit-gap: 1.6rem;
}

/* ---------- Rhythm ------------------------------------------- */

.vf-rhit h2 {
  margin-top: 3.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--vf-rhit-accent);
  scroll-margin-top: 5rem;
}

.vf-rhit h3 {
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  scroll-margin-top: 5rem;
}

.vf-rhit p,
.vf-rhit ul,
.vf-rhit ol {
  margin-bottom: 1rem;
}

.vf-rhit li {
  margin-bottom: 0.45rem;
}

.vf-rhit code {
  background: var(--vf-rhit-surface);
  border: 1px solid var(--vf-rhit-rule);
  border-radius: var(--vf-rhit-radius);
  padding: 0.1em 0.35em;
  font-size: 0.92em;
}

/* ---------- Lede and byline ---------------------------------- */

.vf-rhit-lede {
  font-size: 1.15em;
  line-height: 1.6;
}

.vf-rhit-meta {
  margin: 1.8rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--vf-rhit-surface);
  border-left: 3px solid var(--vf-rhit-rule);
  border-radius: var(--vf-rhit-radius);
  font-size: 0.9em;
  color: var(--vf-rhit-ink-soft);
}

.vf-rhit-meta p {
  margin: 0;
  line-height: 1.7;
}

/* ---------- Table of contents -------------------------------- */

.vf-rhit-toc {
  margin: 2rem 0 2.6rem;
  padding: 1.2rem 1.4rem;
  background: var(--vf-rhit-accent-tint);
  border: 1px solid var(--vf-rhit-rule);
  border-radius: var(--vf-rhit-radius);
}

.vf-rhit-toc-title {
  margin: 0 0 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82em;
  color: var(--vf-rhit-accent-dark);
}

.vf-rhit-toc ol {
  margin: 0;
  padding-left: 1.3rem;
  columns: 2;
  column-gap: 2.5rem;
}

.vf-rhit-toc li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

/* ---------- Start here paths --------------------------------- */

.vf-rhit-path {
  margin: 1.6rem 0;
  padding: 1.2rem 1.4rem 0.6rem;
  border: 1px solid var(--vf-rhit-rule);
  border-top: 4px solid var(--vf-rhit-accent);
  border-radius: var(--vf-rhit-radius);
  background: #fff;
}

.vf-rhit-path h3 {
  margin-top: 0;
  color: var(--vf-rhit-accent-dark);
}

.vf-rhit-path > p:first-of-type {
  color: var(--vf-rhit-ink-soft);
}

.vf-rhit-path ol {
  padding-left: 1.3rem;
}

/* ---------- Practitioner callouts ---------------------------- */

.vf-rhit-callout {
  margin: 1.4rem 0 1.8rem;
  padding: 1rem 1.2rem 0.4rem;
  background: var(--vf-rhit-warm);
  border-left: 4px solid var(--vf-rhit-warm-rule);
  border-radius: var(--vf-rhit-radius);
}

.vf-rhit-callout-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.86em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a6224;
}

.vf-rhit-callout p:last-child {
  margin-bottom: 0.6rem;
}

/* ---------- Definitional lead paragraph ---------------------- */

.vf-rhit-definition {
  font-size: 1.06em;
  line-height: 1.65;
  padding: 0.9rem 1.1rem;
  background: var(--vf-rhit-accent-tint);
  border-left: 4px solid var(--vf-rhit-accent);
  border-radius: var(--vf-rhit-radius);
}

/* ---------- Comparison table --------------------------------- */

.vf-rhit-table {
  width: 100%;
  margin: 1.2rem 0 1.6rem;
  border-collapse: collapse;
  font-size: 0.94em;
}

.vf-rhit-table caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.5rem;
  font-size: 0.85em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vf-rhit-ink-soft);
}

.vf-rhit-table th,
.vf-rhit-table td {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--vf-rhit-rule);
  vertical-align: top;
  text-align: left;
}

.vf-rhit-table thead th {
  background: var(--vf-rhit-accent);
  color: #fff;
  border-color: var(--vf-rhit-accent-dark);
}

.vf-rhit-table tbody tr:nth-child(odd) td {
  background: var(--vf-rhit-surface);
}

.vf-rhit-table tbody td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.vf-rhit-table tbody tr:last-child td {
  font-style: italic;
}

/* ---------- Annotated resource lists ------------------------- */

.vf-rhit-dl {
  margin: 1.2rem 0 1.8rem;
}

.vf-rhit-dl dt {
  margin-top: 1.1rem;
  font-weight: 700;
}

.vf-rhit-dl dt:first-child {
  margin-top: 0;
}

.vf-rhit-dl dd {
  margin: 0.3rem 0 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--vf-rhit-rule);
  color: var(--vf-rhit-ink-soft);
}

/* ---------- FAQ ---------------------------------------------- */

.vf-rhit-faq h3 {
  font-size: 1.08em;
  margin-top: 1.6rem;
}

.vf-rhit-faq h3 + p {
  margin-top: 0.4rem;
}

/* ---------- Closing call to action --------------------------- */

.vf-rhit-cta {
  margin: 2.4rem 0 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--vf-rhit-accent);
  border-radius: var(--vf-rhit-radius);
  color: #fff;
}

.vf-rhit-cta p {
  margin: 0;
}

.vf-rhit-cta a {
  color: #fff;
  text-decoration: underline;
}

.vf-rhit-cta a:hover,
.vf-rhit-cta a:focus {
  color: #fff;
  text-decoration: none;
}

/* ---------- Accessibility ------------------------------------ */

.vf-rhit a:focus-visible {
  outline: 2px solid var(--vf-rhit-accent-dark);
  outline-offset: 2px;
}

/* ---------- Responsive --------------------------------------- */

@media (max-width: 700px) {
  .vf-rhit-toc ol {
    columns: 1;
  }

  .vf-rhit-path,
  .vf-rhit-callout,
  .vf-rhit-toc {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .vf-rhit-dl dd {
    padding-left: 0.75rem;
  }

  .vf-rhit-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vf-rhit-table tbody td:first-child {
    white-space: normal;
  }
}

@media print {
  .vf-rhit-toc,
  .vf-rhit-cta {
    display: none;
  }
}
