/* ============================================================
   M365Assessments Resources (/resources): loaded after styles.css and help.css
   (articles reuse the Help Center article layout, breadcrumbs, callouts and tables).
   Mobile-first; design tokens and dark mode come from styles.css. No inline styles (CSP).
   ============================================================ */

/* ---------- Article extras ---------- */
.res-byline { margin: 0 0 .9rem; font-size: .9rem; color: var(--muted) !important; }
.res-byline span:first-child { font-weight: 700; color: var(--ink); }
.res-pillar { margin: 0 0 1.1rem; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--tint); font-size: .94rem; }
.res-pillar a { font-weight: 700; }

.res-tldr {
  margin: 0 0 1.8rem; padding: 18px 20px;
  border: 1px solid var(--purple-300); border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.res-tldr h2 { margin: 0 0 .5rem !important; font-size: .82rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.res-tldr ul { margin: 0; }
.res-tldr li:last-child { margin-bottom: 0; }

/* Phone/tablet "On this page" (the sidebar TOC shows from 1000px) */
.res-toc-m { margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.res-toc-m summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--ink); }
.res-toc-m ul { list-style: none; margin: 0; padding: 0 16px 12px !important; }
.res-toc-m li { margin: 0; }
.res-toc-m a { display: block; padding: 6px 0; text-decoration: none !important; font-weight: 600; }
@media (min-width: 1000px) { .res-toc-m { display: none; } }

.res-article h3 + ul, .res-article h3 + ol { margin-top: .3rem; }
.res-article .table th[scope="row"] { font-weight: 700; color: var(--ink); }

/* Related articles */
.res-related-list { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
@media (min-width: 720px) { .res-related-list { grid-template-columns: repeat(2, 1fr); } }
.res-related-list li { margin: 0; }
.res-related-list a {
  display: block; height: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--body); text-decoration: none !important;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.res-related-list a:hover { border-color: var(--purple-300); box-shadow: var(--shadow-sm); color: var(--body); }
.res-related-list b { display: block; color: var(--ink); line-height: 1.35; }
.res-related-list span { display: block; margin-top: 4px; font-size: .9rem; color: var(--muted); line-height: 1.45; }

.res-side-lead { background: var(--tint); border-color: var(--purple-300); }

.res-cta-wrap { padding-top: 0; }

/* ---------- Resources index ---------- */
.res-lead-wrap { position: relative; z-index: 2; margin-top: -36px; }
.res-lead {
  display: grid; gap: 16px; align-items: center;
  padding: 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.res-lead h2 { font-size: clamp(1.2rem, 3.2vw, 1.5rem); margin-bottom: .3rem; }
.res-lead p { margin: 0; color: var(--muted); }
.res-lead .btn { justify-self: start; }
@media (min-width: 820px) { .res-lead { grid-template-columns: auto 1fr auto; padding: 26px 30px; } .res-lead .btn { justify-self: end; } }

.res-cluster { padding-top: 44px; padding-bottom: 12px; }
.res-cluster + .res-cluster { padding-top: 28px; }
.res-cluster-head { max-width: 760px; margin-bottom: 18px; }
.res-cluster-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin-bottom: .3rem; }
.res-cluster-head p { margin: 0; color: var(--muted); }

.res-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .res-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .res-cards { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.res-card {
  position: relative; display: flex; flex-direction: column;
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.res-card:hover { border-color: var(--purple-300); box-shadow: var(--shadow-md); }
.res-card:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.res-card--pillar { border-color: var(--purple-300); background: linear-gradient(180deg, var(--tint), var(--surface) 70%); }
.res-card-flag { align-self: flex-start; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; background: var(--tint-2); color: var(--accent-strong); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.res-card-title { font-size: 1.08rem; margin: 0 0 .4rem; line-height: 1.3; }
.res-card-title a { color: var(--ink); }
.res-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.res-card-title a:focus-visible { outline: none; }
.res-card p { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; }
.res-card-meta { margin-top: auto; font-size: .8rem; font-weight: 700; color: var(--accent-text); }

/* ---------- Printable checklist ---------- */
.res-ck-wrap { padding-top: 28px; padding-bottom: 56px; }
.res-ck { max-width: 1000px; margin: 0 auto; }
.res-ck-head h1 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); margin-bottom: .35em; }
.res-ck-head .help-summary { max-width: 760px; }
.res-ck-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.6rem; }
.res-ck-actions .btn svg { width: 18px; height: 18px; }
.res-ck-note { font-size: .92rem; color: var(--muted); margin: 0 0 1.4rem; }
.res-ck-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .res-ck-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
.res-ck-group { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); break-inside: avoid; }
.res-ck-group h2 { font-size: 1.1rem; margin: 0 0 .7rem; }
.res-ck-group h2 small { display: block; margin-top: 2px; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.res-ck-list { list-style: none; margin: 0; padding: 0; }
.res-ck-list li { position: relative; padding-left: 28px; margin: 0 0 .55rem; font-size: .95rem; line-height: 1.45; color: var(--body); }
.res-ck-list li:last-child { margin-bottom: 0; }
.res-ck-list li::before { content: ""; position: absolute; left: 0; top: .15em; width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--purple-400); background: var(--surface); }
.res-ck-list a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.res-ck-foot { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.res-ck-foot p { margin: 0 0 .4rem; }
.res-ck-print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .nav-overlay, .skip-link, .m-cta, .res-noprint, .help-bar, .res-cta-wrap { display: none !important; }
  body.has-m-cta .site-footer { padding: 0; }
  .res-ck-wrap { padding: 0; max-width: none; }
  .res-ck { max-width: none; }
  .res-ck-head h1 { font-size: 20pt; margin: 0 0 4pt; color: #000; }
  .res-ck-head .eyebrow { display: none; }
  .res-ck-head .help-summary, .res-byline { font-size: 9.5pt; color: #333 !important; margin: 0 0 6pt; }
  .res-ck-grid { display: block; columns: 2; column-gap: 8mm; }
  .res-ck-group { break-inside: avoid; page-break-inside: avoid; margin: 0 0 5mm; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .res-ck-group h2 { font-size: 11pt; margin: 0 0 3pt; padding-bottom: 2pt; border-bottom: 1.5pt solid #4C1D95; color: #000; }
  .res-ck-group h2 small { font-size: 8pt; color: #444; }
  .res-ck-list li { font-size: 8.8pt; line-height: 1.35; margin: 0 0 2.5pt; padding-left: 15pt; color: #000; }
  .res-ck-list li::before { width: 8pt; height: 8pt; top: 1.5pt; border: 1pt solid #000; border-radius: 1.5pt; background: #fff; }
  .res-ck-list a { color: #000; text-decoration: none; }
  .res-ck-note { display: none; }
  .res-ck-foot { font-size: 8pt; color: #333; border-top: 1pt solid #999; margin-top: 4mm; padding-top: 2mm; }
  .res-ck-print-only { display: block; }
  a[href]::after { content: none !important; }
}
