/* lssdoc website touches.
   The website uses LimeSurvey's brand lime green (#5C9F1A primary,
   #7FA82E lighter variant) as a nod to the source data format.
   The rendered .docx output deliberately keeps a different palette
   -- editorial petrol blue (#133B52 / #3A7C8C) -- so the website
   reads as "the source-aware portal" and the document reads as
   "the publication-grade output". Two contexts, two identities. */

body,
.navbar,
.dropdown-menu,
table,
.table {
  font-feature-settings: "zero" 1;
}

code,
pre,
kbd,
samp,
.sourceCode {
  font-feature-settings: "zero" 1, "tnum" 1;
}

/* pkgdown / downlit render R output lines (the ones starting with
   #>) inside <span class="co"> because they share the "comment"
   highlight class. Override the dark-mode italic so console
   output stays upright in both light and dark themes. */
.sourceCode .co,
pre .co,
code .co {
  font-style: normal !important;
}

/* IBM Plex Sans has a lower x-height than IBM Plex Mono. Bump
   body to 17 px and line-height to 1.6 so prose and code read at
   the same visual scale, with a fallback chain for the brief swap
   moment when the web font is loading. */
:root {
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-body-font-family:
    "IBM Plex Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    sans-serif;
}

/* Cap article column width so long-form prose stays within a
   comfortable reading length on wide screens. Tables and code
   blocks remain free to overflow on their own. */
@media (min-width: 992px) {
  .template-article main {
    max-width: 78ch;
  }
}

/* Soft background on inline code so it pops off the prose without
   competing with block-code (already styled by the highlighter). */
:not(pre) > code {
  background-color: rgba(92, 159, 26, 0.10);  /* lime green low alpha */
  padding: 0.125em 0.35em;
  border-radius: 0.25rem;
}
[data-bs-theme="dark"] :not(pre) > code {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Section-break breathing room for long-form articles. */
.template-article h2 { margin-top: 2.5rem; }
.template-article h3 { margin-top: 2rem; }
.template-article h4 { margin-top: 1.5rem; }

/* Knitr-rendered Markdown tables ship without gt/tinytable
   classes; loosen their cell padding to match the styled engines. */
.template-article table th,
.template-article table td {
  padding: 0.5rem 0.75rem;
}

/* Subtle lime accent on H2 underline -- the website's analogue of
   the 1 pt group filet that sits below each group title in the
   rendered .docx. Different hue, same typographic gesture. */
.template-article h2 {
  border-bottom: 1px solid rgba(92, 159, 26, 0.22);
  padding-bottom: 0.35rem;
}
[data-bs-theme="dark"] .template-article h2 {
  border-bottom-color: rgba(127, 168, 46, 0.40);
}

/* Respect users with vestibular sensitivity who request reduced
   motion via OS / browser settings. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
