/* ==========================================================================
   JTA Induction Hub — design system
   Professional, high contrast, works on a phone in a hallway and on a
   manager's laptop. Icons are inline SVG (Lucide set), never emoji.
   ========================================================================== */

:root {
  --brand:        #0f766e;
  --brand-dark:   #0b5c56;
  --brand-darker: #084944;
  --brand-light:  #e6f4f2;
  --brand-tint:   #f1f9f8;

  --ink:      #10181f;
  --ink-soft: #334155;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --border-strong: #cbd5e1;
  --bg:       #f6f8f9;
  --card:     #ffffff;

  --ok:        #15803d;
  --ok-bg:     #f0fdf4;
  --warn:      #b45309;
  --warn-bg:   #fffbeb;
  --danger:    #b91c1c;
  --danger-bg: #fef2f2;
  --info:      #1d4ed8;
  --info-bg:   #eff6ff;
  --neutral-bg:#f1f5f9;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-lg: 0 4px 16px rgba(15, 23, 42, .10);

  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body { -webkit-font-smoothing: antialiased; line-height: 1.55; }
a { color: var(--brand-dark); }
svg.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 244px; flex: none; background: var(--brand-darker); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.sidebar .brand .name { font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.sidebar .brand .sub  { font-size: 12px; opacity: .78; margin-top: 2px; }
.sidebar nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 2px;
  color: rgba(255,255,255,.86); text-decoration: none; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.17); color: #fff; font-weight: 650; }
.sidebar nav .group {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  opacity: .55; padding: 14px 12px 6px; font-weight: 700;
}
.sidebar .who { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; }
.sidebar .who .n { font-weight: 650; }
.sidebar .who .r { opacity: .72; font-size: 12px; }
.sidebar .who button {
  margin-top: 8px; background: rgba(255,255,255,.12); color: #fff; border: 0;
  border-radius: 6px; padding: 7px 10px; font-size: 13px; cursor: pointer; width: 100%;
}
.sidebar .who button:hover { background: rgba(255,255,255,.2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 14px 24px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar .search { position: relative; }
.topbar .search input {
  width: 280px; padding: 8px 12px 8px 34px; border: 1px solid var(--border-strong);
  border-radius: 999px; font-size: 14px; background: var(--bg);
}
.topbar .search svg { position: absolute; left: 10px; top: 9px; color: var(--muted); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); }

.content { padding: 22px 24px 60px; max-width: 1240px; width: 100%; }
.page-intro { color: var(--muted); font-size: 14.5px; margin: -4px 0 18px; max-width: 70ch; }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.tight { padding: 14px 16px; }
.card h2 { font-size: 16.5px; margin: 0 0 4px; font-weight: 700; }
.card h3 { font-size: 14px; margin: 0 0 8px; color: var(--brand-dark); font-weight: 700;
           text-transform: uppercase; letter-spacing: .04em; }
.card .card-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

/* ------------------------------------------------------------- stat card */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 16px 18px; box-shadow: var(--shadow); }
.stat .v { font-size: 30px; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.crit .v { color: var(--danger); }
.stat.warn .v { color: var(--warn); }
.stat.ok   .v { color: var(--ok); }

/* -------------------------------------------------------------- progress */
.progress-track { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s ease; }
.progress-fill.warn { background: var(--warn); }
.progress-fill.crit { background: var(--danger); }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .progress-track { flex: 1; }
.progress-row .pct { font-size: 13px; font-weight: 650; min-width: 42px; text-align: right; }

.ring { --pct: 0; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--border) 0); flex: none; }
.ring > div { width: 90px; height: 90px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; text-align: center; }
.ring .n { font-size: 25px; font-weight: 750; line-height: 1; }
.ring .c { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ----------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--neutral-bg); color: var(--ink-soft); border: 1px solid transparent;
}
.chip svg { width: 13px; height: 13px; }
.chip.ok      { background: var(--ok-bg);     color: var(--ok);     border-color: #bbf7d0; }
.chip.info    { background: var(--info-bg);   color: var(--info);   border-color: #bfdbfe; }
.chip.warn    { background: var(--warn-bg);   color: var(--warn);   border-color: #fde68a; }
.chip.crit    { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.chip.brand   { background: var(--brand-light); color: var(--brand-dark); border-color: #99f6e4; }
.chip.muted   { background: var(--neutral-bg); color: var(--muted); border-color: var(--border); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 650; cursor: pointer; background: var(--brand); color: #fff;
  min-height: 42px; text-decoration: none; font-family: inherit;
}
.btn:hover:not(:disabled) { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--card); color: var(--brand-dark); border-color: var(--border-strong); }
.btn.secondary:hover:not(:disabled) { background: var(--brand-tint); border-color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand-dark); }
.btn.ghost:hover:not(:disabled) { background: var(--brand-light); }
.btn.danger { background: var(--danger); }
.btn.danger:hover:not(:disabled) { background: #991b1b; }
.btn.sm { padding: 6px 11px; min-height: 34px; font-size: 13px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; padding: 11px 14px; background: var(--brand-tint); color: var(--brand-dark);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 750;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--brand-tint); }
td.num, th.num { text-align: right; }
.t-primary { font-weight: 650; }
.t-sub { color: var(--muted); font-size: 12.5px; }

/* ----------------------------------------------------------------- forms */
label { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 5px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkline { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; font-size: 14.5px; }
.checkline input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.checkline label { margin: 0; font-weight: 500; color: var(--ink); }

/* -------------------------------------------------------------- callouts */
.callout {
  border-left: 4px solid var(--info); background: var(--info-bg); padding: 13px 15px;
  border-radius: var(--radius-sm); margin: 14px 0; font-size: 14.5px;
}
.callout .t { font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 7px; }
.callout.warn { border-color: var(--warn); background: var(--warn-bg); }
.callout.crit { border-color: var(--danger); background: var(--danger-bg); }
.callout.ok   { border-color: var(--ok); background: var(--ok-bg); }

/* ------------------------------------------------------------- list rows */
.rows { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--brand-tint); }
.row .rmain { flex: 1; min-width: 0; display: block; }
.row .rtitle, .row .rsub { display: block; }
.row .rtitle { font-weight: 650; font-size: 14.5px; }
.row .rsub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.row .ricon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand-dark); flex: none; }
.row.crit .ricon { background: var(--danger-bg); color: var(--danger); }
.row.warn .ricon { background: var(--warn-bg); color: var(--warn); }
.row.done .ricon { background: var(--ok-bg); color: var(--ok); }

/* --------------------------------------------------------------- journey */
.journey { display: flex; gap: 0; margin: 6px 0 4px; overflow-x: auto; padding-bottom: 6px; }
.journey .step { flex: 1; min-width: 116px; text-align: center; position: relative; padding-top: 26px; }
.journey .step::before {
  content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 3px; background: var(--border);
}
.journey .step:first-child::before { left: 50%; }
.journey .step:last-child::before  { right: 50%; }
.journey .step.done::before, .journey .step.current::before { background: var(--brand); }
.journey .dot {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 15px; height: 15px; border-radius: 50%; background: var(--card);
  border: 3px solid var(--border);
}
.journey .step.done .dot    { background: var(--brand); border-color: var(--brand); }
.journey .step.current .dot { background: var(--card);  border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
.journey .lbl { font-size: 12px; color: var(--muted); padding: 0 4px; }
.journey .step.current .lbl { color: var(--brand-dark); font-weight: 700; }
.journey .step.done .lbl { color: var(--ink-soft); }

/* ---------------------------------------------------------------- module */
.reader { max-width: 74ch; }
.reader h2 { font-size: 21px; margin: 26px 0 10px; }
.reader h2:first-child { margin-top: 0; }
.reader p { font-size: 16.5px; line-height: 1.68; margin: 0 0 14px; color: var(--ink-soft); }
.reader ul, .reader ol { padding-left: 22px; margin: 0 0 16px; }
.reader li { font-size: 16.5px; line-height: 1.62; margin-bottom: 8px; color: var(--ink-soft); }
.scenario {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 16px 18px; margin: 18px 0; background: var(--brand-tint);
}
.scenario .stag { font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: 6px; }
.scenario .sq { font-weight: 650; margin: 12px 0 8px; }
.scenario details summary { cursor: pointer; font-weight: 650; color: var(--brand-dark); }
.scenario details p { margin-top: 10px; }

/* ----------------------------------------------------------------- modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex;
  align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: var(--radius); width: 100%; max-width: 640px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal.wide { max-width: 940px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; }
.modal-head button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-body { padding: 20px; max-height: 68vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ----------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(160deg, var(--brand-darker), var(--brand) 55%, #14b8a6); }
.login-card { background: var(--card); border-radius: 16px; padding: 30px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(8, 73, 68, .35); }
.login-card .lname { font-size: 21px; font-weight: 800; }
.login-card .lsub  { color: var(--muted); font-size: 14px; margin: 2px 0 6px; }
.login-card .lethos{ color: var(--brand-dark); font-size: 12.5px; font-style: italic; margin-bottom: 20px; }

/* ----------------------------------------------------------------- toast */
.toast-host { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column;
  gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 14px; box-shadow: var(--shadow-lg); max-width: 380px; }
.toast.err { background: var(--danger); }
.toast.ok  { background: var(--ok); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; color: var(--border-strong); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3, .grid.side, .grid.c2 { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
             transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: block; }
  .content { padding: 16px 14px 60px; }
  .topbar { padding: 12px 14px; }
  .topbar .search input { width: 150px; }
  .grid.c4 { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .sidebar, .topbar, .btn, .toast-host { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ------------------------------------------------------- evidence pack */
.pack { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 34px 38px; max-width: 900px; }
.pack-head { border-bottom: 3px solid var(--brand); padding-bottom: 18px; margin-bottom: 26px; }
.pack-brand { font-size: 20px; font-weight: 800; color: var(--brand-dark); letter-spacing: .2px; }
.pack-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
            color: var(--muted); font-weight: 700; margin-top: 2px; }
.pack-head h1 { font-size: 27px; margin: 14px 0 6px; }
.pack-meta { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pack-section { margin: 0 0 30px; }
.pack-section > h2 { font-size: 17px; color: var(--brand-dark); border-bottom: 1px solid var(--border);
                     padding-bottom: 6px; margin: 0 0 12px; }
.pack-section h3 { font-size: 14.5px; margin: 16px 0 6px; text-transform: none;
                   letter-spacing: 0; color: var(--ink); }
.pack-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
                   color: var(--muted); margin: 12px 0 4px; }
.pack-lead { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 12px; }
.pack-card { border: 1px solid var(--border); border-radius: var(--radius-sm);
             padding: 16px 18px; margin-bottom: 14px; break-inside: avoid; }
.pack-card p { font-size: 14.5px; margin: 0 0 8px; }
.pack-sign { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-strong);
             font-size: 13px; }
.pack-foot { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 14px;
             font-size: 12px; color: var(--muted); text-align: center; }
.pack-ethos { color: var(--brand-dark); font-style: italic; margin-top: 6px; }

@media print {
  .pack { border: 0; padding: 0; max-width: none; }
  .pack-section { break-inside: avoid-page; }
  .pack-head { break-after: avoid; }
  .no-print { display: none !important; }
  table { font-size: 11px; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
}

/* --- Policy governance ------------------------------------------------ */
.row .rchips { flex: 0 0 auto; display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap; justify-content: flex-end; font-size: 12.5px; color: var(--muted); }
.stat .l small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.checks { display: grid; gap: 10px; margin-bottom: 14px; }
.checks .check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  cursor: pointer; }
.checks .check:hover { background: var(--brand-tint); }
.checks .check.disabled { opacity: .55; cursor: not-allowed; }
.checks .check input { margin-top: 3px; flex: 0 0 auto; }
.checks .check .rsub { display: block; margin-top: 3px; }
.check.inline { display: inline-flex; gap: 5px; align-items: center; padding: 0;
  border: 0; background: none; font-size: 12px; color: var(--muted); }
.card h3 .count { display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; background: var(--neutral-bg); color: var(--muted);
  font-size: 12px; font-weight: 650; vertical-align: middle; }

@media (max-width: 720px) {
  .row .rchips { justify-content: flex-start; margin-top: 6px; }
}

/* --- The journey timeline -------------------------------------------- */
.stages { position: relative; }
.stage { position: relative; padding-left: 0; margin-bottom: 4px; }
.stage-head { display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-align: left; font: inherit; }
.stage-head:hover { background: var(--brand-tint); }
.stage.current .stage-head { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.stage.future .stage-head { opacity: .62; }
.stage-dot { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--neutral-bg);
  color: var(--muted); font-weight: 700; font-size: 13px; }
.stage.current .stage-dot { background: var(--brand); color: #fff; }
.stage-dot svg { width: 16px; height: 16px; }
.stage-main { flex: 1; min-width: 0; }
.stage-name { display: block; font-weight: 650; font-size: 14.5px; }
.stage-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stage-body { padding: 12px 16px 16px 60px; }
.stage-body p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

/* --- The scenario player --------------------------------------------- */
.situation { padding: 16px 18px; background: var(--brand-tint); border-left: 3px solid var(--brand);
  border-radius: 6px; font-size: 15px; line-height: 1.65; }
.scen-answer { width: 100%; }
.save-state { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.save-state.err { color: var(--danger); }

/* --- The development heatmap ------------------------------------------ */
.heat { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.heat-cell { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--neutral-bg); }
.heat-cell.critical { border-width: 2px; }
.heat-cell.g-g4, .heat-cell.g-g3 { background: var(--ok-bg); border-color: #bbf7d0; }
.heat-cell.g-g2 { background: var(--warn-bg); border-color: #fde68a; }
.heat-cell.g-g1 { background: var(--danger-bg); border-color: #fecaca; }
.heat-name { font-weight: 650; font-size: 12.5px; line-height: 1.35; }
.heat-grade { font-size: 12px; color: var(--muted); margin-top: 3px; }
.heat-next { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.heat-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px;
  font-size: 12px; color: var(--muted); }
.heat-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border); }
.heat-key i.g-g3 { background: var(--ok-bg); }
.heat-key i.g-g2 { background: var(--warn-bg); }
.heat-key i.g-g1 { background: var(--danger-bg); }
.heat-key i.g-not_assessed { background: var(--neutral-bg); }
.heat-key i.critical-key { background: transparent; border-width: 2px; border-color: var(--text); }

@media (max-width: 720px) {
  .stage-body { padding-left: 16px; }
  .heat { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* =====================================================================
   THE ENTRANCE
   A 55/45 split on desktop; on a phone the artwork becomes a band above
   the card rather than the same layout squeezed.
   ===================================================================== */
.entry-body { margin: 0; }
.entry { min-height: 100vh; min-height: 100dvh; display: grid;
  grid-template-columns: 55fr 45fr; background: var(--bg); }

.entry-brand { position: relative; overflow: hidden; color: #fff;
  padding: 40px 44px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 24px;
  background: linear-gradient(150deg, #0b5c56 0%, #084944 45%, #06403c 100%); }
/* a very slow drift, so the panel is alive without being busy */
.entry-brand::before { content: ""; position: absolute; inset: -30%;
  background:
    radial-gradient(38% 38% at 22% 24%, rgba(45,212,191,.20), transparent 70%),
    radial-gradient(34% 34% at 78% 72%, rgba(16,185,129,.16), transparent 70%);
  animation: entryDrift 34s ease-in-out infinite alternate; }
@keyframes entryDrift {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 2%, 0) scale(1.06); }
}
.entry-brand > * { position: relative; z-index: 1; }

.brandmark { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.jta-logo { color: #fff; flex: 0 0 auto; }
.bm-name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.bm-sub { font-size: 13px; color: #a7f3d0; margin-top: 1px; }
.entry-brand h1 { font-size: 38px; line-height: 1.1; letter-spacing: -.025em;
  margin: 0 0 10px; font-weight: 800; }
.entry-lead { font-size: 16.5px; color: #ccfbf1; margin: 0; max-width: 34ch; line-height: 1.5; }
.entry-ethos { font-size: 13px; color: #99f6e4; font-style: italic; letter-spacing: .01em; }

/* ---- the illustration ---- */
.art { display: flex; flex-direction: column; gap: 14px; }
.art-svg { width: 100%; max-width: 520px; height: auto; display: block; }
.art-svg text { fill: rgba(255,255,255,.72); font-size: 12px; font-weight: 600;
  font-family: inherit; }
.art-stop circle { fill: rgba(255,255,255,.28); transition: fill .5s ease; }
.art-stop.done circle { fill: rgba(255,255,255,.85); }
.art-stop.now circle { fill: #fff; }
.art-stop.now text { fill: #fff; }
.art-stop .pulse { fill: none; stroke: rgba(255,255,255,.6); stroke-width: 1.5;
  transform-origin: center; transform-box: fill-box;
  animation: artPulse 2.8s ease-out infinite; }
@keyframes artPulse {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(2.1); opacity: 0; }
}
.art-window { animation: artGlow 7s ease-in-out infinite; }
.art-window.w2 { animation-delay: 3.5s; }
@keyframes artGlow { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.art-mark { animation: artFloat 9s ease-in-out infinite; transform-box: fill-box;
  transform-origin: center; }
.art-mark.m2 { animation-delay: 3s; }
.art-mark.m3 { animation-delay: 6s; }
@keyframes artFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
.art-copy h2 { font-size: 18px; margin: 0 0 6px; font-weight: 700; letter-spacing: -.01em; }
.art-copy p { margin: 0; font-size: 14px; color: #ccfbf1; line-height: 1.55; max-width: 48ch; }

/* ---- the card side ---- */
.entry-form { display: grid; place-items: center; padding: 40px 28px; }
.entry-card { width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px;
  box-shadow: 0 18px 44px rgba(6, 64, 60, .10);
  animation: cardIn .5s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.entry-card .card-title { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.entry-card .card-lead { color: var(--muted); font-size: 14px; margin: 0 0 20px;
  line-height: 1.55; }
.entry-card .field input { font-size: 16px; min-height: 48px; }
.entry-card .btn.block { min-height: 48px; font-size: 15px; }

.secure-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px; justify-content: center;
  font-size: 12.5px; color: var(--muted); }
.secure-note svg { width: 14px; height: 14px; }

/* ---- the six-digit code ---- */
.otp-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.otp-cell { width: 100%; min-width: 0; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--card); color: var(--text); padding: 0; }
.otp-cell:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light); }

.resend { margin-top: 4px; font-size: 13px; color: var(--muted); text-align: center; }
.alt-actions { margin-top: 14px; display: flex; flex-direction: column;
  gap: 8px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 13px;
  color: var(--brand-dark); text-decoration: underline; cursor: pointer; min-height: 32px; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* ---- new starter / existing employee ---- */
.who { margin-top: 22px; display: grid; gap: 10px; }
.who-item { font-size: 12.5px; color: var(--muted); line-height: 1.55;
  padding: 12px 14px; background: var(--brand-tint); border-radius: 10px; }
.who-item strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

/* ---- help ---- */
.help-disc { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.help-disc summary { cursor: pointer; font-size: 13px; font-weight: 650;
  color: var(--brand-dark); display: flex; align-items: center; gap: 6px;
  list-style: none; min-height: 32px; }
.help-disc summary::-webkit-details-marker { display: none; }
.help-disc summary svg { width: 15px; height: 15px; }
.help-body { font-size: 13px; color: var(--muted); line-height: 1.6; padding-top: 8px; }
.help-body h4 { font-size: 13px; color: var(--text); margin: 12px 0 4px; }
.help-body ul { margin: 0; padding-left: 18px; }
.help-body p { margin: 0; }

/* ---- tablet ---- */
@media (max-width: 1024px) {
  .entry { grid-template-columns: 1fr; }
  .entry-brand { padding: 28px 24px 24px; gap: 16px; }
  .entry-brand h1 { font-size: 28px; }
  .entry-lead { font-size: 15px; }
  .art-svg { max-width: 420px; margin: 0 auto; }
  .art-copy { text-align: center; }
  .art-copy p { margin: 0 auto; }
  .entry-ethos { text-align: center; }
  .entry-form { padding: 24px 20px 40px; }
}

/* ---- phone: the artwork becomes a band, not half the screen ---- */
@media (max-width: 640px) {
  .entry-brand { padding: 22px 18px 18px; }
  .brandmark { margin-bottom: 16px; }
  .entry-brand h1 { font-size: 24px; margin-bottom: 6px; }
  .entry-lead { font-size: 14px; max-width: none; }
  .art-svg { max-width: 100%; }
  .art-copy { display: none; }
  .entry-ethos { font-size: 12px; }
  .entry-form { padding: 18px 14px 32px; }
  .entry-card { padding: 22px 18px; border-radius: 14px; }
  .entry-card .card-title { font-size: 20px; }
  .otp { gap: 6px; }
  .otp-cell { height: 52px; font-size: 20px; border-radius: 9px; }
}

/* 320px: the six cells must still sit on one line */
@media (max-width: 360px) {
  .entry-form { padding: 14px 10px 28px; }
  .entry-card { padding: 18px 14px; }
  .otp { gap: 4px; }
  .otp-cell { height: 46px; font-size: 17px; }
  .entry-brand { padding: 18px 14px 14px; }
  .entry-brand h1 { font-size: 21px; }
}

/* Somebody who has asked their device for less motion gets a still page. */
@media (prefers-reduced-motion: reduce) {
  .entry-brand::before, .art-stop .pulse, .art-window, .art-mark,
  .entry-card { animation: none !important; }
  .art-stop circle { transition: none !important; }
}

/* --- Programme editor ------------------------------------------------- */
.inline-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--card); font: inherit; font-size: 13px; max-width: 240px; }
.linkchip { background: var(--neutral-bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer;
  margin-right: 4px; }
.linkchip:hover { background: var(--brand-tint); color: var(--brand-dark);
  border-color: var(--brand-light); }
.btn.ghost { background: none; border: 1px solid transparent; color: var(--muted);
  padding: 4px 8px; }
.btn.ghost:hover { background: var(--neutral-bg); color: var(--text); }

/* =====================================================================
   FIRST LOGIN
   The same entrance frame as sign-in, with a wider card because there is
   a profile to read rather than one field to fill in.
   ===================================================================== */
.entry-card.wide { max-width: 560px; }

/* ---- account setup: 1 Profile - 2 Terms - 3 Welcome ---- */
.stepbar { margin-bottom: 20px; }
.stepbar-label { display: block; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--muted); padding: 7px 10px; border-radius: 8px; background: var(--neutral-bg);
  min-width: 0; }
.steps li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps li .n { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--border); color: var(--muted);
  font-size: 11px; font-weight: 700; }
.steps li.now { background: var(--brand-tint); color: var(--brand-dark); font-weight: 650; }
.steps li.now .n { background: var(--brand); color: #fff; }
.steps li.done { color: var(--ok); }
.steps li.done .n { background: var(--ok-bg); color: var(--ok); }

/* ---- the access badge ---- */
.access-badge { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: 12px; margin-bottom: 22px; background: var(--neutral-bg);
  border: 1px solid var(--border); }
.access-badge svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px;
  color: var(--muted); }
.access-badge strong { display: block; font-size: 12px; letter-spacing: .09em;
  font-weight: 800; }
.access-badge span span, .access-badge div span { display: block; font-size: 12.5px;
  color: var(--muted); margin-top: 3px; line-height: 1.5; }
/* the senior levels get the brand, so it is obvious why the dashboard differs */
.access-badge.super_admin, .access-badge.org_admin, .access-badge.smt_admin,
.access-badge.responsible_individual {
  background: var(--brand-tint); border-color: var(--brand-light); }
.access-badge.super_admin svg, .access-badge.org_admin svg,
.access-badge.smt_admin svg, .access-badge.responsible_individual svg,
.access-badge.super_admin strong, .access-badge.org_admin strong,
.access-badge.smt_admin strong, .access-badge.responsible_individual strong {
  color: var(--brand-dark); }
.access-badge.hr, .access-badge.content_admin, .access-badge.home_admin,
.access-badge.registered_manager, .access-badge.manager {
  background: var(--info-bg); border-color: #bfdbfe; }

/* ---- read-only detail cards ---- */
.sec-head { font-size: 13px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin: 24px 0 10px; }
.details { display: grid; gap: 8px; margin-bottom: 20px; }
.detail { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); }
.d-label { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .04em;
  text-transform: uppercase; font-weight: 650; }
.d-value { display: block; font-size: 14.5px; font-weight: 650; margin-top: 3px;
  line-height: 1.4; }
.d-note { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---- proper selection rows, not a tiny checkbox beside an essay ---- */
.bigcheck { display: flex; gap: 12px; align-items: flex-start; padding: 16px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--card);
  cursor: pointer; margin-bottom: 12px; }
.bigcheck:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.bigcheck:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.bigcheck input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); }
.bigcheck strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.bigcheck span span { display: block; font-size: 13px; color: var(--muted); line-height: 1.55; }

.btn-row.stack { display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  margin-top: 22px; }
.btn-row.stack .linkbtn { align-self: center; }

.done-tick { display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--ok-bg); color: var(--ok); margin: 0 auto 16px; }
.done-tick svg { width: 28px; height: 28px; }

@media (max-width: 640px) {
  .entry-card.wide { max-width: 100%; }
  .steps li span:last-child { display: none; }
  .steps li { justify-content: center; padding: 8px; }
  .access-badge { padding: 12px 14px; }
  .sec-head { margin: 18px 0 8px; }
  .bigcheck { padding: 14px; }
}

/* --- Organisation overview -------------------------------------------- */
.scope-switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--muted); font-weight: 650; }
.scope-switch select { padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--card); font: inherit; font-size: 13px;
  color: var(--text); }
.scope-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--brand-dark); background: var(--brand-tint); border-radius: 9px;
  padding: 9px 13px; margin-bottom: 16px; }
.scope-note svg { width: 15px; height: 15px; flex: 0 0 auto; }
a.stat.link { text-decoration: none; color: inherit; display: block; transition: .15s; }
a.stat.link:hover { border-color: var(--brand-light); background: var(--brand-tint); }

.preview-banner { display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border-radius: 9px; background: var(--warn-bg); color: #92400e; font-size: 13px;
  font-weight: 650; margin-bottom: 18px; }
.preview-banner svg { width: 16px; height: 16px; flex: 0 0 auto; }
.pv-stage { margin-bottom: 14px; }
.pv-stage-h { font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.pv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pv-act { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-size: 12.5px; max-width: 260px; }
.pv-act i { font-style: normal; font-size: 11px; color: var(--muted); }
.pv-act.crit { border-color: #fecaca; background: var(--danger-bg); }
.pv-act.more { color: var(--muted); background: var(--neutral-bg); justify-content: center; }

/* --- Final review ------------------------------------------------------ */
.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--neutral-bg); }
.verdict svg { width: 24px; height: 24px; flex: 0 0 auto; margin-top: 1px; }
.verdict strong { display: block; font-size: 15px; letter-spacing: .04em; }
.verdict span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px;
  line-height: 1.55; }
.verdict.ok { background: var(--ok-bg); border-color: #bbf7d0; }
.verdict.ok svg, .verdict.ok strong { color: var(--ok); }
.verdict.warn { background: var(--warn-bg); border-color: #fde68a; }
.verdict.warn svg, .verdict.warn strong { color: var(--warn); }
.verdict.crit { background: var(--danger-bg); border-color: #fecaca; }
.verdict.crit svg, .verdict.crit strong { color: var(--danger); }

.ev-grid { display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ev { padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); }
.ev-l { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 650; }
.ev-v { display: block; font-size: 17px; font-weight: 750; margin-top: 3px; }
.ev-v.ok { color: var(--ok); }
.ev-v.crit { color: var(--danger); }
.ev-v.warn { color: var(--warn); }
.row.muted-row { opacity: .62; }
.row.muted-row:hover { opacity: 1; }
