/* ==========================================================================
   CASL: the free checks and guide pages built by build-pages.mjs (9 Oct 2026).
   Every rule is scoped under .pg (the page's <main>), so this file cannot reach
   anything else on the site. Tokens come from site.css. Bump VER in
   build-pages.mjs after any change here, then rebuild the pages.
   ========================================================================== */

.pg { background: var(--cream-100); color: var(--ink-900); }
.pg [id] { scroll-margin-top: 110px; }
.pg .pg-narrow { max-width: 900px; }
.pg-sec { padding: clamp(48px, 7vw, 88px) 0; }
.pg-sec + .pg-sec { padding-top: 0; }
.pg-h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.1; font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 14px; color: var(--ink-900); text-wrap: balance; }
.pg-h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(21px, 2.3vw, 25px); line-height: 1.2; margin: 26px 0 12px; color: var(--ink-900); }
.pg-intro { font-size: 18px; color: var(--ink-700); margin: 0 0 8px; max-width: 42em; }
.pg a:not(.btn) { color: var(--green-700); text-underline-offset: 3px; }
.pg a:not(.btn):hover { color: var(--green-900); }

/* ---------- hero ---------- */
.pg-hero .lede { max-width: 40em; }
.pg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.pg-hero-note { margin: 0; font-size: 15.5px; color: var(--cream-200); }
.pg-hero .crumbs a, .pg-hero .crumbs span[aria-current] { color: var(--cream-200); }
.pg-hero .crumbs a:hover { color: var(--terra-300); }

/* ---------- the check ---------- */
.ck-form { margin-top: 10px; }
.ck-group { margin-top: 34px; }
.ck-group-h { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 13.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8C5335; }
.ck-group-h::before { content: ""; width: 28px; height: 2px; background: var(--terra-500); border-radius: 2px; }
.ck-q {
  margin: 0 0 12px; padding: 18px 22px 20px; min-width: 0;
  background: #fff; border: 1.5px solid var(--ink-100); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.ck-q:has(input:checked) { border-color: var(--green-200); background: #FCFEFD; }
.ck-q legend { float: left; width: 100%; padding: 0; margin: 0; display: flex; gap: 12px; align-items: flex-start; font-size: 18.5px; font-weight: 700; line-height: 1.4; color: var(--ink-900); }
.ck-q legend + * { clear: both; }
.ck-qn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-top: -1px; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-size: 15px; font-weight: 800; }
.ck-q:has(input:checked) .ck-qn { background: var(--green-700); color: var(--cream-50); }
.ck-hint { clear: both; margin: 8px 0 0 42px; font-size: 16px; color: var(--ink-700); }
.ck-opts { clear: both; display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0 0 42px; }
.ck-opt { position: relative; display: inline-flex; }
.ck-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-opt span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border: 2px solid var(--ink-200); border-radius: 999px; background: var(--cream-50);
  font-size: 17px; font-weight: 700; color: var(--ink-900); line-height: 1.2;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.ck-opt:hover span { border-color: var(--green-600); }
.ck-opt input:checked + span { background: var(--green-700); border-color: var(--green-700); color: var(--cream-50); }
.ck-opt input:checked + span::before { content: ""; width: 9px; height: 15px; margin: -3px 2px 0 0; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.ck-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.ck-err { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--terra-50); border: 1.5px solid var(--terra-300); color: var(--terra-800); font-weight: 700; }
.ck-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; }
.ck-count { font-size: 16px; color: var(--ink-700); }

/* ---------- the result ---------- */
.ck-result { margin-top: 44px; padding-top: 36px; border-top: 2px solid var(--ink-100); }
.ck-result:focus-within { outline: none; }
.ck-result h2:focus { outline: none; }
.ck-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: clamp(22px, 3.5vw, 32px); background: #fff; border: 1.5px solid var(--ink-100); border-radius: 22px; box-shadow: var(--shadow-md); }
.ck-ring { position: relative; width: 150px; height: 150px; }
.ck-ring svg { display: block; }
.ck-ring-bg { fill: none; stroke: var(--green-100); stroke-width: 14; }
.ck-ring-fg { fill: none; stroke: var(--green-700); stroke-width: 14; stroke-linecap: round; }
.ck-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ck-ring-num span { font-family: var(--serif); font-weight: 600; font-size: 46px; color: var(--green-900); }
.ck-ring-num small { margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-700); }
.ck-band { margin: 0 0 14px; font-size: 18.5px; font-weight: 700; color: var(--green-900); }
.ck-bar { margin: 10px 0 0; }
.ck-bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 15.5px; font-weight: 700; color: var(--ink-700); margin-bottom: 5px; }
.ck-track { height: 10px; border-radius: 999px; background: var(--cream-200); overflow: hidden; }
.ck-fill { height: 100%; border-radius: 999px; background: var(--green-600); }
.ck-steps { list-style: none; counter-reset: ck; margin: 0; padding: 0; display: grid; gap: 12px; }
.ck-steps li { counter-increment: ck; position: relative; padding: 16px 20px 18px 62px; background: #fff; border: 1.5px solid var(--ink-100); border-radius: 16px; }
.ck-steps li::before { content: counter(ck); position: absolute; left: 18px; top: 15px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--terra-100); color: var(--terra-800); font-weight: 800; font-size: 15px; }
.ck-steps strong { display: block; font-size: 18px; color: var(--ink-900); }
.ck-steps span { display: block; margin-top: 4px; font-size: 16.5px; color: var(--ink-700); }
.ck-allyes { font-size: 18px; color: var(--ink-700); }
.ck-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- the finder's list ---------- */
.fd-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.fd-list li { padding: 16px 20px 18px; background: #fff; border: 1.5px solid var(--ink-100); border-radius: 16px; }
.fd-list strong { display: block; font-size: 18px; color: var(--ink-900); }
.fd-list span { display: block; margin-top: 4px; font-size: 16.5px; line-height: 1.55; color: var(--ink-700); }
.fd-list .fd-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-size: 16px; font-weight: 700; }
.fd-list .fd-links a { min-height: 32px; display: inline-flex; align-items: center; }

/* ---------- tables in guides ---------- */
.pg-table-wrap { margin: 8px 0 18px; overflow-x: auto; border-radius: 16px; border: 1.5px solid var(--ink-100); background: #fff; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 16.5px; line-height: 1.5; color: var(--ink-900); }
.pg-table th, .pg-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ink-100); }
.pg-table thead th { background: var(--green-50); font-weight: 800; color: var(--green-900); }
.pg-table tbody th { font-weight: 700; color: var(--ink-900); width: 26%; }
.pg-table tbody tr:last-child th, .pg-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .pg-table { font-size: 15.5px; } .pg-table th, .pg-table td { padding: 10px 12px; } }

.pg-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a comparison table becomes one card per row on a phone, each cell labelled */
@media (max-width: 640px) {
  .pg-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pg-table--stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--ink-100); }
  .pg-table--stack tbody th, .pg-table--stack td { display: block; width: auto; padding: 4px 0; border: 0; }
  .pg-table--stack tbody th { font-size: 17px; color: var(--green-900); }
  .pg-table--stack td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8C5335; margin-top: 6px; }
}

/* ---------- area pages: partners by kind of business ---------- */
.ar-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.ar-group { padding: 16px 18px; background: #fff; border: 1.5px solid var(--ink-100); border-radius: 16px; }
.ar-cat { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8C5335; }
.pg-prose .ar-group ul, .ar-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ar-group li { display: flex; flex-direction: column; font-size: 16.5px; line-height: 1.4; }
.ar-group li a { font-weight: 700; }
.ar-group li span { font-size: 15px; color: var(--ink-700); }

/* ---------- the invitation ---------- */
.pg-cta { display: block; padding: clamp(28px, 4.5vw, 46px); border-radius: 26px; background: var(--green-900); color: var(--cream-100); box-shadow: var(--shadow-lg); }
.pg-cta .eyebrow { color: var(--terra-300); }
.pg-cta .eyebrow::before { background: var(--terra-300); }
.pg-cta .pg-h2 { color: var(--cream-50); margin-top: 12px; }
.pg-cta p { margin: 0; font-size: 17.5px; color: var(--cream-200); max-width: 42em; }
.pg-cta p:hover { color: var(--cream-50); }
.pg-cta a:not(.btn) { color: var(--cream-50); }
.pg-cta a:not(.btn):hover { color: var(--terra-300); }
.pg-cta .btn-outline { background: transparent; color: var(--cream-50); border-color: rgba(253,251,246,.4); }
.pg-cta .btn-outline:hover { border-color: var(--cream-50); color: var(--cream-50); background: rgba(253,251,246,.08); }
.pg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.pg-fine { font-size: 15px !important; }

/* ---------- notes, guides and questions ---------- */
.pg-notes p, .pg-prose p { margin: 0 0 14px; font-size: 17.5px; line-height: 1.65; color: var(--ink-700); max-width: 42em; }
.pg-prose ul, .pg-prose ol { margin: 0 0 16px; padding-left: 1.3em; font-size: 17.5px; line-height: 1.6; color: var(--ink-700); }
.pg-prose li { margin: 6px 0; }
.pg-callout { margin: 20px 0 0; padding: 16px 20px; border-radius: 14px; background: var(--terra-50); border: 1.5px solid var(--terra-100); border-left: 5px solid var(--terra-500); font-size: 16.5px; line-height: 1.6; color: var(--ink-900); }
.pg-faq-list details { margin: 0 0 10px; background: #fff; border: 1.5px solid var(--ink-100); border-radius: 16px; }
.pg-faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 17px 22px; font-size: 18px; font-weight: 700; color: var(--ink-900); min-height: 56px; }
.pg-faq-list summary::-webkit-details-marker { display: none; }
.pg-faq-list summary::after { content: "+"; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green-50); color: var(--green-800); font-size: 22px; font-weight: 600; line-height: 1; }
.pg-faq-list details[open] summary::after { content: "\2212"; }
.pg-faq-list summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 16px; }
.pg-faq-list details > div { padding: 0 22px 18px; font-size: 17px; line-height: 1.6; color: var(--ink-700); }
.pg-more-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pg-more-list li { display: flex; flex-direction: column; }
.pg-more-list a { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; border-radius: 999px; background: #fff; border: 1.5px solid var(--ink-200); font-weight: 700; text-decoration: none; }
.pg-more-list a:hover { border-color: var(--green-700); }
.pg-more-list li span { margin: 6px 0 0 20px; font-size: 14.5px; color: var(--ink-700); }

/* business pages are for businesses: keep the member sign-up popup off them, as on the partner application */
body:has(.pg--business) .promo-pop { display: none !important; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .ck-q { padding: 16px 16px 18px; }
  .ck-q legend { font-size: 17.5px; }
  .ck-opts, .ck-hint { padding-left: 0; margin-left: 0; }
  .ck-opt { flex: 1 1 auto; }
  .ck-opt span { width: 100%; justify-content: center; padding: 10px 14px; }
  .ck-card { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .ck-bars { width: 100%; }
  .ck-steps li { padding-left: 58px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ck-q, .ck-opt span { transition: none; }
}

/* ---------- print: just the score and the steps ---------- */
@media print {
  .header-shell, .site-footer, .skip-link, .scroll-progress, .promo-pop, .pg-hero-actions, .pg-hero-note, .crumbs,
  .ck-form, .pg-intro, #check-h, .ck-actions, .pg-cta-sec, .pg-notes, .pg-faq, .pg-more { display: none !important; }
  .pg, .page-hero { background: #fff !important; }
  .page-hero { padding: 0 0 12px !important; }
  .page-hero::before, .page-hero::after { display: none !important; }
  .page-hero h1, .page-hero .lede, .page-hero .eyebrow { color: #000 !important; }
  .pg-sec { padding: 0 !important; }
  .ck-result { margin: 0; padding: 0; border: 0; }
  .ck-card, .ck-steps li { box-shadow: none; break-inside: avoid; }
}
