/* Self-hosted fonts (SIL Open Font License, see OFL.txt in each assets/fonts folder), subset to Thai + Latin.
   Anuphan for headings, IBM Plex Sans Thai for text: both loopless, modern Thai. */
@font-face { font-family: "Anuphan"; font-weight: 300 700; font-display: swap; src: url("../fonts/anuphan/Anuphan-wght.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-thai/IBMPlexSansThai-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-thai/IBMPlexSansThai-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-thai/IBMPlexSansThai-Bold.woff2") format("woff2"); }

/* ==========================================================================
   E-learning JVL, after the hospital's prototype deck (Nov 2569):
   forest-green app bar, warm paper ground, white cards, teal actions,
   gold only for "current / in progress / act now". See DESIGN.md.
   ========================================================================== */

:root {
  --jvl-forest: #11493f;
  --jvl-forest-deep: #0c3a32;
  --jvl-forest-soft: #1a5a4e;
  --jvl-teal: #1f7a6d;
  --jvl-teal-deep: #19655a;
  --jvl-mint: #e2f1ec;
  --jvl-mint-ink: #17695d;
  --jvl-gold: #ffd36b;
  --jvl-gold-deep: #f2c14e;
  --jvl-gold-tint: #fff3cc;
  --jvl-gold-ink: #6e4f00;
  --jvl-paper: #f7f6f3;
  --jvl-card: #ffffff;
  --jvl-line: #e6e8e5;
  --jvl-line-strong: #869590;  /* control edges: 3.1:1 on white (WCAG 1.4.11) */
  --jvl-ink: #15322d;
  --jvl-muted: #5b6b66;
  --jvl-quiet: #eef1ef;
  --jvl-rose-tint: #fdecea;
  --jvl-rose-ink: #a3261f;
  --jvl-shadow: 0 1px 2px rgba(17, 73, 63, .03);
  --jvl-ease: cubic-bezier(.16, 1, .3, 1);

  --bs-body-font-family: "IBM Plex Sans Thai", system-ui, sans-serif;
  --jvl-display: "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif;
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.65;
  --bs-body-bg: var(--jvl-paper);
  --bs-body-color: var(--jvl-ink);
  --bs-emphasis-color: var(--jvl-ink);
  --bs-secondary-color: var(--jvl-muted);
  --bs-border-color: var(--jvl-line);
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: .75rem;
  --bs-link-color: var(--jvl-teal);
  --bs-link-color-rgb: 31, 122, 109;
  --bs-link-hover-color: var(--jvl-forest);
  --bs-link-hover-color-rgb: 17, 73, 63;
  --bs-heading-color: var(--jvl-forest);
  --bs-focus-ring-color: rgba(31, 122, 109, .3);
  --bs-primary-rgb: 31, 122, 109;
  --bs-code-color: var(--jvl-teal);
}

/* ---- browser surfaces -------------------------------------------------- */
html { scrollbar-color: var(--jvl-line-strong) var(--jvl-paper); }
body { font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
::selection { background: var(--jvl-gold-tint); color: var(--jvl-ink); }
input, textarea { caret-color: var(--jvl-teal); }
input[type="radio"], input[type="checkbox"], progress { accent-color: var(--jvl-teal); }
a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--jvl-teal-deep); outline-offset: 2px; border-radius: 4px; }
/* Bootstrap removes the outline on buttons; keep one ring for every control, whatever shadow it has. */
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: 3px solid var(--jvl-teal-deep); outline-offset: 2px; }
.app-bar :focus-visible, .admin-side :focus-visible, .auth-visual :focus-visible { outline-color: var(--jvl-gold); }
.btn:focus-visible, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5, .h6, .unit-tile-title, .site-brand b, .kpi dd, .ring text { font-family: var(--jvl-display); }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -.01em; line-height: 1.35; text-wrap: balance; color: var(--jvl-forest); }
p, li, dd { text-wrap: pretty; }
.text-muted, .text-body-secondary { color: var(--jvl-muted) !important; }
.small, small { font-size: .9375rem; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; vertical-align: -.2em; }

/* ---- app bar ------------------------------------------------------------- */
.app-bar { background: var(--jvl-forest); color: #fff; }
.app-bar .navbar { padding-block: 0; min-height: 4.25rem; }
.site-brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; padding-block: .625rem; margin-right: 2rem; }
.site-brand:hover, .site-brand:focus-visible { color: #fff; }
.site-brand b { display: block; font-size: 1.125rem; line-height: 1.3; }
.site-brand b + span { display: block; font-size: .875rem; color: #b8d4cc; line-height: 1.3; }
.brand-logo { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%; background: #fff; }
.brand-logo img { width: auto; height: 2.125rem; }
.app-bar .nav-link, .app-bar .btn-link { color: #d5e6e0; font-size: 1rem; text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.app-bar .nav-link:hover, .app-bar .btn-link:hover, .app-bar .nav-link[aria-current="page"] { color: #fff; }
@media (min-width: 768px) {
  .app-nav .nav-link { padding: 1.4rem .25rem !important; margin-right: 1.25rem; }
  .app-nav .nav-link[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--jvl-gold); }
  .app-bar .btn-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.avatar { display: inline-grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: .7rem; background: #fff; color: var(--jvl-forest); font-weight: 700; font-size: .9375rem; flex: none; }
.user-chip { font-weight: 600; }
.app-bar .navbar-toggler { border-color: rgba(255, 255, 255, .35); min-width: 2.75rem; min-height: 2.75rem; }
@media (max-width: 767.98px) { .app-bar .navbar-collapse { padding-bottom: .75rem; } }
/* Narrow phones: the brand gives way (its subtitle wraps) so the menu button stays on the first row. */
@media (max-width: 374.98px) { .site-brand { flex: 1 1 0; min-width: 0; margin-right: .75rem; } }

.site-foot { border-top: 1px solid var(--jvl-line); color: var(--jvl-muted); font-size: .9375rem; }
.site-foot a { color: var(--jvl-muted); }

/* ---- shared building blocks ------------------------------------------------ */
.panel { background: var(--jvl-card); border: 1px solid var(--jvl-line); border-radius: .75rem; box-shadow: var(--jvl-shadow); padding: 1.25rem 1.5rem; }
.panel > h2, .panel-title { font-size: 1.0625rem; margin-bottom: .875rem; display: flex; align-items: center; gap: .5rem; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .75rem 2rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); margin: 0; }
.page-head .lede { margin: .25rem 0 0; color: var(--jvl-muted); }
.meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--jvl-muted); font-size: .9375rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.meta li { display: flex; align-items: center; gap: .375rem; }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .7rem; border-radius: 99px; font-size: .875rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--jvl-quiet); color: var(--jvl-muted); }
.pill .icon { width: 1rem; height: 1rem; }
.pill-done { background: var(--jvl-mint); color: var(--jvl-mint-ink); }
.pill-now { background: var(--jvl-gold-tint); color: var(--jvl-gold-ink); }
.pill-fail { background: var(--jvl-rose-tint); color: var(--jvl-rose-ink); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }

progress { appearance: none; width: 100%; height: .5rem; border: 0; border-radius: 99px; background: var(--jvl-mint); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--jvl-mint); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--jvl-teal); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--jvl-teal); border-radius: 99px; }
progress.is-soft::-webkit-progress-value { background: #8fc7bc; }
progress.is-soft::-moz-progress-bar { background: #8fc7bc; }

/* ---- home: fallback colour when a unit has no cover yet ---------------------------- */
.cover-1 { background: #1d6b5d; }
.cover-2 { background: #2e9183; }
.cover-3 { background: #3f9c8c; }
.cover-4 { background: #f6c96a; color: var(--jvl-forest); }
.cover-5 { background: #3a988a; }
.cover-6 { background: #45786e; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1.5rem; }
.notice p { margin: 0; flex: 1 1 18rem; }
.notice-cert { background: var(--jvl-gold-tint); border-color: var(--jvl-gold-deep); }
.cert-no { font-weight: 700; color: var(--jvl-forest); letter-spacing: .02em; }

/* ---- unit page: stepper and parts ----------------------------------------------- */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); list-style: none; margin: 0 0 1.25rem; padding: 1.25rem 1rem; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .375rem; padding: 0 .5rem; }
.stepper li::before { content: ""; position: absolute; top: 1.375rem; left: calc(-50% + 1.875rem); right: calc(50% + 1.875rem); height: 3px; border-radius: 3px; background: var(--jvl-line); }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-now::before { background: var(--jvl-teal); }
.step-dot { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--jvl-quiet); color: var(--jvl-muted); }
.is-done .step-dot { background: var(--jvl-teal); color: #fff; }
.is-now .step-dot { background: var(--jvl-gold); color: var(--jvl-forest); }
.step-name { font-weight: 700; font-size: .9375rem; line-height: 1.4; }
.is-locked .step-name { color: var(--jvl-muted); font-weight: 600; }
@media (max-width: 767.98px) {
  .stepper { grid-auto-flow: row; gap: .875rem; padding: 1rem 1.25rem; }
  .stepper li { flex-direction: row; text-align: left; gap: .75rem; padding: 0; }
  .stepper li::before { display: none; }
  .stepper .step-dot { width: 2.25rem; height: 2.25rem; }
  .stepper .pill { margin-left: auto; }
}

.unit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
.unit-layout > div { display: grid; gap: 1.25rem; }
@media (max-width: 991.98px) { .unit-layout { grid-template-columns: 1fr; } }
.part-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .75rem; }
.part-head h2 { font-size: 1.0625rem; margin: 0; }
.jvl-player video { width: 100%; border-radius: .625rem; background: var(--jvl-forest-deep); }
.player-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .75rem; }
.player-foot .progress { flex: 1 1 10rem; }
.player-foot .small, .jvl-notice.small { font-size: 1.0625rem; }
.progress { --bs-progress-height: .5rem; --bs-progress-bg: var(--jvl-mint); --bs-progress-bar-bg: var(--jvl-teal); --bs-progress-border-radius: 99px; }
.progress-bar { transition: width .6s var(--jvl-ease); }
.btn-group-sm > .btn { border-radius: 99px !important; margin-right: .25rem; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
.checklist li { display: flex; gap: .5rem; align-items: flex-start; color: var(--jvl-muted); }
.checklist li::before { content: ""; flex: none; width: 1.125rem; height: 1.125rem; margin-top: .25rem; border: 1.5px solid var(--jvl-line-strong); border-radius: .3rem; }
.checklist li.is-met { color: var(--jvl-ink); }
.checklist li.is-met::before { border-color: var(--jvl-teal); background: var(--jvl-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 80% no-repeat; }

/* ---- test ----------------------------------------------------------------------- */
.test-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.25rem; align-items: start; }
.test-side { position: sticky; top: 1rem; display: grid; gap: 1rem; }
@media (max-width: 991.98px) { .test-layout { grid-template-columns: 1fr; } .test-side { position: static; } }
.question { border: 1px solid var(--jvl-line); border-radius: .75rem; background: var(--jvl-card); box-shadow: var(--jvl-shadow); padding: 1.25rem 1.5rem; margin-bottom: 1rem; scroll-margin-top: 1rem; }
.question legend { font-size: 1.125rem; font-weight: 700; line-height: 1.6; margin-bottom: 1rem; color: var(--jvl-ink); }
.question-no { color: var(--jvl-teal); margin-right: .25rem; }
.choice { position: relative; display: flex; gap: .875rem; align-items: center; padding: .875rem 1rem; margin-bottom: .625rem; border: 1px solid var(--jvl-line-strong);
  border-radius: .625rem; cursor: pointer; background: #fff; transition: border-color .2s var(--jvl-ease), background-color .2s var(--jvl-ease); }
.choice:last-child { margin-bottom: 0; }
.choice:hover { border-color: var(--jvl-teal); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-letter { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; flex: none; border-radius: 50%; border: 1.5px solid var(--jvl-line-strong); font-weight: 700; font-size: .9375rem; color: var(--jvl-muted); }
.choice:has(input:checked) { border-color: var(--jvl-teal); background: #eaf6f2; }
.choice:has(input:checked) .choice-letter { background: var(--jvl-teal); border-color: var(--jvl-teal); color: #fff; }
.choice:has(input:checked)::after { content: "เลือกแล้ว"; margin-left: auto; font-size: .875rem; color: var(--jvl-mint-ink); white-space: nowrap; }
.choice:has(input:focus-visible) { outline: 3px solid var(--jvl-teal-deep); outline-offset: 2px; }
.qnav { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; list-style: none; margin: 0 0 .75rem; padding: 0; }
.qnav a { display: grid; place-items: center; height: 2.75rem; border-radius: .5rem; border: 1px solid var(--jvl-line-strong); color: var(--jvl-muted); text-decoration: none; font-weight: 600; }
.qnav a:hover { border-color: var(--jvl-teal); color: var(--jvl-teal); }
.qnav a.is-answered { background: var(--jvl-teal); border-color: var(--jvl-teal); color: #fff; }
.btn-gold { --bs-btn-bg: var(--jvl-gold); --bs-btn-border-color: var(--jvl-gold); --bs-btn-color: var(--jvl-forest);
  --bs-btn-hover-bg: var(--jvl-gold-deep); --bs-btn-hover-border-color: var(--jvl-gold-deep); --bs-btn-hover-color: var(--jvl-forest);
  --bs-btn-active-bg: var(--jvl-gold-deep); --bs-btn-active-border-color: var(--jvl-gold-deep); --bs-btn-active-color: var(--jvl-forest); }

/* ---- result ------------------------------------------------------------------------ */
.result-layout { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 991.98px) { .result-layout { grid-template-columns: 1fr; } }
.score-card { text-align: center; display: grid; justify-items: center; gap: .75rem; }
.ring { width: 10rem; height: 10rem; }
.ring circle { fill: none; stroke-width: 10; }
.ring .ring-track { stroke: var(--jvl-mint); }
.ring .ring-value { stroke: var(--jvl-teal); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring.is-fail .ring-value { stroke: var(--jvl-rose-ink); }
.ring.is-pre .ring-value { stroke: var(--jvl-muted); }
.ring text { fill: var(--jvl-forest); font-family: inherit; }
.ring .ring-score { font-size: 22px; font-weight: 700; }
.ring .ring-sub { font-size: 9px; fill: var(--jvl-muted); }
.compare { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: .5rem .75rem; margin: 0; }
.compare dt { font-weight: 400; color: var(--jvl-muted); font-size: .9375rem; }
.compare dd { margin: 0; }
.compare dd.num { text-align: right; font-weight: 700; }
.review { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.review li { padding: .75rem 1rem; border-radius: .5rem; background: var(--jvl-quiet); }
.review p { margin: 0 0 .25rem; }

/* ---- verify ------------------------------------------------------------------------- */
.verify-head { text-align: center; display: grid; justify-items: center; gap: .25rem; margin-bottom: 1.25rem; }
.verify-badge { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 50%; background: var(--jvl-mint); color: var(--jvl-teal); margin-bottom: .5rem; }
.verify-badge .icon { width: 2.5rem; height: 2.5rem; }
.verify-badge.is-bad { background: var(--jvl-rose-tint); color: var(--jvl-rose-ink); }
.record dl { display: grid; gap: .875rem; margin: 0; }
.record dt { font-weight: 400; font-size: .875rem; color: var(--jvl-muted); }
.record dd { margin: 0; font-weight: 700; }

/* ---- auth: the illustration fills the window, the form is a paper sheet over its right side ---- */
.auth { --auth-sheet: min(34rem, 44vw); display: grid; grid-template-columns: minmax(0, 1fr) var(--auth-sheet); width: 100%; min-height: 100vh;
  padding: .875rem; background: var(--jvl-paper); }
.auth-visual { grid-column: 1 / -1; grid-row: 1; position: sticky; top: .875rem; align-self: start; height: calc(100dvh - 1.75rem);
  isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 2.5rem calc(var(--auth-sheet) + 3.5rem) 2.5rem clamp(1.5rem, 3.5vw, 3.25rem); border-radius: .75rem; color: #fff; background: var(--jvl-forest); }
.auth-art { position: absolute; top: 0; bottom: 0; left: 0; right: calc(var(--auth-sheet) - 1.5rem); z-index: -2; width: calc(100% - var(--auth-sheet) + 1.5rem);
  height: 100%; object-fit: cover; object-position: 62% 55%; }
/* scrim so the brand line and copy stay legible over the illustration */
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 46, 40, .55) 0%, rgba(10, 46, 40, 0) 24%, rgba(10, 46, 40, 0) 50%, rgba(10, 46, 40, .85) 82%, rgba(10, 46, 40, .95) 100%); }
.auth-visual .site-brand { align-self: flex-start; margin: 0; padding: .375rem .875rem .375rem .375rem; border-radius: .75rem; background: rgba(10, 46, 40, .6); backdrop-filter: blur(8px); }
.auth-visual .site-brand b + span { color: #e2efea; }
.auth-tagline { color: #fff; font-family: var(--jvl-display); font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.5rem); margin: 0 0 .75rem; text-wrap: balance; }
.auth-sub { color: #d7e9e3; max-width: 32rem; margin: 0 0 1.75rem; font-size: 1.0625rem; }
.auth-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .625rem; max-width: 46rem; }
.auth-facts li { display: flex; gap: .625rem; align-items: flex-start; padding: .875rem; border-radius: .75rem; background: rgba(10, 46, 40, .45);
  border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); font-size: .875rem; line-height: 1.4; color: #d7e9e3;
  transition: transform .3s var(--jvl-ease), border-color .3s var(--jvl-ease), background-color .3s var(--jvl-ease); }
.auth-facts li:hover { transform: translateY(-3px); border-color: rgba(255, 211, 107, .55); background: rgba(10, 46, 40, .62); }
.auth-facts .icon { flex: none; color: var(--jvl-gold); margin-top: .1rem; }
.auth-facts b { display: block; color: #fff; font-family: var(--jvl-display); font-size: .9375rem; }
.auth-panel { grid-column: 2; grid-row: 1; position: relative; z-index: 1; display: flex; flex-direction: column; min-height: calc(100dvh - 3.75rem);
  margin: 1rem; padding: .5rem clamp(1.25rem, 3vw, 2.75rem) 1rem; border: 1px solid var(--jvl-line); border-radius: .75rem; background: var(--jvl-paper); }
.auth-top { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-height: 3.5rem; }
.auth-switch { margin: 0; color: var(--jvl-muted); font-size: .9375rem; }
.auth-switch a { font-weight: 700; margin-left: .25rem; }
.auth-body { width: 100%; max-width: 26rem; margin: auto; padding: 2rem 0; }
.auth-register .auth-body { max-width: 34rem; }
.auth-body h1 { font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem); letter-spacing: -.02em; margin-bottom: .5rem; }
.auth-lede { color: var(--jvl-muted); margin-bottom: 2rem; font-size: 1.0625rem; }
.auth-fields { display: grid; gap: 1.125rem; }
.auth-fields .form-label { font-size: .9375rem; margin-bottom: .5rem; }
.auth-fields .form-control, .auth-fields .form-select { min-height: 3.25rem; border-radius: .5rem; border-color: var(--jvl-line-strong); background-color: #fff;
  transition: border-color .2s var(--jvl-ease), box-shadow .2s var(--jvl-ease); }
.auth-fields .form-control:hover, .auth-fields .form-select:hover { border-color: #b4c3bd; }
.auth-fields .form-control:focus, .auth-fields .form-select:focus { border-color: var(--jvl-teal); box-shadow: 0 0 0 4px rgba(31, 122, 109, .14); }
.auth-fields .btn-lg { margin-top: .5rem; min-height: 3.375rem; border-radius: .5rem; }
.auth-fields .btn-lg .icon { transition: transform .25s var(--jvl-ease); }
.auth-fields .btn-lg:hover .icon { transform: translateX(3px); }
.auth-fields .mb-3 { margin-bottom: 0 !important; }
.auth-fields .row { --bs-gutter-y: 1.125rem; }
.auth-group { display: grid; gap: 1.125rem; margin: 0; padding: 0; border: 0; }
.auth-group + .auth-group { padding-top: 1.25rem; border-top: 1px solid var(--jvl-line); }
.auth-group legend { float: none; width: 100%; margin: 0 0 .25rem; font-family: var(--jvl-display); font-size: 1.125rem; font-weight: 700; color: var(--jvl-forest); }
.auth-group legend span { display: block; font-family: var(--bs-body-font-family); font-size: .875rem; font-weight: 400; color: var(--jvl-muted); margin-top: .125rem; }
.auth-help { display: flex; gap: .625rem; align-items: flex-start; margin: 2rem 0 0; padding: 1rem 1.125rem; border-radius: .875rem; background: var(--jvl-quiet);
  color: var(--jvl-muted); font-size: .9375rem; line-height: 1.5; }
.auth-help .icon { color: var(--jvl-teal); margin-top: .1rem; }
.auth-foot { margin: 0; text-align: center; color: var(--jvl-muted); font-size: .875rem; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--jvl-muted); pointer-events: none; transition: color .2s var(--jvl-ease); }
.input-icon .form-control { padding-left: 2.875rem; }
.input-icon:focus-within > .icon { color: var(--jvl-teal); }
.pw-toggle { position: absolute; right: .375rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: .625rem; background: transparent; color: var(--jvl-muted); }
.pw-toggle:hover { color: var(--jvl-forest); background: var(--jvl-quiet); }
.pw-toggle .hide, .pw-toggle[aria-pressed="true"] .show { display: none; }
.pw-toggle[aria-pressed="true"] .hide { display: block; }
.input-icon:has(.pw-toggle) .form-control { padding-right: 3.25rem; }
.btn-lg { min-height: 3.25rem; --bs-btn-font-size: 1.0625rem; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; padding: .625rem; }
  .auth-visual { grid-column: 1; position: relative; top: 0; height: auto; min-height: 17rem; padding: 1.125rem 1.25rem 2.75rem; }
  .auth-visual::before { background: linear-gradient(180deg, rgba(10, 46, 40, .55) 0%, rgba(10, 46, 40, 0) 35%, rgba(10, 46, 40, .25) 50%, rgba(10, 46, 40, .92) 100%); }
  .auth-art { right: 0; width: 100%; object-position: center 40%; }
  .auth-facts { display: none; }
  .auth-tagline { font-size: 1.75rem; margin-bottom: .25rem; }
  .auth-sub { margin: 0; font-size: .9375rem; }
  .auth-panel { grid-column: 1; grid-row: 2; min-height: 0; margin: -1.75rem .375rem 0; padding: .25rem 1.125rem 1rem; }
  .auth-top { min-height: 3rem; }
  .auth-body { padding: 1.25rem 0 1.5rem; }
  .auth-body h1 { font-size: 1.875rem; }
  .auth-lede { margin-bottom: 1.5rem; }
}

/* ---- forms ----------------------------------------------------------------------------- */
.form-narrow { max-width: 38rem; }
.form-label { font-weight: 600; margin-bottom: .375rem; }
.form-text { color: var(--jvl-muted); }
.form-control, .form-select { font-size: 1.0625rem; min-height: 3rem; border-color: var(--jvl-line-strong); border-radius: .625rem; background-color: #fff; color: var(--jvl-ink); }
.form-control::placeholder { color: #66746f; }
.form-control:focus, .form-select:focus { border-color: var(--jvl-teal); }

/* ---- buttons ------------------------------------------------------------------------------ */
.btn { --bs-btn-font-size: 1.0625rem; --bs-btn-font-weight: 600; --bs-btn-padding-y: .5625rem; --bs-btn-padding-x: 1.25rem; --bs-btn-border-radius: .5rem;
  min-height: 2.875rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background-color .2s var(--jvl-ease), border-color .2s var(--jvl-ease), color .2s var(--jvl-ease); }
.btn-sm { min-height: 2.25rem; --bs-btn-font-size: .9375rem; --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .875rem; }
.btn-primary, .btn-success {
  --bs-btn-bg: var(--jvl-teal); --bs-btn-border-color: var(--jvl-teal); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--jvl-teal-deep); --bs-btn-hover-border-color: var(--jvl-teal-deep); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--jvl-forest); --bs-btn-active-border-color: var(--jvl-forest);
  --bs-btn-disabled-bg: #9db3ad; --bs-btn-disabled-border-color: #9db3ad;
}
.btn-outline-primary, .btn-outline-secondary {
  --bs-btn-color: var(--jvl-teal); --bs-btn-border-color: var(--jvl-teal); --bs-btn-bg: #fff;
  --bs-btn-hover-bg: var(--jvl-mint); --bs-btn-hover-border-color: var(--jvl-teal); --bs-btn-hover-color: var(--jvl-forest);
  --bs-btn-active-bg: var(--jvl-teal); --bs-btn-active-border-color: var(--jvl-teal); --bs-btn-active-color: #fff;
}
.btn-outline-secondary.active, .btn-outline-secondary[aria-pressed="true"] { background: var(--jvl-teal); color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--jvl-rose-ink); --bs-btn-border-color: #e3aaa5; --bs-btn-hover-bg: var(--jvl-rose-tint); --bs-btn-hover-color: var(--jvl-rose-ink); --bs-btn-hover-border-color: var(--jvl-rose-ink); }
.btn-locked { --bs-btn-bg: var(--jvl-quiet); --bs-btn-border-color: var(--jvl-quiet); --bs-btn-color: var(--jvl-muted); pointer-events: none; }

/* ---- alerts and badges ------------------------------------------------------------- */
.alert { --bs-alert-border-radius: .75rem; --bs-alert-padding-y: .875rem; }
.alert-success, .alert-info { --bs-alert-bg: var(--jvl-mint); --bs-alert-border-color: #b5ddd3; --bs-alert-color: var(--jvl-mint-ink); }
.alert-warning { --bs-alert-bg: var(--jvl-gold-tint); --bs-alert-border-color: #f1d98f; --bs-alert-color: var(--jvl-gold-ink); }
.alert-danger { --bs-alert-bg: var(--jvl-rose-tint); --bs-alert-border-color: #efc0bb; --bs-alert-color: var(--jvl-rose-ink); }
.badge { font-weight: 600; font-size: .8125rem; padding: .3em .7em; border-radius: 99px; }
.text-bg-success { background-color: var(--jvl-mint) !important; color: var(--jvl-mint-ink) !important; }
.text-bg-secondary, .text-bg-light { background-color: var(--jvl-quiet) !important; color: var(--jvl-muted) !important; }

/* ---- admin shell: white sidebar, quiet cards, teal data ------------------------------------ */
.is-admin { background: #f6f7f6; }
.admin-shell { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem 1rem;
  background: #fff; border-right: 1px solid var(--jvl-line); }
.admin-brand { display: flex; align-items: center; gap: .75rem; padding: 0 .25rem; color: var(--jvl-forest); text-decoration: none; }
.admin-brand .brand-logo { border: 1px solid var(--jvl-line); }
.admin-brand b { display: block; font-family: var(--jvl-display); } .admin-brand small { color: var(--jvl-muted); font-size: .875rem; }
.admin-nav { display: flex; flex-direction: column; flex: 1; }
.side-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .125rem; }
.side-nav-end { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--jvl-line); }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .625rem .75rem; border-radius: .5rem; color: var(--jvl-ink);
  font-weight: 500; text-decoration: none; background: none; border: 0; font: inherit; text-align: left; }
.side-nav .icon { color: var(--jvl-muted); }
.side-nav a:hover, .side-nav button:hover { background: var(--jvl-quiet); }
.side-nav a[aria-current="page"] { background: var(--jvl-mint); color: var(--jvl-forest); font-weight: 700; }
.side-nav a[aria-current="page"] .icon { color: var(--jvl-teal); }
.side-me { display: flex; align-items: center; gap: .75rem; padding: .875rem .25rem 0; border-top: 1px solid var(--jvl-line); color: var(--jvl-ink); text-decoration: none; }
.side-me .avatar { background: var(--jvl-mint); width: 2.25rem; height: 2.25rem; border-radius: .5rem; }
.side-me b { display: block; font-size: .9375rem; } .side-me small { color: var(--jvl-muted); font-size: .8125rem; }
.side-me:hover b { color: var(--jvl-teal); }
.admin-main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; max-width: 90rem; }
@media (max-width: 991.98px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; padding: .75rem 1rem; gap: .75rem; border-right: 0; border-bottom: 1px solid var(--jvl-line); }
  .admin-nav { flex-direction: row; overflow-x: auto; gap: .25rem; }
  .side-nav { display: flex; gap: .25rem; }
  .side-nav-end { margin: 0; padding: 0 0 0 .5rem; border: 0; border-left: 1px solid var(--jvl-line); }
  .side-nav a, .side-nav button { white-space: nowrap; padding: .5rem .75rem; }
  .side-me { display: none; }
}
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-head h1 { margin-bottom: .25rem; } .admin-head .lede { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.kpi { position: relative; padding: 1.25rem; background: #fff; border: 1px solid var(--jvl-line); border-radius: .75rem; }
.kpi dt { font-weight: 500; color: var(--jvl-muted); font-size: .9375rem; padding-right: 2.75rem; }
.kpi-icon { position: absolute; right: 1rem; top: 1rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: var(--jvl-mint); color: var(--jvl-teal); }
.kpi dd { margin: .5rem 0 .25rem; color: var(--jvl-muted); }
.kpi dd b { font-family: var(--jvl-display); font-size: 2.25rem; font-weight: 700; color: var(--jvl-forest); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .kpi-note { margin: 0; font-size: .875rem; color: var(--jvl-mint-ink); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.admin-card { background: #fff; border: 1px solid var(--jvl-line); border-radius: .75rem; padding: 1.25rem 1.5rem; }
.admin-card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.admin-card h2 { font-size: 1.0625rem; margin: 0; } .admin-card > header span, .admin-card > header a { font-size: .875rem; color: var(--jvl-muted); }
.prepost { display: block; width: 100%; height: auto; font-family: var(--bs-body-font-family); }
.prepost .grid { stroke: var(--jvl-line); } .prepost .axis { font-size: 12px; fill: var(--jvl-muted); }
.prepost .pre { fill: #cfe3dc; } .prepost .post { fill: var(--jvl-teal); } .prepost .gain { font-size: 13px; font-weight: 700; fill: var(--jvl-forest); }
.chart-legend { display: flex; gap: 1.25rem; margin: .5rem 0 0; font-size: .875rem; color: var(--jvl-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; } .chart-legend i { width: .75rem; height: .75rem; border-radius: 3px; }
.chart-legend .l-pre { background: #cfe3dc; } .chart-legend .l-post { background: var(--jvl-teal); }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.bar-list li { display: grid; grid-template-columns: 6.5rem 1fr 2.75rem; align-items: center; gap: .75rem; font-size: .9375rem; }
.bar-list progress { height: .5rem; } .bar-list b { text-align: right; font-variant-numeric: tabular-nums; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto auto; gap: .875rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--jvl-line); }
.activity li:last-child { border-bottom: 0; padding-bottom: 0; }
.activity .avatar { background: var(--jvl-mint); width: 2.25rem; height: 2.25rem; border-radius: .5rem; }
.activity b { display: block; font-weight: 600; font-size: .9375rem; } .activity small { color: var(--jvl-muted); font-size: .8125rem; }
.activity time { color: var(--jvl-muted); font-size: .8125rem; white-space: nowrap; }
.unit-pass { list-style: none; margin: 0; padding: 0; }
.unit-pass li { display: grid; grid-template-columns: 1.75rem 1fr auto; gap: .75rem; padding: .625rem 0; border-bottom: 1px solid var(--jvl-line); font-size: .9375rem; }
.unit-pass li:last-child { border-bottom: 0; padding-bottom: 0; }
.unit-pass .n { color: var(--jvl-teal); font-weight: 700; } .unit-pass b { font-variant-numeric: tabular-nums; } .unit-pass .is-soon { color: var(--jvl-muted); }
@media (max-width: 1199.98px) { .admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .activity li { grid-template-columns: 2.25rem minmax(0, 1fr); } .activity .pill, .activity time { grid-column: 2; justify-self: start; } }
.card { --bs-card-bg: var(--jvl-card); --bs-card-border-color: var(--jvl-line); --bs-card-border-radius: .75rem; --bs-card-cap-bg: #f3f6f4; box-shadow: var(--jvl-shadow); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--jvl-ink); --bs-table-border-color: var(--jvl-line); --bs-table-hover-bg: #f2f7f5; }
.table > thead th { font-weight: 700; color: var(--jvl-muted); font-size: .9375rem; border-bottom-width: 1px; white-space: nowrap; vertical-align: bottom; }
.table > tbody td, .table > tbody th { vertical-align: middle; }
.table > tfoot td, .table > tfoot th { font-weight: 700; border-top: 1.5px solid var(--jvl-line-strong); }
.table .table-success { --bs-table-bg: var(--jvl-mint); --bs-table-color: var(--jvl-mint-ink); }
.table-responsive { border: 1px solid var(--jvl-line); border-radius: .75rem; background: var(--jvl-card); box-shadow: var(--jvl-shadow); }
.table-responsive > .table { margin-bottom: 0; }
.table-responsive > .table > :not(caption) > * > :first-child { padding-left: 1rem; }
.table-responsive:has(> .table.w-auto) { display: inline-block; max-width: 100%; vertical-align: top; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--jvl-muted); --bs-breadcrumb-item-active-color: var(--jvl-muted); font-size: .9375rem; margin-bottom: .25rem; }

/* Sign-up honeypot: off-screen rather than display:none, which some bots skip */
.jvl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gain { color: var(--jvl-mint-ink); }
.gain.is-flat { color: var(--jvl-muted); }
/* Bootstrap's hairline checkbox edge disappears on paper; this one meets 3:1 */
.auth-fields .form-check-input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; border-color: var(--jvl-muted); }
.auth-fields .form-check-label { padding-left: .25rem; }

/* ---- unit banner: the cover illustration carries the unit title -------------------- */
.unit-banner { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(13rem, 24vw, 17rem); align-items: flex-end;
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem); border-radius: .75rem; color: #fff; }
.unit-banner-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.unit-banner::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 46, 40, .9) 0%, rgba(10, 46, 40, .62) 48%, rgba(10, 46, 40, .1) 100%), linear-gradient(0deg, rgba(10, 46, 40, .55), transparent 55%); }
.unit-banner h1 { color: #fff; max-width: 40rem; font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); }
.unit-banner .meta { color: #d7e9e3; }
.unit-banner-no { display: none; }
.unit-banner .unit-banner-no { display: inline-block; margin: 0 0 .5rem; padding: .2rem .75rem; border-radius: .5rem; background: rgba(255, 255, 255, .18);
  color: #fff; font-weight: 700; font-size: .875rem; }

/* ---- profile ------------------------------------------------------------------------------- */
.profile-layout { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.profile-card { text-align: center; position: sticky; top: 1rem; }
.avatar-lg { width: 5rem; height: 5rem; border-radius: .75rem; font-size: 2rem; font-family: var(--jvl-display); margin-bottom: .75rem; }
.profile-name { font-family: var(--jvl-display); font-weight: 700; font-size: 1.25rem; color: var(--jvl-forest); margin: 0; }
.profile-facts { text-align: left; display: grid; gap: .75rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--jvl-line); }
.profile-facts dt { font-weight: 400; font-size: .875rem; color: var(--jvl-muted); display: flex; align-items: center; gap: .375rem; }
.profile-facts dt .icon { width: 1rem; height: 1rem; }
.profile-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 991.98px) { .profile-layout { grid-template-columns: 1fr; } .profile-card { position: static; } }

/* ---- empty and not-found states ------------------------------------------------------- */
.empty-state { max-width: 32rem; margin: 3rem auto; text-align: center; display: grid; justify-items: center; gap: .75rem; }
.empty-state h1 { font-size: 1.75rem; margin: 0; }
.empty-state p { color: var(--jvl-muted); margin: 0 0 .75rem; }
.empty-mark { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: .75rem; background: var(--jvl-mint); color: var(--jvl-teal); }
.empty-mark .icon { width: 2.25rem; height: 2.25rem; }

/* ---- feel: hover, press, entry --------------------------------------------------------- */
.btn:active:not(:disabled) { transform: scale(.98); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .unit-tile, .stepper, .unit-layout > div > .panel, .result-layout > *, .kpi { animation: rise .6s var(--jvl-ease) both; }
  .unit-tile:nth-child(2) { animation-delay: .08s; } .unit-tile:nth-child(3) { animation-delay: .16s; } .unit-tile:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: .35; transform: translateY(10px); } }
}
.text-success { color: var(--jvl-mint-ink) !important; }

/* ---- field errors ------------------------------------------------------------------------ */
.field-error { display: flex; gap: .375rem; align-items: flex-start; margin-top: .375rem; color: var(--jvl-rose-ink); font-size: 1.0625rem; font-weight: 600; }
.field-error::before { content: "!"; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin-top: .2rem; border-radius: 50%;
  background: var(--jvl-rose-ink); color: #fff; font-size: .75rem; font-weight: 700; }
.form-control[aria-invalid="true"], .form-select[aria-invalid="true"] { border-color: var(--jvl-rose-ink); background-color: #fffafa; }
.form-errors a { color: inherit; text-decoration: underline; }
.question:has(.question-missing:not([hidden])) { border-color: var(--jvl-rose-ink); }

/* ---- test: sticky answered count + submit on phones ---------------------------------- */
.test-bar { display: none; }
@media (max-width: 991.98px) {
  .test-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; bottom: .75rem; z-index: 10;
    margin-top: 1rem; padding: .625rem .625rem .625rem 1.125rem; border-radius: .75rem; background: var(--jvl-forest); color: #fff; }
  .test-bar b { font-family: var(--jvl-display); font-size: 1.125rem; }
  .test-side .btn-gold { display: none; }
}

/* ---- next-unit call to action on a passed unit -------------------------------------------- */
.next-up { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--jvl-line); }

/* ---- phones: the unit page leads with the work, not the status ------------------------- */
@media (max-width: 767.98px) {
  .unit-banner { min-height: 0; padding: 1.25rem; border-radius: .75rem; }
  .unit-banner h1 { font-size: 1.375rem; }
  .unit-banner .meta { display: none; }
}

.app-bar .nav-link:focus-visible, .app-bar .btn-link:focus-visible { box-shadow: none; outline: 3px solid var(--jvl-gold); outline-offset: 2px; border-radius: .25rem; }

/* ---- course progress on home, result links in the stepper, quiet submit until every answer is in ---- */
.pill-link { position: relative; text-decoration: none; gap: .125rem; }
.pill-link::after { content: ""; position: absolute; inset: -.625rem 0; }  /* 44px tap area without a bigger pill */
.pill-link .icon { width: .875rem; height: .875rem; }
.pill-link:hover { text-decoration: underline; }
.btn-gold.is-waiting { --bs-btn-bg: var(--jvl-gold-tint); --bs-btn-border-color: var(--jvl-gold-tint); --bs-btn-color: var(--jvl-gold-ink); }
.quality-hint { flex-basis: 100%; margin: 0; text-align: right; font-size: .875rem; color: var(--jvl-muted); }
.kw { white-space: nowrap; }
.input-icon-bare .form-control { padding-left: 1rem; }

/* ---- how the course works: four picture cards, open on the first visit, folded afterwards ---- */
.howto { margin-bottom: 2rem; }
.howto summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; padding: .25rem 0 1rem; cursor: pointer; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary b { font-family: var(--jvl-display); font-size: 1.375rem; color: var(--jvl-forest); }
.howto summary span { color: var(--jvl-muted); }
.howto summary::after { content: ""; align-self: center; margin-left: auto; width: .55rem; height: .55rem; border-right: 2px solid var(--jvl-forest); border-bottom: 2px solid var(--jvl-forest);
  transform: rotate(45deg); transition: transform .25s var(--jvl-ease); }
.howto[open] summary::after { transform: rotate(-135deg); }
.howto summary:focus-visible { outline: 3px solid var(--jvl-teal-deep); outline-offset: 4px; border-radius: .25rem; }
.howto-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.howto-cards li { display: flex; flex-direction: column; gap: .25rem; }
.howto-art { position: relative; display: block; aspect-ratio: 4 / 3; margin-bottom: .75rem; overflow: hidden; border-radius: .75rem; background: var(--jvl-forest); }
.howto-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform .6s var(--jvl-ease); }
.howto-cards li:hover .howto-art img { transform: scale(1.05); }
.howto-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 46, 40, 0) 45%, rgba(10, 46, 40, .78) 100%); }
.howto-ic { position: absolute; z-index: 1; left: .875rem; bottom: .875rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: #fff; color: var(--jvl-teal); }
.howto-stage { position: absolute; z-index: 1; left: 4.25rem; bottom: 1.5rem; color: #fff; font-weight: 700; font-size: .9375rem; }
.howto-cards b { font-family: var(--jvl-display); font-size: 1.25rem; color: var(--jvl-forest); line-height: 1.35; }
.howto-note { color: var(--jvl-muted); font-size: .9375rem; }
.howto-cards .is-goal .howto-art { outline: 2px solid var(--jvl-gold); outline-offset: 3px; }
.howto-cards .is-goal .howto-ic { background: var(--jvl-gold); color: var(--jvl-forest); }
@media (max-width: 991.98px) { .howto-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .howto-cards { gap: 1rem .75rem; }
  .howto-cards b { font-size: 1.0625rem; } .howto-note { font-size: .875rem; }
  .howto-ic { width: 2.25rem; height: 2.25rem; left: .625rem; bottom: .625rem; } .howto-stage { left: 3.25rem; bottom: 1.125rem; font-size: .8125rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .howto[open] .howto-cards li { animation: auth-in .6s var(--jvl-ease) both; }
  .howto[open] .howto-cards li:nth-child(2) { animation-delay: .08s; } .howto[open] .howto-cards li:nth-child(3) { animation-delay: .16s; } .howto[open] .howto-cards li:nth-child(4) { animation-delay: .24s; }
}

/* ---- profile on phones: a short identity line, the form does the rest ---------------------- */
@media (max-width: 991.98px) {
  .profile-card { display: flex; align-items: center; gap: 1rem; text-align: left; }
  .profile-card .avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.5rem; margin: 0; border-radius: .625rem; }
  .profile-card .profile-name, .profile-card p { margin: 0; }
  .profile-card .profile-facts, .profile-card > .btn { display: none; }
}
.avatar-lg { background: var(--jvl-mint); }

/* ---- sign-up: a long form, kept compact ---------------------------------------------------- */
.auth-register .auth-body { padding: 1rem 0 1.5rem; }
.auth-register .auth-lede { margin-bottom: 1.25rem; }
.auth-register .auth-fields, .auth-register .auth-group { gap: .875rem; }
.auth-register .auth-fields .row { --bs-gutter-y: .875rem; }
.auth-register .auth-fields .form-control, .auth-register .auth-fields .form-select { min-height: 3rem; }
.auth-register .form-text { margin-top: .25rem; }

/* ---- sign-in motion: a slow drift in the illustration, copy and sheet settle in once ----- */
@media (prefers-reduced-motion: no-preference) {
  .auth-art { animation: auth-drift 28s ease-in-out infinite alternate; }
  .auth-visual .site-brand, .auth-tagline, .auth-sub, .auth-facts li { animation: auth-in .8s var(--jvl-ease) both; }
  .auth-tagline { animation-delay: .1s; }
  .auth-sub { animation-delay: .18s; }
  .auth-facts li:nth-child(1) { animation-delay: .26s; }
  .auth-facts li:nth-child(2) { animation-delay: .34s; }
  .auth-facts li:nth-child(3) { animation-delay: .42s; }
  .auth-panel { animation: auth-sheet .7s var(--jvl-ease) both; }
  @keyframes auth-drift { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
  @keyframes auth-in { from { opacity: 0; transform: translateY(14px); } }
  @keyframes auth-sheet { from { opacity: 0; transform: translateX(18px); } }
}
@media (min-width: 992px) and (max-width: 1199.98px) { .auth-facts { display: none; } }

/* ---- admin pages share the overview's flat card look ---------------------------------------- */
.is-admin .panel, .is-admin .card, .is-admin .table-responsive { box-shadow: none; }
.is-admin .table > thead th { font-weight: 500; font-size: .875rem; background: #fafbfa; }
.is-admin .table-responsive > .table > thead th { border-bottom-color: var(--jvl-line); }
.btn-quiet { --bs-btn-color: var(--jvl-muted); --bs-btn-border-color: var(--jvl-line-strong); --bs-btn-hover-color: var(--jvl-rose-ink);
  --bs-btn-hover-border-color: var(--jvl-rose-ink); --bs-btn-hover-bg: var(--jvl-rose-tint); --bs-btn-active-bg: var(--jvl-rose-tint); --bs-btn-active-color: var(--jvl-rose-ink); }

/* ---- home: the current unit fills the hero, every unit is an image tile --------------------- */
.wide-flash .alert { margin: 1rem 0 0; }
.home-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--jvl-forest); }
.home-hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 46, 40, .92) 0%, rgba(10, 46, 40, .72) 45%, rgba(10, 46, 40, .18) 100%); }
.home-hero-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-top: clamp(2.5rem, 7vh, 5rem); padding-bottom: clamp(2.25rem, 6vh, 3.75rem); }
.home-hero-copy { max-width: 40rem; }
.home-hero-hi { margin: 0 0 1.25rem; color: #d7e9e3; font-family: var(--bs-body-font-family); font-size: 1.0625rem; font-weight: 400; }
.home-hero-unit { display: inline-block; margin: 0 0 .5rem; padding: .125rem .625rem; border-radius: .375rem; background: rgba(255, 255, 255, .16); font-weight: 700; font-size: .875rem; }
.home-hero-title { margin: 0 0 1.25rem; color: #fff; font-family: var(--jvl-display); font-weight: 700; font-size: clamp(1.625rem, 1.05rem + 2vw, 2.75rem); line-height: 1.25; text-wrap: balance; }
.home-hero-sub { margin: -.5rem 0 1.5rem; color: #d7e9e3; max-width: 34rem; }
.home-hero-prog { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .875rem; margin-bottom: 1.5rem; color: #d7e9e3; }
.home-hero-prog progress { width: 14rem; height: .4rem; background: rgba(255, 255, 255, .22); }
.home-hero-prog progress::-webkit-progress-bar { background: rgba(255, 255, 255, .22); }
.home-hero-prog progress::-webkit-progress-value { background: var(--jvl-gold); }
.home-hero-prog progress::-moz-progress-bar { background: var(--jvl-gold); }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.home-goal { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .75rem 1rem; min-width: 17rem; margin: 0; padding: 1.25rem;
  border-radius: .75rem; background: rgba(10, 46, 40, .6); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); }
.goal-ring { width: 4.5rem; height: 4.5rem; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 4; } .goal-ring .t { stroke: rgba(255, 255, 255, .2); } .goal-ring .v { stroke: var(--jvl-gold); stroke-linecap: round; }
.home-goal-n { margin: 0; color: #d7e9e3; } .home-goal-n b { font-family: var(--jvl-display); font-size: 2rem; color: #fff; line-height: 1; }
.home-goal-n span { display: block; font-size: .875rem; margin-top: .25rem; }
.home-goal-t { grid-column: 1 / -1; margin: 0; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .16); color: #d7e9e3; font-size: .875rem; }
.home-main { padding-top: 2.25rem; padding-bottom: 3rem; }
.home-main > .notice { margin-bottom: 1.5rem; }
.home-units-head h2 { font-size: 1.375rem; margin: 0 0 1rem; }
.unit-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.unit-tile > a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--jvl-card); border: 1px solid var(--jvl-line); border-radius: .75rem;
  color: inherit; text-decoration: none; transition: border-color .25s var(--jvl-ease); }
.unit-tile > a:hover { border-color: var(--jvl-teal); }
.unit-tile.is-now > a { border-color: var(--jvl-gold-deep); box-shadow: 0 0 0 1px var(--jvl-gold-deep); }
.unit-tile-art { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.unit-tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--jvl-ease); }
.unit-tile > a:hover img { transform: scale(1.05); }
.unit-tile-n { position: absolute; left: .75rem; bottom: .75rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem;
  background: var(--jvl-forest); color: #fff; font-family: var(--jvl-display); font-weight: 700; }
.unit-tile.is-now .unit-tile-n { background: var(--jvl-gold); color: var(--jvl-forest); }
.unit-tile-art .pill { position: absolute; top: .75rem; left: .75rem; }
.unit-tile-body { display: flex; flex-direction: column; gap: .375rem; flex: 1; padding: 1rem 1.125rem 1.125rem; }
.unit-tile-body small { color: var(--jvl-muted); font-size: .875rem; }
.unit-tile-title { flex: 1; font-size: 1.0625rem; line-height: 1.45; color: var(--jvl-ink); }
.unit-tile-prog { display: flex; align-items: center; gap: .625rem; margin-top: .5rem; } .unit-tile-prog progress { flex: 1; }
.unit-tile-prog em { font-style: normal; font-weight: 700; font-size: .9375rem; color: var(--jvl-forest); font-variant-numeric: tabular-nums; }
.unit-tile-line { display: flex; align-items: center; gap: .375rem; font-size: .875rem; color: var(--jvl-muted); }
.unit-tile.is-now .unit-tile-line { color: var(--jvl-mint-ink); font-weight: 600; }
.home-soon { display: flex; align-items: flex-start; gap: .5rem; margin: 1.5rem 0 0; color: var(--jvl-muted); }
.home-soon .icon { flex: none; margin-top: .2rem; }
@media (max-width: 1199.98px) { .unit-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
  .home-hero-in { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .home-hero::before { background: linear-gradient(180deg, rgba(10, 46, 40, .55) 0%, rgba(10, 46, 40, .9) 60%); }
  .home-goal { min-width: 0; }
  .home-hero-prog progress { width: 9rem; }
}
@media (max-width: 575.98px) { .unit-tiles { grid-template-columns: 1fr; } .unit-tile-art { aspect-ratio: 16 / 9; } }
@media (prefers-reduced-motion: no-preference) {
  .home-hero-art { animation: auth-drift 30s ease-in-out infinite alternate; }
  .home-hero-copy > *, .home-goal { animation: auth-in .8s var(--jvl-ease) both; }
  .home-hero-copy > :nth-child(2) { animation-delay: .08s; } .home-hero-copy > :nth-child(3) { animation-delay: .16s; }
  .home-hero-copy > :nth-child(4) { animation-delay: .24s; } .home-hero-copy > :nth-child(5) { animation-delay: .32s; } .home-goal { animation-delay: .3s; }
}
.admin-head > div { flex: 1 1 28rem; }
.table-responsive:focus-visible { outline: 3px solid var(--jvl-teal-deep); outline-offset: 2px; }
.howto-cards li:nth-child(3) .howto-art img { object-position: 30% 20%; transform-origin: 30% 20%; }

/* ---- home for visitors: the sign-in illustration bleeds off the right edge, copy on forest ---- */
.home-intro { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--jvl-forest); }
.home-intro-art { position: absolute; top: 0; right: 0; z-index: -2; width: 58%; height: 100%; object-fit: cover; object-position: center 36%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%); mask-image: linear-gradient(90deg, transparent 0%, #000 40%); }
.home-intro::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #11493f 0%, #11493f 40%, rgba(17, 73, 63, 0) 68%), linear-gradient(0deg, rgba(10, 46, 40, .45), rgba(10, 46, 40, 0) 35%); }
.home-intro-in { display: flex; align-items: center; min-height: clamp(30rem, 74vh, 42rem); padding-top: 3.5rem; padding-bottom: 3.5rem; }
.home-intro-copy { max-width: 38rem; }
.home-intro h1 { color: #fff; font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.25rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 1.25rem; text-wrap: balance; }
.home-intro-course { margin: 0 0 2rem; color: #d7e9e3; font-size: 1.1875rem; line-height: 1.65; }
.home-intro .home-hero-actions { margin-bottom: 2.25rem; }
.home-intro .btn-gold .icon { margin-left: .25rem; transition: transform .25s var(--jvl-ease); }
.home-intro .btn-gold:hover .icon { transform: translateX(3px); }
.home-intro-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 1.25rem 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .18); }
.home-intro-facts li { display: flex; align-items: center; gap: .5rem; color: #e2efea; font-size: 1rem; }
.home-intro-facts .icon { flex: none; width: 1.25rem; height: 1.25rem; color: #a9d6cb; }
@media (min-width: 576px) { .home-intro-facts { display: grid; grid-template-columns: repeat(2, max-content); gap: .625rem 2rem; } }
/* Phones and tablets: the picture is a band on top that fades into the forest, so the nurse is never under the text */
@media (max-width: 991.98px) {
  .home-intro-art { position: relative; display: block; z-index: 0; width: 100%; height: auto; aspect-ratio: 16 / 9; object-position: center 44%;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
  .home-intro::before { display: none; }
  .home-intro-in { min-height: 0; margin-top: -2.5rem; padding-top: 0; padding-bottom: 2.25rem; position: relative; }
}
@media (max-width: 575.98px) { .home-intro-art { aspect-ratio: 4 / 3; } .home-intro-facts { flex-direction: column; } }
@media (prefers-reduced-motion: no-preference) {
  .home-intro-copy > * { animation: auth-in .8s var(--jvl-ease) both; }
  .home-intro-copy > :nth-child(2) { animation-delay: .08s; } .home-intro-copy > :nth-child(3) { animation-delay: .16s; } .home-intro-copy > :nth-child(4) { animation-delay: .24s; }
}

/* Logos on white (DESIGN.md: never on forest without white behind) */
.home-orgs { background: var(--jvl-card); border-bottom: 1px solid var(--jvl-line); }
.home-orgs ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.5rem; margin: 0 auto; padding-top: 1.25rem; padding-bottom: 1.25rem; list-style: none; }
.home-orgs img { display: block; width: auto; height: 3.5rem; }
.home-orgs li:last-child img { height: 3rem; }

/* ---- home for visitors: login link, tagline reveal, FAQ, closing call to action ---- */
.home-intro-login { margin: .75rem 0 0; color: #d7e9e3; }
.home-hero-actions .home-intro-login { margin: 0; align-self: center; }
.home-intro-login a { color: #fff; font-weight: 700; }
.home-intro-login a:focus-visible { outline: 3px solid var(--jvl-gold); outline-offset: 2px; border-radius: .25rem; }
/* Tagline: a white band edge to edge, the claim at left and its proof (the public verify page) beside it */
.tagline { margin: 1rem 0 4rem; padding: 4rem 0; background: var(--jvl-card); border-top: 1px solid var(--jvl-line); border-bottom: 1px solid var(--jvl-line); }
.tagline-in { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 3rem; align-items: center; }
.tagline-text { margin: 0; font-family: var(--jvl-display); font-weight: 700; color: var(--jvl-forest);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.3; text-wrap: balance; }
.tagline-proof { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.5rem; background: var(--jvl-paper); border: 1px solid var(--jvl-line); border-radius: .75rem; }
.tagline-proof .verify-badge { flex: none; width: 3rem; height: 3rem; margin: 0; }
.tagline-proof .verify-badge .icon { width: 1.5rem; height: 1.5rem; }
.tagline-proof p { margin: 0; color: var(--jvl-muted); font-size: .9375rem; line-height: 1.6; text-wrap: pretty; }
.tagline-proof b { display: block; margin-bottom: .25rem; color: var(--jvl-forest); font-size: 1.0625rem; }
/* Each phrase stays whole, so lines break only between phrases. */
.rw { white-space: nowrap; }
/* Muted only once app.js has armed the reveal, so without JS or with reduced motion the text is simply full colour. */
.reveal-on .rw { color: rgba(17, 73, 63, .3); transition: color .6s var(--jvl-ease); }
.reveal-on .rw.is-lit { color: var(--jvl-forest); }

/* FAQ: heading column at left (sticky on wide screens), questions in two labelled groups at right */
.faq { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 2rem 4rem; align-items: start; padding-bottom: 4rem; }
.faq-head { position: sticky; top: 1.5rem; }
.faq-head h2 { font-family: var(--jvl-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.35; margin-bottom: .75rem; text-wrap: balance; }
.faq-head > p { color: var(--jvl-muted); margin-bottom: 1.5rem; text-wrap: pretty; }
.faq-more { display: flex; gap: .625rem; align-items: flex-start; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--jvl-line); color: var(--jvl-muted); font-size: .9375rem; }
.faq-more .icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .15rem; color: var(--jvl-teal); }
.faq-groups { display: grid; gap: 2rem; }
.faq-group { background: var(--jvl-card); border: 1px solid var(--jvl-line); border-radius: .75rem; overflow: hidden; }
.faq-group h3 { margin: 0; padding: 1rem 1.5rem; font-size: .9375rem; font-weight: 700; color: var(--jvl-mint-ink); background: var(--jvl-mint); }
.faq-item + .faq-item { border-top: 1px solid var(--jvl-line); }
.faq-item summary { display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; padding: .875rem 1.5rem; font-weight: 700; color: var(--jvl-forest); cursor: pointer; list-style: none;
  transition: background-color .25s var(--jvl-ease); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; margin-left: auto; width: .55rem; height: .55rem; border-right: 2px solid var(--jvl-teal); border-bottom: 2px solid var(--jvl-teal);
  transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--jvl-ease); }
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item summary:hover { background: var(--jvl-paper); }
.faq-item[open] summary { color: var(--jvl-teal-deep); }
.faq-item summary:focus-visible { outline: 3px solid var(--jvl-teal-deep); outline-offset: -3px; }
.faq-item p { margin: 0; padding: 0 1.5rem 1.25rem; max-width: 46rem; text-wrap: pretty; }
.final-cta { padding-bottom: 4rem; }
.final-cta-in { padding: 2.5rem 1.5rem; text-align: center; background: var(--jvl-card); border: 1px solid var(--jvl-line); border-radius: .75rem; }
.final-cta-in h2 { font-family: var(--jvl-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); text-wrap: balance; }
.final-cta-in > p:first-of-type { color: var(--jvl-muted); margin-bottom: 1.5rem; text-wrap: balance; }
.final-cta .home-intro-login { color: var(--jvl-muted); }
.final-cta .home-intro-login a { color: var(--jvl-teal); }
.final-cta .home-intro-login a:focus-visible { outline-color: var(--jvl-teal-deep); }
@media (max-width: 991.98px) { .tagline-in, .faq { grid-template-columns: minmax(0, 1fr); } .tagline-in { gap: 2rem; } .faq-head { position: static; } }
@media (max-width: 575.98px) { .tagline { padding: 3rem 0; margin-bottom: 3rem; } .tagline-proof { padding: 1rem; } .faq-item summary { padding: .875rem 1rem; } .faq-item p { padding: 0 1rem 1rem; } .faq-group h3 { padding: .875rem 1rem; } }
