/* STRAX training, certification and consultant directory.
   Linked only where a page sets ViewData["Training"] = true (the /training, /certification,
   /learn, /verify and /consultants pages), on top of site.css, whose tokens it uses. Own smoke
   budget in tools/public-site-smoke.cjs. Prefix: tr-. */

/* ── tracks ─────────────────────────────────────────────────────────────── */
.tr-tracks { align-items: stretch; }
.tr-track { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color var(--dur-fast), transform var(--dur-fast); }
.tr-track:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tr-track:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.tr-track h3 { font-size: 20px; }
.tr-track .tr-foot { margin-top: auto; padding-top: var(--s-4); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-code { font: 500 13px/1 var(--font-mono); letter-spacing: .04em; color: var(--amber-text); margin-bottom: var(--s-2); }
.tr-meta { font-size: 14px; color: var(--text-muted); }
.hero .tr-code { color: var(--orange); }

.tr-steps { counter-reset: tr-step; }
.tr-steps .card { counter-increment: tr-step; }
.tr-steps .card::before { content: counter(tr-step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tint-100); color: var(--amber-900); font-weight: 700; margin-bottom: var(--s-3); }

/* ── track page ─────────────────────────────────────────────────────────── */
.tr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); align-items: start; }
@media (max-width: 900px) { .tr-layout { grid-template-columns: minmax(0, 1fr); } }
.tr-lessons { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.tr-lessons a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: inherit; }
.tr-lessons a:hover { border-color: var(--border-strong); }
.tr-lessons .tr-num { font: 600 15px/1 var(--font-mono); color: var(--amber-text); padding-top: 3px; }
.tr-lessons strong { display: block; font-size: 17px; margin-bottom: 4px; }
.tr-lessons span.tr-meta { display: block; margin-top: 6px; }
.tr-aside { position: sticky; top: 96px; }
.tr-aside h2, .tr-aside h3 { font-size: 20px; margin-bottom: var(--s-3); }
.tr-facts { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: 8px; }
.tr-facts li { display: flex; justify-content: space-between; gap: var(--s-3); font-size: 15px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tr-facts li span:first-child { color: var(--text-muted); }
.tr-objectives { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tr-objectives li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--s-3); align-items: baseline; font-size: 16px; color: var(--text-2); }
.tr-objectives .tr-oid { font: 500 13px/1 var(--font-mono); color: var(--amber-text); }
.tr-objectives .tr-w { font-size: 14px; color: var(--text-muted); }

/* ── lesson page ────────────────────────────────────────────────────────── */
.tr-crumbs { font-size: 14px; color: var(--text-muted); margin-bottom: var(--s-4); }
.tr-crumbs a { color: var(--link); }
.tr-lesson-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-8); align-items: start; }
@media (max-width: 900px) { .tr-lesson-grid { grid-template-columns: minmax(0, 1fr); } .tr-toc { order: 2; } }
.tr-toc { position: sticky; top: 96px; font-size: 14px; }
.tr-toc h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-3); }
.tr-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.tr-toc a { display: block; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; }
.tr-toc a:hover { background: var(--surface-2); }
.tr-toc a[aria-current="page"] { background: var(--tint-50); color: var(--amber-900); font-weight: 600; }
.tr-article h1 { font-size: var(--fs-h2); letter-spacing: var(--ls-h2); margin-bottom: var(--s-3); }
.tr-article .lede { margin-bottom: var(--s-3); }
.tr-byline { font-size: 14px; color: var(--text-muted); margin-bottom: var(--s-6); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tr-prose h2 { font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); margin: var(--s-7) 0 var(--s-3); }
.tr-prose h3 { font-size: 19px; margin: var(--s-5) 0 var(--s-2); }
.tr-prose p, .tr-prose li { color: var(--text-2); font-size: 17px; line-height: 1.7; }
.tr-prose p { margin-bottom: var(--s-3); }
.tr-prose ul, .tr-prose ol { padding-left: 22px; margin: var(--s-2) 0 var(--s-4); }
.tr-prose ul { list-style: disc; }
.tr-prose ol { list-style: decimal; }
.tr-prose li { margin-bottom: 8px; }
.tr-prose a { color: var(--link); text-decoration: underline; }
.tr-prose strong { color: var(--text); }
.tr-prose table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border: 1px solid var(--border); margin: var(--s-4) 0; }
.tr-prose th { text-align: left; font-weight: 600; background: var(--surface-2); padding: 10px 12px; }
.tr-prose td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.tr-prose blockquote { border-left: 4px solid var(--orange); background: var(--tint-50); padding: 12px 16px; margin: var(--s-4) 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.tr-shot { margin: var(--s-5) 0; }
.tr-shot img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
.tr-shot figcaption { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.tr-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: var(--s-8); }
.tr-pager a { display: block; padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--text); }
.tr-pager a:hover { border-color: var(--border-strong); }
.tr-pager .tr-next { text-align: right; grid-column: 2; }
.tr-pager small { display: block; color: var(--text-muted); font-size: 13px; margin-bottom: 4px; }
.tr-draft { border-left-color: var(--warning); background: var(--warning-tint); }

/* ── learner account area (/learn) ─────────────────────────────────────── */
.tr-auth { max-width: 560px; margin: 0 auto; }
.tr-auth h1, .tr-page-title { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); letter-spacing: var(--ls-h2); margin-bottom: var(--s-3); }
.tr-auth p { color: var(--text-2); }
.tr-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.tr-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--amber-text); }
.tr-check label { font-weight: 400; margin: 0; }
.tr-learn-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: var(--s-6); padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.tr-learn-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 15px; }
.tr-learn-nav a:hover { background: var(--surface-2); }
.tr-learn-nav a[aria-current="page"] { background: var(--tint-50); color: var(--amber-900); font-weight: 600; }
.tr-signout { margin: 0 0 0 auto; }
.tr-account { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.tr-account h2, .tr-card-title { font-size: 20px; margin-bottom: var(--s-3); }
.tr-account h3 { font-size: 16px; margin-bottom: var(--s-2); }
.tr-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tr-codes code { font: 500 15px/1.4 var(--font-mono); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; text-align: center; }
.tr-break { word-break: break-all; }
details summary { cursor: pointer; color: var(--link); font-size: 14px; }

/* ── exam ───────────────────────────────────────────────────────────────── */
.tr-exam-bar { position: sticky; top: 64px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); background: var(--bg); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); margin-bottom: var(--s-4); }
.tr-exam-bar .tr-code { margin: 0 0 4px; }
.tr-clock { font: 600 16px/1.3 var(--font-mono); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 8px 16px; white-space: nowrap; }
.tr-clock-low { color: var(--critical-text); border-color: var(--critical); }
.tr-exam-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-5); }
.tr-exam-pages a, .tr-exam-pages button { font: 500 14px/1 var(--font-sans); padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; cursor: pointer; }
.tr-exam-pages [aria-current="page"] { background: var(--tint-50); border-color: var(--amber-text); color: var(--amber-900); font-weight: 600; }
.tr-question { margin: 0 0 var(--s-4); border: 1px solid var(--border); max-width: 820px; }
.tr-qnum { font: 600 13px/1 var(--font-mono); letter-spacing: .04em; color: var(--amber-text); padding: 0 6px; }
.tr-stem { font-size: 17px; line-height: 1.6; color: var(--text); margin-bottom: var(--s-3); }
.tr-options { display: grid; gap: 8px; }
.tr-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); }
.tr-option:hover { border-color: var(--border-strong); }
.tr-option input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--amber-text); }
.tr-option label { font-weight: 400; margin: 0; font-size: 16px; color: var(--text-2); cursor: pointer; }
.tr-option:has(input:checked) { border-color: var(--amber-text); background: var(--tint-50); }
.tr-exam-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }
.tr-rules { padding-left: 20px; list-style: disc; display: grid; gap: 6px; color: var(--text-2); font-size: 15px; }

/* ── result ─────────────────────────────────────────────────────────────── */
.tr-result.tr-pass { border-top: 4px solid var(--success); }
.tr-result.tr-fail { border-top: 4px solid var(--warning); }
.tr-score strong { font-size: 44px; letter-spacing: -.02em; margin-right: 8px; }
.tr-bars { list-style: none; padding: 0; margin: 0 0 var(--s-3); display: grid; gap: 12px; }
.tr-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; }
.tr-bar-label { color: var(--text-2); }
.tr-bar-value { color: var(--text-muted); font-size: 14px; }
.tr-bar { grid-column: 1 / -1; height: 8px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.tr-bar span { display: block; height: 100%; background: var(--amber-text); border-radius: var(--r-pill); }

/* ── verify + certificate ───────────────────────────────────────────────── */
.tr-verify h1 { margin-bottom: var(--s-2); }
.tr-certificate { position: relative; max-width: 1100px; aspect-ratio: 1100 / 780; margin: var(--s-5) auto 0; background: #fff; color: #111418; box-shadow: var(--shadow-card); border-radius: 18px; }
.tr-cert-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.tr-cert-body { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6% 10%; gap: 6px; }
.tr-cert-logo { width: clamp(140px, 22%, 240px); height: auto; margin-bottom: 2%; }
.tr-cert-kicker { font-size: clamp(12px, 1.6vw, 17px); color: #3A424B; letter-spacing: .04em; text-transform: uppercase; }
.tr-cert-name { font-size: clamp(24px, 4.2vw, 46px); font-weight: 700; letter-spacing: -.02em; border-bottom: 2px solid #FFB000; padding: 0 4% 6px; margin: 4px 0 8px; }
.tr-cert-title { font-size: clamp(18px, 2.8vw, 30px); letter-spacing: -.01em; margin: 4px 0 2%; color: #111418; }
.tr-cert-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 36px; margin: 2% 0; }
.tr-cert-facts dt { font-size: 12px; color: #5B646E; text-transform: uppercase; letter-spacing: .06em; }
.tr-cert-facts dd { font: 600 clamp(13px, 1.5vw, 16px)/1.4 var(--font-mono); margin: 0; }
.tr-cert-verify, .tr-cert-issuer { font-size: clamp(11px, 1.2vw, 13px); color: #5B646E; max-width: 70ch; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .site-header, .site-footer, .skip-link, .tr-noprint { display: none !important; }
  body, .band, .tr-cert-band { background: #fff !important; padding: 0 !important; }
  .tr-certificate { box-shadow: none; max-width: none; width: 100%; margin: 0; }
}

/* ── consultants ────────────────────────────────────────────────────────── */
.tr-wide { max-width: 860px; }
.tr-span2 { grid-column: span 2; }
@media (max-width: 760px) { .tr-span2 { grid-column: auto; } }
.tr-choices { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; }
.tr-choices legend { font: 500 14px/1.4 var(--font-sans); padding: 0 6px; }
.tr-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s-3); align-items: end; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); }
.tr-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-bio { color: var(--text-2); font-size: 17px; line-height: 1.65; margin-bottom: var(--s-3); white-space: pre-line; }
.tr-certlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tr-certlist li { display: grid; gap: 2px; }
.mt-1 { margin-top: 6px; }
.tr-layout > div > h2 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); letter-spacing: var(--ls-h3); margin-bottom: var(--s-2); }
.tr-layout > div > h2.mt-3 { margin-top: var(--s-6); }
/* Consultant photos: round, cropped to fill; initials in the brand colours when there is no photo. */
.tr-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.tr-avatar-sm { width: 64px; height: 64px; font-size: 22px; }
.tr-avatar-md { width: 96px; height: 96px; font-size: 32px; }
.tr-avatar-lg { width: 160px; height: 160px; font-size: 52px; box-shadow: 0 0 0 4px rgba(245,244,240,.16), var(--shadow-card); }
.tr-initials { background: var(--charcoal); color: var(--orange); font-weight: 700; letter-spacing: .02em; user-select: none; }
.tr-card-head, .tr-profile-head, .tr-photo-row { display: flex; align-items: center; gap: var(--s-4); }
.tr-card-head { margin-bottom: var(--s-3); }
.tr-card-head .tr-card-title { margin-bottom: 2px; }
.tr-profile-head { gap: var(--s-6); flex-wrap: wrap; }
.tr-photo-row { margin-bottom: var(--s-3); }
.tr-card-facts { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tr-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tint-50); color: var(--amber-900); border: 1px solid var(--tint-200); font-size: 13px; font-weight: 600; }
.tr-website a { overflow-wrap: anywhere; }
@media (max-width: 600px) { .tr-avatar-lg { width: 112px; height: 112px; font-size: 38px; } .tr-profile-head { gap: var(--s-4); } }

/* Training by request (2026-10-01): the public track page lists lessons without links; the request form groups tracks. */
.tr-lessons .tr-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.tr-fieldset { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); margin: 0; display: grid; gap: var(--s-3); }
.tr-fieldset legend { font-weight: 600; padding: 0 6px; }
