/* words/sites shared stylesheet.
   Identical on all ten sites. Every colour, font, size and radius is a custom property whose
   value is written into an inline <style> block in the page head from brand/tokens.json, so a
   site's whole visual identity is its brand/ directory and nothing else.
   No @font-face, no external asset, no JavaScript. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-base);
  line-height: var(--line-body);
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-dark);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 10;
}
.skip-link:focus { left: 0; }

a { color: var(--primary); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ------------------------------------------------------------------ header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--primary);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  padding-top: var(--space-md);
  padding-bottom: var(--space-sm);
}
.brand { display: inline-flex; flex: 0 0 auto; text-decoration: none; }
.brand img { display: block; width: 232px; height: auto; }

/* The nav always takes its own full-width row, left-aligned with the content column. Site nav
   lengths vary from 6 to 13 items across the portfolio; giving it a row of its own means no site
   gets a ragged half-wrapped nav hanging off the right of the wordmark. */
.site-nav { flex: 1 0 100%; margin-top: var(--space-xs); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.25rem;
  justify-content: flex-start;
}
.site-nav a {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus { color: var(--primary-dark); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* -------------------------------------------------------------- breadcrumb */

.crumb-bar { padding-top: var(--space-sm); }
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  font-size: var(--type-small);
  color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* ------------------------------------------------------------------- page */

main { padding-bottom: var(--space-xl); }

/* Prose is capped at the reading measure; data tables are allowed to break out to the wider
   article width, because a four-column provider roster squeezed into 72ch is unreadable. */
.page {
  max-width: 880px;
  padding-top: var(--space-md);
}
.page > h1,
.page > h2,
.page > h3,
.page > h4,
.page > p,
.page > ul,
.page > ol,
.page > blockquote,
.page > .answer,
.page > .disclosure-banner,
.page > .faq-list {
  max-width: var(--measure);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--line-heading);
  color: var(--ink);
  letter-spacing: -0.011em;
  text-wrap: balance;
  /* Several sites put the bare domain in an H1 ("About floridarealestateprelicense.com"), which
     is one unbreakable 31-character token and overflows a 390px viewport without this. */
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--type-h1);
  font-weight: 700;
  margin: 0.4rem 0 var(--space-md);
}
h2 {
  font-size: var(--type-h2);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
h3 {
  font-size: var(--type-h3);
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-xs);
}
h4 { font-size: 1rem; font-weight: 700; margin: var(--space-md) 0 var(--space-xs); }

p, li, dd, summary { overflow-wrap: break-word; }
p { margin: 0 0 var(--space-md); }
p.lead strong:first-child { color: var(--ink); }

ul, ol { margin: 0 0 var(--space-md); padding-left: 1.35rem; }
li { margin-bottom: 0.4rem; }
li > ul, li > ol { margin-top: 0.4rem; margin-bottom: 0; }

strong { font-weight: 700; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--tint-soft);
  padding: 0.08em 0.32em;
  border-radius: var(--radius-sm);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-lg) 0;
}
blockquote {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--accent);
  background: var(--tint-soft);
}
blockquote p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ answer box */

.answer {
  background: var(--tint-soft);
  border: 1px solid var(--tint-edge);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) - 0.35rem);
  margin: 0 0 var(--space-lg);
}
.answer p { margin-bottom: 0.7rem; }
.answer p:last-child { margin-bottom: 0; }
.answer strong { color: var(--primary-dark); }
.answer > p:first-child { font-size: 1.06rem; }

/* ------------------------------------------------------- disclosure banner */

.disclosure-banner {
  display: block;
  margin: 0 0 var(--space-lg);
  padding: 0.7rem var(--space-md);
  border: 1px solid var(--tint-edge);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.5;
}
.disclosure-banner strong { color: var(--ink); }

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.93rem;
  line-height: 1.45;
}
thead th {
  background: var(--tint-soft);
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--tint-edge);
}
th, td {
  padding: 0.62rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: break-word;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--stripe); }
td a { overflow-wrap: anywhere; }

/* The Sources table always carries a raw regulator URL. Fixed layout stops that one column
   from stretching the table past the article width; break-all lets the URL wrap inside it. */
.sources-table table { min-width: 34rem; table-layout: fixed; }
.sources-table th:nth-child(4), .sources-table td:nth-child(4) { width: 34%; }
.sources-table td:nth-child(4) { word-break: break-all; font-size: 0.86rem; }
.sources-table th:nth-child(5), .sources-table td:nth-child(5) { width: 11%; }

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

.faq-list { margin: 0 0 var(--space-lg); border-top: 1px solid var(--line); }
details.faq-item {
  border-bottom: 1px solid var(--line);
}
details.faq-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 2rem 0.85rem 0;
  font-weight: 700;
  position: relative;
  color: var(--ink);
}
details.faq-item > summary::-webkit-details-marker { display: none; }
details.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.78rem;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--primary);
}
details.faq-item[open] > summary::after { content: "\2212"; }
details.faq-item > summary:hover { color: var(--primary-dark); }
.faq-answer { padding: 0 0 var(--space-sm); }
.faq-answer > *:last-child { margin-bottom: var(--space-sm); }

/* -------------------------------------------------------------- meta line */

.page-meta {
  margin: var(--space-lg) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-size: var(--type-small);
  color: var(--muted);
}
.page-meta .regulator { display: block; }

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--primary-dark);
  color: var(--paper);
  margin-top: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-lg);
}
.footer-inner { display: grid; gap: var(--space-lg); }
.site-footer a { color: var(--paper); text-decoration: underline; }
.site-footer a:hover, .site-footer a:focus { color: var(--paper); text-decoration-thickness: 2px; }
.footer-name { font-weight: 700; font-size: 1.05rem; margin: 0 0 0.2rem; }
.footer-tagline { margin: 0; opacity: 0.88; font-size: var(--type-small); }
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: var(--type-small);
}
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.24); padding-top: var(--space-md); }
.footer-legal p { margin: 0 0 0.6rem; font-size: var(--type-small); line-height: 1.55; }
.footer-legal p:last-child { margin-bottom: 0; }
.footer-legal .disclaimer { opacity: 0.92; max-width: 76ch; }
.footer-legal .verified, .footer-legal .copyright { opacity: 0.78; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .header-inner { padding-bottom: var(--space-xs); }
  .site-nav ul { gap: 0.1rem 0.95rem; }
}

@media (max-width: 620px) {
  :root { --type-base: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand img { width: 196px; }
  h1 { font-size: 1.62rem; }
  h2 { font-size: 1.22rem; margin-top: var(--space-lg); }
  table { min-width: 28rem; font-size: 0.88rem; }
  .sources-table table { min-width: 30rem; }
  .site-footer { padding-top: var(--space-lg); }
}

@media print {
  .site-nav, .crumb-bar, .skip-link { display: none; }
  .site-footer { background: none; color: var(--ink); }
  details.faq-item > .faq-answer { display: block; }
}
