/**
 * TRoofLaw additive UI components (.vfl-*)
 * Brand tokens mirror theme accents from custom.css:
 *   accent orange #ffa150 (links / checkbox-adjacent highlight)
 *   primary blue  #294895 / #3761ca
 *   muted text    #666666
 */

:root {
  --vfl-accent: #ffa150;
  --vfl-accent-soft: #fff4e8;
  --vfl-accent-text: #8a4d1a;
  --vfl-primary: #294895;
  --vfl-primary-mid: #3761ca;
  --vfl-primary-soft: #e8eef8;
  --vfl-primary-text: #1a3269;
  --vfl-surface: #f4f6fa;
  --vfl-muted: #666666;
  --vfl-text: #444444;
  --vfl-border: #cacaca;
}

.vfl-toc {
  background: var(--vfl-surface);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 1.5rem;
}
.vfl-toc p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--vfl-muted);
  font-weight: 600;
}
.vfl-toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.vfl-toc-links a {
  font-size: 13px;
  text-decoration: none;
  color: var(--vfl-primary);
}
.vfl-toc-links a:hover {
  color: var(--vfl-accent);
}

.vfl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0 0 1.75rem;
}
.vfl-stat-card {
  background: var(--vfl-surface);
  border-radius: 8px;
  padding: 1rem;
}
.vfl-stat-card .label {
  font-size: 13px;
  color: var(--vfl-muted);
  margin: 0 0 4px;
}
.vfl-stat-card .value {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--vfl-primary);
}
.vfl-stat-card .unit {
  font-size: 14px;
  color: var(--vfl-muted);
  font-weight: 400;
}

.vfl-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1.75rem 0 0.75rem;
}
.vfl-section-heading i {
  font-size: 20px;
  color: var(--vfl-accent);
}
.vfl-section-heading h2 {
  margin: 0;
}

.vfl-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 1.75rem;
}
.vfl-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.vfl-step-num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vfl-primary-soft);
  color: var(--vfl-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.vfl-step p {
  margin: 2px 0 0;
  font-size: 15px;
}

.vfl-callout {
  border-left: 3px solid var(--vfl-accent);
  background: var(--vfl-accent-soft);
  padding: 12px 16px;
  margin: 0 0 1.75rem;
  border-radius: 0;
}
.vfl-callout p {
  margin: 0;
  font-size: 14px;
  color: var(--vfl-accent-text);
}
.vfl-callout.info {
  border-left-color: var(--vfl-primary);
  background: var(--vfl-primary-soft);
}
.vfl-callout.info p {
  color: var(--vfl-primary-text);
}

.vfl-faq details {
  border-top: 0.5px solid var(--vfl-border);
  padding: 12px 0;
}
.vfl-faq details:last-child {
  border-bottom: 0.5px solid var(--vfl-border);
}
.vfl-faq summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vfl-faq summary::-webkit-details-marker {
  display: none;
}
.vfl-faq summary .chevron {
  font-size: 16px;
  color: var(--vfl-muted);
  transition: transform 0.15s ease;
}
.vfl-faq details[open] summary .chevron {
  transform: rotate(180deg);
}
.vfl-faq .answer {
  font-size: 14px;
  color: var(--vfl-text);
  margin: 8px 0 0;
}

.vfl-related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vfl-related-chips a {
  font-size: 13px;
  padding: 6px 12px;
  border: 0.5px solid var(--vfl-border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--vfl-primary);
}
.vfl-related-chips a i {
  color: var(--vfl-accent);
  font-size: 14px;
  line-height: 1;
}
.vfl-related-chips a:hover {
  border-color: var(--vfl-accent);
  color: var(--vfl-accent);
}
.vfl-related-chips a:hover i {
  color: var(--vfl-accent);
}

.vfl-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.vfl-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--vfl-surface);
  color: #555;
}
.vfl-tag.accent {
  background: var(--vfl-primary-soft);
  color: var(--vfl-primary);
}

/* Sticky header (#myHeader.sticky) clearance for in-page TOC anchors.
   Prefer html scroll-padding — scroll-margin on flex-wrapped H2s is unreliable
   in Chromium for hash / scrollIntoView navigation. */
html {
  scroll-padding-top: 90px;
}
.topic-main .vfl-section-heading,
.topic-main h2,
.topic-main h2[id] {
  scroll-margin-top: 90px;
}

/* Footer link groups: Site / Topics / Resources / For AI & Crawlers */
.site-footer .footer-columns {
  display: grid;
  /* 220px min → ~4 cols @1440, 2 @768, 1 @375 (auto-fit, no media query) */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 24px;
}

/* Headings: #7a869e on #242a36 is ~3.9:1 (fails AA). #9aa3b5 is ~5.7:1. */
.site-footer .footer-columns > div > p:first-child,
.site-footer .footer-columns h3,
.site-footer .footer-columns h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3b5;
  margin: 0 0 14px;
}

.site-footer .footer-columns a {
  font-size: 14px;
  color: #e7ebf3;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}
.site-footer .footer-columns a:hover {
  color: #f0a860;
  text-decoration: underline;
}

.site-footer .footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .footer-columns li {
  margin: 0;
  padding: 0;
}

.site-footer .footer-bottom {
  border-top: 0.5px solid #33405a;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px 32px;
}
.site-footer .footer-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #8b96ac;
  max-width: 640px;
  margin: 0 0 14px;
}
.site-footer .footer-disclaimer .site-disclaimer,
.site-footer .footer-disclaimer .site-disclaimer p {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.site-footer .footer-disclaimer a {
  color: #e7ebf3;
  text-decoration: underline;
}
.site-footer .footer-disclaimer a:hover {
  color: #f0a860;
}
.site-footer .footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  /* #5f6b81 on #242a36 is ~2.7:1 (fails AA). #8b96ac is ~4.8:1. */
  color: #8b96ac;
}
.site-footer .footer-meta a {
  color: #e7ebf3;
}
.site-footer .footer-meta a:hover {
  color: #f0a860;
}
