/* ==========================================================================
   cdltrainingproviders.com — Day-1 design system
   Vanilla CSS, no framework. Mobile-first, light + dark, print-friendly.
   ========================================================================== */

:root {
  --ink: #0d1b2a;
  --ink-2: #33475b;
  --muted: #64748b;
  --line: #e3e8ef;
  --line-2: #eef2f7;
  --bg: #f7f9fc;
  --card: #ffffff;
  --brand: #0b3b6f;
  --brand-2: #12518f;
  --brand-ink: #06233f;
  --accent: #f59f00;
  --accent-soft: #fff8e6;
  --accent-ink: #7a4a00;
  --ok: #067647;
  --ok-soft: #eafaf1;
  --warn-soft: #fff4ed;
  --warn-ink: #8a3800;
  --shadow: 0 1px 2px rgba(13, 27, 42, .06), 0 6px 20px rgba(13, 27, 42, .06);
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .07);
  --r: 12px;
  --r-sm: 8px;
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef6;
    --ink-2: #c2cede;
    --muted: #93a3b8;
    --line: #23324a;
    --line-2: #1a2637;
    --bg: #0b1420;
    --card: #121e2e;
    --brand: #7fb2e6;
    --brand-2: #a9cdf3;
    --brand-ink: #cbe1f8;
    --accent: #f7b955;
    --accent-soft: #2a2113;
    --accent-ink: #f3cd8e;
    --ok: #59d3a0;
    --ok-soft: #10291f;
    --warn-soft: #2b1d12;
    --warn-ink: #f3b98a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .mark {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; place-items: center;
  font-size: .74rem; font-weight: 800; letter-spacing: .02em;
}
.brand b { display: block; line-height: 1.15; }
.brand span { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a {
  display: block; padding: 8px 11px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600;
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav-toggle {
  display: none; margin-left: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 8px 12px 14px;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid var(--line-2); border-radius: 0; }
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 12% -20%, rgba(18, 81, 143, .16), transparent 62%),
    linear-gradient(180deg, var(--card), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.16; margin: 0 0 12px; letter-spacing: -.02em; }
.hero p.lede { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--ink-2); max-width: 66ch; margin: 0 0 20px; }
.hero.tight { padding: 26px 0 22px; }

.eyebrow {
  display: inline-block; margin: 0 0 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 4px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}

.crumbs { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--line); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- sections ---------- */
main { display: block; padding-bottom: 8px; }
section { padding: 30px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.28rem, 2.3vw, 1.62rem); line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font-size: 1.06rem; margin: 0 0 8px; }
h4 { font-size: .95rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.section-lede { color: var(--ink-2); max-width: 74ch; margin-bottom: 18px; }

/* ---------- stat grid ---------- */
.stats {
  display: grid; gap: 12px; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  list-style: none; padding: 0;
}
.stats li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stats .n { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.stats .k { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card.tight { padding: 13px 15px; }

a.card { display: block; text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
a.card:hover { border-color: var(--brand); transform: translateY(-1px); }
a.card:hover h3 { color: var(--brand); }
.card .sub { color: var(--muted); font-size: .86rem; }

.pill-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; }
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2);
  font-size: .78rem; font-weight: 700; border: 1px solid var(--line);
}
.pill.a { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pill.g { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }

/* ---------- tool panels ---------- */
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
}
.tool-hd {
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff; padding: 18px 20px;
}
.tool-hd h2, .tool-hd h3 { margin: 0 0 4px; color: #fff; }
.tool-hd p { margin: 0; color: #dbe9f8; font-size: .9rem; }
.tool-bd { padding: 18px 20px 20px; }
.tool.alt .tool-hd { background: linear-gradient(140deg, #7a4a00, #b06a00); }
.tool.alt .tool-hd p { color: #ffeed4; }

.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .76rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; width: 100%;
}
.field input[type="range"] { padding: 0; }
.field .unit { position: relative; }
.field .unit input { padding-right: 34px; }
.field .unit::after {
  content: "$"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .9rem; pointer-events: none;
}
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: .94rem;
  padding: 10px 18px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  text-decoration: none;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.btn.ghost:hover { background: var(--line-2); color: var(--brand); }
.btn.amber { background: var(--accent); border-color: var(--accent); color: #3b2600; }
.btn.amber:hover { background: #ffb733; border-color: #ffb733; color: #3b2600; }
.btn.sm { padding: 7px 13px; font-size: .86rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.out { margin-top: 16px; }
.out-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  list-style: none; margin: 0 0 12px; padding: 0;
}
.out-grid li {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px;
}
.out-grid .n { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.out-grid .k { display: block; font-size: .77rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bar { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 4px 0 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #34c98a); width: 0; transition: width .3s ease; }
.verdict { font-weight: 700; }
.verdict.good { color: var(--ok); }
.verdict.warn { color: var(--warn-ink); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 620px; }
caption { text-align: left; padding: 12px 14px; color: var(--muted); font-size: .84rem; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th {
  background: var(--bg); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); position: sticky; top: 0;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--line-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .prov { font-weight: 700; display: block; }
td .adr { color: var(--muted); font-size: .84rem; }
a.tel { white-space: nowrap; text-decoration: none; font-weight: 600; }
a.tel:hover { text-decoration: underline; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.filter-bar .field { min-width: 200px; flex: 1 1 200px; }
.count-note { font-size: .84rem; color: var(--muted); margin: 8px 0 0; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 14px 30px 14px 0; font-weight: 700; position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 1.3rem; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "\2212"; }
.faq .ans { padding: 0 0 16px; color: var(--ink-2); max-width: 80ch; }
.faq .ans p:last-child { margin-bottom: 0; }

/* ---------- notes / callouts ---------- */
.note {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 16px; margin: 0 0 16px;
  color: var(--accent-ink);
}
.note.info { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); color: var(--ink-2); }
.note.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ink-2); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: inherit; }

.cta {
  background: linear-gradient(140deg, var(--brand-ink), var(--brand));
  color: #fff; border-radius: var(--r); padding: 24px 26px;
}
.cta h2, .cta h3 { color: #fff; margin-top: 0; }
.cta p { color: #d5e5f7; }
.cta a:not(.btn) { color: #ffd98a; }

.src-stamp {
  font-size: .8rem; color: var(--muted);
  border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 10px;
}
.src-stamp code { font-family: var(--mono); font-size: .78rem; }

/* ---------- footer ---------- */
.ftr { background: var(--card); border-top: 1px solid var(--line); margin-top: 34px; padding: 30px 0 38px; font-size: .9rem; }
.ftr-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ftr h4 { text-transform: uppercase; font-size: .74rem; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 6px; }
.ftr a { color: var(--ink-2); text-decoration: none; }
.ftr a:hover { color: var(--brand); text-decoration: underline; }
.ftr .disc { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; max-width: 92ch; }

/* ---------- misc ---------- */
.two-col { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .two-col { grid-template-columns: 1.6fr 1fr; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.embed-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
ul.plain li:last-child { border-bottom: 0; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 5px 0 5px 26px; position: relative; }
ul.checks li::before { content: "\2713"; position: absolute; left: 4px; color: var(--ok); font-weight: 800; }
ol.steps { padding-left: 22px; }
ol.steps li { margin-bottom: 8px; }

@media print {
  .hdr, .ftr, .nav, .skip, .btn { display: none !important; }
  body { background: #fff; }
  .tool { box-shadow: none; border-color: #999; }
}
