/* CRM Career Notes — visual identity shared with CRM Certs (navy header, white surfaces,
   restrained teal/amber accents, rounded cards, amber focus ring). No framework, no JS.
   Contrast notes are against white unless stated. */
:root {
  --navy: #0f2a55;
  --navy-2: #16396f;
  --blue: #1f5eb8;        /* 6.0:1 */
  --blue-dark: #174a92;
  --teal: #0e7c6b;        /* 5.2:1 */
  --amber: #fbbf24;
  --ink: #1b2536;         /* 15:1 */
  --muted: #56627a;       /* 5.9:1; 5.5:1 on --surface */
  --surface: #f5f7fb;
  --border: #dde3ee;
  --focus: #f59e0b;
  --footer: #0b1f40;
  --radius: .75rem;
  --shadow: 0 1px 2px rgba(15, 42, 85, .05);
  --shadow-lg: 0 10px 28px rgba(15, 42, 85, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 42rem;       /* ~70 characters per line; used by prose pages (about, author) */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--surface);
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, picture, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .75rem; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); text-decoration-thickness: .12em; }
code { font-family: var(--mono); font-size: .9em; background: #eef2f8; padding: .1em .35em; border-radius: .3rem; }
ul, ol { padding-left: 1.4rem; }

/* Visible, consistent keyboard focus (WCAG 2.4.7 / 2.4.11) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: .2rem; }
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: #fff; color: var(--navy); padding: .6rem 1rem; border-radius: .5rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: .5rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .container { padding-inline: 1.5rem; } }

/* ---------------------------------------------------------------- header + navigation */
.site-header { background: var(--navy); color: #fff; position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; color: #d6e0f0; text-decoration: none; font-weight: 500; padding: .5rem .8rem; border-radius: .5rem; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .14); }
.site-nav a:focus-visible { outline-offset: 0; }
.nav-inline { display: none; }
.nav-mobile summary {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none;
  color: #fff; font-weight: 600; padding: .5rem .8rem; min-height: 44px; border: 1px solid rgba(255, 255, 255, .4); border-radius: .5rem;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-icon, .nav-icon::before, .nav-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; }
.nav-icon { position: relative; }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; left: 0; }
.nav-icon::before { top: -6px; }
.nav-icon::after { top: 6px; }
.nav-mobile[open] .nav-icon { background: transparent; }
.nav-mobile[open] .nav-icon::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .nav-icon::after { top: 0; transform: rotate(-45deg); }
.nav-panel {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-2);
  padding: .5rem 1rem 1rem !important; box-shadow: var(--shadow-lg); border-top: 1px solid rgba(255, 255, 255, .12);
}
.nav-panel a { padding: .75rem .8rem; }
@media (min-width: 52rem) {
  .nav-mobile { display: none; }
  .nav-inline { display: flex; gap: .25rem; }
}

/* ---------------------------------------------------------------- breadcrumbs */
.breadcrumbs { padding-top: 1.25rem; font-size: .925rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; }
.breadcrumbs li + li::before {
  content: ""; width: .4rem; height: .4rem; border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg); margin: 0 .4rem 0 .15rem; flex: none;
}
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------------------------------------------------------------- shared bits */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: .5rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section { padding-block: 2.5rem; }
.section-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 1.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.section-head .section-title { margin: 0; }
.section-link { font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.15rem;
  border-radius: .5rem; font-weight: 600; text-decoration: none; border: 2px solid transparent;
}
.btn-accent { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-accent:hover { background: var(--focus); border-color: var(--focus); color: var(--ink); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { color: var(--blue); border-color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }

/* ---------------------------------------------------------------- hero (home) */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1b5a8c 100%); color: #fff; }
.hero-inner { padding-block: 3rem 3.25rem; }
.hero h1 { color: #fff; }
.hero .lead { color: #d6e0f0; }
.hero-badge {
  display: inline-block; background: rgba(94, 234, 212, .15); color: #99f6e4; border: 1px solid rgba(94, 234, 212, .35);
  padding: .25rem .8rem; border-radius: 999px; font-size: .875rem; margin-bottom: 1rem;
}
.hero .btn:focus-visible { outline-color: var(--amber); }
@media (min-width: 48rem) { .hero-inner { padding-block: 4.5rem; } }

/* ---------------------------------------------------------------- page header */
.page-header { background: #fff; border-bottom: 1px solid var(--border); padding-block: 1.75rem 2rem; margin-top: 1rem; }
.page-header h1 { margin-bottom: .5rem; }
.page-header .lead { margin-bottom: 0; }
.topic-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.25rem 0 0; }
.topic-links a {
  display: inline-block; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .925rem; background: var(--surface);
}
.topic-links a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.profile-head { display: flex; gap: 1.25rem; align-items: flex-start; }
.profile-head img { flex: none; border-radius: 1rem; }

/* ---------------------------------------------------------------- cards */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card {
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: box-shadow .15s ease, transform .15s ease; }
  .card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
}
.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e8f0fc; }
.card-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.15rem; margin-bottom: .5rem; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; }
.card-text { color: var(--muted); font-size: .95rem; }
.card .meta { margin: auto 0 0; }
.empty-state { padding: 2rem; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }

.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.topic { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--focus); border-radius: var(--radius); padding: 1.25rem; }
.topic h3 a, .topic-title a { color: var(--navy); }
.topic-title { font-size: 1.2rem; }
.topic p { color: var(--muted); }
.topic .meta { margin: 0; }

.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2rem 0 0; }
.pagination a, .pagination [aria-current] {
  display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 .9rem;
  border: 1px solid var(--border); border-radius: .5rem; background: #fff; text-decoration: none; font-weight: 600;
}
.pagination [aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------------------------------------------------------- article */
.article { padding-bottom: 2.5rem; }
.article-header { padding-top: 1.25rem; }
.article-header h1 { margin-bottom: 1rem; }
.byline { display: flex; flex-wrap: wrap; gap: .25rem .5rem; color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.byline a { font-weight: 600; }
.article-hero { margin-top: 0; margin-bottom: 2rem; }
.article-hero figcaption { margin-top: .6rem; }
.article-hero img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: #e8f0fc; }

.toc { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; }
.toc-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: .3rem 0; }

.article-body { font-size: 1.125rem; line-height: 1.7; }
.article-body p, .article-body li { color: var(--ink); }
.article-body h2 { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.article-body h3 { margin-top: 1.75rem; scroll-margin-top: 1rem; font-size: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem; }
.article-body li { margin-bottom: .45rem; }
.article-body li::marker { color: var(--teal); font-weight: 700; }
.article-figure { margin: 1.75rem 0; }
.article-figure img { border-radius: .6rem; border: 1px solid var(--border); }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

.callout { border-left: 4px solid var(--teal); background: #eefaf7; padding: 1rem 1.15rem; border-radius: .5rem; margin: 1.5rem 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { margin-bottom: .35rem; color: #0b5d4f; }
.callout-caution { border-left-color: #d97706; background: #fff8eb; }
.callout-caution .callout-title { color: #8a4a04; }
.callout-note { border-left-color: var(--blue); background: #eef4fd; }
.callout-note .callout-title { color: var(--blue-dark); }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: .6rem; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
caption { text-align: left; padding: .75rem 1rem 0; color: var(--muted); font-size: .9rem; }
th, td { text-align: left; padding: .6rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { color: var(--navy); background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 40rem) { table { font-size: .9375rem; } th, td { padding: .5rem .65rem; } caption { padding: .6rem .65rem 0; } }

.sources { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.sources h2 { font-size: 1.2rem; }
.sources ul { margin: 0; }
.sources li { margin: .3rem 0; }

.author-box { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding: 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.author-box img { flex: none; border-radius: .75rem; }
.author-name { font-size: 1.1rem; margin-bottom: .35rem; }
.author-box p { margin: 0; color: var(--muted); }
.related .section-title { margin-bottom: 1.25rem; }

/* ---------------------------------------------------------------- prose pages */
.prose { max-width: none; font-size: 1.0625rem; line-height: 1.7; } /* full container width, like articles */
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.articles-by { margin-top: 2.5rem; margin-bottom: 1.25rem; }

/* ---------------------------------------------------------------- contact page */
.contact-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.contact-intro .section-title { margin-bottom: .35rem; }
.contact-intro p { color: var(--muted); margin: 0; }
.contact-email { font-size: 1.25rem; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.contact-card { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; display: flex; flex-direction: column; }
.contact-card:nth-child(2) { border-top-color: var(--teal); }
.contact-card:nth-child(3) { border-top-color: var(--amber); }
.contact-card:nth-child(4) { border-top-color: var(--navy); }
.contact-icon { width: 2.75rem; height: 2.75rem; padding: .6rem; border-radius: .75rem; background: #e8f0fc; color: var(--blue); margin-bottom: .9rem; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.contact-card p { color: var(--muted); font-size: .95rem; }
.contact-link { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; gap: .3rem; min-height: 44px; align-items: center; }
.contact-link:hover { text-decoration: underline; }
.highlight-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.highlight-grid li { border-left: 4px solid var(--teal); padding: .25rem 0 .25rem 1rem; }
.highlight-grid h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.highlight-grid p { color: var(--muted); margin: 0; font-size: .95rem; }
.contact-cta { margin-top: 2.5rem; padding: 1.75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.contact-cta p { color: var(--muted); }

/* ---------------------------------------------------------------- archives */
.archive-year { scroll-margin-top: 1rem; }
.archive-year + .archive-year { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.archive-year h3 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; color: var(--teal); }
.archive-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.archive-list li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .25rem 1rem; align-items: baseline; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.archive-list li:last-child { border-bottom: 0; }
.archive-list time { color: var(--muted); font-size: .9rem; }
.archive-title { font-weight: 600; color: var(--navy); }
.archive-cat { font-size: .85rem; color: var(--teal); text-decoration: none; white-space: nowrap; }
.archive-cat:hover { text-decoration: underline; }
@media (max-width: 40rem) { .archive-list li { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--footer); color: #b8c4d9; margin-top: 3rem; padding-block: 2.5rem; font-size: .95rem; }
.page-article .site-footer, .page-home .site-footer { margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 3fr 1fr; } }
.footer-topics a { white-space: nowrap; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .75rem; }
.site-footer p { line-height: 1.7; }
.footer-disclaimer { color: #9fb0cb; font-size: .875rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: #dbe5f5; }
.site-footer a:hover { color: #fff; }

/* ---------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .toc, .related, .skip-link, .breadcrumbs { display: none !important; }
  body { background: #fff; }
  .article-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: var(--muted); }
}
