/* =========================================================
   Lawyers of Ontario – single resource page (checklist/guide)
   Load AFTER resources.css (it reuses the variables, buttons
   and badges defined there). Upload to /assets/css/
   ========================================================= */

/* ---------- Hero ---------- */
.lo-res .lo-rhero { background: var(--lo-navy); color: #fff; }
.lo-res .lo-rhero__inner {
  max-width: 1180px; margin: 0 auto; padding: 48px 24px 56px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
}
.lo-res .lo-rhero__text { flex: 999 1 520px; min-width: 0; }
.lo-res .lo-rhero__cover { flex: 1 1 240px; display: flex; justify-content: center; }
.lo-res .lo-rhero__cover img {
  width: 260px; max-width: 100%; height: auto; border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35); transform: rotate(2deg);
}
.lo-res .lo-rhero h1 {
  margin: 18px 0 0; font-family: var(--lo-serif); font-weight: 700; color: #fff;
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; max-width: 700px;
}
.lo-res .lo-rhero .lo-lead {
  margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #D5DBE6; max-width: 640px;
}
.lo-res .lo-rhero .lo-badge { background: #24355A; color: #E3E8F0; }
.lo-res .lo-rhero .lo-badge--accent { background: var(--lo-accent); color: var(--lo-navy); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lo-res .lo-rmeta {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: #B9C2D3;
}
.lo-res .lo-rmeta .lo-checked { color: #9FD3B0; font-size: 14px; }
.lo-res .lo-rmeta .lo-checked svg { width: 16px; height: 16px; }
.lo-res .lo-rhero .lo-actions { margin-top: 28px; }

/* ---------- Two-column layout ---------- */
.lo-res .lo-rlayout {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px 0;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px;
}
.lo-res .lo-raside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 20px; }
.lo-res .lo-article { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Sidebar sticks on desktop only */
@media (min-width: 980px) and (min-height: 960px) {
  .lo-res .lo-raside { position: sticky; top: 24px; }
}

.lo-res .lo-box { background: #fff; border: 1px solid var(--lo-line); border-radius: 12px; padding: 22px; }
.lo-res .lo-box-label {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lo-muted);
}

/* Table of contents (built by resource.js) */
.lo-res .lo-toc { padding: 20px 14px; }
.lo-res .lo-toc .lo-box-label { padding: 0 12px 8px; }
.lo-res .lo-toc a {
  display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none;
  color: var(--lo-body); font-size: 15px; font-weight: 500;
}
.lo-res .lo-toc a:hover, .lo-res .lo-toc a.is-active { background: var(--lo-tint); color: var(--lo-navy); }
.lo-res .lo-toc a.is-active { font-weight: 700; }

/* Progress */
.lo-res .lo-progress__num { margin-top: 10px; display: flex; align-items: baseline; gap: 6px; }
.lo-res .lo-progress__num strong { font-family: var(--lo-serif); font-size: 30px; color: var(--lo-navy); }
.lo-res .lo-progress__num span { color: var(--lo-muted); font-size: 14px; }
.lo-res .lo-progress__bar { margin-top: 10px; height: 8px; border-radius: 999px; background: var(--lo-tint); overflow: hidden; }
.lo-res .lo-progress__bar span { display: block; height: 100%; width: 0; background: var(--lo-accent); transition: width .25s; }
.lo-res .lo-progress p { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--lo-muted); }
.lo-res .lo-linkbtn {
  margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px;
  color: var(--lo-navy); text-decoration: underline; cursor: pointer;
}

.lo-res .lo-asidecta { background: var(--lo-navy); color: #fff; border-radius: 12px; padding: 22px; }
.lo-res .lo-asidecta strong { display: block; font-family: var(--lo-serif); font-size: 20px; line-height: 1.25; }
.lo-res .lo-asidecta p { margin: 8px 0 16px; font-size: 14px; line-height: 1.55; color: #D5DBE6; }
.lo-res .lo-asidecta .lo-btn { min-height: 44px; font-size: 14px; padding: 0 18px; }

/* ---------- Article content (what goes in the Content field) ---------- */
.lo-res .lo-note {
  background: #FFF8E8; border: 1px solid #EBD9AE; border-radius: 12px; padding: 20px 24px;
  display: flex; gap: 14px; align-items: flex-start;
}
.lo-res .lo-note svg { width: 22px; height: 22px; flex: none; margin-top: 2px; stroke: #8A6414; }
.lo-res .lo-note p { margin: 0; font-size: 15px; line-height: 1.6; color: #5C4510; }

.lo-res .lo-sec {
  background: #fff; border: 1px solid var(--lo-line); border-radius: 12px; padding: 36px 40px; scroll-margin-top: 24px;
}
.lo-res .lo-sec h2 {
  margin: 0; font-family: var(--lo-serif); font-weight: 700; font-size: 28px; line-height: 1.2;
  color: var(--lo-navy); display: flex; align-items: center; gap: 14px;
}
.lo-res .lo-step {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--lo-navy); color: #fff;
  font-family: var(--lo-sans); font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.lo-res .lo-sec > p { margin: 12px 0 0; font-size: 16px; line-height: 1.65; color: var(--lo-body); }
.lo-res .lo-sec .lo-tip { font-size: 14px; color: var(--lo-muted); margin-top: 18px; }

/* Tick-off lists */
.lo-res .lo-checks { margin: 22px 0 0; padding: 0; list-style: none; }
.lo-res .lo-checks li { border-top: 1px solid #EEF0F3; }
.lo-res .lo-checks li:first-child { border-top: 0; }
.lo-res .lo-checks label {
  display: flex; gap: 14px; align-items: flex-start; padding: 13px 0;
  font-size: 16px; line-height: 1.55; color: var(--lo-ink); cursor: pointer;
}
.lo-res .lo-checks input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--lo-navy); cursor: pointer; }
.lo-res .lo-checks input:checked + span { color: var(--lo-muted); text-decoration: line-through; text-decoration-color: #B5BCC8; }

/* Three-up info tiles */
.lo-res .lo-tiles { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.lo-res .lo-tile { background: #F4F6FA; border-radius: 10px; padding: 18px; }
.lo-res .lo-tile strong { display: block; color: var(--lo-navy); font-size: 15px; }
.lo-res .lo-tile p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--lo-body); }

/* Tables */
.lo-res .lo-tablewrap { overflow-x: auto; margin-top: 22px; }
.lo-res .lo-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.lo-res .lo-table th {
  text-align: left; background: var(--lo-tint); color: var(--lo-navy); font-weight: 700;
  padding: 12px 16px; border-bottom: 1px solid #DDE1E8;
}
.lo-res .lo-table td { padding: 14px 16px; border-bottom: 1px solid #EEF0F3; vertical-align: top; line-height: 1.55; color: var(--lo-body); }
.lo-res .lo-table td:first-child { font-weight: 700; color: var(--lo-navy); width: 30%; }

/* Numbered questions (two columns) */
.lo-res .lo-questions {
  margin: 18px 0 0; padding: 0; list-style: none; counter-reset: q;
  columns: 2 280px; column-gap: 32px;
}
.lo-res .lo-questions li {
  counter-increment: q; break-inside: avoid; display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid #EEF0F3; font-size: 15px; line-height: 1.55;
}
.lo-res .lo-questions li::before {
  content: counter(q, decimal-leading-zero); flex: none; width: 30px;
  font-family: var(--lo-serif); font-weight: 700; font-size: 20px; line-height: 1.2; color: #B5862A;
}

/* Worksheet */
.lo-res .lo-worksheet { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.lo-res .lo-field { display: flex; flex-direction: column; gap: 6px; }
.lo-res .lo-field label { font-size: 13px; font-weight: 700; color: var(--lo-navy); }
.lo-res .lo-field input, .lo-res .lo-field textarea {
  min-height: 44px; border: 1.5px solid var(--lo-line-2); border-radius: 6px; padding: 10px 12px;
  font: inherit; font-size: 15px; color: var(--lo-ink); background: #fff; resize: vertical;
}
.lo-res .lo-field input:focus, .lo-res .lo-field textarea:focus,
.lo-res .lo-checks input:focus-visible { outline: 3px solid rgba(212,168,75,.55); outline-offset: 1px; border-color: var(--lo-navy); }

/* Link cards */
.lo-res .lo-linkcards { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lo-res .lo-linkcard {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 10px;
  border: 1px solid var(--lo-line); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.lo-res .lo-linkcard:hover { border-color: var(--lo-navy); box-shadow: 0 6px 18px rgba(20,33,61,.08); }
.lo-res .lo-linkcard strong { font-size: 16px; color: var(--lo-navy); }
.lo-res .lo-linkcard span { font-size: 14px; line-height: 1.5; color: var(--lo-body); }
.lo-res .lo-linkcard em { margin-top: 6px; font-style: normal; font-size: 14px; font-weight: 700; color: var(--lo-navy); }
.lo-res .lo-linkcard--dark { background: var(--lo-navy); border-color: var(--lo-navy); }
.lo-res .lo-linkcard--dark strong { color: #fff; }
.lo-res .lo-linkcard--dark span { color: #D5DBE6; }
.lo-res .lo-linkcard--dark em { color: var(--lo-accent); }

/* Sources / disclaimer */
.lo-res .lo-sources { padding: 8px 4px 0; scroll-margin-top: 24px; }
.lo-res .lo-sources h2 {
  margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lo-muted);
}
.lo-res .lo-sources p { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: var(--lo-muted); }

/* Related */
.lo-res .lo-related { max-width: 1180px; margin: 56px auto 0; padding: 0 24px; }
.lo-res .lo-related .lo-section-head a { font-weight: 700; font-size: 15px; }
.lo-res .lo-rcta-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .lo-res .lo-sec { padding: 26px 20px; }
  .lo-res .lo-sec h2 { font-size: 23px; }
  .lo-res .lo-rhero__cover img { width: 200px; }
  .lo-res .lo-raside { order: 2; }
}

/* ---------- Print: just the checklist ---------- */
@media print {
  header, footer, nav, .lo-noprint, .lo-raside, .lo-related, .lo-cta, .lo-rhero__cover { display: none !important; }
  .lo-res, .lo-res .lo-rhero { background: #fff !important; color: #000 !important; }
  .lo-res .lo-rhero h1, .lo-res .lo-rhero .lo-lead, .lo-res .lo-rmeta { color: #000 !important; }
  .lo-res .lo-rhero__inner { padding: 0 0 16px; }
  .lo-res .lo-rlayout { padding: 0; }
  .lo-res .lo-sec { border: 0; padding: 12px 0; break-inside: avoid-page; }
  .lo-res .lo-step { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lo-res .lo-checks input:checked + span { text-decoration: none; color: #000; }
}

/* =========================================================
   Directory-style resources (e.g. Legal Assistance Directory)
   ========================================================= */

/* Cost / access tags */
.lo-res .lo-cost {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; font-family: var(--lo-sans);
}
.lo-res .lo-cost--free { background: #E3F1E8; color: #1F5133; }
.lo-res .lo-cost--elig { background: #E4ECF8; color: #1D3E73; }
.lo-res .lo-cost--paid { background: #F1ECE2; color: #6B4E12; }

/* "Choose a starting route" cards */
.lo-res .lo-routes { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lo-res .lo-route {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--lo-line);
  border-radius: 10px; text-decoration: none; color: var(--lo-ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.lo-res .lo-route:hover { border-color: var(--lo-navy); box-shadow: 0 6px 18px rgba(20,33,61,.08); color: var(--lo-ink); }
.lo-res .lo-route__if { font-size: 14px; line-height: 1.5; color: var(--lo-body); }
.lo-res .lo-route__if b { color: var(--lo-muted); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.lo-res .lo-route strong { font-size: 17px; color: var(--lo-navy); line-height: 1.3; }
.lo-res .lo-route__foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--lo-navy); }

/* Provider blocks inside a section */
.lo-res .lo-provider { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--lo-line); scroll-margin-top: 24px; }
.lo-res .lo-sec > h2 + p + .lo-provider, .lo-res .lo-sec > h2 + .lo-provider { border-top: 0; padding-top: 0; margin-top: 22px; }
.lo-res .lo-provider__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.lo-res .lo-provider h3 { margin: 0; font-family: var(--lo-serif); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--lo-navy); }
.lo-res .lo-provider > p { margin: 10px 0 0; font-size: 16px; line-height: 1.65; color: var(--lo-body); }
.lo-res .lo-provider ul { margin: 10px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.65; color: var(--lo-body); }
.lo-res .lo-provider ul li + li { margin-top: 4px; }

/* Key facts */
.lo-res .lo-facts {
  margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px;
  background: #F4F6FA; border-radius: 10px; padding: 18px 20px; font-size: 15px; line-height: 1.5;
}
.lo-res .lo-facts dt { font-weight: 700; color: var(--lo-navy); }
.lo-res .lo-facts dd { margin: 0; color: var(--lo-body); }
.lo-res .lo-facts a[href^="tel:"] { font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) {
  .lo-res .lo-facts { grid-template-columns: 1fr; gap: 2px; }
  .lo-res .lo-facts dd + dt { margin-top: 10px; }
}

/* Small link buttons under a provider */
.lo-res .lo-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.lo-res .lo-links a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 6px;
  border: 1.5px solid var(--lo-navy); color: var(--lo-navy); font-weight: 600; font-size: 14px; text-decoration: none;
}
.lo-res .lo-links a:hover { background: var(--lo-navy); color: #fff; }
.lo-res .lo-links a.is-primary { background: var(--lo-navy); color: #fff; }
.lo-res .lo-links a.is-primary:hover { background: #0B1426; }

/* Red alert variant of the note */
.lo-res .lo-note--alert { background: #FCEDEC; border-color: #F0C4C0; }
.lo-res .lo-note--alert svg { stroke: #9B2C22; }
.lo-res .lo-note--alert p { color: #6E1F18; }
.lo-res .lo-sec .lo-note { margin-top: 22px; }
