/* =====================================================================================================================
   Cyberblack Arena v5.1 · "Sage"  (Final F: light sidebar, soft surfaces, a pastel fill for actions)
   Loaded after dossier.css on the player page and the coordinator console. Color roles:
     --fill / --fill-ink   the pastel action fill (--accent) with dark text on it (--accent-ink): primary buttons, avatars
     --red / --red-ink     the deep accent (--accent-2 / --accent-text) for lines, indicators and accent text
   The role names stay "red" so every v5.0 rule keeps working; under the Dossier-red preset they are red again.
   ===================================================================================================================== */
:root {
  --red: var(--accent-2, var(--accent)); --red-ink: var(--accent-text, var(--accent-2));
  --red-tint: color-mix(in srgb, var(--accent) 22%, var(--panel));
  --fill: var(--accent); --fill-ink: var(--accent-ink, #fff);
  --fill-edge: color-mix(in srgb, var(--accent) 72%, var(--accent-2, var(--text)));
  --fill-hover: color-mix(in srgb, var(--accent) 82%, var(--accent-2, var(--text)));
  --ink-2: color-mix(in srgb, var(--text) 82%, var(--panel));
  --dz-side-w: 264px; --dz-rad: 10px;
}

/* ---------- 1. color roles on existing components ---------- */
body.dz .btn.primary, body.admin .btn.primary, body.dz #submit.btn, body.dz #next.btn.primary { background: var(--fill); border-color: var(--fill-edge); color: var(--fill-ink); }
body.dz .btn.primary:hover, body.admin .btn.primary:hover, body.dz #submit.btn:hover { background: var(--fill-hover); border-color: var(--fill-edge); color: var(--fill-ink); }
body.dz .btn, body.admin .btn { border-radius: 8px; }
body.dz .btn:not(.primary):not(.dz-btn-dark) { border-color: var(--line-2); }
body.dz .btn:not(.primary):not(.dz-btn-dark):hover { border-color: var(--red); background: var(--surface); }
body.dz .card { border-radius: var(--dz-rad); }
.dz-top .avi, .avatar.red, .dz-top .pm-head .avi { background: var(--fill); color: var(--fill-ink); }
/* items that used white text on the accent now sit on the pastel fill */
.chip-btn.on, .vtab.on .vtab-n, .pz-bar .rrow.cur, .mc-sw.on, .arc-switch .arc-sw.on { background: var(--fill) !important; border-color: var(--fill-edge) !important; color: var(--fill-ink) !important; }
body.dz :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
body.dz ::selection { background: color-mix(in srgb, var(--accent) 55%, transparent); }

/* vault digits, the file-closed strip and the finale hero go light (the arcade stays a dark console) */
.dz-digit { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); border-radius: 6px; }
.dz-digit.blank { color: var(--faint); }
.dz-digit.blank.next { border-color: var(--red); background: var(--red-tint); color: var(--red-ink); }
.dz-closed { background: var(--red-tint); color: var(--ink); border: 1px solid var(--fill-edge); border-radius: var(--dz-rad); }
.dz-closed .small b, .dz-closed b { color: var(--ink); }
.dz-closed .eyebrow, .dz-closed .eyebrow.on-dark, .dz-closed .eyebrow.on-dark.red { color: var(--red-ink); }
.dz-closed .muted, .dz-closed .on-dark { color: var(--muted); }
.dz-final-hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--fill); border-radius: var(--dz-rad); }
.dz-final-hero h1, .dz-final-stats b { color: var(--ink); }
.dz-final-hero .eyebrow.on-dark, .dz-final-hero .eyebrow.on-dark.red, .dz-final-hero .eyebrow { color: var(--red-ink); }
.dz-final-hero .on-dark, .dz-final-hero .muted, .dz-final-hero p { color: var(--muted); }
body.dz .dz-final-hero .btn.dz-btn-dark { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
body.dz .dz-final-hero .btn.dz-btn-dark:hover { background: var(--sunk); color: var(--ink); border-color: var(--red); }
.dz-final-hero .dz-stamp, .dz-final-hero [class*="stamp"] { color: var(--red-ink); border-color: var(--red); }

/* ---------- 2. desktop: the light sidebar and the page bar ---------- */
.dz-sfiles, .dz-sub { display: none; }
.dz-mgreet { display: none; }
@media (min-width: 901px) {
  :root { --dz-top-h: 0px; }
  html body.dz:not(.landing):not(.onboarding) { padding-left: var(--dz-side-w) !important; }
  .dz-top { position: fixed; top: 0; left: 0; bottom: 0; width: var(--dz-side-w); height: auto; z-index: 40; flex-direction: column; align-items: stretch; gap: 0; padding: 22px 14px 14px; border-bottom: 0; border-right: 1px solid var(--line); background: var(--surface); overflow: visible; }
  .dz-brand { padding: 0 8px 18px; gap: 10px; }
  .dz-top .cobrand { margin: -6px 8px 16px; }
  .dz-top .cobrand .cb-client { max-width: 150px; }
  .dz-nav { flex: 1 1 auto; flex-direction: column; align-items: stretch; height: auto; gap: 2px; overflow-y: auto; overflow-x: hidden; min-height: 0; margin: 0 -4px; padding: 0 4px; }
  .dz-tab { width: 100%; min-height: 40px; padding: 0 12px; gap: 12px; justify-content: flex-start; border: 0; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); flex: none; }
  .dz-tab:hover { background: var(--sunk); color: var(--ink); }
  .dz-tab.active { background: var(--red-tint); color: var(--ink); font-weight: 600; border: 0; }
  .dz-tab.active .ic { color: var(--red-ink); }
  .dz-tab .mini, .dz-tab .dz-count { margin-left: auto; }
  /* undo the v5.0 top-bar squeeze steps (they hid labels, icons and the wordmark on narrower screens) */
  .dz-tab .ic { display: inline-flex; }
  .dz-word { display: block; }
  .dz-tab .mini { display: inline; }
  .dz-top .prof .pmeta { display: flex; }

  /* the case files under "Case board" */
  .dz-sfiles { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 10px 19px; padding-left: 9px; border-left: 1px solid var(--line); flex: none; }
  .dz-sfiles:empty { display: none; }
  .dz-sf-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; }
  .dz-sfile { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink-2); text-align: left; cursor: pointer; }
  .dz-sfile:hover { background: var(--sunk); color: var(--ink); }
  .dz-sfile.sel { background: var(--red-tint); color: var(--ink); font-weight: 600; }
  .dz-sfile.locked { color: var(--faint); }
  .dz-sfile .sf-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 0; color: var(--faint); }
  .dz-sfile .sf-ic svg { width: 14px; height: 14px; }
  .dz-sfile .sf-ic.ok { color: var(--red); }
  .dz-sfile .sf-ic.ring { width: 10px; height: 10px; border: 1.5px solid var(--line-2); border-radius: 50%; box-sizing: border-box; }
  .dz-sfile .sf-ic.ring.cur { border-color: var(--red); background: var(--fill); }
  .dz-sfile .sf-num { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
  .dz-sfile .sf-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dz-sfile .sf-n { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; }

  /* profile at the bottom; its menu opens upward */
  .dz-right { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); width: 100%; flex: none; display: block; }
  .dz-me { width: 100%; }
  .dz-top .prof { width: 100%; justify-content: flex-start; border-color: transparent; border-radius: 8px; padding: 6px 8px 6px 6px; }
  .dz-top .prof:hover { border-color: var(--line); background: var(--sunk); }
  .dz-top .prof .pmeta { flex: 1 1 auto; min-width: 0; }
  .dz-top .prof .pmeta b { max-width: none; }
  .dz-top .avi { border-radius: 8px; }
  .dz-top .profmenu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: max(100%, 240px); border-color: var(--line-2); border-radius: 10px; box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(16, 36, 29, .12); }

  /* the page bar above the stage: greeting or section, the vault code, days left */
  body.dz > main { padding-top: 28px; }
  .dz-sub { display: flex; align-items: center; gap: 24px; margin: 0 0 22px; min-height: 48px; }
  .dz-sub[hidden] { display: none; }
  .dz-sub-l { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .dz-sub-l b { font-family: var(--display); font-stretch: 100%; font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dz-sub-l small { font-size: 14px; color: var(--muted); }
  .dz-sub-vault { display: flex; align-items: center; gap: 10px; flex: none; }
  .dz-sub-vault[hidden] { display: none; }
  .dz-sub-vault .sv-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .dz-sub-vault .sv-d { display: flex; gap: 6px; }
  .sv-digit { width: 30px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); font-family: var(--display); font-stretch: 100%; font-weight: 800; font-size: 19px; color: var(--ink); }
  .sv-digit.blank { color: var(--faint); font-size: 15px; font-weight: 600; }
  .sv-digit.blank.next { border-color: var(--red); background: var(--red-tint); color: var(--red-ink); }
  .dz-sub .dz-days { display: inline-flex; flex: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .dz-sub .dz-days .chip-lbl { display: inline; }

  /* the arcade page fills the height next to the sidebar */
  .arc-page, .arc-frame { margin-top: -28px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  :root { --dz-side-w: 228px; }
  .dz-top { padding: 18px 10px 12px; }
  .dz-sub { gap: 16px; }
  .dz-sub-l b { font-size: 22px; }
  .dz-sub-vault .sv-l { display: none; }
}
@media (min-width: 901px) and (max-width: 1040px) { .dz-sub .dz-days .chip-lbl { display: none; } }
@media (min-width: 901px) and (max-height: 760px) {
  .dz-brand { padding-bottom: 12px; }
  .dz-tab { min-height: 36px; }
  .dz-sfile { min-height: 30px; }
  .dz-sfiles { margin-bottom: 6px; }
}

/* ---------- 3. Home ---------- */
.dz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.dz-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); font: inherit; color: var(--ink); text-align: left; box-sizing: border-box; }
button.dz-stat { cursor: pointer; }
button.dz-stat:hover { border-color: var(--line-2); }
.dz-stat-l { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-stat-n { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 52px; line-height: .95; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.dz-stat-s { font-size: 13px; color: var(--muted); line-height: 1.35; }
.dz-stat-team { background: var(--fill); border-color: var(--fill-edge); color: var(--fill-ink); }
button.dz-stat-team:hover { background: var(--fill-hover); border-color: var(--fill-edge); }
.dz-stat-team .dz-stat-l, .dz-stat-team .dz-stat-s { color: color-mix(in srgb, var(--fill-ink) 78%, var(--fill)); }

.dz-home-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start; margin: 0 0 20px; }
.dz-home-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

body.dz .card.dz-move { padding: 28px 32px 30px; border-top: 4px solid var(--fill); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.dz-move-eb { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
.dz-move-dl { margin-top: -4px; }
body.dz .dz-move-t { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 3.4vw, 46px); line-height: .98; letter-spacing: -0.005em; margin: 0; color: var(--ink); }
.dz-move-p { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); max-width: 660px; margin: 0; }
.dz-move-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dz-move-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

.dz-filecard-h { font-weight: 600; font-size: 15px; }
.dz-ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 10px; padding: 2px 20px 20px; }
.dz-ptile { display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; box-sizing: border-box; min-width: 0; }
.dz-ptile:hover:not(:disabled) { border-color: var(--red); }
.dz-ptile:disabled { cursor: default; opacity: .6; }
.dz-ptile-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dz-ptile-h svg { width: 14px; height: 14px; }
.dz-ptile-t { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dz-ptile .ok { color: var(--red); }
.dz-ptile.done { background: var(--sunk); }
.dz-ptile.cur { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.dz-ptile.fin { border-style: dashed; }
.dz-ptile.fin .dz-ptile-h svg { color: var(--amber); }
.dz-ptile-next { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--fill); color: var(--fill-ink); padding: 2px 6px; border-radius: 4px; }

body.dz .dz-race-h { font-size: 18px; margin: 0; }
.dz-race-rows { display: flex; flex-direction: column; padding: 0 20px; }
.dz-race-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rk nm sc" "tr tr tr"; gap: 6px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.dz-race-r:first-child { border-top: 0; }
.dz-race-r .rk { grid-area: rk; font-size: 12px; color: var(--muted); }
.dz-race-r .nm { grid-area: nm; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-race-r .sc { grid-area: sc; font-size: 13px; font-weight: 600; }
.dz-race-r .tr { grid-area: tr; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.dz-race-r .tr i { display: block; height: 100%; background: color-mix(in srgb, var(--ink) 26%, var(--panel)); border-radius: 3px; }
.dz-race-r.me { background: var(--red-tint); margin: 0 -20px; padding: 10px 20px; border-top-color: transparent; }
.dz-race-r.me + .dz-race-r { border-top-color: transparent; }
.dz-race-r.me .nm { font-weight: 700; }
.dz-race-r.me .rk { color: var(--red-ink); }
.dz-race-r.me .tr { background: var(--surface); }
.dz-race-r.me .tr i { background: var(--red); }
.dz-race-foot { padding: 12px 20px 18px; margin: 0; }
.dz-race > .small.muted { padding: 0 20px 20px; margin: 0; }

.dz-qtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 8px; }
.dz-qtile { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.dz-qtile:hover { border-color: var(--line-2); }
.dz-qtile-ic { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; }
.dz-qtile-ic svg { width: 20px; height: 20px; }
.dz-qtile-ic.done { background: var(--fill); color: var(--fill-ink); }
.dz-qtile-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-qtile-t b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-qtile-t small { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1280px) { .dz-home-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1180px) { .dz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .dz-mgreet { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; }
  .dz-mgreet b { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.15; }
  .dz-mgreet small { font-size: 14px; color: var(--muted); }
  .dz-mgreet:has(b:empty) { display: none; }
  .dz-qtiles { grid-template-columns: minmax(0, 1fr); }
  .dz-stats { gap: 12px; }
}
@media (max-width: 600px) {
  .dz-stat { padding: 14px 14px 12px; }
  .dz-stat-n { font-size: 38px; }
  .dz-stat-s { font-size: 12px; }
  body.dz .card.dz-move { padding: 20px 18px 22px; }
  body.dz .dz-move-t { font-size: 30px; }
  .dz-move-cta { width: 100%; }
  .dz-move-cta .btn { flex: 1 1 100%; }
  .dz-ptiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); padding: 2px 14px 14px; }
}

/* ---------- 4. Sign-in (Final F: headline and form on the left, the Colosseum on the right, three steps below) ---------- */
body.landing.dz #loginOverlay { display: block; padding: 0; background: var(--paper); overflow-y: auto; }
body.landing.dz #loginOverlay[hidden] { display: none; }
.dz-si { position: relative; display: flex; flex-direction: column; gap: clamp(24px, 5vh, 56px); min-height: 100vh; min-height: 100dvh; max-width: 1480px; margin: 0 auto; padding: clamp(24px, 3.4vw, 44px) clamp(20px, 4.6vw, 72px) clamp(24px, 3vw, 40px); box-sizing: border-box; color: var(--ink); }
.si-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.si-lockup { display: inline-flex; align-items: center; gap: 14px; }
.si-lockup .sp-cb-logo { height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.si-lockup .sp-cb-logo[hidden] { display: none; }
.si-arena { height: 46px; width: auto; display: block; }
.dz-si .cobrand { display: inline-flex; align-items: center; gap: 10px; }
.dz-si .cobrand[hidden] { display: none; }
.dz-si .cobrand .cb-sep { color: var(--faint); font-size: 20px; }
.dz-si .cobrand .cb-client { height: 30px; width: auto; max-width: 170px; object-fit: contain; }
.si-meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.si-main { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 400px); gap: clamp(32px, 5vw, 96px); align-items: center; position: relative; z-index: 1; }
.si-copy { display: flex; flex-direction: column; gap: 22px; max-width: 800px; min-width: 0; }
.si-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--red-ink); }
.si-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); flex: none; }
body.landing.dz .si-title { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(48px, 6.4vw, 96px); line-height: .92; letter-spacing: -0.01em; text-transform: uppercase; margin: 0; color: var(--ink); }
.si-intro { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 600px; margin: 0; }
.si-intro:empty { display: none; }

body.landing.dz #loginForm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; align-self: auto; justify-self: auto; width: auto; max-width: 640px; margin: 8px 0 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body.landing.dz #loginForm > * { grid-column: 1 / -1; margin: 0; }
body.landing.dz #loginForm [hidden], body.landing.dz #loginForm .login-brand { display: none !important; }
body.landing.dz #loginForm > .field { grid-column: 1; display: flex; flex-direction: column; gap: 6px; }
body.landing.dz #loginForm > .actions { grid-column: 2; display: flex; margin: 0; padding: 0; border: 0; }
body.landing.dz #loginForm .field .label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
body.landing.dz #loginEmail { height: 58px; font-size: 17px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); box-sizing: border-box; width: 100%; }
body.landing.dz #loginEmail:focus { border-color: var(--red); outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; }
body.landing.dz #loginBtn { min-height: 58px; padding: 0 28px; font-size: 16px; border-radius: 10px; }
.si-formhead { display: none; }
body.landing.dz #loginForm:has(#loginExpired:not([hidden])) .si-formhead { display: block; }
.si-formhead h2 { font-size: 26px; margin: 4px 0 0; }
body.landing.dz #loginExpired { border-radius: 8px; }
.si-note { font-size: 13.5px; color: var(--muted); }
body.landing.dz #loginErr:empty { display: none; }
body.landing.dz #loginForm.sent { display: block; max-width: 560px; }
body.landing.dz #loginSent .sent { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--fill); border-radius: var(--dz-rad); }
body.landing.dz #loginSent .sent .big { color: var(--red); line-height: 0; }
body.landing.dz #loginSent .sent-h { font-size: 24px; margin: 0; }
body.landing.dz #loginSent p { margin: 0; }
body.landing.dz .codebox { width: 100%; box-sizing: border-box; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
body.landing.dz .code-row input { height: 52px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); flex: 1 1 auto; min-width: 0; padding: 0 14px; }
body.landing.dz .code-row .btn { min-height: 52px; }
body.landing.dz .sent-note { font-size: 13px; color: var(--muted); }
body.landing.dz .signin-help { margin-top: 4px; }

.si-art { display: flex; justify-content: center; align-items: center; min-width: 0; }
.si-mark { display: block; width: 100%; max-width: 380px; aspect-ratio: 117 / 93; background: var(--ink); -webkit-mask: url(brand/arena-mark.svg) center / contain no-repeat; mask: url(brand/arena-mark.svg) center / contain no-repeat; }
.si-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 22px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.si-step { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.si-step b { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 30px; line-height: 1; color: var(--red-ink); flex: none; }
.si-step span { font-size: 14.5px; font-weight: 500; color: var(--ink-2); line-height: 1.4; }

@media (max-width: 900px) {
  .dz-si { padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 24px; gap: 28px; }
  .si-arena { height: 38px; }
  .si-meta { margin-left: 0; flex-basis: 100%; }
  .si-main { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; flex: 0 0 auto; }
  .si-art { display: none; }
  body.landing.dz .si-title { font-size: clamp(40px, 11vw, 64px); }
  .si-intro { font-size: 16.5px; }
  .si-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 18px; }
  .si-step b { font-size: 24px; width: 32px; }
}
@media (max-width: 520px) {
  body.landing.dz #loginForm { grid-template-columns: minmax(0, 1fr); }
  body.landing.dz #loginForm > .actions { grid-column: 1; }
  body.landing.dz #loginBtn { width: 100%; }
  .si-lockup .sp-cb-logo { height: 30px; }
  .dz-si .cobrand .cb-client { height: 24px; }
}
@media (min-width: 901px) and (max-height: 760px) {
  .dz-si { gap: 24px; }
  body.landing.dz .si-title { font-size: clamp(44px, 5.4vw, 76px); }
  .si-mark { max-width: 300px; }
}

/* ---------- 5. v5.1 review fixes ---------- */
/* styles.css's light-theme hover (deep green under dark text) outranks section 1, so restate it with more weight */
:root[data-theme] body.dz .btn.primary:hover, :root[data-theme] body.admin .btn.primary:hover, :root[data-theme] body.dz #submit.btn:hover { background: var(--fill-hover); border-color: var(--fill-edge); color: var(--fill-ink); }
.si-nobr { white-space: nowrap; }
.si-steps, .si-step span { text-align: left; }
.si-step span { flex: 1 1 auto; min-width: 0; }
body.landing.dz .codebox { margin: 4px 0 0; text-align: left; }
body.landing.dz .sent-alt, body.landing.dz .devlink { text-align: left; }
/* the dark arcade keeps its console, with a mint eyebrow instead of the old pink */
:root { --console-red: color-mix(in srgb, var(--accent) 72%, #fff); }
/* the selected case file and the modals trade the hard black offset for the deep accent / a soft shadow */
.dz-file.on .dz-fbody { border-color: var(--red); box-shadow: 4px 4px 0 var(--fill); border-radius: 0 var(--dz-rad) var(--dz-rad) var(--dz-rad); }
.dz-file.on .dz-ftab { background: var(--red); color: #fff; border-color: var(--red); }
body.dz .modal, body.dz .badge-pop-card, body.dz .badge-case { border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px rgba(16, 36, 29, .16); }
@media (max-width: 480px) { body.dz .modal { box-shadow: 0 16px 40px rgba(16, 36, 29, .16); } }
/* Cold Boot's "go" panel: the theme fill with its own readable ink (it used dark text on the deep accent) */
.arc-react.go { background: var(--fill); color: var(--fill-ink); border-color: var(--fill-edge); }

/* ---------- 6. v5.2 · G "Scorecard": Home is metrics with one door into the game; the case board is where you play ---------- */
/* the door */
.dz-home-main { grid-template-columns: minmax(0, 1fr) minmax(300px, 370px); }
body.dz .card.dz-door { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 24px; margin: 0 0 20px; border-left: 5px solid var(--fill); }
.dz-door-ic { width: 52px; height: 52px; border-radius: 12px; background: var(--red-tint); color: var(--red-ink); display: grid; place-items: center; }
.dz-door-ic { font-size: 26px; }   /* icons are 1em (inline style), so size them through font-size */
.dz-door-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-door-eb { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
.dz-door-t b { font-size: 20px; font-weight: 700; line-height: 1.25; }
.dz-door-s { font-size: 14px; color: var(--muted); }
.dz-door .btn { white-space: nowrap; }
/* points tile with its sparkline */
.dz-stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; width: 100%; }
.dz-spark { flex: none; overflow: visible; }
.dz-spark polyline { stroke: var(--red); }
.dz-spark circle { fill: var(--red); stroke: var(--surface); stroke-width: 2; }
/* shared: thin progress bar */
.dz-wr-bar { display: block; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; min-width: 0; }
.dz-wr-bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
.dz-wr-bar.ok i { background: color-mix(in srgb, var(--red) 55%, var(--panel)); }
/* within reach */
.dz-reach-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); gap: 22px; padding: 0 20px 16px; }
.dz-wr-people { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-wr-p { display: grid; grid-template-columns: 30px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.dz-wr-p .rk { font-size: 12px; color: var(--muted); }
.dz-wr-p .av { width: 30px; height: 30px; border-radius: 8px; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.dz-wr-p .nm, .dz-wr-p .sc { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.dz-wr-p .nm b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-wr-p small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-wr-p .sc { align-items: flex-end; }
.dz-wr-p .sc b { font-size: 13px; }
.dz-wr-p .sc small { font-size: 11px; }
.dz-wr-p.me { background: var(--red-tint); }
.dz-wr-p.me .rk { color: var(--red-ink); }
.dz-wr-p.me .av { background: var(--fill); color: var(--fill-ink); }
.dz-wr-goals { display: flex; flex-direction: column; min-width: 0; }
.dz-wr-goal { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.dz-wr-goal:first-child { border-top: 0; padding-top: 4px; }
.dz-wr-gh { display: flex; align-items: center; gap: 10px; }
.dz-wr-gh svg { font-size: 16px; color: var(--red-ink); }
.dz-wr-gh b { font-size: 14px; font-weight: 600; }
body.dz .dz-reach h2, body.dz .dz-prog h2, body.dz .dz-topics h2, body.dz .dz-achv h2 { font-size: 18px; margin: 0; }
body.dz .dz-reach .dz-cardh.sb, body.dz .dz-prog .dz-cardh.sb, body.dz .dz-topics .dz-cardh.sb, body.dz .dz-achv .dz-cardh.sb { flex-wrap: wrap; gap: 4px 12px; }
.dz-race-r .tr i { background: color-mix(in srgb, var(--red) 70%, var(--panel)); }
/* row three: case progress, accuracy by topic, achievements */
.dz-home-row3 { display: grid; grid-template-columns: 1.15fr 1fr .85fr; gap: 20px; align-items: start; margin: 0 0 8px; }
.dz-pg-rows, .dz-tp-rows, .dz-bd-rows { display: flex; flex-direction: column; padding: 0 20px; }
.dz-pg-r { display: grid; grid-template-columns: 18px 22px minmax(0, 1fr) 80px 32px; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.dz-pg-r .ic { display: inline-flex; align-items: center; justify-content: center; color: var(--red); line-height: 0; }
.dz-pg-r .ic svg { font-size: 15px; }
.dz-pg-r .ic .ring { width: 13px; height: 13px; border: 2px solid var(--red); border-radius: 50%; box-sizing: border-box; }
.dz-pg-r.cur .ic .ring { background: var(--fill); }
.dz-pg-r.cur .nm { font-weight: 700; }
.dz-pg-r.locked { color: var(--muted); }
.dz-pg-r.locked .ic { color: var(--faint); }
.dz-pg-r .num, .dz-pg-r .ct { font-size: 12px; color: var(--muted); }
.dz-pg-r .ct { text-align: right; }
.dz-pg-r .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-pg-vault { display: inline-flex; gap: 4px; }
.dz-vd { width: 22px; height: 26px; border: 1px solid var(--line-2); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; font-weight: 600; background: var(--surface); }
.dz-vd.blank { color: var(--faint); }
.dz-vd.blank.next { border-color: var(--red); background: var(--red-tint); color: var(--red-ink); }
.dz-pg-foot { padding-top: 8px; padding-bottom: 18px; }
.dz-tp-r { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 40px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.dz-tp-r .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-tp-r .ct { font-size: 12px; text-align: right; }
.dz-topics > .small.muted { padding-bottom: 18px; }
.dz-bd-rows { gap: 12px; padding-bottom: 18px; padding-top: 2px; }
.dz-bd-r { display: flex; gap: 12px; align-items: center; }
.dz-bd-r .bi { width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--red-tint); color: var(--red-ink); display: grid; place-items: center; }
.dz-bd-r .bi { font-size: 17px; }
.dz-bd-r .bt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.dz-bd-r .bt b { font-size: 14px; }
.dz-bd-r .bt small { font-size: 12px; color: var(--muted); }
.dz-bd-r.off .bi { background: var(--sunk); color: var(--muted); }
.dz-bd-r.off .bt b { color: var(--muted); font-weight: 600; }

/* the case board: a compact file stepper, the briefing beside its puzzles, then previously / habits / field guide */
.dz-files.dz-steps { gap: 12px; }
body.dz .dz-file.dz-step { padding: 14px 16px; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); }
body.dz .dz-file.dz-step:hover:not(:disabled) { border-color: var(--line-2); }
body.dz .dz-file.dz-step.on { background: var(--red-tint); border: 2px solid var(--red); padding: 13px 15px; box-shadow: none; }
body.dz .dz-file.dz-step.locked { background: var(--surface); color: var(--muted); }
body.dz .dz-file.dz-step.locked .dz-ftitle { color: var(--muted); }
body.dz .dz-file.dz-step.closed-case { border-color: var(--fill-edge); }
.dz-sp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-sp-eb { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dz-file.on .dz-sp-eb { color: var(--red-ink); }
.dz-sp-ic { display: inline-flex; line-height: 0; color: var(--faint); }
.dz-sp-ic svg { font-size: 16px; }
.dz-sp-ic.ok { color: var(--red); }
.dz-sp-ic .ring { width: 14px; height: 14px; border: 2px solid var(--red); border-radius: 50%; box-sizing: border-box; }
.dz-file.on .dz-sp-ic .ring { background: var(--fill); }
body.dz .dz-file.dz-step .dz-ftitle { font-size: 16px; font-stretch: 100%; }
.dz-sp-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-case-grid.dz-case-g { grid-template-columns: minmax(0, 1fr) minmax(370px, 460px); }
@media (min-width: 901px) { .dz-case > .dz-pagehead .dz-ph-l h1 { font-size: clamp(26px, 2.2vw, 32px); } }
body.dz .card.dz-bc { border-top: 4px solid var(--fill); }
.dz-bc-in { display: flex; flex-direction: column; gap: 12px; padding: 24px 28px 20px; }
body.dz .dz-bc-t { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 2.7vw, 44px); line-height: .96; letter-spacing: -0.005em; margin: 0; }
.dz-bc .dz-brief, .dz-bc .dz-brief p { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.dz-bc-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.dz-bc-cta .btn { max-width: 100%; white-space: normal; text-align: left; }
.dz-bc-foot { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line); }
.dz-bc .dz-reward { border-top: 1px solid var(--line); border-bottom: 0; }
body.dz .dz-plist-card h2 { font-size: 18px; margin: 0; }
body.dz .dz-plist-card .dz-plist { border-top: 1px solid var(--line); }
body.dz .dz-plist-card .dz-prow { grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 12px; padding: 13px 18px; }
body.dz .dz-plist-card .dz-prow.next { padding: 13px 18px; }
.dz-plist-card .dz-prow .pr-topic { display: none; }
.dz-plist-card .dz-prow .pr-pts { min-width: 64px; }
.dz-case-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.dz-case-extras .card b { font-size: 15px; }
.dz-case-extras .card p { margin: 0; }
.dz-habits-card .dz-habit { border-radius: 6px; }
@media (min-width: 901px) { .dz-case .dz-pagehead .dz-vaultchip { display: none; } }   /* the page bar already shows the vault */

@media (max-width: 1280px) {
  .dz-home-main { grid-template-columns: minmax(0, 1fr); }
  .dz-home-row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-home-row3 .dz-prog { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .dz-case-grid.dz-case-g { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  body.dz .dz-file.dz-step { flex: 0 0 200px; }
}
@media (max-width: 900px) {
  body.dz .card.dz-door { grid-template-columns: auto minmax(0, 1fr); padding: 16px 18px; }
  .dz-door .btn { grid-column: 1 / -1; justify-content: center; }
  .dz-reach-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dz-home-row3 { grid-template-columns: minmax(0, 1fr); }
  .dz-bc-in { padding: 20px 18px 18px; }
}
@media (max-width: 600px) {
  .dz-door-ic { width: 42px; height: 42px; }
  .dz-door-t b { font-size: 17px; }
  .dz-spark { width: 72px; }
  .dz-reach-grid { padding: 0 12px 12px; }
  .dz-wr-p { grid-template-columns: 28px 30px minmax(0, 1fr) auto; gap: 8px; padding: 7px 8px; }
  .dz-pg-r { grid-template-columns: 18px 22px minmax(0, 1fr) 56px 30px; }
  body.dz .dz-file.dz-step { flex-basis: 170px; }
  body.dz .dz-bc-t { font-size: 30px; }
  .dz-bc-cta .btn { width: 100%; justify-content: center; }
  body.dz .dz-plist-card .dz-prow, body.dz .dz-plist-card .dz-prow.next { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 12px 14px; }
}

/* ---------- 7. v5.3 story presentation: one line of scene per puzzle, a role tag, who's who, the story so far ---------- */
body.dz .pz-scene { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
body.dz .pz-scene svg { font-size: 13px; color: var(--red-ink); flex: none; }
body.dz .chip.dz-role { display: inline-flex; align-items: center; gap: 5px; background: var(--red-tint); border-color: var(--fill-edge); color: var(--ink); font-weight: 600; }
body.dz .chip.dz-role svg { font-size: 12px; color: var(--red-ink); }
body.dz .pz-ctx { border-left-color: var(--fill); }
body.dz .prologue-cast { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
body.dz .pc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin: 10px 0 0; }
body.dz .pc-list > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
body.dz .pc-list dt { font-weight: 700; font-size: 14.5px; }
body.dz .pc-list dd { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
body.dz .pw-list .pw-t { display: flex; flex-direction: column; gap: 2px; }
body.dz .pw-list .pw-t small { font-weight: 400; font-size: 13px; color: var(--muted); line-height: 1.45; }
body.dz .pw-list li.done .pw-wk { color: var(--red); }
@media (max-width: 600px) { body.dz .pw-list li { grid-template-columns: 78px 1fr; } }
body.dz .pw-list li { border: 0; border-bottom: 1px solid var(--line); }
/* v5.3: evidence logs wrap line by line (hanging indent) instead of scrolling sideways; see wrapLogs() in app.js */
body.dz pre.mono.lines { white-space: normal; overflow-x: visible; font-size: 12.5px; line-height: 1.55; }
body.dz pre.mono.lines .ln { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 3ch; text-indent: -3ch; }
body.dz pre.mono.lines .ln + .ln { margin-top: 2px; }
/* v5.4: interactive story modules (login lineup, cipher note). Note: styles.css `.bar { height: 8px }` (password meter) also hits `.browser .bar`, so it's reset here. */
body.dz .lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { body.dz .lineup { grid-template-columns: minmax(0, 1fr); } }
body.dz .browser { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
body.dz .browser .bar { align-items: flex-start; height: auto; min-height: 36px; overflow: visible; }
body.dz .browser .bar, body.dz .browser .page { flex: none; }
body.dz .browser .addr { display: block; padding: 4px 10px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; font-size: 12.5px; }
body.dz .browser .addr svg { vertical-align: -2px; margin-right: 4px; }
body.dz .cc pre.mono { white-space: pre-wrap; overflow-wrap: anywhere; }
/* ===== v5.5 field guide in play: term cards, field notes, diagrams, coordinator insight ===== */
/* inline glossary terms: a quiet dotted underline, never a button look */
.gterm { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--red) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; border-radius: 2px; }
.gterm:hover, .gterm.on { background: color-mix(in srgb, var(--accent) 35%, transparent); text-decoration-color: var(--red); }
.gterm:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.gcard { position: fixed; z-index: 10001; background: var(--surface); border: 1px solid var(--ink); border-radius: 8px; padding: 12px 14px 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.gcard[hidden] { display: none; }
.gcard-h { display: flex; justify-content: space-between; align-items: center; }
.gcard-x { background: none; border: 1px solid var(--line-2); border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.gcard-t { display: block; font-size: 15px; margin: 4px 0 2px; }
.gcard p { margin: 6px 0; }
.gcard-w { color: var(--muted); }
.gcard-w .label { display: block; margin-bottom: 1px; }
.gcard-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.gcard-f .tiny { display: inline-flex; align-items: center; gap: 4px; }
.gcard.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
/* field note rows (case board card, after a solve) */
.fn-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.fn-row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; cursor: pointer; min-height: 40px; }
.fn-row:hover { border-color: var(--red); }
.fn-st { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--fill-ink); }
.fn-row.read .fn-st { background: var(--fill); border-color: var(--fill-edge); }
.fn-row.read .fn-t { color: var(--ink-2); }
.fn-rt { font-size: 11px; color: var(--muted); }
.fn-card .dz-cardh { gap: 8px; }
.fn-h { display: inline-flex; align-items: center; gap: 8px; }
.fn-badge b { font-size: inherit; }
.fn-card .dz-cardh svg { width: 16px; height: 16px; color: var(--red); }
.fn-badge { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 2px 0 0; }
.fn-after { border: 1px solid var(--line); border-radius: var(--dz-rad, 8px); padding: 12px 14px; margin: 14px 0; background: var(--sunk); }
.fn-after-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fn-after-h .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.fn-after-h .eyebrow svg { width: 14px; height: 14px; }
.fn-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.fn-terms > .tiny { margin-right: 4px; }
.gterm.gchip { text-decoration: none; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; background: var(--surface); cursor: pointer; }
.gterm.gchip:hover, .gterm.gchip.on { border-color: var(--red); background: var(--red-tint); }
.fn-brush { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 9px 12px; border: 1px dashed var(--fill-edge); border-radius: 6px; font-size: 13.5px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.fn-brush svg { flex: none; margin-top: 2px; color: var(--red); }
.fn-brush .dz-link { font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; display: inline; text-align: left; }
.fn-nudge { display: block; }
.fn-nudge-t { display: flex; gap: 8px; align-items: flex-start; }
.fn-nudge-t svg { flex: none; margin-top: 2px; color: var(--red); }
.fn-nudge .actions { margin: 10px 0 0; flex-wrap: wrap; }
.fn-nudge-n { margin: 6px 0 0; }
/* the drawer: progress meters, read state, diagrams */
.g-meter { margin: 0 0 14px; }
.g-meter-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.g-meter-t b { font-size: 13px; }
.g-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
.g-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-item summary .g-sum { flex-wrap: nowrap; align-items: flex-start; }
.g-sum b { flex: 1 1 0; min-width: 0; }
.g-sum .g-st { margin-top: 1px; } .g-sum .g-rt, .g-sum .g-met { margin-top: 2px; }
.g-met { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--red-ink); }
.g-st { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--fill-ink); }
.g-note.read .g-st { background: var(--fill); border-color: var(--fill-edge); }
.g-rt { flex: none; font-size: 10.5px; color: var(--muted); }
.g-note.focus { border-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.g-readnote { display: flex; align-items: center; gap: 4px; margin: 0 12px 10px !important; }
.g-badge-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 0 0 8px; color: var(--ink-2); }
.g-badge-line svg { color: var(--red); flex: none; }
.g-fig { margin: 10px 12px 2px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.gfig { display: block; width: 100%; height: auto; font-family: inherit; }
.gfig text { fill: var(--ink); font-size: 11px; }
.gfig text.b { font-weight: 650; }
.gfig text.sm { fill: var(--muted); font-size: 10px; }
.gfig text.lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; fill: var(--muted); }
.gfig text.mono { font-family: var(--mono); }
.gfig text.ok, .gfig text.sm.ok, .gfig text.lbl.ok { fill: var(--green, #16704A); }
.gfig text.bad, .gfig text.sm.bad, .gfig text.lbl.bad { fill: var(--bad); }
.gfig .bx { fill: var(--sunk); stroke: var(--line-2); stroke-width: 1; }
.gfig .bx.hl { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); stroke: var(--fill-edge); }
.gfig .bx.ok { fill: var(--green-tint, #E5F2EB); stroke: var(--green, #16704A); }
.gfig .bx.bad { fill: color-mix(in srgb, var(--bad) 8%, var(--surface)); stroke: color-mix(in srgb, var(--bad) 70%, var(--surface)); }
.gfig .bx.dim { opacity: .55; }
.gfig .bx.lay { fill: var(--surface); }
.gfig .ln { stroke: var(--ink-2); stroke-width: 1.4; fill: none; }
.gfig .ln.bad { stroke: var(--bad); } .gfig .ln.ok { stroke: var(--green, #16704A); }
.gfig .ah { fill: var(--ink-2); } .gfig .ah.bad { fill: var(--bad); } .gfig .ah.ok { fill: var(--green, #16704A); }
.gfig .br { fill: none; stroke: var(--muted); stroke-width: 1.2; } .gfig .br.ok { stroke: var(--green, #16704A); } .gfig .br.bad { stroke: var(--bad); }
.gfig .life { stroke: var(--line-2); stroke-dasharray: 3 3; }
.gfig .rule-ln { stroke: var(--line); }
.gfig .ck { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .gfig .ck.ok { stroke: var(--green, #16704A); } .gfig .ck.bad { stroke: var(--bad); }
.gfig .phone { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.gfig .dot { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; } .gfig .dot.bad { fill: var(--bad); stroke: var(--bad); }
.gfig .strength { fill: var(--red); opacity: .9; }
/* on wide screens the guide sits beside the page instead of over it */
@media (min-width: 1600px) { body.dz.guide-open > main { padding-right: calc(var(--dz-gut) + 500px); } }
/* coordinator: Field guide insight */
.gi-head .sb-row, .sb-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.gi-head .seg button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.gi-head .seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.gi-of { font-size: 13px; color: var(--muted); font-weight: 400; }
.gi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gi-grid > .card { margin: 0 0 16px; }
@media (max-width: 1000px) { .gi-grid { grid-template-columns: minmax(0, 1fr); } }
.gi-cmp { margin: 12px 0; }
.gi-cmp-h { font-weight: 650; font-size: 13px; margin-bottom: 2px; }
.gi-cmp .rbar, .gi-grid .rbar { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; margin: 6px 0; font-size: 12.5px; }
.gi-cmp .rtrack, .gi-grid .rtrack { background: var(--sunk); border-radius: 4px; height: 14px; overflow: hidden; }
.gi-cmp .rfill, .gi-grid .rfill { display: block; background: var(--red); height: 100%; border-radius: 4px; min-width: 2px; }
.gi-cmp .rfill.muted { background: var(--line-2); }
.gi-cmp .rval, .gi-grid .rval { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.gi-offer { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gi-offer b { font-size: 24px; min-width: 64px; font-variant-numeric: tabular-nums; color: var(--red-ink); }
.gi-h { font-size: 13px; margin: 16px 0 8px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gi-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.gi-term { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; background: var(--surface); }
.gi-term b { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.gi-term.miss { border-style: dashed; }
.gi-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); }
.gi-pill.ok { color: var(--green, #16704A); border-color: color-mix(in srgb, var(--green, #16704A) 45%, var(--surface)); background: var(--green-tint, #E5F2EB); }
.gi-pill.warn { color: var(--amber, #9A5A06); border-color: color-mix(in srgb, var(--amber, #9A5A06) 40%, var(--surface)); background: var(--amber-tint, #FAF0E0); }
tr.gi-flag td { background: color-mix(in srgb, var(--amber-tint, #FAF0E0) 60%, transparent); }
.gi-players tr.gi-row { cursor: pointer; } .gi-players tr.gi-row:hover td { background: var(--sunk); }
.modal.wide.gi-modal { width: min(1120px, calc(100vw - 32px)); max-width: none; }
.gi-modal .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.gi-kpis .stat-tile small { display: block; font-size: 12px; }
.gi-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; }
@media (max-width: 900px) { .gi-cols { grid-template-columns: minmax(0, 1fr); } }
.gi-file { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.gi-file-h { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.gi-note { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 8px; align-items: start; font-size: 13px; padding: 4px 0; }
.gi-note > span:nth-child(3) { grid-column: 2; font-size: 11.5px; }
.gi-note .gi-ck { margin-top: 1px; }
.gi-ck { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--fill-ink); }
.gi-note.read .gi-ck { background: var(--fill); border-color: var(--fill-edge); }
.gi-note:not(.read) > span:nth-child(2) { color: var(--muted); }
.gi-yes { color: var(--green, #16704A); display: inline-flex; align-items: center; gap: 3px; } .gi-no { color: var(--bad); }
.gi-tl { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.gi-ev { display: grid; grid-template-columns: 140px 84px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
@media (max-width: 700px) { .gi-ev { grid-template-columns: 1fr; gap: 2px; } }
.gi-k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gi-k.k-note { color: var(--green, #16704A); } .gi-k.k-search { color: var(--amber, #9A5A06); }
.gi-link { margin: 8px 0 12px; }
/* v5.5 Story editor: field notes picker */
.fn-pick summary { cursor: pointer; }
.fn-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin-top: 6px; font-size: 13px; }
.fn-pick .fn-pick-grid label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; font-weight: 400; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.fn-pick .fn-pick-grid input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; min-height: 0; order: -1; accent-color: var(--red); }
@media (max-width: 640px) { .fn-pick-grid { grid-template-columns: minmax(0, 1fr); } }
/* v5.6 Support inbox: problem type + context block */
.issue .pill.cat { color: var(--text); border-color: var(--accent-text); font-weight: 600; }
.issue-ctx { margin: 10px 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); padding: 8px 12px; display: grid; gap: 5px; }
.ic-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 13px; line-height: 1.45; }
.ic-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ic-v { overflow-wrap: anywhere; }
.ic-v .ok-t { color: var(--green, #16704A); font-weight: 600; } .ic-v .bad-t { color: var(--bad); font-weight: 600; }
@media (max-width: 600px) { .ic-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }
#issCat { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); }
.issue-actions a.btn { text-decoration: none; }
/* ===== v5.6.1 sign-in: the whole page fits one screen, before and after the code is sent ===== */
/* The client watermark sits behind everything and can never add height or scroll (it used to render in the flow). */
.dz-si { overflow: hidden; }
.dz-si > .sp-wm { position: absolute; z-index: 0; right: clamp(12px, 3vw, 56px); bottom: clamp(72px, 13vh, 150px); width: min(30vw, 420px); aspect-ratio: 1 / 1; pointer-events: none; opacity: var(--wm, .06); }
.dz-si > .sp-wm[hidden] { display: none; }
.dz-si > .sp-wm.wide { width: min(42vw, 600px); aspect-ratio: auto; }
.dz-si > .sp-wm img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.dz-si > .sp-wm.wide img { height: auto; }
@media (max-width: 900px) { .dz-si > .sp-wm { width: 62vw; right: -6vw; bottom: 6vh; } .dz-si > .sp-wm.wide { width: 84vw; right: -2vw; } }
/* The headline scales with the window's height too, so short laptop screens keep the form and steps on screen. */
@media (min-width: 901px) { body.landing.dz .si-title { font-size: clamp(40px, min(6.4vw, 8.6vh), 96px); } .dz-si { gap: clamp(18px, 3.6vh, 48px); } }
/* After "Enter the arena": the code card replaces the email form in the same place, and the page gives up the
   intro and the three steps for it, so nothing moves off screen and nobody has to scroll to find the code box. */
.dz-si.si-sent .si-intro, .dz-si.si-sent .si-steps { display: none; }
body.landing.dz .dz-si.si-sent #loginSent .sent { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 8px; padding: 18px 20px; }
body.landing.dz .dz-si.si-sent #loginSent .sent > * { grid-column: 1 / -1; }
body.landing.dz .dz-si.si-sent #loginSent .sent .big { grid-column: 1; grid-row: 1; align-self: center; }
body.landing.dz .dz-si.si-sent #loginSent .sent .big svg { width: 30px; height: 30px; }
body.landing.dz .dz-si.si-sent #loginSent .sent .sent-h { grid-column: 2; grid-row: 1; align-self: center; font-size: 22px; }
body.landing.dz .dz-si.si-sent .codebox { padding: 12px 14px; }
body.landing.dz .dz-si.si-sent #loginForm.sent { max-width: 620px; }
body.landing.dz .dz-si.si-sent #loginSent .sent p, body.landing.dz .dz-si.si-sent #loginSent .sent-note { max-width: none; margin: 0; }
body.landing.dz .dz-si.si-sent #loginSent .codebox { max-width: none; width: 100%; margin: 2px 0 0; }
body.landing.dz .dz-si.si-sent #loginSent .code-row { display: flex; gap: 10px; justify-content: flex-start; }
body.landing.dz .dz-si.si-sent #loginSent .code-row input { flex: 0 1 260px; max-width: 260px; margin: 0; }
/* the watermark peeks from the bottom-right corner, behind the art and the steps */
@media (min-width: 901px) { .dz-si > .sp-wm { right: clamp(0px, 1.5vw, 24px); bottom: clamp(12px, 4vh, 40px); width: min(24vw, 340px); } .dz-si > .sp-wm.wide { width: min(34vw, 480px); } }
@media (min-width: 901px) and (max-height: 740px) { .dz-si { padding-top: 18px; padding-bottom: 16px; } }

/* v5.6.3: a button that's waiting on the server ("Checking…", "Loading…") keeps its full color with a progress cursor
   instead of the faded disabled look, so a pressed Submit reads as working, not broken */
body.dz .btn.is-busy:disabled, body.dz .btn.is-busy[disabled] { opacity: 1; cursor: progress; }
body.dz .btn.primary.is-busy:disabled, body.dz #submit.btn.is-busy:disabled { background: var(--fill); border-color: var(--fill-edge); color: var(--fill-ink); }

/* ===== v5.6.4 accent roles ==========================================================================================
   One color per job, so the eye learns the flow: sage green = the case and your progress (unchanged), burnt orange =
   learning (the field guide, field notes, glossary terms: always free), slate blue = side quests (bonus points),
   amber stays cost and caution (hints, warnings), and the top three places on any board wear gold, silver and bronze.
   Flat fills only; every text color here is 4.5:1 or better on its background. */
:root {
  --learn: #B4501A; --learn-ink: #8A3A0C; --learn-hover: #9C4415; --learn-tint: #FCEEE4; --learn-edge: #EDC1A2;
  --quest: #2F5E9E; --quest-ink: #244B80; --quest-tint: #E7EEF8; --quest-edge: #B7C9E6;
  --gold: #8B6A00; --gold-tint: #F7EFD6; --gold-edge: #E3CF95;
  --silver: #5F6773; --silver-tint: #EEF0F3; --silver-edge: #CDD2D9;
  --bronze: #8F522A; --bronze-tint: #F6E9DF; --bronze-edge: #E2C3AD;
}
/* sidebar: Field guide reads as its own thing; it fills in while the drawer is open */
body.dz #tabGuide, body.dz #tabGuide .ic { color: var(--learn); }
body.dz #tabGuide .tab-l { color: var(--learn-ink); font-weight: 600; }
body.dz #tabGuide:hover { background: var(--learn-tint); }
body.guide-open #tabGuide { background: var(--learn-tint); box-shadow: inset 3px 0 0 var(--learn); }
body.dz #pmGuide, body.dz #pmGuide .ic { color: var(--learn-ink); }
/* side quests count in the sidebar and the New tags on quest tiles */
body.dz #questCount { background: var(--quest-tint); color: var(--quest-ink); border-color: var(--quest-edge); }
body.dz .dz-tab[data-tab="quests"].active .ic { color: var(--quest); }
body.dz .chip.sq-new { background: var(--quest-tint); color: var(--quest-ink); border-color: var(--quest-edge); }
body.dz .dz-quests .dz-pagehead .eyebrow.red { color: var(--quest); }
body.dz .dz-quests .sq-progress .dz-bar span { background: var(--quest); }
/* glossary terms in puzzle text */
body.dz .gterm { text-decoration-color: color-mix(in srgb, var(--learn) 75%, transparent); }
body.dz .gterm:hover, body.dz .gterm.on { background: var(--learn-tint); text-decoration-color: var(--learn); }
body.dz .gterm:focus-visible { outline-color: var(--learn); }
body.dz .gterm.gchip:hover, body.dz .gterm.gchip.on { border-color: var(--learn-edge); background: var(--learn-tint); }
.gcard { border-top: 3px solid var(--learn); }
.gcard .eyebrow { color: var(--learn-ink); }
/* field note rows (case board card, after a solve): a read note ticks in burnt orange */
body.dz .fn-card .dz-cardh svg, body.dz .fn-card .fn-h .eyebrow { color: var(--learn-ink); }
body.dz .fn-card { border-top: 3px solid var(--learn); }
body.dz .fn-row:hover { border-color: var(--learn-edge); background: var(--learn-tint); }
body.dz .fn-row.read .fn-st { background: var(--learn); border-color: var(--learn); color: #fff; }
body.dz .fn-badge b, body.dz .fn-badge svg { color: var(--learn-ink); }
body.dz .fn-after-h .eyebrow { color: var(--learn-ink); }
/* the free field note offered on a hint and after a wrong answer */
:root[data-theme] body.dz .fb.confirm.fn-nudge, body.dz .fb.confirm.fn-nudge { background: var(--learn-tint); border-color: var(--learn-edge); border-left: 3px solid var(--learn); color: #3E1A06; }
:root[data-theme] body.dz .fb.confirm.fn-nudge .fn-nudge-t { border-color: var(--learn-edge); }
body.dz .fn-nudge-t svg, body.dz .fn-brush svg { color: var(--learn); }
body.dz .fn-nudge .btn.primary { background: var(--learn); border-color: var(--learn); color: #fff; }
body.dz .fn-nudge .btn.primary:hover { background: var(--learn-hover); border-color: var(--learn-hover); color: #fff; }
body.dz .fn-brush { border-color: var(--learn-edge); background: var(--learn-tint); }
body.dz .fn-brush .dz-link { color: var(--learn-ink); text-decoration-color: color-mix(in srgb, var(--learn) 60%, transparent); }
/* the drawer */
body.dz .guide-panel { border-top: 3px solid var(--learn); }
body.dz #guideEyebrow { color: var(--learn); }
body.dz .guide-tabs .gt.on { background: var(--learn); border-color: var(--learn); color: #fff; }
body.dz .guide-search input:focus { border-color: var(--learn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--learn) 22%, transparent); outline: none; }
body.dz .g-bar i { background: var(--learn); }
body.dz .g-met { color: var(--learn-ink); }
body.dz .g-note.read .g-st { background: var(--learn); border-color: var(--learn); color: #fff; }
body.dz .g-note.focus { border-color: var(--learn); box-shadow: 0 0 0 2px var(--learn-tint); }
body.dz .g-badge-line svg { color: var(--learn); }
/* medals: the top three on the case standings, the department race and the side-quest boards */
body.dz .rk[data-rk="1"], body.dz .rk[data-rk="2"], body.dz .rk[data-rk="3"] { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; border: 1px solid; font-weight: 600; box-sizing: border-box; }
body.dz .rk[data-rk="1"] { color: var(--gold); background: var(--gold-tint); border-color: var(--gold-edge); }
body.dz .rk[data-rk="2"] { color: var(--silver); background: var(--silver-tint); border-color: var(--silver-edge); }
body.dz .rk[data-rk="3"] { color: var(--bronze); background: var(--bronze-tint); border-color: var(--bronze-edge); }
body.dz .dz-pr .rk[data-rk="1"], body.dz .dz-pr .rk[data-rk="2"], body.dz .dz-pr .rk[data-rk="3"] { width: auto; min-width: 22px; height: 22px; }
/* coordinator console: the Field guide insight entry carries the same orange */
body.dz-admin nav.side button[data-v="guide"] .ic { color: #F29A5E; }
body.dz-admin .gi-k.k-note { color: var(--learn); }
/* glossary: the terms pinned for the file you're in */
body.dz .g-sec.ctx { border-color: var(--learn-edge); background: var(--learn-tint); }
body.dz .g-sec.ctx > .label { color: var(--learn-ink); }
body.dz .g-item.pinned summary b { color: var(--learn-ink); }
body.dz .g-item:not(.g-note) summary:hover b { color: var(--learn-ink); }

/* ===== v5.6.5 score boards: podium, ranked rows, your line, hub cards (boards.js) ====================================
   One look for every per-game board: the Standings hub (light), the Side quests panel (light) and the Arcade panel
   (dark, scoped by .obb.dark). Medal colors come from the v5.6.4 accent roles. */
.obb-podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); align-items: end; gap: 8px; padding: 16px 16px 0; border-bottom: 1px solid var(--line); }
.obb-pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; gap: 1px; }
.obb-av { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sunk); color: var(--ink); font-family: var(--mono); font-size: 12.5px; font-weight: 600; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line-2); margin-bottom: 6px; flex: none; }
.obb-pod.p1 .obb-av { width: 50px; height: 50px; font-size: 14px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.obb-pod.p2 .obb-av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--silver); }
.obb-pod.p3 .obb-av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--bronze); }
.obb-pod.me .obb-av { background: var(--fill); color: var(--fill-ink); }
.obb-pn { max-width: 100%; font-weight: 600; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.obb-pd { max-width: 100%; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obb-ps { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.obb-ped { align-self: stretch; margin-top: 8px; display: grid; place-items: center; border: 1px solid; border-bottom: 0; border-radius: 6px 6px 0 0; font-family: var(--mono); font-size: 15px; font-weight: 700; }
.obb-pod.p1 .obb-ped { height: 54px; color: var(--gold); background: var(--gold-tint); border-color: var(--gold-edge); }
.obb-pod.p2 .obb-ped { height: 40px; color: var(--silver); background: var(--silver-tint); border-color: var(--silver-edge); }
.obb-pod.p3 .obb-ped { height: 30px; color: var(--bronze); background: var(--bronze-tint); border-color: var(--bronze-edge); }
.obb-pod.empty .obb-av, .obb-pod.empty .obb-pn { opacity: .5; } .obb-pod.empty .obb-pn { font-weight: 500; }
.obb-rows { display: flex; flex-direction: column; }
.obb-row { display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.obb-row .rk { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.obb-av.sm { width: 30px; height: 30px; font-size: 11px; box-shadow: none; margin: 0; }
.obb-row.me { background: var(--red-tint); box-shadow: inset 3px 0 0 var(--red); }
.obb-row.me .obb-av { background: var(--fill); color: var(--fill-ink); }
.obb-nm { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.obb-nm b, .obb-nm small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obb-nm b { font-weight: 600; font-size: 13.5px; color: var(--ink); } .obb-nm small { font-size: 11.5px; color: var(--muted); }
.obb-sc { font-family: var(--mono); font-size: 13.5px; text-align: right; color: var(--ink); }
.obb-gap { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line); }
.obb-me { display: flex; gap: 8px; align-items: flex-start; margin: 12px 16px; padding: 10px 12px; border-radius: 8px; background: var(--sunk); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.obb-me svg { flex: none; margin-top: 2px; color: var(--red); } .obb-me b { color: var(--ink); }
.obb-me.none { color: var(--muted); } .obb-me.none svg { color: var(--muted); }
.obb-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px 12px; text-align: center; color: var(--muted); }
.obb-empty p { margin: 0; font-size: 13.5px; }
/* game switcher above a panel board */
.obb-switch { width: 100%; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 36px 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23526359' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); appearance: none; -webkit-appearance: none; cursor: pointer; }
.obb-switch:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
/* hub cards */
.obb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.obb-card { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); padding: 16px; cursor: pointer; }
.obb-card:hover { border-color: var(--red); } .obb-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.obb-card-h { display: flex; align-items: center; gap: 10px; }
.obb-card-h > svg { margin-left: auto; color: var(--muted); flex: none; }
.obb-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--ink); color: #fff; flex: none; }
.obb-card-t { display: flex; flex-direction: column; min-width: 0; } .obb-card-t b { font-size: 15.5px; } .obb-card-t small { font-size: 12px; color: var(--muted); }
.obb-top3 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.obb-top3 li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); min-height: 42px; box-sizing: border-box; }
.obb-top3 li:first-child { border-top: 0; }
.obb-top3 li.me { background: var(--red-tint); margin: 0 -8px; padding: 6px 8px; border-radius: 6px; }
.obb-card-empty { margin: 0; font-size: 13px; color: var(--muted); padding: 10px 0 38px; }
.obb-card-me { font-family: var(--mono); font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: auto; }
.obb-card-me.none { color: var(--muted); }
.obb-card.podium .obb-card-me b { color: var(--gold); }
.obb-card.loading { cursor: default; } .obb-card.loading li::before { content: ""; grid-column: 1 / -1; height: 10px; border-radius: 4px; background: var(--sunk); }
/* the Standings hub */
.dz-bh-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 16px; }
.dz-bh-bar p { margin: 0; max-width: 640px; }
.dz-bh-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.dz-bh-sum .chip { font-size: 11px; }
.dz-bh-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.dz-bh-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; padding: 0; overflow: hidden; }
.dz-bh-dh { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dz-bh-dh .obb-ic { width: 44px; height: 44px; }
.dz-bh-dh h2 { margin: 0; font-size: 24px; } .dz-bh-dh .dz-fgrow { flex: 1; }
.dz-bh-left { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dz-bh-left .obb-podium { padding-top: 24px; }
.dz-bh-note { margin: 0 16px 16px; font-size: 12.5px; color: var(--muted); }
.dz-bh-right .obb-rows { max-height: 560px; overflow: auto; }
.dz-bh-right .obb-empty { padding: 40px 16px; }
@media (max-width: 900px) { .dz-bh-detail { grid-template-columns: minmax(0, 1fr); } .dz-bh-left { border-right: 0; border-bottom: 1px solid var(--line); } .dz-bh-right .obb-rows { max-height: none; } }
/* dark (arcade panel) */
.obb.dark .obb-podium, .obb.dark .obb-row, .obb.dark .obb-gap { border-color: var(--console-line); }
.obb.dark .obb-av { background: var(--console-line); color: var(--console-text); box-shadow: 0 0 0 2px var(--console-2), 0 0 0 4px var(--console-line-2); }
.obb.dark .obb-pod.p1 .obb-av { box-shadow: 0 0 0 2px var(--console-2), 0 0 0 4px #E0B84C; }
.obb.dark .obb-pod.p2 .obb-av { box-shadow: 0 0 0 2px var(--console-2), 0 0 0 4px #C4CBD4; }
.obb.dark .obb-pod.p3 .obb-av { box-shadow: 0 0 0 2px var(--console-2), 0 0 0 4px #D9905E; }
.obb.dark .obb-pod.me .obb-av, .obb.dark .obb-row.me .obb-av { background: var(--fill); color: var(--fill-ink); }
.obb.dark .obb-row .obb-av.sm { box-shadow: none; }
.obb.dark .obb-pn, .obb.dark .obb-ps, .obb.dark .obb-nm b, .obb.dark .obb-sc { color: #fff; }
.obb.dark .obb-pd, .obb.dark .obb-nm small, .obb.dark .obb-row .rk, .obb.dark .obb-gap, .obb.dark .obb-empty { color: var(--console-dim); }
.obb.dark .obb-pod.p1 .obb-ped { color: #E0B84C; background: rgba(224, 184, 76, .12); border-color: rgba(224, 184, 76, .45); }
.obb.dark .obb-pod.p2 .obb-ped { color: #C4CBD4; background: rgba(196, 203, 212, .10); border-color: rgba(196, 203, 212, .40); }
.obb.dark .obb-pod.p3 .obb-ped { color: #D9905E; background: rgba(217, 144, 94, .12); border-color: rgba(217, 144, 94, .45); }
.obb.dark .obb-row.me { background: color-mix(in srgb, var(--accent) 14%, var(--console-2)); box-shadow: inset 3px 0 0 var(--accent); }
.obb.dark .obb-me { background: var(--console-line); color: var(--console-text); } .obb.dark .obb-me b { color: #fff; } .obb.dark .obb-me svg { color: var(--accent); }
.obb.dark .obb-me.none, .obb.dark .obb-me.none svg { color: var(--console-dim); }
body.dz .obb.dark .rk[data-rk="1"], body.dz .obb.dark .rk[data-rk="2"], body.dz .obb.dark .rk[data-rk="3"] { background: transparent; }
body.dz .obb.dark .rk[data-rk="1"] { color: #E0B84C; border-color: rgba(224, 184, 76, .5); } body.dz .obb.dark .rk[data-rk="2"] { color: #C4CBD4; border-color: rgba(196, 203, 212, .45); } body.dz .obb.dark .rk[data-rk="3"] { color: #D9905E; border-color: rgba(217, 144, 94, .5); }
.obb-switch.dark { background-color: var(--console); border-color: var(--console-line-2); color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9CED6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.dz-standings.show-hub .dz-live { display: none; }
/* the Case score / Side quests / Arcade switch now leads somewhere real, so phones and tablets keep it (full width) */
@media (max-width: 1000px) { .dz-standings .dz-ph-r { width: 100%; } .dz-standings .dz-st-boards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; } .dz-standings .dz-st-boards button { padding: 0 8px; } }
@media (max-width: 600px) { .dz-bh-dh { padding: 14px 16px; gap: 10px; } .dz-bh-dh h2 { font-size: 20px; } .dz-bh-dh .segctl, .dz-bh-dh #bhPlay { flex: 1 1 100%; } .dz-bh-dh .segctl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } .dz-bh-bar .segctl { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }

/* ===== v5.6.6 built-in decoder (Caesar / Base64 text puzzles) ===== */
body.dz .pz-tool { margin: 14px 0 0; border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
body.dz .pz-tool-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pz-tool-h svg { color: var(--ink); } .pz-tool-h b { font-size: 14.5px; }
body.dz .pz-tool .label { margin: 4px 0 0; }
body.dz .pz-tool textarea { width: 100%; box-sizing: border-box; resize: vertical; font-size: 14px; letter-spacing: .06em; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunk); color: var(--ink); }
body.dz .pz-tool-ops { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
body.dz .pz-tool-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
body.dz .pz-tool-shift { display: inline-flex; align-items: center; gap: 8px; } .pz-tool-shift .label { margin: 0 4px 0 0 !important; }
body.dz .pz-tool-shift .btn { min-width: 34px; padding: 0; justify-content: center; font-size: 16px; }
body.dz .pz-tool-shift output { min-width: 28px; text-align: center; font-size: 18px; font-weight: 700; }
body.dz .pz-wheel { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; padding: 8px 10px; background: var(--sunk); border-radius: 8px; font-size: 11.5px; }
body.dz .pz-wheel .w-r { display: flex; align-items: center; gap: 0; white-space: nowrap; }
body.dz .pz-wheel i { font-style: normal; width: 48px; flex: none; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
body.dz .pz-wheel b { width: 14px; flex: none; text-align: center; font-weight: 500; color: var(--ink-2); }
body.dz .pz-wheel .w-r + .w-r b { color: var(--red-ink); font-weight: 700; }
body.dz .pz-tool-out { min-height: 22px; padding: 9px 11px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 15px; letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }
body.dz .pz-tool-f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* v5.6.7 decoder kit: the work pad (one box per cipher letter; the player types the plain letter) */
body.dz .pz-pad { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 12px; background: var(--sunk); border-radius: 8px; }
body.dz .pz-word { display: inline-flex; gap: 3px; }
body.dz .pz-gap { width: 6px; }
body.dz .pz-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30px; }
body.dz .pz-cell b { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1; }
body.dz .pz-cell input { width: 30px; height: 36px; box-sizing: border-box; padding: 0; text-align: center; font-family: var(--mono); font-size: 17px; font-weight: 700; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; }
body.dz .pz-cell input:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
body.dz .pz-cell.fixed span { height: 36px; display: grid; place-items: center; font-size: 17px; color: var(--muted); }
body.dz .pz-tool-b64 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.dz .pz-tool-shift .small { margin-right: 2px; }
@media (max-width: 600px) { body.dz .pz-cell, body.dz .pz-cell input { width: 26px; } body.dz .pz-word { gap: 2px; } }
body.dz .pz-tool-sub { margin: -4px 0 2px; }
/* v5.6.8 cipher dial: a 7-letter window onto two reels (cipher above, plain below) that slide like a combination dial */
body.dz .pz-dial { display: flex; align-items: center; gap: 8px; outline: none; }
body.dz .pz-dial:focus-visible .pz-dial-win { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--red); }
body.dz .pz-dial-nav { flex: none; width: 34px; height: 76px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
body.dz .pz-dial-nav:hover { border-color: var(--ink); }
body.dz .pz-dial-win { --cw: 40px; position: relative; width: calc(var(--cw) * 7); max-width: 100%; overflow: hidden; border-radius: 10px; background: var(--ink); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
body.dz .pz-dial-win.drag { cursor: grabbing; }
body.dz .pz-dial-row { position: relative; height: 38px; overflow: hidden; }
body.dz .pz-dial-row.plain { background: var(--surface); border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 10px 10px; }
body.dz .pz-dial-tag { position: absolute; z-index: 2; left: 5px; top: 3px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
body.dz .pz-dial-row.cipher .pz-dial-tag { color: var(--console-dim, #8B929C); } body.dz .pz-dial-row.plain .pz-dial-tag { color: var(--muted); }
body.dz .pz-reel { display: flex; height: 100%; will-change: transform; }
body.dz .pz-reel.anim { transition: transform .24s cubic-bezier(.2, .9, .3, 1.15); }
body.dz .pz-reel b { flex: none; width: var(--cw); display: grid; place-items: center; padding-top: 6px; box-sizing: border-box; font-family: var(--mono); font-size: 19px; font-weight: 600; transition: opacity .2s, transform .2s; }
body.dz .pz-dial-row.cipher b { color: #fff; } body.dz .pz-dial-row.plain b { color: var(--ink); }
body.dz .pz-reel b.n1 { opacity: .7; } body.dz .pz-reel b.n2 { opacity: .4; } body.dz .pz-reel b.n3 { opacity: .16; }
body.dz .pz-reel b.on { transform: scale(1.12); }
body.dz .pz-dial-row.plain b.on { color: var(--red-ink); }
body.dz .pz-dial-lens { position: absolute; z-index: 3; top: 3px; bottom: 3px; left: calc(var(--cw) * 3); width: var(--cw); border: 2px solid var(--accent); border-radius: 8px; pointer-events: none; }
body.dz .pz-tool-shift { flex-wrap: wrap; }
body.dz .pz-dial-win { flex: none; }
@media (max-width: 600px) { body.dz .pz-dial { gap: 6px; } body.dz .pz-dial-win { --cw: 30px; } body.dz .pz-dial-nav { width: 28px; } body.dz .pz-reel b { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { body.dz .pz-reel.anim { transition: none; } }
/* ===== v5.6.9 interaction skins (skins.js): flat, token-driven; the plain list stays in the DOM, hidden ===== */
.puzzle.skin-on .opts, .puzzle.skin-on .opts-help, .puzzle.skin-on .order-help { display: none !important; }
.sk-hidden { display: none !important; }
body.dz .sk { margin: 12px 0 0; }
body.dz .sk-eyebrow { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
body.dz .sk-help { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); } body.dz .sk-help svg { margin-top: 2px; flex: none; color: var(--red); }
body.dz .sk-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; } body.dz .sk-hd > b { font-size: 14.5px; } body.dz .sk-hd .small { flex: 1 1 200px; }
body.dz .sk-relay, body.dz .sk-rule, body.dz .sk-trace, body.dz .sk-spray { border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); background: var(--surface); padding: 14px 16px; }
body.dz .sk-plain, body.dz .sk-back { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
body.dz .sk-plain:hover, body.dz .sk-back:hover { color: var(--ink); }
body.dz .sk-back { margin-top: 8px; }
body.dz .sk-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
body.dz .sk-tag.ok { background: var(--green-tint); color: var(--ok); } body.dz .sk-tag.warn { background: var(--amber-tint); color: var(--amber); } body.dz .sk-tag.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); }
body.dz .ln.sk-hl { background: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: -6px 0 0 color-mix(in srgb, var(--accent) 45%, transparent); transition: background .25s; }
body.dz .ln.sk-dim { opacity: .35; transition: opacity .25s; }

/* Playbook timeline (order) */
body.dz .sk-tl { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; display: flex; flex-direction: column; gap: 8px; }
body.dz .sk-tl::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line-2); }
body.dz .sk-step { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 8px 8px 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); transition: transform .22s cubic-bezier(.2, .8, .3, 1), border-color .15s; cursor: grab; user-select: none; -webkit-user-select: none; }
body.dz .sk-step:hover { border-color: var(--ink-2); }
body.dz .sk-step .sk-num { position: absolute; left: -24px; top: 50%; margin-top: -12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
body.dz .sk-step { margin-left: 12px; }
body.dz .sk-grip { flex: none; width: 34px; align-self: stretch; display: grid; place-items: center; color: var(--muted); touch-action: none; border-right: 1px solid var(--line); }
body.dz .sk-txt { flex: 1; font-size: 14px; line-height: 1.35; }
body.dz .sk-mv { flex: none; display: flex; flex-direction: column; gap: 2px; }
body.dz .sk-mv button { width: 30px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 5px; background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
body.dz .sk-mv button:hover:not([disabled]) { border-color: var(--ink); } body.dz .sk-mv button[disabled] { opacity: .3; cursor: default; }
body.dz .sk-mv .sk-up svg { transform: rotate(180deg); }
body.dz .sk-step.locked { cursor: default; background: var(--green-tint); border-color: color-mix(in srgb, var(--ok) 40%, var(--line-2)); }
body.dz .sk-step.locked .sk-num { background: var(--ok); } body.dz .sk-step.locked .sk-grip { color: var(--ok); }
body.dz .sk-tl.dragging .sk-step:not(.dragging) { transition: transform .18s ease; }
body.dz .sk-step.dragging { z-index: 3; transition: none; border-color: var(--ink); cursor: grabbing; outline: 2px solid var(--ink); }

/* Highlight the call */
body.dz .sk-call { border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); overflow: hidden; background: var(--surface); }
body.dz .sk-call-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--ink); color: #fff; }
body.dz .sk-call-av { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #0F1216); }
body.dz .sk-call-who { flex: 1; min-width: 0; display: flex; flex-direction: column; } body.dz .sk-call-who .sk-eyebrow { color: var(--console-dim, #8B929C); } body.dz .sk-call-who b { font-size: 15px; } body.dz .sk-call-who small { font-size: 12px; color: #C9CED6; }
body.dz .sk-call-t { display: flex; align-items: center; gap: 6px; font-size: 13px; }
body.dz .sk-live { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; animation: skPulse 1.4s ease-in-out infinite; }
@keyframes skPulse { 50% { opacity: .25; } }
body.dz .sk-call-lines { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
body.dz .sk-line { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 4px 14px 14px 14px; background: var(--sunk); font: inherit; font-size: 14.5px; line-height: 1.4; color: var(--ink); cursor: pointer; transition: opacity .35s, transform .35s, background .15s, border-color .15s; }
body.dz .sk-line:hover { border-color: var(--ink-2); }
body.dz .sk-lwrap { display: flex; flex-direction: column; gap: 6px; transition: opacity .35s, transform .35s; }
body.dz .sk-lwrap.pending { opacity: 0; transform: translateY(6px); pointer-events: none; }
body.dz .sk-lwrap.open .sk-line { border-color: var(--ink); }
body.dz .sk-line-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body.dz .sk-ltags { display: flex; flex-wrap: wrap; gap: 4px; }
body.dz .sk-ltag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
body.dz .sk-tactics { margin: 0 0 4px 16px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
body.dz .sk-tchips { display: flex; flex-direction: column; gap: 6px; width: 100%; }
body.dz .sk-tchip { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); font: inherit; font-size: 13.5px; line-height: 1.35; color: var(--ink); cursor: pointer; }
body.dz .sk-tchip span { flex: 1; } body.dz .sk-tchip small { flex: none; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
body.dz .sk-tchip:hover { border-color: var(--ink-2); }
body.dz .sk-tchip.on { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: var(--bad); } body.dz .sk-tchip.on svg { color: var(--bad); flex: none; }
body.dz .sk-flags-l li small { display: block; margin-top: 2px; color: var(--ink-2); }
body.dz .sk-flag { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--line-2); color: transparent; margin-top: -1px; }
body.dz .sk-line.on { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: var(--bad); }
body.dz .sk-line.on .sk-flag { background: var(--bad); border: 0; color: #fff; }
body.dz .sk-call-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 12px 12px; }
body.dz .sk-flags { border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); padding: 12px 14px; background: var(--surface); }
body.dz .sk-flags-h { display: flex; align-items: center; gap: 8px; } body.dz .sk-flags-h svg { color: var(--bad); } body.dz .sk-flags-h b { flex: 1; font-size: 14px; }
body.dz .sk-count { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; font-size: 12px; padding: 0 6px; }
body.dz .sk-flags-l { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
body.dz .sk-flags-l li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-left: 3px solid var(--bad); background: var(--sunk); font-size: 13.5px; line-height: 1.4; }
body.dz .sk-flags-l li span { flex: 1; }
body.dz .sk-x { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; } body.dz .sk-x:hover { background: var(--surface); color: var(--ink); }
body.dz .sk-empty { margin: 8px 0 0; }

/* Spot the change */
body.dz .sk-docs-g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
body.dz .sk-doc { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); overflow: hidden; }
body.dz .sk-doc header { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--sunk); }
body.dz .sk-doc header span { display: flex; flex-direction: column; } body.dz .sk-doc header b { font-size: 13.5px; } body.dz .sk-doc header small { font-size: 11px; color: var(--muted); }
body.dz .sk-doc.b header { background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
body.dz .sk-fld { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; color: var(--ink); }
body.dz .sk-fld:last-child { border-bottom: 0; }
body.dz button.sk-fld { cursor: pointer; }
body.dz .sk-fk { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
body.dz .sk-fv { font-size: 14px; overflow-wrap: anywhere; }
body.dz .sk-fld.hov { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
body.dz .sk-fld.picked { background: color-mix(in srgb, var(--accent) 60%, var(--surface)); box-shadow: inset 3px 0 0 var(--red); }
body.dz .sk-pickline { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); background: var(--surface); font-size: 14.5px; }
body.dz .sk-pickline svg { color: var(--red); flex: none; }

/* Account cleanup panel */
body.dz .sk-acct { border: 1px solid var(--line-2); border-radius: var(--dz-rad, 10px); background: var(--surface); overflow: hidden; }
body.dz .sk-acct-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
body.dz .sk-acct-h > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; } body.dz .sk-acct-done { flex: none; } body.dz .sk-acct-h small { font-size: 12px; color: var(--muted); }
body.dz .sk-acct-av { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--fill, var(--accent)); color: var(--fill-ink, var(--accent-ink)); font-weight: 700; font-size: 13px; }
body.dz .sk-acct-sec { padding: 10px 14px 4px; } body.dz .sk-acct-sec + .sk-acct-sec { border-top: 1px solid var(--line); }
body.dz .sk-acct-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; transition: opacity .2s; }
body.dz .sk-acct-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--sunk); color: var(--ink-2); }
body.dz .sk-acct-t { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
body.dz .sk-acct-row.done .sk-acct-ic { background: var(--green-tint); color: var(--ok); }
body.dz .sk-kr { flex: none; } body.dz .sk-kr button { min-height: 32px; padding: 0 12px; }
body.dz .sk-kr button.on[data-v="remove"] { background: var(--bad); color: #fff; }
body.dz .sk-acct-row.rm .sk-acct-t { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--ink-2); }
body.dz .sk-acct-row.rm .sk-acct-ic { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); }
body.dz .sk-acct-f { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--sunk); }

/* Relay trace replay */
body.dz .sk-lanes { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-bottom: 46px; }
body.dz .sk-lane { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); transition: border-color .2s, background .2s; min-width: 0; }
body.dz .sk-lane b { font-size: 12.5px; } body.dz .sk-lane small { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.25; }
body.dz .sk-lane-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sunk); color: var(--ink); }
body.dz .sk-lane[data-k="1"] .sk-lane-ic { background: var(--amber-tint); color: var(--amber); } body.dz .sk-lane[data-k="3"] .sk-lane-ic { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); }
body.dz .sk-lane.on { border-color: var(--ink); background: var(--sunk); }
body.dz .sk-track { position: absolute; left: 0; right: 0; bottom: 8px; height: 30px; }
body.dz .sk-track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 50%; border-top: 2px dashed var(--line-2); }
body.dz .sk-tok { position: absolute; top: 0; left: 12.5%; transform: translateX(-50%); display: none; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; transition: left 1.1s cubic-bezier(.45, 0, .2, 1); }
body.dz .sk-tok.on { display: inline-flex; } body.dz .sk-tok.cookie { background: var(--amber); } body.dz .sk-tok.mfa { background: var(--red); }
body.dz .sk-note { min-height: 42px; margin: 4px 0 8px; font-size: 14px; line-height: 1.45; }
body.dz .sk-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.dz .sk-dots { display: flex; gap: 6px; } body.dz .sk-dots button { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); cursor: pointer; }
body.dz .sk-dots button.done { background: var(--line-2); } body.dz .sk-dots button.on { background: var(--ink); border-color: var(--ink); }
body.dz .sk-time { color: var(--muted); }

/* Rule in action */
body.dz .sk-bins { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; margin-bottom: 10px; }
body.dz .sk-bin { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; min-width: 0; }
body.dz .sk-bin > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; font-weight: 600; } body.dz .sk-bin small { font-size: 10.5px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
body.dz .sk-bin > b { font-size: 18px; } body.dz .sk-bin.out { border-color: color-mix(in srgb, var(--bad) 45%, var(--line-2)); } body.dz .sk-bin.out > svg, body.dz .sk-bin.out > b { color: var(--bad); }
body.dz .sk-bin.bump > b { animation: skBump .4s ease; } @keyframes skBump { 40% { transform: scale(1.35); } }
body.dz .sk-mails { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
body.dz .sk-mail { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; transition: opacity .4s, transform .4s, background .3s; }
body.dz .sk-mail.new { opacity: 0; transform: translateX(-10px); }
body.dz .sk-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--blue, #1F56C4); }
body.dz .sk-mail.read .sk-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
body.dz .sk-mail-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; } body.dz .sk-mail-t span { color: var(--ink-2); }
body.dz .sk-mail.read .sk-mail-t b { font-weight: 500; }
body.dz .sk-mail.gone { background: var(--sunk); } body.dz .sk-mail.gone .sk-mail-t { opacity: .6; }
body.dz .sk-stamps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 48%; }
body.dz .sk-foot { margin: 8px 0 0; }

/* Session tracer */
body.dz .sk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.dz .sk-chip { min-height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 17px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
body.dz .sk-chip:hover { border-color: var(--ink); } body.dz .sk-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
body.dz .sk-sid { font: inherit; color: inherit; padding: 0 3px; margin: 0 -3px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--accent) 35%, transparent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
body.dz .sk-sid.on { background: var(--ink); color: #fff; text-decoration: none; }
body.dz .sk-trace-out .small { margin: 12px 0 6px; }
body.dz .sk-hops { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
body.dz .sk-hop { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 0 10px; font-size: 13px; }
body.dz .sk-hop::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
body.dz .sk-hop.moved::before { background: var(--amber); }
body.dz .sk-hop > span.mono { grid-row: span 3; color: var(--muted); } body.dz .sk-hop small { color: var(--muted); }
body.dz .sk-leg { display: flex; align-items: center; gap: 6px; margin-left: -6px; padding: 5px 10px; border-radius: 6px; background: var(--amber-tint); color: var(--amber); font-size: 12.5px; } body.dz .sk-leg b { color: var(--ink); }

/* Spray replay */
body.dz .sk-spray-bar { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; }
body.dz .sk-kv { display: flex; flex-direction: column; } body.dz .sk-kv small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } body.dz .sk-kv b { font-size: 15px; } body.dz .sk-kv b + small { letter-spacing: 0; text-transform: none; font-size: 11px; }
body.dz .sk-ticker { min-height: 34px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; margin-bottom: 10px; border-radius: 6px; background: var(--ink); color: #DDE1E6; }
body.dz .sk-ticker .ok { color: #F5B454; } body.dz .sk-ticker .bad { color: #FF8A84; }
body.dz .sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; }
body.dz .sk-tile { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface); transition: background .15s, color .15s, border-color .15s; }
body.dz .sk-tile.anon { border-style: dashed; }
body.dz .sk-tile.anon.fail::after { content: "×"; font-size: 13px; }
body.dz .sk-tile.fail { background: var(--sunk); border-style: solid; border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); color: var(--bad); animation: skFlip .3s ease; }
body.dz .sk-tile.ok { background: var(--amber); border-color: var(--amber); color: #fff; animation: skFlip .3s ease; }
@keyframes skFlip { 0% { transform: rotateY(90deg); } 100% { transform: none; } }

@media (max-width: 700px) {
  body.dz .sk-docs-g { grid-template-columns: 1fr; }
  body.dz .sk-bins { grid-template-columns: 1fr; }
  body.dz .sk-stamps { max-width: none; justify-content: flex-start; } body.dz .sk-mail { flex-wrap: wrap; } body.dz .sk-stamps { flex-basis: 100%; padding-left: 18px; }
  body.dz .sk-lane b { font-size: 11px; } body.dz .sk-lane small { display: none; } body.dz .sk-tok { font-size: 11px; padding: 0 8px; }
  body.dz .sk-acct-row { flex-wrap: wrap; } body.dz .sk-acct-t { flex: 1 1 calc(100% - 44px); } body.dz .sk-acct-row.done { flex-wrap: nowrap; } body.dz .sk-acct-row.done .sk-acct-t { flex: 1 1 auto; } body.dz .sk-kr { margin-left: 40px; }
  body.dz .sk-grip { width: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  body.dz .sk-step, body.dz .sk-line, body.dz .sk-lwrap, body.dz .sk-tok, body.dz .sk-mail, body.dz .sk-tile, body.dz .sk-bin > b { transition: none !important; animation: none !important; }
  body.dz .sk-live { animation: none; }
}
/* ===== v5.7 solved view: the debrief walk-through (renderWalk in app.js). One card at a time: Result → Why → Habit →
   Go deeper → Next. Color roles: ink = the one button that moves you on, green = what you earned, orange = learning (free),
   gray paper = the evidence. ===== */
body.dz .card.puzzle.wt-host .wt { grid-area: left; width: 100%; max-width: 920px; margin: 20px auto 0; display: flex; flex-direction: column; gap: 16px; }
body.dz .wt-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
body.dz .wt-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.dz .wt-title h2 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.08; }
body.dz .wt-skip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
body.dz .wt-steps { display: flex; gap: 6px; }
body.dz .wt-step { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
body.dz .wt-step:hover { border-color: var(--ink); color: var(--ink); }
body.dz .wt-step .wt-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dz .wt-dot { flex: none; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 11px; }
body.dz .wt-step.cur { border: 2px solid var(--ink); color: var(--ink); font-weight: 700; padding: 0 13px; }
body.dz .wt-step.cur .wt-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
body.dz .wt-step.done { background: var(--green-tint, #E5F2EB); color: var(--ok); font-weight: 600; }
body.dz .wt-step.done .wt-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
body.dz .wt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px 44px 22px; min-height: 480px; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; }
body.dz .wt-pane { display: flex; flex-direction: column; gap: 16px; }
body.dz .wt-pane[hidden] { display: none; }
body.dz .wt-pane > .eyebrow { margin: 0; }
body.dz .wt-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
body.dz .wt-foot .wt-count { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
body.dz .wt-foot .wt-back[hidden], body.dz .wt-foot .wt-go[hidden] { display: none; }
body.dz .wt-foot .wt-back[hidden] + .wt-count { text-align: left; }
body.dz .wt-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; }
body.dz .wt-go:hover { background: color-mix(in srgb, var(--ink) 86%, #000); color: #fff; }
body.dz .wt-go.wt-lg { height: 58px; padding: 0 30px; font-size: 17px; margin-top: 8px; }
/* 1 · Result */
body.dz .card.puzzle .wt-hero.fb.ok.dz-earned, :root[data-theme] body.dz .card.puzzle .wt-hero.fb.ok.dz-earned { background: none; border: 0; padding: 8px 0 0; }
body.dz .wt-hero.dz-earned > .chip { margin: 0; align-self: center; }
body.dz .card.puzzle .wt-skip#next, body.dz .card.puzzle .wt-skip#next:hover { background: none; border: 0; color: var(--ink-2); }
body.dz .wt-hero.fb.ok { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin: 0; padding: 8px 0 0; background: none; border: 0; box-shadow: none; color: var(--ink); }
body.dz .wt-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
body.dz .wt-eb-ok { color: var(--ok); }
body.dz .wt-n { font-family: var(--display); font-size: 72px; font-weight: 800; line-height: .9; color: var(--ok); }
body.dz .wt-n small { font-size: .45em; }
body.dz .wt-rows { font-size: 13px; color: var(--ink-2); }
body.dz .wt-file { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
body.dz .wt-file-t { display: flex; flex-direction: column; gap: 2px; } body.dz .wt-file-t b { font-size: 16px; } body.dz .wt-file-t .small { color: var(--muted); }
body.dz .wt-ans { display: flex; flex-direction: column; gap: 10px; }
body.dz .wt-ans .wt-q { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
body.dz .wt-ans .opts.review { margin: 0; }
/* 2 · Why */
body.dz .wt-h { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1.08; }
body.dz .wt-tell { font-size: 18px; line-height: 1.65; }
body.dz .wt-tell p { margin: 0 0 12px; } body.dz .wt-tell p:last-child { margin: 0; }
body.dz .wt-ev { border: 1px solid var(--line-2); border-radius: 10px; background: var(--sunk); }
body.dz .wt-ev summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; }
body.dz .wt-ev summary::-webkit-details-marker { display: none; }
body.dz .wt-ev summary span { flex: 1; }
body.dz .wt-ev[open] summary svg:last-child { transform: rotate(180deg); }
body.dz .wt-ev .wrap-x { margin: 0 16px 16px; }
/* 3 · Habit and tips */
body.dz .wt-habit { background: var(--ink); color: #fff; border-radius: 14px; padding: 26px 30px; }
body.dz .wt-habit .rt { font-size: 22px; font-weight: 600; line-height: 1.45; }
body.dz .wt-habit .rt p { margin: 0 0 10px; } body.dz .wt-habit .rt p:last-child { margin: 0; }
body.dz .wt-habit .gterm { color: #fff; text-decoration-color: var(--learn-edge, #EDC1A2); }
body.dz .wt-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
body.dz .wt-tip { padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
body.dz .wt-tip p { margin: 0; }
/* 4 · Go deeper (learning = orange, always free) */
body.dz .wt-learn { color: var(--learn-ink, #8A3A0C); }
body.dz .wt-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
body.dz .wt-note { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 20px; border: 1px solid var(--learn-edge, #EDC1A2); border-radius: 12px; background: var(--learn-tint, #FCEEE4); color: var(--ink); font: inherit; cursor: pointer; }
body.dz .wt-note:hover { border-color: var(--learn, #B4501A); }
body.dz .wt-note.read { background: var(--surface); border-color: var(--line-2); }
body.dz .wt-note-m { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--learn-ink, #8A3A0C); }
body.dz .wt-note .fn-st { width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--learn, #B4501A); display: grid; place-items: center; color: #fff; }
body.dz .wt-note.read .fn-st { background: var(--learn, #B4501A); }
body.dz .wt-note b { font-size: 18px; line-height: 1.3; }
body.dz .wt-note-go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--learn-ink, #8A3A0C); }
body.dz .wt-fnp { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--learn-ink, #8A3A0C); }
body.dz .wt-terms { margin: 0; }
/* 5 · Next */
body.dz .wt-next { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 34px 0 10px; }
body.dz .wt-h.wt-big { font-size: 44px; }
body.dz .wt-sub { font-size: 16px; color: var(--muted); }
@media (max-width: 700px) {
  body.dz .card.puzzle.wt-host .wt { margin-top: 12px; gap: 12px; }
  body.dz .wt-title h2 { font-size: 22px; }
  body.dz .wt-steps { gap: 4px; }
  body.dz .wt-step { flex: 0 0 auto; padding: 0 10px; height: 44px; }
  body.dz .wt-step.cur { flex: 1 1 auto; padding: 0 9px; }
  body.dz .wt-step:not(.cur) .wt-lbl { display: none; }
  body.dz .wt-card { padding: 22px 18px 16px; border-radius: 14px; min-height: 0; }
  body.dz .wt-n { font-size: 56px; } body.dz .wt-ok { width: 60px; height: 60px; }
  body.dz .wt-h { font-size: 26px; } body.dz .wt-h.wt-big { font-size: 30px; }
  body.dz .wt-tell { font-size: 16.5px; }
  body.dz .wt-habit { padding: 20px; } body.dz .wt-habit .rt { font-size: 18.5px; }
  body.dz .wt-foot .wt-go { flex: 1; }
  body.dz .wt-foot .wt-count { display: none; }
}
/* ===== v5.7.1 decoder kit: one tool per encoding. The Base64 kit (look up → join and cut bits → read bytes as ASCII) ===== */
body.dz .pz-tool.both .pz-caesar { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
body.dz .pz-b64, body.dz .pz-caesar { display: flex; flex-direction: column; gap: 8px; }
body.dz .pz-b64-groups { display: flex; flex-wrap: wrap; gap: 6px; }
body.dz .pz-b64-g { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font: inherit; font-size: 15px; letter-spacing: .08em; color: var(--ink); cursor: pointer; }
body.dz .pz-b64-g:hover { border-color: var(--ink); }
body.dz .pz-b64-g.on { border: 2px solid var(--ink); padding: 0 11px; font-weight: 600; }
body.dz .pz-b64-g.done { background: var(--green-tint, #E5F2EB); color: var(--ok); }
body.dz .pz-b64-work { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; background: var(--sunk); }
body.dz .pz-b64-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; transition: opacity .2s; }
body.dz .pz-b64-step.off { opacity: .45; }
body.dz .pz-b64-step > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body.dz .pz-b64-step b { font-size: 14px; }
body.dz .pz-b64-n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; }
body.dz .pz-b64-syms, body.dz .pz-b64-reads { display: flex; flex-wrap: wrap; gap: 6px; }
body.dz .pz-b64-sym, body.dz .pz-b64-read { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 70px; padding: 8px 8px 7px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
body.dz button.pz-b64-sym:hover, body.dz button.pz-b64-read:hover { border-color: var(--ink); }
body.dz .pz-b64-sym b { font-size: 22px; line-height: 1.1; } body.dz .pz-b64-sym small, body.dz .pz-b64-read small { font-size: 11px; color: var(--muted); }
body.dz .pz-b64-sym code, body.dz .pz-b64-read code { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; }
body.dz .pz-b64-sym.pad { border-style: dashed; color: var(--muted); cursor: default; }
body.dz .pz-b64-sym.open { cursor: default; }
body.dz .pz-b64-read.open { cursor: default; border-color: var(--ok); }
body.dz .pz-b64-read.open b { font-size: 22px; color: var(--ok); line-height: 1.1; }
/* one color per source symbol, so the regrouped bits show where each came from */
body.dz .pz-b64 .c0 { --bc: #1F56C4; } body.dz .pz-b64 .c1 { --bc: #1F7A4D; } body.dz .pz-b64 .c2 { --bc: #9A5A06; } body.dz .pz-b64 .c3 { --bc: #7A3E9D; }
body.dz .pz-b64-sym.open { border-color: var(--bc); } body.dz .pz-b64-sym.open b, body.dz .pz-b64-sym.open code { color: var(--bc); }
body.dz .pz-b64-bits, body.dz .pz-b64-byte, body.dz .pz-b64-spare { font-size: 14px; letter-spacing: .04em; }
body.dz .pz-b64-bits i, body.dz .pz-b64-byte i, body.dz .pz-b64-spare i { font-style: normal; color: var(--bc, var(--ink)); font-weight: 600; }
body.dz .pz-b64-bits { padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; animation: b6In .3s ease; }
body.dz .pz-b64-cut { display: flex; flex-wrap: wrap; gap: 6px; animation: b6In .35s ease .1s both; }
body.dz .pz-b64-byte { padding: 5px 8px; border-radius: 6px; background: var(--surface); border: 1.5px solid var(--ink); }
body.dz .pz-b64-spare { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; border: 1px dashed var(--line-2); opacity: .7; text-decoration: line-through; }
body.dz .pz-b64-spare small { text-decoration: none; font-size: 11px; color: var(--muted); font-family: var(--body, inherit); }
@keyframes b6In { from { opacity: 0; transform: translateY(-4px); } }
body.dz .pz-b64-out { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.dz .pz-b64-out .label { margin: 0; }
body.dz .pz-b64-out output { font-size: 20px; letter-spacing: .08em; }
body.dz .pz-b64-out .got { color: var(--ink); font-weight: 600; } body.dz .pz-b64-out .todo { color: var(--faint, #8A9A90); }
body.dz .pz-b64-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.dz .pz-b64-ref summary { font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
body.dz .pz-b64-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
body.dz .pz-b64-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; margin-top: 4px; }
body.dz .pz-b64-grid span { display: flex; flex-direction: column; align-items: center; padding: 3px 0; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
body.dz .pz-b64-grid span b { font-size: 12.5px; color: var(--ink); }
body.dz .pz-b64-grid span.on { background: var(--ink); border-color: var(--ink); color: #fff; } body.dz .pz-b64-grid span.on b { color: #fff; }
body.dz .pz-pad-wait { margin: 0; padding: 8px 2px; }
@media (max-width: 600px) { body.dz .pz-b64-sym, body.dz .pz-b64-read { min-width: 62px; } body.dz .pz-b64-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { body.dz .pz-b64-bits, body.dz .pz-b64-cut { animation: none; } }
/* v5.7.2 Base64 kit: the player types numbers, flips bit switches and types letters */
body.dz .pz-b64-g .pz-b64-gck { display: none; } body.dz .pz-b64-g.done .pz-b64-gck { display: inline-flex; }
body.dz label.pz-b64-sym { cursor: default; }
body.dz .pz-b64-sym input.b6-num, body.dz .pz-b64-read input.b6-ch { width: 52px; height: 36px; box-sizing: border-box; padding: 0; text-align: center; font-size: 17px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; }
body.dz .pz-b64-sym input.b6-num:focus, body.dz .pz-b64-read input.b6-ch:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
body.dz label.pz-b64-sym { border-color: var(--bc); } body.dz label.pz-b64-sym > b { color: var(--bc); }
body.dz .pz-b64-sws { display: flex; flex-direction: column; gap: 8px; }
body.dz .pz-b64-sw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.dz .pz-b64-swl { width: 22px; font-size: 20px; font-weight: 700; color: var(--bc); text-align: center; }
body.dz .pz-b64-bitrow { display: inline-flex; gap: 4px; }
body.dz .pz-b64-bit { width: 38px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); font: inherit; color: var(--muted); cursor: pointer; }
body.dz .pz-b64-bit b { font-family: var(--mono); font-size: 17px; line-height: 1; }
body.dz .pz-b64-bit small { font-family: var(--mono); font-size: 10px; }
body.dz .pz-b64-bit:hover { border-color: var(--ink); }
body.dz .pz-b64-bit.on { background: var(--bc); border-color: var(--bc); color: #fff; }
body.dz .pz-b64-sum { display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; }
body.dz .pz-b64-sum b { font-size: 17px; } body.dz .pz-b64-sum small { font-family: var(--body, inherit); font-size: 12px; color: var(--muted); }
body.dz .pz-b64-sum small.ok { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
body.dz .pz-b64-cut .pz-b64-byte { display: inline-flex; align-items: baseline; gap: 6px; }
body.dz .pz-b64-cut .pz-b64-byte small { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
body.dz .pz-b64-spare { text-decoration: none; }
body.dz label.pz-b64-read { cursor: default; min-width: 70px; border-color: var(--line-2); }
body.dz label.pz-b64-read small { font-family: var(--mono); font-size: 13px; color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { body.dz .pz-b64-bit { width: 34px; height: 44px; } body.dz .pz-b64-sum { flex-basis: 100%; padding-left: 32px; } }

/* ---- v5.8 Layout A: an unsolved puzzle as 1 Scenario / 2 Evidence / 3 Your call (app.js qaLayout) ----
   Scenario is a white band across the top, Evidence a dark exhibit panel (a log reads straight off it; an email, a table
   or an interactive replay sits on paper inside it), Your call the ink-bordered answer card. Phones stack them in order. */
body.dz .card.puzzle.wb.qa { gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "rail" "scen" "left" "right"; }
body.dz .card.puzzle.wb.qa.noev { grid-template-areas: "rail" "scen" "right"; }
body.dz .wb.qa .pz-rail.pz-bar { border-radius: 12px; padding-top: 8px; padding-bottom: 8px; }
body.dz .wb.qa .pz-pane { border-radius: 12px; }
body.dz .wb.qa .qa-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink); margin: 0; }
body.dz .wb.qa .qa-n { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; letter-spacing: 0; }
body.dz .wb.qa .qa-h small { font-family: var(--body); font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }

body.dz .wb.qa .qa-scen { grid-area: scen; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 28px; padding: 14px 22px 16px; background: var(--surface); border: 1px solid var(--line); }
body.dz .wb.qa .qa-scen-l, body.dz .wb.qa .qa-scen-r { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
body.dz .wb.qa .qa-scen h2 { font-size: clamp(24px, 2.1vw, 30px); line-height: 1.05; }
body.dz .wb.qa .qa-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
body.dz .wb.qa .qa-meta span { display: inline-flex; align-items: center; gap: 6px; }
body.dz .wb.qa .qa-meta svg { color: var(--muted); flex: none; }
body.dz .wb.qa .qa-sit, body.dz .wb.qa .qa-sit p { font-size: 16px; line-height: 1.55; color: var(--ink); margin: 0; }

body.dz .wb.qa .pz-pane.left.qa-left { grid-area: left; background: transparent; border: 0; padding: 0; gap: 14px; }
body.dz .wb.qa .qa-ev { flex: 1 0 auto; display: flex; flex-direction: column; background: var(--ink); color: #E6EEE9; border-radius: 12px; overflow: hidden; }
body.dz .wb.qa .qa-ev-h { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 13px 18px; background: color-mix(in srgb, var(--ink) 86%, #fff); border-bottom: 1px solid rgba(255, 255, 255, .08); }
body.dz .wb.qa .qa-ev .qa-h { color: #fff; }
body.dz .wb.qa .qa-ev .qa-n { background: #E6EEE9; color: var(--ink); }
body.dz .wb.qa .qa-ev .qa-h small { color: #B5C7BC; }
body.dz .wb.qa .qa-ev-cap { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: #D3E0D8; }
body.dz .wb.qa .qa-ev-b { flex: 1 0 auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
body.dz .wb.qa .qa-ev.is-log .wrap-x { background: transparent; border: 0; padding: 0; overflow: visible; }
body.dz .wb.qa .qa-ev.is-log .wrap-x pre { color: #E6EEE9; background: transparent; border: 0; border-radius: 0; padding: 0; font-size: 13.5px; line-height: 1.55; margin: 0; }
body.dz .wb.qa .qa-ev.is-log pre.mono.lines .ln { padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
body.dz .wb.qa .qa-ev.is-log pre.mono.lines .ln + .ln { margin-top: 0; }
body.dz .wb.qa .qa-ev.is-log pre.mono.lines .ln:last-child { border-bottom: 0; }
/* anything that isn't a plain log (an email, a table, a replay skin) sits on a paper sheet inside the dark panel */
body.dz .wb.qa .qa-ev:not(.is-log) .qa-ev-b, body.dz .wb.qa .qa-ev.is-log:has(.sk) .qa-ev-b { background: var(--paper); color: var(--ink); margin: 10px; padding: 14px; border-radius: 8px; }
body.dz .wb.qa .qa-ev.is-log:has(.sk) .wrap-x { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; }
body.dz .wb.qa .qa-ev.is-log:has(.sk) .wrap-x pre { color: var(--ink); }
body.dz .wb.qa .qa-ev.is-log:has(.sk) pre.mono.lines .ln { border-bottom-color: var(--line); }
body.dz .wb.qa .qa-ev .sk-plain, body.dz .wb.qa .qa-ev .sk-back { align-self: flex-start; }

body.dz .wb.qa .pz-pane.right.qa-call { grid-area: right; background: var(--surface); border: 2px solid var(--ink); padding: 16px 22px 18px; gap: 10px; }
body.dz .wb.qa .qa-call .prompt, body.dz .wb.qa .qa-call .prompt p { font-size: 17px; font-weight: 600; line-height: 1.42; }
body.dz .wb.qa .qa-call .opts-help, body.dz .wb.qa .qa-call .order-help { margin: 0; }
body.dz .wb.qa .qa-call .opts { gap: 6px; }
body.dz .wb.qa .qa-call .opts .opt { padding: 9px 14px 9px 50px; font-size: 15px; line-height: 1.4; border-radius: 8px; }
body.dz .wb.qa .qa-call .opts .opt::before { left: 14px; top: 9px; }
body.dz .wb.qa .qa-call .opts .opt.multi::before { left: 16px; top: 11px; width: 20px; height: 20px; }
body.dz .wb.qa .qa-call .opts .opt .ordn { left: 14px; top: 9px; }
body.dz .wb.qa .qa-call .actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
body.dz .wb.qa .qa-call .actions #submit { flex: 1 1 auto; min-height: 48px; }
body.dz .wb.qa .qa-call .actions .meta { flex-basis: 100%; margin-left: 0; text-align: center; }

@media (min-width: 1101px) {
  body.dz .card.puzzle.wb.qa { grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "rail rail" "scen scen" "left right"; gap: 12px 16px; }
  /* v5.11: no evidence -> the scenario is the band across the top (like every other puzzle) and the answer takes the full
     width below, instead of a scenario column that was mostly empty (WW The Playbook) */
  body.dz .card.puzzle.wb.qa.noev { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, auto); align-content: start; grid-template-areas: "rail" "scen" "right"; }
  body.dz .wb.qa .qa-scen { grid-template-columns: minmax(260px, 390px) minmax(0, 1fr); align-items: start; }
  body.dz .wb.qa.fit .pz-pane.left, body.dz .wb.qa.fit .pz-pane.right, body.dz .wb.qa.fit.noev .qa-scen { overflow: auto; min-height: 0; }
  /* v5.9.5: the panes scroll; nothing inside them may be squeezed (a skin like the account cleanup card clips its own
     overflow, so on a short window it shrank to its header and the Keep/Remove rows vanished) */
  body.dz .wb.qa.fit .pz-pane.left > *, body.dz .wb.qa.fit .pz-pane.right > * { flex-shrink: 0; }
  body.dz .wb.qa .qa-call .sk-acct-h { padding: 9px 14px; }
  body.dz .wb.qa .qa-call .sk-acct-sec { padding: 7px 14px 1px; }
  body.dz .wb.qa .qa-call .sk-acct-row { padding: 5px 0; }
  body.dz .wb.qa.fit .qa-call .sk-acct-f { display: none; } /* each row already shows Keep/Remove; Submit sits right below */
  /* Submit stays in view at the foot of the answer card; a long answer list scrolls above it */
  body.dz .wb.qa.fit .qa-call .actions { position: sticky; bottom: -18px; z-index: 3; background: var(--surface); margin: auto -22px -18px; padding: 12px 22px 16px; }
  body.dz .wb.qa.fit .qa-call .actions ~ * { position: relative; z-index: 1; }
}
@media (max-width: 700px) {
  body.dz .wb.qa .qa-scen { padding: 16px; }
  body.dz .wb.qa .pz-pane.right.qa-call { padding: 18px 16px; }
  body.dz .wb.qa .qa-ev-cap { margin-left: 0; flex-basis: 100%; }
  body.dz .wb.qa .qa-ev-b { padding: 14px; }
  body.dz .wb.qa .qa-call .actions .meta { text-align: left; }
}

/* ---- v5.9 decoder kit drawer (kit.js, design K2): a launcher card in the page, a pull-out drawer on <body> ----
   Left: "How it works" lookup tables (orange = learning); right: the kit's steps. Phones: full-screen, tables fold. */
html.kd-lock, html.kd-lock body { overflow: hidden; }
body.dz .kd-root { position: fixed; inset: 0; z-index: 9993; }
body.dz .kd-root[hidden] { display: none; }
body.dz .kd-scrim { position: absolute; inset: 0; background: rgba(22, 36, 29, .42); animation: kdFade .2s ease-out; }
body.dz .kd { position: absolute; top: 0; right: 0; bottom: 0; width: min(920px, calc(100vw - 120px)); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2); color: var(--ink); animation: kdIn .24s cubic-bezier(.2, .8, .2, 1); }
body.dz .kd-root.instant .kd, body.dz .kd-root.instant .kd-scrim { animation: none; }
@keyframes kdIn { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kdFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.dz .kd, body.dz .kd-scrim { animation: none; } }
body.dz .kd-h { display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 22px; border-bottom: 1px solid var(--line); flex: none; }
body.dz .kd-h > svg { font-size: 20px; flex: none; }
body.dz .kd-ht { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
body.dz .kd-ht b { font-size: 17px; line-height: 1.25; }
body.dz .kd-ht span { font-size: 12.5px; color: var(--muted); }
body.dz .kd-src { flex: none; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 13.5px; letter-spacing: .05em; }
body.dz .kd-x { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px; }
body.dz .kd-x:hover { border-color: var(--ink); }
body.dz .kd-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
body.dz .kd-guide { min-height: 0; overflow: auto; background: #FCF6F1; border-right: 1px solid #EFDCCB; padding: 18px 18px 24px; }
body.dz .kd-gt { display: none; }
body.dz .kd-gh { display: flex; align-items: center; gap: 8px; color: var(--learn-ink); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin-bottom: 12px; }
body.dz .kd-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
body.dz .kd-tabs button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--learn-edge); background: var(--surface); color: var(--learn-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
body.dz .kd-tabs button:hover { border-color: var(--learn-ink); }
body.dz .kd-tabs button.on { background: var(--learn-ink); border-color: var(--learn-ink); color: #fff; }
body.dz .kd-pane { display: flex; flex-direction: column; gap: 10px; }
body.dz .kd-pane[hidden] { display: none; }
body.dz .kd-pane p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
body.dz .kd-pane h5 { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }
body.dz .kd-pane h5 span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--learn-ink); margin-left: 4px; }
body.dz .kd-pane .kd-mono { font-family: var(--mono); font-size: 12.5px; color: var(--learn-ink); line-height: 1.6; }
body.dz .kd-pane .kd-note { font-size: 12.5px; color: var(--ink-2); padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--learn-edge); }
body.dz .kd-cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
body.dz .kd-cells.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.dz .kd-cells.pv { grid-template-columns: repeat(6, minmax(0, 1fr)); }
body.dz .kd-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 34px; padding: 2px 0; border: 1px solid #E7D3C2; border-radius: 5px; background: var(--surface); font-family: var(--mono); line-height: 1.1; }
body.dz .kd-cell b { font-size: 13px; color: var(--ink); }
body.dz .kd-cell small { font-size: 10px; color: var(--learn-ink); }
body.dz .kd-cell.pad { border-style: dashed; }
body.dz .kd-bars { display: flex; flex-direction: column; gap: 4px; }
body.dz .kd-bars div { display: flex; gap: 3px; }
body.dz .kd-bars span { flex: 1; display: grid; place-items: center; height: 26px; border-radius: 4px; color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 600; }
body.dz .kd-bars .c0 { background: #1F56C4; } body.dz .kd-bars .c1 { background: #1F7A4D; } body.dz .kd-bars .c2 { background: #9A5A06; } body.dz .kd-bars .c3 { background: #7A3E9D; } body.dz .kd-bars .ink { background: var(--ink); }
/* the work area reuses the kit's own .pz-* styles; drop the old in-page card frame */
body.dz .kd .kd-work.pz-tool { margin: 0; border: 0; border-radius: 0; background: var(--surface); padding: 18px 24px 28px; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 22px; }
body.dz .kd-sec { display: flex; flex-direction: column; gap: 10px; }
body.dz .kd-work.chain .kd-sec + .kd-sec { padding-top: 20px; border-top: 1px dashed var(--line-2); }
body.dz .kd-step { display: flex; align-items: center; gap: 10px; }
body.dz .kd-step b { font-size: 15px; }
body.dz .kd-sn { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 12.5px; font-weight: 600; flex: none; }
body.dz .kd .pz-b64-work { background: var(--sunk, #F2F5F3); padding: 14px; }
body.dz .kd .kd-bar { position: sticky; bottom: -28px; z-index: 2; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; background: var(--surface); margin: 0 -24px -28px; padding: 12px 24px 16px; border-top: 1px solid var(--line); }
body.dz .kd .kd-bar .pz-b64-out { margin-right: auto; }
body.dz .kd .kd-work.chain .kd-bar { position: static; margin: 0; padding: 10px 0 0; }
body.dz .kd-wait[hidden], body.dz .kd-live[hidden] { display: none; }
body.dz .kd-live { display: flex; flex-direction: column; gap: 8px; }
body.dz .kd-wait { padding: 12px 14px; border-radius: 8px; border: 1px dashed var(--line-2); }

/* the launcher card in the page (evidence column, or the module's right column) */
body.dz .kd-launch { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
body.dz .kd-lh { display: flex; align-items: center; gap: 10px; }
body.dz .kd-lh > svg { font-size: 20px; flex: none; }
body.dz .kd-lh div { display: flex; flex-direction: column; gap: 1px; }
body.dz .kd-lh b { font-size: 16px; }
body.dz .kd-lh span { font-size: 13px; color: var(--muted); }
body.dz .kd-ld { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
body.dz .kd-lrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.dz .kd-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 7px; font-size: 15px; letter-spacing: .08em; color: var(--muted); background: var(--surface); }
body.dz .kd-chip i { font-style: normal; font-weight: 600; }
body.dz .kd-chip .c0 { color: #1F56C4; } body.dz .kd-chip .c1 { color: #1F7A4D; } body.dz .kd-chip .c2 { color: #9A5A06; } body.dz .kd-chip .c3 { color: #7A3E9D; }
body.dz .kd-chip.more { letter-spacing: 0; font-size: 13px; }
body.dz .kd-lprog { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
body.dz .kd-lout { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 9px; background: var(--sunk, #F2F5F3); min-width: 0; }
body.dz .kd-lout .label { margin: 0; flex: none; }
body.dz .kd-lout output { font-size: 17px; letter-spacing: .12em; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
body.dz .kd-dots { color: var(--faint, #8A9A90); font-weight: 400; }
body.dz .kd-launch .btn.kd-open { min-height: 48px; justify-content: center; gap: 10px; border: 0; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; }
body.dz .kd-launch .btn.kd-open:hover { background: color-mix(in srgb, var(--ink) 86%, #fff); }
body.dz .wb.qa .qa-left .pz-kit-host { flex: none; }
body.dz .wb.qa .qa-left.has-kit .qa-ev { flex: 0 0 auto; }
body.dz .wb.qa .qa-ev.is-code .wrap-x pre { font-size: 24px; font-weight: 600; letter-spacing: .06em; color: #fff; }
body.dz .cc.cc-haskit { align-items: start; }

/* hex kit (c3p4 "When It Fires": hex -> Base64 -> shift) */
body.dz .pz-hex { display: flex; flex-direction: column; gap: 8px; }
body.dz .pz-hex .c0 { --bc: #1F56C4; } body.dz .pz-hex .c1 { --bc: #1F7A4D; } body.dz .pz-hex .c2 { --bc: #9A5A06; } body.dz .pz-hex .c3 { --bc: #7A3E9D; }
body.dz .pz-hex-pairs, body.dz .pz-hex-make { display: flex; flex-wrap: wrap; gap: 8px; }
body.dz .pz-hex-pair { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; border: 1.5px solid var(--bc); border-radius: 9px; background: var(--surface); }
body.dz .pz-hex-pair > b { font-size: 22px; letter-spacing: .2em; color: var(--bc); line-height: 1.1; }
body.dz .pz-hex-pair > span { display: flex; gap: 4px; }
body.dz .pz-hex-pair input.hx-num, body.dz .pz-b64-read input.hx-ch { width: 44px; height: 36px; box-sizing: border-box; padding: 0; text-align: center; font-size: 17px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; }
body.dz .pz-b64-read input.hx-ch { width: 52px; }
body.dz .pz-hex-pair input.hx-num:focus, body.dz .pz-b64-read input.hx-ch:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
body.dz .pz-hex-make .pz-b64-byte { border-color: var(--bc); font-size: 14px; }
body.dz .pz-hex-make .pz-b64-byte b { font-size: 15px; }

@media (max-width: 900px) {
  body.dz .kd { width: 100vw; border-left: 0; }
  body.dz .kd-h { padding: 10px 12px 10px 16px; gap: 10px; }
  body.dz .kd-src { display: none; }
  body.dz .kd-ht span { display: none; }
  body.dz .kd-body { display: block; overflow: auto; }
  body.dz .kd-guide { overflow: visible; border-right: 0; border-bottom: 1px solid #EFDCCB; padding: 10px 16px; }
  body.dz .kd-gt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--learn-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  body.dz .kd-gt > svg:last-child { margin-left: auto; transition: transform .2s; }
  body.dz .kd-guide.open .kd-gt > svg:last-child { transform: rotate(180deg); }
  body.dz .kd-gb { display: none; padding: 6px 0 12px; }
  body.dz .kd-guide.open .kd-gb { display: block; }
  body.dz .kd-gh { display: none; }
  body.dz .kd .kd-work.pz-tool { overflow: visible; padding: 16px 16px 28px; }
  body.dz .kd .kd-bar { margin: 0 -16px -28px; padding: 10px 16px 14px; bottom: 0; }
  body.dz .kd-cells { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}
/* v5.9.1: a byte waits until every symbol it takes bits from is set; each step links to its table */
body.dz .pz-b64-byte.wait { border-style: dashed; border-color: var(--line-2); }
body.dz .pz-b64-byte.wait i { opacity: .45; }
body.dz .pz-b64-byte.wait small { color: var(--muted); font-family: var(--body); font-size: 11.5px; }
body.dz .kd-see { display: inline; padding: 0; border: 0; background: none; font: inherit; font-size: inherit; font-weight: 600; color: var(--learn-ink); text-decoration: underline; text-decoration-color: var(--learn-edge); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
body.dz .kd-see:hover { text-decoration-color: var(--learn-ink); }
/* v5.9.3: group cards (which letters came from which group), letter self-checks, the next-group row */
body.dz .kd .pz-b64-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
body.dz .kd-grp { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
body.dz .kd-grp:hover { border-color: var(--ink); }
body.dz .kd-grp.on { border: 2px solid var(--ink); padding: 7px 11px; }
body.dz .kd-grp-n { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
body.dz .kd-grp.ok .kd-grp-n { color: var(--ok, #1F7A4D); }
body.dz .kd-grp-warn { font-style: normal; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: #FDF1DE; color: #7A4604; }
body.dz .kd-grp-s { font-size: 15px; font-weight: 600; letter-spacing: .08em; }
body.dz .kd-grp-l { font-size: 15px; letter-spacing: .22em; color: var(--ink); }
body.dz .kd-grp.ok { background: var(--green-tint, #E5F2EB); border-color: #9CCDB2; }
body.dz .kd-grp.ok.on { border-color: var(--ink); }
body.dz .kd-grp.chk { border-color: #D6B27A; }
body.dz .kd-grp.chk.on { border-color: var(--ink); }
body.dz .kd-chk { min-height: 15px; font-family: var(--body) !important; font-size: 11px !important; line-height: 1.25; text-align: center; max-width: 96px; }
body.dz .kd-chk .ok { color: var(--ok, #1F7A4D); display: inline-flex; align-items: center; gap: 3px; }
body.dz .kd-chk .no { color: #7A4604; }
body.dz .kd-hold { margin: 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 13px; color: var(--muted); }
body.dz .kd-next { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 4px; padding: 10px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
body.dz .kd-next b { letter-spacing: .12em; }
body.dz .kd-next-host:empty { display: none; }
body.dz .kd-next-b { margin-left: auto; min-height: 38px; gap: 8px; border: 0; background: var(--ink); color: #fff; font-weight: 600; }
body.dz .kd .pz-b64-out output .kd-sep { display: inline-block; width: 1px; height: 18px; margin: 0 8px; vertical-align: middle; background: var(--line-2); }
body.dz .kd .pz-b64-out output .cur { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
body.dz .kd .pz-hex .pz-b64-groups { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
body.dz .pz-hex .kd-grp-s { white-space: nowrap; font-size: 14px; letter-spacing: .04em; }
/* v5.9.4: the full printable ASCII table; a byte outside 32–126 says so */
body.dz .kd-cells.sym .kd-cell b { font-size: 14px; }
body.dz .pz-hex-make .pz-b64-byte.off { border-color: #D6B27A; background: #FDF6EA; }
body.dz .kd-chk .no { display: block; max-width: 120px; }
body.dz .pz-b64-read:has(.kd-chk .no) { max-width: 150px; }
body.dz .kd-range { margin: 2px 0 0; padding: 8px 12px; border-radius: 8px; background: #FDF6EA; border: 1px solid #EBCB94; color: #6A3D03; font-size: 13px; line-height: 1.45; }
body.dz .kd-range-host:empty { display: none; }

/* ===================================================================================================================
   v5.10 case finale (vault.js): the last call in the evidence slot, the tumblers in the answer pane
   =================================================================================================================== */
body.dz .qa-vc { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 16px 20px 18px; }
body.dz .pz-vcall-host { display: block; }
body.dz .vc { display: flex; flex-direction: column; gap: 10px; }
body.dz .vc-card { background: #16241D; color: #E6EEE9; border-radius: 10px; padding: 14px 16px; }
body.dz .vc-who { display: flex; align-items: center; gap: 12px; }
body.dz .vc-ph { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #2D3B34; color: #9FE0BC; display: grid; place-items: center; }
body.dz .vc-id { display: flex; flex-direction: column; min-width: 0; }
body.dz .vc-id b { font-size: 15px; color: #FFFFFF; }
body.dz .vc-id small { font-family: var(--mono); font-size: 12px; color: #B5C7BC; }
body.dz .vc-state { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: #9FE0BC; }
body.dz .vc-state.live i { width: 8px; height: 8px; border-radius: 50%; background: #9FE0BC; animation: vcPulse 1.4s ease-in-out infinite; }
@keyframes vcPulse { 50% { opacity: .25; } }
body.dz .vc-q { margin: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: #E6EEE9; }
body.dz .vc-beats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.dz .vc-beat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
body.dz .vc-beat.cur { border: 2px solid var(--ink); padding: 11px 13px; }
body.dz .vc-beat.lock { background: var(--sunk); }
body.dz .vc-bh { display: flex; align-items: flex-start; gap: 10px; }
body.dz .vc-bn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; background: var(--ink); color: #FFFFFF; }
body.dz .vc-beat.done .vc-bn { background: var(--ok); }
body.dz .vc-beat.lock .vc-bn { background: var(--line); color: var(--muted); }
body.dz .vc-bl { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
body.dz .vc-beat.done .vc-bl { color: var(--ok); }
body.dz .vc-beat.lock .vc-bl { color: var(--muted); }
body.dz .vc-opts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0 34px; }
body.dz .vc-opt { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; }
body.dz .vc-opt:hover:not([disabled]) { border-color: var(--ink); }
body.dz .vc-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
body.dz .vc-opt.no { border-color: var(--learn-edge); background: var(--learn-tint); color: var(--learn-ink); cursor: default; }
body.dz .vc-x { flex: none; display: inline-flex; margin-top: 2px; }
body.dz .vc-why { margin: 0 0 4px; font-size: 13px; line-height: 1.45; }
body.dz .vc-why p, body.dz .vc-end p { margin: 0; }
body.dz .vc-why.no { color: var(--learn-ink); padding: 0 4px; }
body.dz .vc-why.ok { color: var(--muted); margin: 6px 0 0 34px; }
body.dz .vc-got { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 34px; padding: 6px 10px; border-radius: 7px; background: var(--green-tint); border: 1px solid #7CC29C; color: #17603C; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
body.dz .vc-got svg { flex: none; }
body.dz .vc-end { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--green-tint); border: 1px solid #7CC29C; color: #17603C; font-size: 14px; line-height: 1.45; }
body.dz .vc-end svg { flex: none; margin-top: 1px; }

body.dz .vt { display: flex; flex-direction: column; gap: 8px; background: #0F1216; color: #E6EEE9; border-radius: 12px; padding: 12px; }
body.dz .vt-row { display: flex; justify-content: center; gap: 8px; padding: 10px 8px 8px; border: 1px solid #2D3B34; border-radius: 12px; background: #141A17; }
body.dz .vt-t { flex: 1 1 0; min-width: 0; max-width: 78px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
body.dz .vt-b { width: 44px; max-width: 100%; height: 30px; border-radius: 7px; border: 1px solid #3E4E46; background: #1B2621; color: #D3E0D8; display: grid; place-items: center; cursor: pointer; padding: 0; }
body.dz .vt-b:hover:not([disabled]) { background: #24332C; color: #FFFFFF; }
body.dz .vt-b[disabled] { opacity: .35; cursor: default; }
body.dz .vt-b:focus-visible, body.dz .vt-drum:focus-visible, body.dz .vt-name:focus-visible, body.dz .vt-read-x:focus-visible { outline: 2px solid #9FE0BC; outline-offset: 2px; }
body.dz .vt-drum { position: relative; width: 100%; height: 116px; box-sizing: border-box; border: 1px solid #3E4E46; border-radius: 10px; background: #1B2621; overflow: hidden; display: flex; flex-direction: column; justify-content: center; cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
body.dz .vt-cells { display: flex; flex-direction: column; align-items: stretch; }
body.dz .vt-cells.roll-up { animation: vtUp .18s ease-out; }
body.dz .vt-cells.roll-dn { animation: vtDn .18s ease-out; }
@keyframes vtUp { from { transform: translateY(16px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes vtDn { from { transform: translateY(-16px); opacity: .5; } to { transform: none; opacity: 1; } }
body.dz .vt-c { height: 28px; display: grid; place-items: center; font-family: var(--mono); font-size: 19px; font-weight: 600; color: #FFFFFF; opacity: .32; }
body.dz .vt-c.mid { height: 56px; font-size: 34px; opacity: 1; }
body.dz .vt-lens { position: absolute; left: 3px; right: 3px; top: 50%; height: 56px; margin-top: -28px; box-sizing: border-box; border: 2px solid #3E4E46; border-radius: 8px; pointer-events: none; }
body.dz .vt-t.on .vt-lens { border-color: #9FE0BC; }
body.dz .vt-t.lk .vt-drum { cursor: default; place-items: center; background: #161D1A; border-style: dashed; }
body.dz .vt-lock { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #B5C7BC; text-align: center; }
body.dz .vt-lock small { font-size: 11.5px; line-height: 1.3; }
body.dz .vt-f { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #9FB2A6; white-space: nowrap; }
body.dz .vt-name { background: none; border: 0; padding: 2px; color: #D3E0D8; font: inherit; font-size: 12px; line-height: 1.3; text-align: center; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; max-width: 100%; }
body.dz .vt-name:hover, body.dz .vt-name.on { color: #9FE0BC; }
body.dz .vt-read { background: #1B2621; border: 1px solid #2D3B34; border-radius: 10px; padding: 10px 14px 12px; font-size: 13.5px; line-height: 1.5; color: #E6EEE9; }
body.dz .vt-read-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
body.dz .vt-read-h b { font-size: 13px; color: #FFFFFF; }
body.dz .vt-read-x { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #D3E0D8; display: grid; place-items: center; cursor: pointer; }
body.dz .vt-read .rt, body.dz .vt-read .rt p { margin: 0; color: #E6EEE9; }
body.dz .vt-read .rt strong, body.dz .vt-read .rt b { color: #9FE0BC; }
body.dz .vt-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 7px 12px; border-radius: 9px; background: #1B2621; font-size: 13px; line-height: 1.45; color: #D3E0D8; }
body.dz .vt-note svg { flex: none; margin-top: 2px; }
body.dz .vt-status { margin: 0; font-family: var(--mono); font-size: 12px; color: #9FB2A6; }
body.dz .vt-status b { color: #FFFFFF; font-weight: 600; }
@media (min-width: 1101px) {
  body.dz .card.puzzle.wb.qa.vaultq:not(.noev) { grid-template-columns: minmax(0, 1fr) minmax(440px, 520px); }
  body.dz .card.puzzle.wb.qa.vaultq.noev .qa-vault { max-width: 640px; width: 100%; justify-self: center; }
}
@media (max-width: 700px) {
  body.dz .qa-vc { padding: 14px 14px 16px; }
  body.dz .vc-opts, body.dz .vc-why.ok, body.dz .vc-got { margin-left: 0; }
  body.dz .vt { padding: 10px; }
  body.dz .vt-row { gap: 5px; padding: 10px 4px 8px; }
  body.dz .vt-drum { height: 112px; }
  body.dz .vt-c.mid { font-size: 30px; }
  body.dz .vt-name { font-size: 11px; }
  body.dz .vt-f { font-size: 9.5px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) {
  body.dz .vt-cells.roll-up, body.dz .vt-cells.roll-dn, body.dz .vc-state.live i { animation: none; }
}

/* ===================================================================================================================
   v5.11 finales are games (no Submit): the run's outcome line, and the threat-hunt TEST QUERY button
   =================================================================================================================== */
body.dz .fb.fin-res { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
body.dz .fb.fin-res .fin-res-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; }
body.dz .fb.fin-res.none { background: var(--learn-tint); border-color: var(--learn-edge); color: var(--learn-ink); }
body.dz .fb.fin-res.busy { color: var(--muted); }
body.dz .qb-actions { align-items: center; }
body.dz .btn.qb-run, body.dz .btn.qb-run:hover { background: #B42318; border-color: #B42318; color: #FFFFFF; }
body.dz .btn.qb-run { min-height: 44px; padding: 0 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 0 0 3px rgba(180, 35, 24, .16); }
body.dz .btn.qb-run:hover { background: #912018; border-color: #912018; }
body.dz .btn.qb-run:focus-visible { outline: 2px solid #912018; outline-offset: 3px; }
body.dz .s2-earn { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 4px; padding: 10px 14px; border-radius: 9px; font-size: 13.5px; line-height: 1.4; }
body.dz .s2-earn b { font-size: 15px; }
body.dz .s2-earn.ok { background: var(--green-tint); border: 1px solid #7CC29C; color: #17603C; }
body.dz .s2-earn.bad { background: var(--learn-tint); border: 1px solid var(--learn-edge); color: var(--learn-ink); }
body.dz .s2-more { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
body.dz .btn.qb-run:not(.primary):not(.dz-btn-dark), body.dz .btn.qb-run:not(.primary):not(.dz-btn-dark):focus { background: #B42318; border-color: #B42318; color: #FFFFFF; }
body.dz .btn.qb-run:not(.primary):not(.dz-btn-dark):hover, body.dz .btn.qb-run:not(.primary):not(.dz-btn-dark):active { background: #912018; border-color: #912018; color: #FFFFFF; }
/* the module status line was colored for the old dark theme (light text); on Sage's light surfaces it needs dark text */
body.dz .netmap-status.ok { color: #17603C; }
body.dz .netmap-status.warn { color: #7A4604; }
body.dz .netmap-status.bad { color: #A8322A; }

/* v5.11 field guide: 25% wider (400 -> 500 px), a "What you can check now" tab, and the reading-points line */
body.dz .guide-panel { width: min(500px, 100vw); }
body.dz .guide-body { font-size: 15px; }
body.dz .guide-tabs .gt { flex: 1 1 auto; }
body.dz .g-pts { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: var(--learn-tint); border: 1px solid var(--learn-edge); color: var(--learn-ink); font-size: 13.5px; line-height: 1.45; }
body.dz .g-pts svg { flex: none; margin-top: 2px; color: var(--learn); }
body.dz .g-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
body.dz .g-check .g-where, body.dz .g-check .g-then { margin: 8px 0; line-height: 1.5; }
body.dz .g-check .label { display: block; margin-bottom: 2px; }
body.dz .g-check .g-where { padding: 8px 10px; border-radius: 7px; background: var(--sunk); font-size: 14px; }
body.dz .g-look { margin: 4px 0 8px; padding-left: 20px; line-height: 1.5; }
body.dz .g-look li + li { margin-top: 4px; }

/* v5.11 solved review of an order puzzle: the step number sat on top of the first letters (review rows lost the padding) */
body.dz .opts.review .opt.ordered { padding-left: 56px; }
body.dz .opts.review .opt.ordered .ordn { top: 50%; margin-top: -13px; }
@media (min-width: 1101px) {
  /* a full-width timeline: the move buttons sit side by side, so each step is one short row */
  body.dz .wb.qa.noev .sk-step { min-height: 44px; padding: 5px 8px 5px 0; }
  body.dz .wb.qa.noev .sk-mv { flex-direction: row; gap: 6px; }
  body.dz .wb.qa.noev .sk-mv button { width: 34px; height: 30px; }
  body.dz .wb.qa.noev .sk-txt { font-size: 14.5px; }
}

/* v5.11 · The Tell: a bold lead line, then the components as scannable rows (bullets) or numbered steps */
body.dz .wt-tell > p:first-child strong:first-child { font-weight: 800; }
body.dz .wt-tell ul, body.dz .wt-tell ol { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 8px; counter-reset: wtn; }
body.dz .wt-tell ul:last-child, body.dz .wt-tell ol:last-child { margin-bottom: 0; }
body.dz .wt-tell li { position: relative; margin: 0; padding: 10px 14px 10px 40px; font-size: 16.5px; line-height: 1.5; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; }
body.dz .wt-tell ul > li::before { content: ""; position: absolute; left: 17px; top: calc(10px + 0.75em - 4px); width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
body.dz .wt-tell ol > li { counter-increment: wtn; }
body.dz .wt-tell ol > li::before { content: counter(wtn); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red-ink); font-size: 12.5px; font-weight: 700; line-height: 19px; text-align: center; font-family: var(--mono, inherit); }
body.dz .wt-tell li strong { font-weight: 700; }
body.dz .debrief .db-part .rt ol { margin: 4px 0 0; padding-left: 22px; } body.dz .debrief .db-part .rt ol li { margin: 3px 0; }
@media (max-width: 640px) { body.dz .wt-tell li { font-size: 15.5px; padding: 9px 12px 9px 36px; } body.dz .wt-tell ul > li::before { left: 15px; } body.dz .wt-tell ol > li::before { left: 8px; } }

/* v5.12 · interactive finales: no Submit, no puzzle hint; the points line sits quietly under the game */
body.dz .actions.fin-acts { justify-content: flex-start; padding-top: 4px; border-top: 0; }
body.dz .actions.fin-acts .meta { margin-left: 0; text-align: left; }

/* v5.12 · Mission briefing: a pop-up on first sign-in (read to the end), reopened from the case board; the page before File 01 opens */
.brief-ov { z-index: 120; }
body.brief-open { overflow: hidden; }
.brief-modal { position: relative; width: min(760px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.brief-modal .bm-head { padding: 24px 28px 14px; border-bottom: 1px solid var(--line); }
.brief-modal .bm-head h2 { margin: 6px 0 0; font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.1; }
.bm-intro { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.brief-modal .bm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 28px 24px; outline: none; overscroll-behavior: contain; }
.brief-modal .bm-body:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
.brief-modal .bm-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 28px; border-top: 1px solid var(--line); background: var(--paper); }
.bm-note { margin-right: auto; font-size: 13px; color: var(--muted); font-family: var(--mono); letter-spacing: .02em; }
.brief-modal .bm-foot .btn { min-height: 44px; padding: 0 22px; }
.brief-modal .bm-foot .btn:disabled { opacity: .45; cursor: not-allowed; }
.brief-modal .modal-x { top: 18px; right: 18px; z-index: 2; }
.bm-status { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); font-size: 16px; }
.bm-status > span { display: flex; flex-direction: column; gap: 1px; }
.bm-status small { font-size: 13px; color: var(--muted); }
.bm-status.pre { border-left: 4px solid var(--red); color: var(--text); }
.bm-status.pre svg, .bm-status.live svg { color: var(--red-ink); flex: none; }
.bm-status.ok svg { color: #1B7F4B; flex: none; }
.bm-sec + .bm-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.bm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
.bm-hs { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.bm-sec .story { font-size: 16.5px; line-height: 1.65; }
.bm-sec .story p { margin: 0 0 12px; } .bm-sec .story p:last-child { margin: 0; }
.bm-cast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bm-cast > div { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.bm-cast dt { font-weight: 700; font-size: 15px; }
.bm-cast dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.bm-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bm-files li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.bm-fn { font-size: 13px; color: var(--muted); }
.bm-ft { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bm-ft b { font-size: 15px; } .bm-ft small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.bm-fst { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.bm-fst.ok { color: #1B7F4B; font-weight: 600; } .bm-fst.live { color: var(--red-ink); font-weight: 600; }
.bm-files li.open { border-color: var(--red); }
/* the page version (case board before File 01 opens) */
body.dz .card.brief-page { max-width: 880px; margin: 0 auto; padding: 0; overflow: hidden; }
.brief-page .bp-head { padding: 26px 32px 16px; border-bottom: 1px solid var(--line); }
.brief-page .bp-head h2 { margin: 6px 0 0; font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1.08; }
.brief-page .bp-body { padding: 20px 32px 26px; }
.brief-page .bp-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 32px; border-top: 1px solid var(--line); background: var(--sunk); }
.brief-page .bp-foot > span { margin-right: auto; }
.brief-page .bp-foot .btn { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; }
/* Home door: a second action beside the main one */
.dz-door-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .dz-door-acts { grid-column: 1 / -1; } .dz-door-acts .btn { flex: 1 1 auto; justify-content: center; }
  .brief-ov { padding: 0 !important; place-items: stretch !important; }
  .brief-modal { width: 100%; max-height: none; height: 100%; height: 100dvh; border-radius: 0 !important; }
  .brief-modal .bm-head { padding: 18px 56px 12px 18px; } .brief-modal .bm-head h2 { font-size: 25px; }
  .brief-modal .bm-body { padding: 16px 18px 20px; }
  .brief-modal .bm-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .brief-modal .bm-foot .btn { flex: 1 1 100%; }
  .bm-note { margin: 0 auto; }
  .brief-modal .modal-x { top: 14px; right: 14px; }
  .bm-cast { grid-template-columns: minmax(0, 1fr); }
  .bm-files li { grid-template-columns: 30px minmax(0, 1fr); } .bm-fst { grid-column: 2; }
  .brief-page .bp-head, .brief-page .bp-body, .brief-page .bp-foot { padding-left: 18px; padding-right: 18px; }
  .brief-page .bp-head h2 { font-size: 27px; }
  .brief-page .bp-foot .btn { flex: 1 1 100%; justify-content: center; }
}
/* admin › How to play & briefing */
.bf-story { padding: 10px 14px; border: 1px solid var(--line, #dfe5e1); border-radius: 8px; background: var(--sunk, #f4f6f5); }
.bf-story p { margin: 0 0 4px; } .bf-story p:last-child { margin: 0; }
.bf-preview { margin-top: 16px; padding: 18px 20px; border: 1px solid var(--line, #dfe5e1); border-left: 4px solid var(--red, #B42318); border-radius: 10px; }
.bf-preview h3 { margin: 4px 0 8px; } .bf-preview .rt p { margin: 0 0 10px; }
.field.flash { outline: 2px solid var(--red, #B42318); outline-offset: 6px; border-radius: 6px; transition: outline-color 1.6s ease 1.2s; }
body.dz .bm-h { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); margin: 0 0 10px; }
body.dz .bm-h .bm-hs { font-size: 12px; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--muted); }
@media (max-width: 720px) { .dz-door-acts .btn.primary { order: -1; } }
/* v5.12.1 · the first (required) read stands alone: the app is hidden (body.onboarding) and the backdrop is the plain page */
body.brief-gate #briefOverlay { background: var(--bg); }
body.dz.brief-gate #briefOverlay { background: var(--paper); }

/* =====================================================================================================================
   v5.13 "Field Notes" color: the mint and deep green stay the base; a terracotta for the one action that matters on a
   screen (.btn.cta), a sand-and-brass vault, badges in their own soft colors, and three performance tiers (green /
   yellow / orange-red) on the Home stats and topic bars. Light themes use the pastel values; dark themes mix the same
   hues into the panel so nothing glares.
   ===================================================================================================================== */
:root {
  --cta: #B84E34; --cta-ink: #FFFFFF; --cta-edge: #A0432C; --cta-hover: #A9452C; --cta-tint: #FADBD2; --cta-text: #A63A22;
  --vault-bg: #F4E6C8; --vault-ink: #5E4210; --vault-edge: #D9BE85; --vault-label: #7A5A0C;
  --tg-bg: #E3F4E8; --tg-edge: #BFE3CB; --tg-ink: #14532D; --tg-eb: #1F7A4D; --tg-bar: #2E9A5E;
  --tm-bg: #FDF1D3; --tm-edge: #F2D99A; --tm-ink: #5E4106; --tm-eb: #8A5E07; --tm-bar: #E0A526;
  --tl-bg: #FCE1D6; --tl-edge: #F4BBA6; --tl-ink: #6E2410; --tl-eb: #A63A22; --tl-bar: #C8553A;
}
:root[data-theme="dark"] {
  --cta: #D0654A; --cta-ink: #FFFFFF; --cta-edge: #D0654A; --cta-hover: #DB7559; --cta-tint: color-mix(in srgb, #D0654A 22%, var(--panel)); --cta-text: #F2A48E;
  --vault-bg: color-mix(in srgb, #D9BE85 20%, var(--panel)); --vault-ink: #F2D99A; --vault-edge: color-mix(in srgb, #D9BE85 45%, var(--panel)); --vault-label: #E5C77E;
  --tg-bg: color-mix(in srgb, #2E9A5E 20%, var(--panel)); --tg-edge: color-mix(in srgb, #2E9A5E 45%, var(--panel)); --tg-ink: #CFF2DC; --tg-eb: #8FDDAE; --tg-bar: #3DB271;
  --tm-bg: color-mix(in srgb, #E0A526 18%, var(--panel)); --tm-edge: color-mix(in srgb, #E0A526 42%, var(--panel)); --tm-ink: #FBE7B5; --tm-eb: #F2C75E; --tm-bar: #E0A526;
  --tl-bg: color-mix(in srgb, #C8553A 20%, var(--panel)); --tl-edge: color-mix(in srgb, #C8553A 45%, var(--panel)); --tl-ink: #FAD2C6; --tl-eb: #F29C82; --tl-bar: #D96A4E;
}

/* the attention action */
body.dz .btn.cta, body.dz .btn.primary.cta { background: var(--cta); border-color: var(--cta-edge); color: var(--cta-ink); }
body.dz .btn.cta:hover, body.dz .btn.primary.cta:hover, body.dz .btn.cta:focus-visible { background: var(--cta-hover); border-color: var(--cta-edge); color: var(--cta-ink); }
body.dz .btn.cta:disabled { background: var(--cta-tint); border-color: var(--cta-tint); color: var(--cta-text); opacity: 1; }
body.dz .btn.cta svg { color: currentColor; }

/* Home door: the file you're on, with a terracotta rule on top */
body.dz .card.dz-door { border-left: 1px solid var(--line); border-top: 4px solid var(--cta); }
body.dz .dz-door-ic { background: var(--cta-tint); color: var(--cta-text); }
body.dz .dz-door-eb { color: var(--cta-text); }

/* the vault: sand-and-brass found digits, a terracotta outline on the one you're working toward */
body.dz .dz-digit, body.dz .dz-vd { background: var(--surface); border: 1px solid var(--line-2); color: var(--faint); }
body.dz .dz-digit:not(.blank), body.dz .dz-vd:not(.blank) { background: var(--vault-bg); border-color: var(--vault-edge); color: var(--vault-ink); }
body.dz .dz-digit.blank.next, body.dz .dz-vd.blank.next { background: var(--surface); border: 2px solid var(--cta); color: var(--cta-text); }
body.dz .dz-sub-vault .sv-l { color: var(--vault-label); font-weight: 600; }

/* stat tiles: neutral until there's something to measure, then one of three tiers */
body.dz .dz-stat-team { background: var(--surface); border-color: var(--line); color: var(--ink); }
body.dz button.dz-stat-team:hover { background: var(--surface); border-color: var(--line-2); }
body.dz .dz-stat-team .dz-stat-l, body.dz .dz-stat-team .dz-stat-s { color: var(--muted); }
.dz-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 24px; }
.dz-tier { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; white-space: nowrap; flex: none; }
body.dz .dz-stat.t-good { background: var(--tg-bg); border-color: var(--tg-edge); color: var(--tg-ink); }
body.dz .dz-stat.t-mid { background: var(--tm-bg); border-color: var(--tm-edge); color: var(--tm-ink); }
body.dz .dz-stat.t-low { background: var(--tl-bg); border-color: var(--tl-edge); color: var(--tl-ink); }
body.dz .dz-stat.t-good .dz-stat-l, body.dz .dz-stat.t-good .dz-tier { color: var(--tg-eb); } body.dz .dz-stat.t-good .dz-tier { border-color: var(--tg-edge); }
body.dz .dz-stat.t-mid .dz-stat-l, body.dz .dz-stat.t-mid .dz-tier { color: var(--tm-eb); } body.dz .dz-stat.t-mid .dz-tier { border-color: var(--tm-edge); }
body.dz .dz-stat.t-low .dz-stat-l, body.dz .dz-stat.t-low .dz-tier { color: var(--tl-eb); } body.dz .dz-stat.t-low .dz-tier { border-color: var(--tl-edge); }
body.dz .dz-stat.t-good .dz-stat-s { color: var(--tg-ink); } body.dz .dz-stat.t-mid .dz-stat-s { color: var(--tm-ink); } body.dz .dz-stat.t-low .dz-stat-s { color: var(--tl-ink); }
body.dz button.dz-stat.t-good:hover { border-color: var(--tg-eb); } body.dz button.dz-stat.t-mid:hover { border-color: var(--tm-eb); } body.dz button.dz-stat.t-low:hover { border-color: var(--tl-eb); }
body.dz .dz-stat.t-good .dz-spark polyline { stroke: var(--tg-bar); } body.dz .dz-stat.t-good .dz-spark circle { fill: var(--tg-bar); }
body.dz .dz-stat.t-mid .dz-spark polyline { stroke: var(--tm-bar); } body.dz .dz-stat.t-mid .dz-spark circle { fill: var(--tm-bar); }
body.dz .dz-stat.t-low .dz-spark polyline { stroke: var(--tl-bar); } body.dz .dz-stat.t-low .dz-spark circle { fill: var(--tl-bar); }

/* accuracy by topic: the same three bands, with a key */
body.dz .dz-tp-r.t-good .dz-wr-bar i { background: var(--tg-bar); } body.dz .dz-tp-r.t-good .ct { color: var(--tg-eb); font-weight: 600; }
body.dz .dz-tp-r.t-mid .dz-wr-bar i { background: var(--tm-bar); } body.dz .dz-tp-r.t-mid .ct { color: var(--tm-eb); font-weight: 600; }
body.dz .dz-tp-r.t-low .dz-wr-bar i { background: var(--tl-bar); } body.dz .dz-tp-r.t-low .ct { color: var(--tl-eb); font-weight: 600; }
.dz-tp-key { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 20px 0; font-size: 11.5px; color: var(--muted); }
.dz-tp-key span { display: inline-flex; align-items: center; gap: 5px; }
.dz-tp-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dz-tp-key .t-good i { background: var(--tg-bar); } .dz-tp-key .t-mid i { background: var(--tm-bar); } .dz-tp-key .t-low i { background: var(--tl-bar); }

/* within reach: each player their own soft avatar color; each goal its own icon color */
body.dz .dz-wr-p .av.av0 { background: #E1ECFA; color: #2A5C9A; } body.dz .dz-wr-p .av.av1 { background: #FCEFD3; color: #8A5207; }
body.dz .dz-wr-p .av.av2 { background: #ECE7FA; color: #5B45A8; } body.dz .dz-wr-p .av.av3 { background: #DDF1EE; color: #1D6B66; }
body.dz .dz-wr-p .av.av4 { background: #FADBD2; color: #A63A22; }
body.dz .dz-wr-p.me .av { background: var(--fill); color: var(--fill-ink); }
body.dz .dz-wr-goal.g0 .dz-wr-gh svg { color: #1F7A4D; } body.dz .dz-wr-goal.g0 .dz-wr-bar i { background: #2E9A5E; }
body.dz .dz-wr-goal.g1 .dz-wr-gh svg { color: #2A5C9A; } body.dz .dz-wr-goal.g1 .dz-wr-bar i { background: #2A5C9A; }
body.dz .dz-wr-goal.g2 .dz-wr-gh svg { color: var(--cta-text); } body.dz .dz-wr-goal.g2 .dz-wr-bar i { background: var(--cta); }

/* department race: a color per department, gold / silver / bronze for the top three */
body.dz .dz-race-r .rk.m0, body.dz .dz-race-r .rk.m1, body.dz .dz-race-r .rk.m2 { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; }
body.dz .dz-race-r .rk.m0 { background: #F3E0A8; color: #6B4E08; } body.dz .dz-race-r .rk.m1 { background: #E3E3DE; color: #4A4A44; } body.dz .dz-race-r .rk.m2 { background: #F0D2BC; color: #7A3E14; }
body.dz .dz-race-r.c0 .tr i { background: #C4553A; } body.dz .dz-race-r.c1 .tr i { background: #1F7A4D; } body.dz .dz-race-r.c2 .tr i { background: #2A5C9A; } body.dz .dz-race-r.c3 .tr i { background: #B07A12; }
body.dz .dz-race-r.c4 .tr i { background: #5B45A8; } body.dz .dz-race-r.c5 .tr i { background: #1D6B66; } body.dz .dz-race-r.c6 .tr i { background: #A94A14; } body.dz .dz-race-r.c7 .tr i { background: #3A4C9C; }
body.dz .dz-race-r.me { background: var(--fill-tint, color-mix(in srgb, var(--fill) 26%, var(--panel))); }
body.dz .dz-race-r.me .rk:not(.m0):not(.m1):not(.m2) { color: var(--ink); }

/* case progress: closed files a solid green check, the one you're in a terracotta ring */
body.dz .dz-pg-r .ic svg { color: #FFFFFF; background: var(--red); border-radius: 50%; padding: 3px; box-sizing: content-box; font-size: 10px; }
body.dz .dz-pg-r.locked .ic svg { color: var(--faint); background: none; padding: 0; font-size: 14px; }
body.dz .dz-pg-r.cur .ic .ring { border: 2.5px solid var(--cta); background: var(--surface); width: 15px; height: 15px; }
body.dz .dz-pg-r.cur .dz-wr-bar i { background: var(--cta); }
body.dz .dz-pg-r .dz-wr-bar.ok i { background: var(--tg-bar); }

/* achievements: every badge as a medallion in its own color; locked ones stay gray */
.dz-bd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; padding: 4px 20px 0; }
.dz-bd-c { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.dz-bd-c .bm { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; background: var(--sunk); color: var(--faint); }
.dz-bd-c .bn { font-size: 11.5px; line-height: 1.2; color: var(--faint); }
.dz-bd-c.on .bn { color: var(--ink); font-weight: 600; }
.dz-bd-c.on .bd-first_blood { background: #FADBD2; color: #A63A22; } .dz-bd-c.on .bd-early_bird { background: #FBE7C6; color: #8A5207; }
.dz-bd-c.on .bd-well_read { background: #D5EEE9; color: #1D6B66; } .dz-bd-c.on .bd-clean_sweep { background: #D9E7F7; color: #2A5C9A; }
.dz-bd-c.on .bd-cryptographer { background: #E6DFF7; color: #5B45A8; } .dz-bd-c.on .bd-hard_hitter { background: #FBDCC7; color: #A94A14; }
.dz-bd-c.on .bd-night_owl { background: #DDE2F5; color: #3A4C9C; } .dz-bd-c.on .bd-comeback { background: #D6F0E1; color: #1F7A4D; }
.dz-bd-c.on .bd-case_closed { background: #F3E6C4; color: #7A5A0C; }
.dz-bd-c.on .bm:not([class*="bd-"]) { background: var(--fill); color: var(--fill-ink); }

/* difficulty: easy green, medium sand, hard coral */
body.dz .chip.diff.easy { background: #E6F5EC; border-color: #9FE0BC; color: #1F7A4D; }
body.dz .chip.diff.medium { background: #FBF0DC; border-color: #EBC374; color: #8A5207; }
body.dz .chip.diff.hard { background: #FADBD2; border-color: #EDB0A2; color: #A63A22; }
:root[data-theme="dark"] body.dz .chip.diff.easy { background: transparent; color: #8FDDAE; border-color: #2E9A5E; }
:root[data-theme="dark"] body.dz .chip.diff.medium { background: transparent; color: #F2C75E; border-color: #B07A12; }
:root[data-theme="dark"] body.dz .chip.diff.hard { background: transparent; color: #F29C82; border-color: #C8553A; }
@media (max-width: 720px) { .dz-bd-grid { gap: 12px 6px; } .dz-bd-c .bm { width: 42px; height: 42px; } .dz-stat-top { flex-wrap: wrap; } }
body.dz .sv-digit:not(.blank) { background: var(--vault-bg); border-color: var(--vault-edge); color: var(--vault-ink); }
body.dz .sv-digit.blank.next { background: var(--surface); border: 2px solid var(--cta); color: var(--cta-text); }
/* long stat labels wrap above the tier pill instead of being cut off */
body.dz .dz-stat-top { flex-wrap: wrap; row-gap: 6px; }
body.dz .dz-stat-top .dz-stat-l { white-space: normal; overflow: visible; }

/* =====================================================================================================================
   v5.14 Field Notes color in the coordinator console (/admin): KPI tiles in soft category tints, rates in the three
   performance tiers (green / yellow / orange-red, always with a number or word), difficulty chips, nudge segments,
   the awareness report. The dark sidebar stays the console's identity.
   ===================================================================================================================== */
body.dz-admin .stat-tile { border-radius: 10px; }
body.dz-admin .stat-tile.k-blue { background: #E6EFFA; border-color: #C9DBF1; } body.dz-admin .stat-tile.k-blue .label { color: #2A5C9A; } body.dz-admin .stat-tile.k-blue .v { color: #1B3558; }
body.dz-admin .stat-tile.k-green { background: #E3F4E8; border-color: #BFE3CB; } body.dz-admin .stat-tile.k-green .label { color: #1F7A4D; } body.dz-admin .stat-tile.k-green .v { color: #14532D; }
body.dz-admin .stat-tile.k-sand { background: #FBF0DC; border-color: #F0DDB4; } body.dz-admin .stat-tile.k-sand .label { color: #8A5207; } body.dz-admin .stat-tile.k-sand .v { color: #4A3006; }
body.dz-admin .stat-tile.k-lilac { background: #EEE9FA; border-color: #D9D0F2; } body.dz-admin .stat-tile.k-lilac .label { color: #5B45A8; } body.dz-admin .stat-tile.k-lilac .v { color: #33245F; }
body.dz-admin .stat-tile.k-teal { background: #DDF1EE; border-color: #BCE2DC; } body.dz-admin .stat-tile.k-teal .label { color: #1D6B66; } body.dz-admin .stat-tile.k-teal .v { color: #12403D; }
body.dz-admin .stat-tile.t-good { background: var(--tg-bg); border-color: var(--tg-edge); } body.dz-admin .stat-tile.t-good .label { color: var(--tg-eb); } body.dz-admin .stat-tile.t-good .v { color: var(--tg-ink); }
body.dz-admin .stat-tile.t-mid { background: var(--tm-bg); border-color: var(--tm-edge); } body.dz-admin .stat-tile.t-mid .label { color: var(--tm-eb); } body.dz-admin .stat-tile.t-mid .v { color: var(--tm-ink); }
body.dz-admin .stat-tile.t-low { background: var(--tl-bg); border-color: var(--tl-edge); } body.dz-admin .stat-tile.t-low .label { color: var(--tl-eb); } body.dz-admin .stat-tile.t-low .v { color: var(--tl-ink); }
body.dz-admin .stat-tile[class*="t-"] .v small, body.dz-admin .stat-tile[class*="k-"] .v small, body.dz-admin .stat-tile[class*="k-"] small { color: inherit !important; opacity: .8; }
/* KPI rows that don't carry their own meaning cycle through the soft tints */
body.dz-admin .kpis > .stat-tile:not([class*=" k-"]):not([class*=" t-"]):nth-child(5n+1) { background: #E6EFFA; border-color: #C9DBF1; }
body.dz-admin .kpis > .stat-tile:not([class*=" k-"]):not([class*=" t-"]):nth-child(5n+2) { background: #E3F4E8; border-color: #BFE3CB; }
body.dz-admin .kpis > .stat-tile:not([class*=" k-"]):not([class*=" t-"]):nth-child(5n+3) { background: #FBF0DC; border-color: #F0DDB4; }
body.dz-admin .kpis > .stat-tile:not([class*=" k-"]):not([class*=" t-"]):nth-child(5n+4) { background: #EEE9FA; border-color: #D9D0F2; }
body.dz-admin .kpis > .stat-tile:not([class*=" k-"]):not([class*=" t-"]):nth-child(5n+5) { background: #DDF1EE; border-color: #BCE2DC; }
body.dz-admin .stat-tile .v.accent, body.dz-admin .stat-tile .v.ember, body.dz-admin .stat-tile .v.ok { color: inherit; }

/* charts and bars */
body.dz-admin .chart b { background: var(--tg-bar); border-radius: 3px 3px 0 0; }
body.dz-admin .chart b[title]:hover { background: #1F7A4D; }
body.dz-admin .bar { border-radius: 4px; overflow: hidden; }
body.dz-admin .bar i { background: var(--tg-bar); border-radius: 4px; }
body.dz-admin .bar.t-good i { background: var(--tg-bar); } body.dz-admin .bar.t-mid i { background: var(--tm-bar); } body.dz-admin .bar.t-low i { background: var(--tl-bar); }
body.dz-admin .bar.warn i { background: var(--tm-bar); } body.dz-admin .bar.bad i { background: var(--tl-bar); }
.ax-struggle-v { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; white-space: nowrap; }
body.dz-admin .dz-bar { height: 7px; border-radius: 4px; background: var(--sunk); }
body.dz-admin .dz-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tg-bar); }
body.dz-admin .dz-bar.t-mid i { background: var(--tm-bar); } body.dz-admin .dz-bar.t-low i { background: var(--tl-bar); }
body.dz-admin .prog-mini i { background: var(--tg-bar); } body.dz-admin .prog-mini.t-mid i { background: var(--tm-bar); } body.dz-admin .prog-mini.t-low i { background: var(--tl-bar); }
.ax-tv.t-good { color: var(--tg-eb); font-weight: 600; } .ax-tv.t-mid { color: var(--tm-eb); font-weight: 600; } .ax-tv.t-low { color: var(--tl-eb); font-weight: 600; }
.ax-tier { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.ax-tier.t-good { background: var(--tg-bg); border-color: var(--tg-edge); color: var(--tg-eb); }
.ax-tier.t-mid { background: var(--tm-bg); border-color: var(--tm-edge); color: var(--tm-eb); }
.ax-tier.t-low { background: var(--tl-bg); border-color: var(--tl-edge); color: var(--tl-eb); }

/* difficulty chips, topics, chapter rows */
body.dz-admin .diff.easy { background: #E6F5EC; border-color: #9FE0BC; color: #1F7A4D; }
body.dz-admin .diff.medium { background: #FBF0DC; border-color: #EBC374; color: #8A5207; }
body.dz-admin .diff.hard { background: #FADBD2; border-color: #EDB0A2; color: #A63A22; }
body.dz-admin .topic-pill { background: #E6EFFA; border-color: #C9DBF1; color: #1B3558; }
body.dz-admin tr.pz-chapter td { background: var(--vault-bg); color: var(--vault-ink); }

/* needs attention: an amber rule on top; the go-live hero keeps its dark band */
body.dz-admin .ax-attn { border-top: 4px solid var(--tm-bar); }
body.dz-admin .ax-attn .ax-check.st-todo { background: var(--tl-bg); }

/* nudges: each segment its own soft color */
body.dz-admin .tmpl { background: var(--surface); border-radius: 10px; }
body.dz-admin .tmpl pre { color: var(--text); }
body.dz-admin .tmpl .label { gap: 12px; }
body.dz-admin .tmpl .label .seg-l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-right: auto; }
.seg-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; background: #E6EFFA; color: #1B3558; }
.seg-never .seg-chip { background: var(--tl-bg); color: var(--tl-eb); } .seg-stalled .seg-chip { background: var(--tm-bg); color: var(--tm-eb); }
.seg-finished .seg-chip { background: var(--tg-bg); color: var(--tg-eb); } .seg-ontrack .seg-chip { background: #DDF1EE; color: #1D6B66; }

/* the awareness report (prints as shown) */
body.dz-admin .report h2 { border-bottom-color: #1F7A4D; }
body.dz-admin .report .kpi b { color: #1F7A4D; }
body.dz-admin .report th { background: #F1EFE8; }
body.dz-admin .report .rbar .rtrack { background: #F1EFE8; }
body.dz-admin .report .rbar .rfill { background: #2E9A5E; }
body.dz-admin .report .rbar .rfill.k-blue { background: #2A5C9A; } body.dz-admin .report .rbar .rfill.k-green { background: #2E9A5E; } body.dz-admin .report .rbar .rfill.k-cta { background: #C4553A; }
body.dz-admin .report .rbar .rfill.t-good { background: #2E9A5E; } body.dz-admin .report .rbar .rfill.t-mid { background: #E0A526; } body.dz-admin .report .rbar .rfill.t-low { background: #C8553A; }
body.dz-admin .report .rcol .rcbar { background: #2E9A5E; }
body.dz-admin .report .ax-tier { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { body.dz-admin .report .rfill, body.dz-admin .report .rcbar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* activity log: a color per kind of event */
body.dz-admin .log-row .log-ic { border-radius: 8px; }
body.dz-admin .log-row.auth .log-ic { background: #E6EFFA; color: #2A5C9A; }
body.dz-admin .log-row.register .log-ic { background: var(--tg-bg); color: var(--tg-eb); }
body.dz-admin .log-row.report .log-ic { background: var(--tm-bg); color: var(--tm-eb); }
body.dz-admin .log-row.error .log-ic { background: var(--tl-bg); color: var(--tl-eb); }

/* =====================================================================================================================
   v5.14 certificate: two landscape letter pages (certificate + field record) previewed in an overlay and printed with
   the browser's print dialog. Fixed light "paper" colors whatever the theme, so it always prints cleanly.
   ===================================================================================================================== */
.cert-ov { position: fixed; inset: 0; z-index: 140; display: flex; flex-direction: column; background: #E9E6DE; color: #16241D; }
.cert-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: #FFFFFF; border-bottom: 1px solid #E6E2D8; flex-wrap: wrap; }
.cert-bar-t { display: flex; flex-direction: column; gap: 2px; } .cert-bar-t b { font-family: var(--display); font-size: 20px; } .cert-bar-t small { font-size: 13px; color: #526359; }
.cert-bar-a { display: flex; gap: 10px; } .cert-bar-a .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.cert-scroll { flex: 1; overflow: auto; padding: 24px 16px 40px; }
.cert-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cert-page { box-sizing: border-box; width: 11in; height: 8.5in; flex: none; position: relative; overflow: hidden; background: #FBFAF6; color: #16241D; font-family: 'IBM Plex Sans', system-ui, sans-serif;
  border: 12px solid var(--frame, #1F5C3F); box-shadow: 0 10px 30px rgba(22, 36, 29, .16); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-in { position: absolute; inset: 0.16in; border: 1.5px solid #C9A95C; padding: 0.36in 0.46in 0.3in; display: flex; flex-direction: column; z-index: 1; box-sizing: border-box; }
.cert-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cert-eb { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #A9452C; }
.cert-id { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .08em; color: #7A7462; }
.cert-mid { display: grid; grid-template-columns: minmax(0, 1fr) 2.15in; gap: 0.35in; align-items: center; margin-top: 0.3in; }
.cert-title { margin: 0; font-family: 'Archivo', sans-serif; font-size: 44px; font-weight: 800; line-height: 1.02; letter-spacing: -0.01em; color: #16241D; }
.cert-op { margin-top: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #1F7A4D; }
.cert-certify { margin-top: 0.22in; font-size: 16px; color: #526359; }
.cert-name { margin-top: 4px; font-family: 'Archivo', sans-serif; font-size: 50px; font-weight: 800; line-height: 1.05; padding-bottom: 6px; border-bottom: 2px solid #C9A95C; display: inline-block; min-width: 60%; }
.cert-dept { margin-top: 8px; font-size: 15px; color: #526359; }
.cert-body { margin: 0.14in 0 0; max-width: 64ch; font-size: 15px; line-height: 1.55; color: #2D3A33; }
.cert-seal { width: 2.15in; height: 2.15in; display: block; }
.cert-stats { display: flex; gap: 10px; margin-top: 0.34in; }
.cert-stat { flex: 1; padding: 10px 14px; border-radius: 8px; background: #F1EFE8; border: 1px solid #E6E2D8; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cert-stat b { font-family: 'Archivo', sans-serif; font-size: 26px; font-weight: 800; line-height: 1.05; color: #1F7A4D; font-variant-numeric: tabular-nums; }
.cert-stat b small { font-size: 15px; color: #526359; font-weight: 700; }
.cert-stat span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #526359; }
.cert-stat.code { background: #F4E6C8; border-color: #D9BE85; } .cert-stat.code b { color: #5E4210; letter-spacing: .22em; font-family: 'IBM Plex Mono', monospace; font-size: 24px; }
.cert-lab { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #1F7A4D; margin-bottom: 7px; }
.cert-skills { margin-top: 0.26in; }
.cert-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cert-skill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; background: #E3F4E8; border: 1px solid #BFE3CB; color: #14532D; font-size: 12px; font-weight: 600; }
.cert-skill svg { color: #1F7A4D; }
.cert-foot { margin-top: auto; display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 0.3in; align-items: end; font-size: 12px; color: #526359; }
.cert-sig { display: flex; flex-direction: column; gap: 2px; } .cert-sigline { display: block; width: 2.7in; border-top: 1.5px solid #16241D; margin-bottom: 6px; }
.cert-sig b { color: #16241D; font-size: 13.5px; }
.cert-verify { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11px; } .cert-verify span { font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #7A7462; font-size: 9.5px; align-self: center; } .cert-verify b { color: #16241D; font-weight: 600; }
.cert-arena { height: 0.48in; width: auto; display: block; }
.cert-lockup { display: flex; align-items: center; gap: 12px; } .cert-lockup .x { font-weight: 300; font-size: 22px; color: #7A7462; } .cert-lockup img:not(.cert-arena) { height: 34px; max-width: 2.2in; object-fit: contain; }
.cert-wm { position: absolute; z-index: 0; right: -0.4in; bottom: -0.5in; width: 4.6in; height: 4.6in; opacity: .06; pointer-events: none; }
.cert-wm.wide { right: 0.5in; bottom: 0.9in; width: 5.2in; height: 1.6in; }
.cert-wm img { width: 100%; height: 100%; object-fit: contain; object-position: right bottom; filter: grayscale(1); }
/* page 2: field record */
.rec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 0.12in; padding-bottom: 0.12in; border-bottom: 2px solid #C9A95C; }
.rec-head h2 { margin: 0; font-family: 'Archivo', sans-serif; font-size: 32px; font-weight: 800; } .rec-head > div > span { font-size: 13px; color: #526359; }
.rec-nums { display: flex; gap: 22px; } .rec-nums div { display: flex; flex-direction: column; align-items: flex-end; } .rec-nums b { font-family: 'Archivo', sans-serif; font-size: 24px; font-weight: 800; color: #1F7A4D; } .rec-nums span { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #526359; }
.rec-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0.32in; margin-top: 0.16in; min-height: 0; }
.rec-col { display: flex; flex-direction: column; min-width: 0; } .rec-col .cert-lab + * { margin-bottom: 12px; }
.rec-habits { margin: 0; padding: 0; list-style: none; counter-reset: rh; display: flex; flex-direction: column; gap: 7px; }
.rec-habits li { counter-increment: rh; position: relative; padding: 7px 10px 7px 38px; border-radius: 8px; background: #FFFFFF; border: 1px solid #E6E2D8; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.4; }
.rec-habits li::before { content: counter(rh); position: absolute; left: 9px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: #F4E6C8; color: #5E4210; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rec-fl { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #A9452C; }
.rec-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rec-table th { text-align: left; font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #526359; font-weight: 500; padding: 4px 6px; border-bottom: 1px solid #D3CDBE; }
.rec-table td { padding: 5px 6px; border-bottom: 1px solid #E6E2D8; } .rec-table td:not(:first-child), .rec-table th:not(:first-child) { text-align: right; } .rec-table td b { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #A9452C; margin-right: 4px; }
.rec-dg { display: inline-flex; width: 20px; height: 22px; align-items: center; justify-content: center; border-radius: 4px; background: #F4E6C8; border: 1px solid #D9BE85; color: #5E4210; font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.rec-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.rec-bd { display: flex; align-items: center; gap: 8px; font-size: 11.5px; line-height: 1.25; } .rec-bd small { display: block; color: #526359; font-size: 10.5px; }
.rec-bd .bm { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: #E3F4E8; color: #1F7A4D; }
.rec-bd .bd-first_blood { background: #FADBD2; color: #A63A22; } .rec-bd .bd-early_bird { background: #FBE7C6; color: #8A5207; } .rec-bd .bd-well_read { background: #D5EEE9; color: #1D6B66; }
.rec-bd .bd-clean_sweep { background: #D9E7F7; color: #2A5C9A; } .rec-bd .bd-cryptographer { background: #E6DFF7; color: #5B45A8; } .rec-bd .bd-hard_hitter { background: #FBDCC7; color: #A94A14; }
.rec-bd .bd-night_owl { background: #DDE2F5; color: #3A4C9C; } .rec-bd .bd-comeback { background: #D6F0E1; color: #1F7A4D; } .rec-bd .bd-case_closed { background: #F3E6C4; color: #7A5A0C; }
.rec-acc { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; } .rec-acc b { text-transform: capitalize; }
.rec-acc i { font-style: normal; font-weight: 700; padding: 0 7px; border-radius: 9px; font-size: 11.5px; }
.rec-acc i.t-good { background: #E3F4E8; color: #1F7A4D; } .rec-acc i.t-mid { background: #FDF1D3; color: #8A5E07; } .rec-acc i.t-low { background: #FCE1D6; color: #A63A22; }
.rec-foot { grid-template-columns: 1fr auto; font-size: 11px; }
@media (max-width: 640px) { .cert-bar { padding: 12px 16px; } .cert-bar-a { width: 100%; } .cert-bar-a .btn { flex: 1; justify-content: center; } .cert-scroll { padding: 16px 8px 32px; } }
@media print {
  @page { size: 11in 8.5in; margin: 0; }
  html body.cert-open, html body.dz.cert-open:not(.landing):not(.onboarding):not(.cert-x) { padding: 0 !important; margin: 0 !important; background: #FBFAF6 !important; }
  body.cert-open > *:not(#certOv) { display: none !important; }
  body.cert-open #certOv { position: static; display: block; background: none; }
  body.cert-open .cert-bar { display: none !important; }
  body.cert-open .cert-scroll { overflow: visible; padding: 0; }
  body.cert-open .cert-pages { display: block; }
  body.cert-open .cert-page { zoom: 1 !important; box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  body.cert-open .cert-page:last-child { break-after: auto; page-break-after: auto; }
}

/* =====================================================================================================================
   v5.15 arcade (arcade.js .arx*): a dark console with two views (Games cards / Leaderboards with a game switcher and
   one live board), a How to play modal, and a play view whose stage the game fits into (--arx-h = usable height).
   ===================================================================================================================== */
.arx, .arx-play { background: var(--console); color: var(--console-text); margin: -24px calc(-1 * var(--dz-gut)) -40px; min-height: calc(100vh - var(--dz-top-h)); box-sizing: border-box; }
.arx { padding: 26px var(--dz-gut) 32px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 901px) { .arx, .arx-play { margin-top: -28px; } }
@media (min-width: 1101px) and (min-height: 640px) {
  .arx, .arx-play { height: calc(100vh - var(--dz-top-h)); height: calc(100dvh - var(--dz-top-h)); min-height: 0; margin-bottom: 0; }
  .arx { overflow-y: auto; scrollbar-width: thin; }
}
.arx-eb { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--console-red); }
.arx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 24px; flex-wrap: wrap; }
.arx-ht { display: flex; flex-direction: column; gap: 6px; }
.arx-ht h1 { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; color: #fff; line-height: 1.05; }
.arx-ht p { margin: 0; max-width: 560px; font-size: 15px; }
.arx-hr { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.arx-views { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--console-2); border: 1px solid var(--console-line); }
.arx-views button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 7px; background: transparent; color: var(--console-text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.arx-views button[aria-selected="true"] { background: #fff; color: var(--console); }
.arx-views button:not([aria-selected="true"]):hover { color: #fff; background: var(--console-line); }
.arx-never { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--console-dim); }
/* Games: cards */
.arx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.arx-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--console-2); border: 1px solid var(--console-line); min-width: 0; }
.arx-card:hover { border-color: var(--console-line-2); }
.arx-card-h { display: flex; align-items: center; gap: 12px; }
.arx-ic { width: 44px; height: 44px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, var(--console-2)); color: var(--console-red); display: inline-flex; align-items: center; justify-content: center; }
.arx-ic.sm { width: 30px; height: 30px; border-radius: 8px; } .arx-ic.lg { width: 76px; height: 76px; border-radius: 18px; }
.arx-ct { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; } .arx-ct b { color: #fff; font-size: 16.5px; font-weight: 700; } .arx-ct small { font-family: var(--mono); font-size: 11.5px; color: var(--console-dim); letter-spacing: .04em; }
.arx-q { width: 36px; height: 36px; flex: none; border-radius: 9px; border: 1px solid var(--console-line-2); background: transparent; color: var(--console-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arx-q:hover { color: #fff; border-color: #fff; }
.arx-blurb { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--console-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.arx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.arx-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--console); border: 1px solid var(--console-line); min-width: 0; }
.arx-stats span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--console-dim); }
.arx-stats b { color: #fff; font-family: var(--mono); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .arx-stats b small { color: var(--console-dim); font-weight: 400; font-size: 11.5px; }
.arx-acts { display: flex; gap: 8px; }
.arx-acts .btn { flex: 1; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
body.dz .btn.arx-ghost { background: transparent; color: #fff; border-color: var(--console-line-2); }
body.dz .btn.arx-ghost:hover { background: var(--console-line); border-color: #fff; color: #fff; }
.arx-foot { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--console-dim); font-size: 12.5px; }
/* Leaderboards: game tabs + one board */
.arx-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.arx-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--console-line-2); background: var(--console-2); color: var(--console-text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.arx-tabs button:hover { color: #fff; border-color: #fff; }
.arx-tabs button[aria-selected="true"] { background: var(--fill); border-color: var(--fill); color: var(--fill-ink); }
.arx-board { border-radius: 12px; background: var(--console-2); border: 1px solid var(--console-line); display: flex; flex-direction: column; min-height: 0; }
.arx-bh { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--console-line); }
.arx-bt { display: flex; align-items: center; gap: 12px; } .arx-bt > span:last-child { display: flex; flex-direction: column; } .arx-bt b { color: #fff; font-size: 20px; font-family: var(--display); font-weight: 800; } .arx-bt small { font-size: 12.5px; color: var(--console-dim); }
.arx-bctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.arx-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--console-red); }
.arx-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--console-red); box-shadow: 0 0 0 0 color-mix(in srgb, var(--console-red) 60%, transparent); animation: arxPulse 2s infinite; }
@keyframes arxPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--console-red) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .arx-live i { animation: none; } }
.arx-seg { display: inline-flex; border: 1px solid var(--console-line-2); border-radius: 8px; overflow: hidden; }
.arx-seg button { min-height: 36px; padding: 0 14px; border: 0; border-right: 1px solid var(--console-line-2); background: transparent; color: var(--console-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.arx-seg button:last-child { border-right: 0; } .arx-seg button[aria-selected="true"] { background: #fff; color: var(--console); }
.arx-nav { display: inline-flex; gap: 6px; }
.arx-arrow { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--console-line-2); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arx-arrow:hover { border-color: #fff; background: var(--console-line); }
.arx-bb { padding: 8px 0 4px; min-height: 280px; }
.arx-bcols { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; }
.arx-bl { padding: 10px 18px 16px; border-right: 1px solid var(--console-line); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.arx-br { padding: 4px 0 10px; }
.arx-bf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--console-line); }
.arx-bf-a { display: flex; gap: 10px; } .arx-bf .btn { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; }
.arx-count { font-size: 12.5px; color: var(--console-dim); }
.arx-loading { padding: 18px; margin: 0; color: var(--console-dim); font-size: 13.5px; }
/* How to play modal */
.arx-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 15, .72); }
.arx-mbox { width: min(560px, 100%); max-height: min(88vh, 760px); display: flex; flex-direction: column; border-radius: 14px; background: var(--console-2); border: 1px solid var(--console-line-2); color: var(--console-text); overflow: hidden; }
.arx-mbox.wide { width: min(640px, 100%); }
.arx-mh { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--console-line); }
.arx-mh .arx-ct b { font-size: 21px; font-family: var(--display); font-weight: 800; }
.arx-x { width: 40px; height: 40px; flex: none; border-radius: 9px; border: 1px solid var(--console-line-2); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arx-x:hover { border-color: #fff; }
.arx-mb { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.arx-goal { margin: 0; font-size: 16px; line-height: 1.5; color: #fff; }
.arx-sec { display: flex; flex-direction: column; gap: 8px; }
.arx-lab { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--console-red); }
.arx-ctl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.arx-ctl li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.arx-key { flex: none; min-width: 78px; text-align: center; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--console-line-2); border-bottom-width: 2px; background: var(--console); color: #fff; font-family: var(--mono); font-size: 11.5px; }
.arx-sc { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; }
.arx-tip { margin: 0; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, var(--console)); color: #fff; font-size: 13.5px; line-height: 1.45; }
.arx-tip svg { color: var(--console-red); flex: none; margin-top: 2px; }
.arx-best { margin: 0; font-size: 13px; color: var(--console-dim); } .arx-best b { color: #fff; }
.arx-mf { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--console-line); }
.arx-mf .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; }
.arx-mb.obb { padding: 8px 0; }
/* Play view */
.arx-play { display: flex; flex-direction: column; }
.arx-bar { display: flex; align-items: center; gap: 10px; padding: 10px var(--dz-gut); min-height: 60px; box-sizing: border-box; border-bottom: 1px solid var(--console-line); flex: none; }
body.dz .arx-bar .arx-back { background: transparent; color: #fff; border-color: var(--console-line-2); display: inline-flex; align-items: center; gap: 6px; }
body.dz .arx-bar .arx-back:hover { border-color: #fff; background: var(--console-2); }
.arx-pt { display: inline-flex; align-items: center; gap: 10px; min-width: 0; } .arx-pt b { color: #fff; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arx-grow { flex: 1; }
.arx-chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--console-line-2); font-size: 12.5px; color: var(--console-dim); white-space: nowrap; } .arx-chip b { color: #fff; font-family: var(--mono); }
.arx-iconbtn { width: 40px; height: 40px; flex: none; border-radius: 9px; border: 1px solid var(--console-line-2); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arx-iconbtn:hover { border-color: #fff; background: var(--console-2); }
.arx-stage { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; padding: 12px var(--dz-gut) 12px; overflow: auto; box-sizing: border-box; }
body.dz .arx-stage .arc-body.arx-screen { margin: 0; width: 100%; max-width: 900px; box-sizing: border-box; padding: 16px; border-radius: 12px; background: var(--paper); color: var(--ink); position: relative; }
body.dz .arx-stage .arc-body.arx-ready-on, body.dz .arx-stage .arc-body.arx-result-screen { background: var(--console-2); color: var(--console-text); border: 1px solid var(--console-line); }
.arx-ready { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 22px 12px; }
.arx-ready > b { font-family: var(--display); font-size: 28px; font-weight: 800; color: #fff; }
.arx-ready p { margin: 0; max-width: 460px; font-size: 15.5px; line-height: 1.5; color: var(--console-text); }
.arx-ctl.mini { align-items: flex-start; font-size: 13.5px; }
.arx-ready-a { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.arx-ready-a .btn { min-height: 48px; padding: 0 26px; display: inline-flex; align-items: center; gap: 8px; }
.arx-ready small { color: var(--console-dim); font-size: 12px; }
/* each game fits the stage height */
.arx-stage .arc-react { height: clamp(220px, calc(var(--arx-h) - 80px), 380px); }
.arx-stage .arc-grid { max-width: min(360px, calc(var(--arx-h) - 110px)); }
.arx-stage .arc-sweep { height: clamp(240px, calc(var(--arx-h) - 100px), 460px); }
.arx-stage .arc-match { max-width: min(440px, calc((var(--arx-h) - 110px) * 0.74)); }
.arx-stage .arc-worm { width: min(420px, 84vw, calc(var(--arx-h) - 110px)); }
.arx-stage .arc-fr { max-width: 860px; }
.arx-stage .arc-over { border-radius: 12px; }
.arx-result { gap: 28px; }
.arx-rboard { border-radius: 10px; background: var(--console); border: 1px solid var(--console-line); min-width: 0; }
.arx-rbh { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--console-line); } .arx-rbh .mono { color: var(--console-dim); }
@media (max-width: 1100px) {
  .arx, .arx-play { margin: -16px -16px -40px; }
  .arx { padding: 20px 16px 28px; }
  .arx-hr { align-items: flex-start; }
  .arx-bcols { grid-template-columns: minmax(0, 1fr); } .arx-bl { border-right: 0; border-bottom: 1px solid var(--console-line); }
  body.dz .arx-result { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* while a game is open on a phone or tablet, the app's top bar and bottom tabs step aside */
  body.arx-playing .dz-top, body.arx-playing .dz-btabs, body.arx-playing #btabs, body.arx-playing #obReportBtn, body.arx-playing #footer { display: none !important; }
  body.arx-playing > main { padding-top: 0 !important; padding-bottom: 0 !important; }
  body.arx-playing .arx-play { margin: 0 -16px; min-height: 100vh; min-height: 100dvh; height: 100dvh; }
  .arx-bar { padding: 8px 12px; gap: 8px; min-height: 54px; }
  .arx-chip#arxBest { display: none; }
  .arx-stage { padding: 8px; }
  body.dz .arx-stage .arc-body.arx-screen { padding: 10px; }
}
@media (max-width: 640px) {
  .arx-views { width: 100%; } .arx-views button { flex: 1; justify-content: center; padding: 0 10px; }
  .arx-hr { width: 100%; }
  .arx-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .arx-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .arx-bh { padding: 14px; } .arx-bctl { width: 100%; justify-content: space-between; } .arx-seg button { padding: 0 10px; }
  .arx-bf { padding: 12px 14px; } .arx-bf-a { width: 100%; } .arx-bf-a .btn { flex: 1; justify-content: center; }
  .arx-stage .arc-worm { width: min(340px, 90vw, calc(var(--arx-h) - 270px)); }
  .arx-pt b { max-width: 34vw; }
  .arx-modal { padding: 0; align-items: flex-end; } .arx-mbox { border-radius: 14px 14px 0 0; max-height: 92vh; }
}
.arx-stats .arx-topd b { display: flex; flex-direction: column; line-height: 1.2; } .arx-stats .arx-topd b small { font-size: 11px; }
.arx-acts .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
body.dz .arx-stage .arc-body.arx-screen.dark:not(.arx-ready-on):not(.arx-result-screen) { background: transparent; padding: 0; }
body.dz .arx-stage .arc-body.arx-screen.dark .arc-help { color: var(--console-dim); }
body.dz .arx-stage .arc-body.arx-screen.dark .module-card.arc-module { background: transparent; border: 0; padding: 0; }
@media (max-width: 480px) { .arx-pt .arx-ic, #arxToday { display: none; } .arx-pt b { max-width: 46vw; } }
.arx-stage { align-items: safe center; }
body.dz .arx-stage .arc-body.arx-screen:not(.dark) { max-width: 780px; }

/* ===== v5.16 Side quests: a case timeline (side-quests.js) =====
   Paper and slate blue, laid out along the story: a node per file (closed green, open blue, locked gray), and the
   quests pinned to each file as "assignment" cards (tab + stamp, skill, case tie-in, reward, unlock condition with
   progress, Start / How to play / Board). Boards and how-to open in modals; the play view is a slim bar, a one-line
   case brief and a stage sized to the screen (--sqx-h). The arcade stays the dark console; this stays the dossier. */
:root[data-theme="dark"] { --quest: #7FA6DE; --quest-ink: #BCD2F2; --quest-tint: color-mix(in srgb, #7FA6DE 18%, var(--panel)); --quest-edge: color-mix(in srgb, #7FA6DE 42%, var(--panel)); }
.sqx { display: flex; flex-direction: column; gap: 22px; max-width: 1180px; }
.sqx-lab, .sqx-kick, .sqx-eb, .sqx-fn { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sqx-kick { color: var(--quest); }
.sqx-head { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: end; }
.sqx-ht h1 { margin: 6px 0 8px; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.sqx-ht p { margin: 0; max-width: 660px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.sqx-sum { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--quest); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.sqx-sum-t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .sqx-sum-t .sqx-lab { color: var(--quest-ink); }
.sqx-sum-n { font-family: var(--mono); font-size: 13px; color: var(--muted); } .sqx-sum-n b { font-size: 20px; color: var(--ink); }
.sqx-bar { height: 8px; border-radius: 99px; background: var(--quest-tint); overflow: hidden; } .sqx-bar span { display: block; height: 100%; background: var(--quest); border-radius: 99px; }
.sqx-sum-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.sqx .btn { display: inline-flex; align-items: center; gap: 7px; }
body.dz .sqx .btn.primary, body.dz .sqx-mf .btn.primary, body.dz .sqx-play .btn.primary { background: var(--quest); border-color: var(--quest); color: #fff; }
body.dz .sqx .btn.primary:hover, body.dz .sqx-mf .btn.primary:hover { background: var(--quest-ink); border-color: var(--quest-ink); color: #fff; }
:root[data-theme="dark"] body.dz .sqx .btn.primary, :root[data-theme="dark"] body.dz .sqx-mf .btn.primary { color: #0E1726; }
/* how it works */
.sqx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sqx-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 10px; background: var(--quest-tint); border: 1px solid var(--quest-edge); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.sqx-steps li b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; } .sqx-steps em { font-style: normal; font-weight: 600; color: var(--quest-ink); }
.sqx-sn { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--quest); border: 1px solid var(--quest-edge); display: inline-flex; align-items: center; justify-content: center; }
/* the timeline */
.sqx-tl { position: relative; display: flex; flex-direction: column; gap: 6px; }
.sqx-tl::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line-2); }
.sqx-file { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding-bottom: 18px; }
.sqx-node { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 2px solid var(--line-2); color: var(--faint); font-size: 12.5px; font-weight: 700; }
.sqx-file.done .sqx-node { background: var(--tg-bar); border-color: var(--tg-bar); color: #fff; }
.sqx-file.open .sqx-node { background: var(--quest); border-color: var(--quest); color: #fff; }
.sqx-file.always .sqx-node { background: var(--quest-tint); border-color: var(--quest-edge); color: var(--quest-ink); }
:root[data-theme="dark"] .sqx-file.open .sqx-node { color: #0E1726; }
.sqx-fb { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 5px; }
.sqx-fh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sqx-fn { color: var(--muted); } .sqx-file.open .sqx-fn { color: var(--quest-ink); }
.sqx-ft { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.sqx-file.locked .sqx-ft { color: var(--muted); }
.sqx-fs { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); background: var(--surface); }
.sqx-fs.done { background: var(--tg-bg); border-color: var(--tg-edge); color: var(--tg-ink); }
.sqx-fs.open { background: var(--quest-tint); border-color: var(--quest-edge); color: var(--quest-ink); }
.sqx-fopen { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--quest-ink); cursor: pointer; } .sqx-fopen:hover { text-decoration: underline; }
.sqx-beat { margin: -4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.sqx-none { margin: 0; font-size: 13px; color: var(--faint); font-style: italic; }
.sqx-file.noq { padding-bottom: 12px; }
.sqx-blink { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--quest-ink); cursor: pointer; } .sqx-blink:hover { text-decoration: underline; }
/* assignment cards */
.sqx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sqx-card { display: flex; flex-direction: column; gap: 11px; padding: 0 16px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--quest); border-radius: 10px; min-width: 0; }
.sqx-card.done { border-top-color: var(--tg-bar); }
.sqx-card.locked { border-top-color: var(--line-2); background: color-mix(in srgb, var(--surface) 55%, var(--sunk)); }
.sqx-tab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 -16px; padding: 9px 16px; border-bottom: 1px dashed var(--line-2); }
.sqx-tab .sqx-eb { color: var(--quest-ink); } .sqx-card.locked .sqx-tab .sqx-eb { color: var(--muted); } .sqx-card.done .sqx-tab .sqx-eb { color: var(--tg-eb); }
.sqx-stamp { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border: 1.5px solid; }
.sqx-stamp.done { color: var(--tg-ink); border-color: var(--tg-bar); background: var(--tg-bg); }
.sqx-stamp.open { color: var(--quest-ink); border-color: var(--quest); background: var(--quest-tint); }
.sqx-stamp.locked { color: var(--muted); border-color: var(--line-2); background: var(--surface); }
.sqx-ch { display: flex; gap: 12px; align-items: center; }
.sqx-ic { flex: none; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--quest-tint); color: var(--quest-ink); border: 1px solid var(--quest-edge); }
.sqx-card.done .sqx-ic { background: var(--tg-bg); color: var(--tg-ink); border-color: var(--tg-edge); }
.sqx-card.locked .sqx-ic { background: var(--sunk); color: var(--faint); border-color: var(--line-2); }
.sqx-ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .sqx-ct b { font-family: var(--display); font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.sqx-skill { font-size: 12.5px; color: var(--muted); }
.sqx-story { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); padding-left: 11px; border-left: 2px solid var(--quest-edge); }
.sqx-card.locked .sqx-story { color: var(--muted); border-left-color: var(--line-2); }
.sqx-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.sqx-rew { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--quest-tint); color: var(--quest-ink); border: 1px solid var(--quest-edge); white-space: nowrap; }
.sqx-rew.done { background: var(--tg-bg); color: var(--tg-ink); border-color: var(--tg-edge); } .sqx-rew.fun { background: var(--sunk); color: var(--muted); border-color: var(--line-2); }
.sqx-best { font-family: var(--mono); font-size: 12px; color: var(--muted); } .sqx-best b { color: var(--ink); }
.sqx-lock { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--line-2); background: var(--surface); color: var(--muted); }
.sqx-lock > svg { flex: none; }
.sqx-lock-t { flex: 1 1 160px; display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13px; } .sqx-lock-t b { color: var(--ink); font-size: 13.5px; }
.sqx-lock-p { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.sqx-mbar { flex: 0 0 90px; height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; } .sqx-mbar span { display: block; height: 100%; background: var(--quest); }
.sqx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sqx-acts .btn { min-height: 40px; }
.sqx-note { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; color: var(--muted); } .sqx-note svg { flex: none; }
/* modals */
.sqx-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 24, 22, .55); }
.sqx-mbox { width: min(580px, 100%); max-height: min(90vh, 780px); display: flex; flex-direction: column; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--quest); color: var(--ink); overflow: hidden; }
.sqx-mbox.wide { width: min(660px, 100%); }
.sqx-mh { display: flex; align-items: center; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.sqx-mh .sqx-ct { flex: 1; } .sqx-mh .sqx-ct b { font-size: 21px; } .sqx-mh .sqx-eb { color: var(--quest-ink); display: inline-flex; align-items: center; gap: 10px; }
.sqx-x { width: 40px; height: 40px; flex: none; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sqx-x:hover { border-color: var(--quest); }
.sqx-mb { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sqx-tie { padding: 11px 14px; border-radius: 8px; background: var(--quest-tint); border-left: 3px solid var(--quest); } .sqx-tie .sqx-lab { color: var(--quest-ink); } .sqx-tie p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.sqx-goal { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.sqx-sec { display: flex; flex-direction: column; gap: 8px; } .sqx-sec .sqx-lab { color: var(--muted); }
.sqx-ctl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sqx-ctl li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.sqx-key { flex: none; min-width: 92px; text-align: center; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 11.5px; }
.sqx-fin { margin: 0; display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink); } .sqx-fin svg { flex: none; margin-top: 3px; color: var(--quest); }
.sqx-sc { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.sqx-tip { margin: 0; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--vault-bg); color: var(--vault-ink); font-size: 13.5px; line-height: 1.45; } .sqx-tip svg { flex: none; margin-top: 2px; }
.sqx-mine { margin: 0; font-size: 13px; color: var(--muted); } .sqx-mine b { color: var(--ink); }
.sqx-mf { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sqx-mf .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; }
.sqx-btabs { display: flex; gap: 8px; padding: 12px 20px 0; overflow-x: auto; scrollbar-width: thin; }
.sqx-btabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.sqx-btabs button:hover { border-color: var(--quest); color: var(--ink); }
.sqx-btabs button.on { background: var(--quest); border-color: var(--quest); color: #fff; }
:root[data-theme="dark"] .sqx-btabs button.on { color: #0E1726; }
.sqx-bseg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 0; } .sqx-bseg .segctl { flex: none; } .sqx-bseg .segctl button { padding: 0 14px; min-height: 34px; }
.sqx-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sqx-mb.obb { padding: 10px 0 6px; min-height: 260px; }
.sqx-loading { margin: 0; padding: 14px 20px; font-size: 13.5px; color: var(--muted); }
.sqx-live { display: inline-flex; align-items: center; gap: 5px; letter-spacing: .08em; color: var(--tg-eb); } .sqx-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--tg-bar); }
@media (prefers-reduced-motion: no-preference) { .sqx-live i { animation: sqxPulse 1.6s ease-in-out infinite; } }
@keyframes sqxPulse { 50% { opacity: .35; } }
.sqx-res { padding: 14px 16px; border-radius: 10px; border: 1px solid; display: flex; flex-direction: column; gap: 10px; }
.sqx-res.ok { background: var(--tg-bg); border-color: var(--tg-edge); color: var(--tg-ink); } .sqx-res.no { background: var(--tm-bg); border-color: var(--tm-edge); color: var(--tm-ink); } .sqx-res.bad { background: var(--tl-bg); border-color: var(--tl-edge); color: var(--tl-ink); }
.sqx-rs { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-size: 20px; font-weight: 800; }
.sqx-rn { display: flex; gap: 22px; flex-wrap: wrap; } .sqx-rn > span { display: flex; flex-direction: column; gap: 2px; } .sqx-rn .sqx-lab { opacity: .85; } .sqx-rn b { font-family: var(--mono); font-size: 22px; } .sqx-rn b.ok { color: var(--tg-eb); }
.sqx-res p { margin: 0; font-size: 14px; line-height: 1.5; } .sqx-det { opacity: .8; }
.sqx-rboard { border: 1px solid var(--line); border-radius: 10px; padding: 8px 0 4px; background: var(--surface); } .sqx-rboard .obb-me { margin: 0 12px 6px; }
/* play view */
.sqx-play { display: flex; flex-direction: column; gap: 10px; }
.sqx-pbar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--quest); border-radius: 10px; }
.sqx-pt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .sqx-pt .sqx-eb { color: var(--quest-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqx-pt b { font-family: var(--display); font-size: 19px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqx-pr { display: flex; align-items: center; gap: 8px; flex: none; }
.sqx-pbest { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sqx-ib { min-height: 36px; }
.sqx-brief { display: flex; gap: 12px; align-items: baseline; padding: 8px 14px; border-radius: 8px; background: var(--quest-tint); border-left: 3px solid var(--quest); }
.sqx-brief .sqx-lab { flex: none; color: var(--quest-ink); } .sqx-brief p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sqx-stage { height: var(--sqx-h, 640px); overflow: auto; display: flex; justify-content: center; align-items: flex-start; }
.sqx-game { width: 100%; max-width: 1000px; }
.sqx-game > .sq, .sqx-game > .module-card { margin: 0 auto; }
/* a quest's own help card (inside its field) scrolls from the top instead of clipping when it's taller than the field */
.sq-ov:not([hidden]) { display: flex; } .sq-ov > * { margin: auto; }
body.sqx-playing .dz-sub, body.sqx-playing #footer { display: none !important; }
body.sqx-playing > main { padding-bottom: 0 !important; }
@media (max-width: 1100px) { .sqx-head { grid-template-columns: minmax(0, 1fr); align-items: start; } .sqx-sum { max-width: 460px; } .sqx-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media (max-width: 900px) {
  body.sqx-playing .dz-top, body.sqx-playing .dz-btabs, body.sqx-playing #btabs, body.sqx-playing #obReportBtn, body.sqx-playing #footer { display: none !important; }
  body.sqx-playing > main { padding-top: 8px !important; padding-bottom: 0 !important; }
  .sqx-ib span, .sqx-pbest, .sqx-pft { display: none; }
  .sqx-ib { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 600px) {
  .sqx-ht h1 { font-size: 32px; }
  .sqx-cards { grid-template-columns: minmax(0, 1fr); }
  .sqx-tl::before { left: 13px; } .sqx-file { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; } .sqx-node { width: 28px; height: 28px; font-size: 11px; }
  .sqx-steps li { padding: 10px 12px; }
  .sqx-fopen { margin-left: 0; }
  .sqx-pbar { gap: 8px; padding: 6px 8px; } .sqx-back span { display: none; } .sqx-back { width: 38px; padding: 0; justify-content: center; }
  .sqx-pt b { font-size: 16px; } .sqx-rew { font-size: 11.5px; padding: 2px 7px; }
  #sqxChip { display: none; }
  .sqx-brief { padding: 6px 10px; } .sqx-brief .sqx-lab { display: none; } .sqx-brief p { font-size: 12.5px; }
  .sqx-modal { padding: 0; align-items: flex-end; } .sqx-mbox { border-radius: 14px 14px 0 0; max-height: 92vh; }
  .sqx-key { min-width: 76px; }
}
/* Daily Passphrase sized to the quest stage: the grid and keys shrink so the keyboard stays on screen */
.sqx-stage .pw-grid { width: min(330px, 100%, max(200px, calc((var(--sqx-h, 640px) - 300px) * 0.8))); }
.sqx-stage .pw-key { height: clamp(40px, calc(var(--sqx-h, 640px) * 0.075), 52px); }
/* v5.16.1 arcade spacing: the view host stacks its parts with a gap (the game tabs sat on the board), roomier cards,
   and buttons that keep their padding and never squeeze their label */
#arxView { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.arx-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.arx-card { padding: 18px; gap: 14px; }
.arx-acts { flex-wrap: wrap; gap: 10px; }
.arx-acts .btn { flex: 1 1 auto; min-height: 42px; padding: 0 16px; white-space: nowrap; }
.arx-acts .btn svg { flex: none; }
.arx-foot { margin-top: 4px; }
.arx-tabs { gap: 8px 10px; padding-bottom: 2px; }
.arx-tabs button { padding: 0 16px; }
.arx-bh { padding: 18px 20px; }
.arx-bb { padding: 12px 0 8px; }
.arx-bb .obb-empty { padding: 36px 20px 24px; }
.arx-bb > .obb-me, .arx-bb .obb-me { margin-left: 20px; margin-right: 20px; }
.arx-bl { padding: 12px 20px 18px; }
.arx-bf { padding: 16px 20px; }
.arx-bf .btn { padding: 0 18px; white-space: nowrap; }
@media (max-width: 600px) { .arx-grid { grid-template-columns: minmax(0, 1fr); } .arx-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; margin: 0 -16px; padding: 0 16px 4px; } }
/* v5.17 field guide: "+5" on notes and checks that still pay the first time (drawer and every story entry point), and
   an "In the case" example under a note, shown only for the story it belongs to */
.g-ptag, .fn-pts { flex: none; display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 99px; font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1.5; background: var(--learn-tint); color: var(--learn-ink); border: 1px solid var(--learn-edge); white-space: nowrap; }
.g-ptag { margin-left: 6px; }
.fn-row .fn-pts { margin-left: auto; } .fn-row .fn-pts + .fn-rt { margin-left: 8px; }
.wt-note-m .fn-pts { margin-left: 6px; }
.g-case { margin: 10px 0 4px; padding: 9px 12px; border-radius: 8px; background: var(--learn-tint); border-left: 3px solid var(--learn); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
.g-case .label { display: block; margin-bottom: 2px; color: var(--learn-ink); }

/* v5.18 a11y: the department roster toggle is a real button now (the row stays clickable) */
.tm-row .tm-tog { border: 0; background: none; padding: 4px; margin: -4px; border-radius: 6px; cursor: pointer; }
.tm-row .tm-tog:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
/* v5.18: on phones the awareness report's wide tables scroll inside the report instead of the whole console page */
@media screen and (max-width: 700px) { body.dz-admin .report table, .report table { display: block; max-width: 100%; overflow-x: auto; } }

/* =====================================================================================================================
   v5.19 certificate preview: until the program ends the certificate is a preview (scores and ranks still move). Each
   page carries a diagonal PREVIEW mark (it prints too), players get no print button, and a player's print shows only a
   "not final yet" note instead of the pages. Coordinators can print a marked preview copy. Batch = .cert-set per player.
   ===================================================================================================================== */
.cert-pv { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; transform: rotate(-22deg); }
.cert-pv span { font-family: 'Archivo', sans-serif; font-size: 150px; font-weight: 800; letter-spacing: .12em; line-height: 1; text-transform: uppercase; color: rgba(184, 78, 52, .13); -webkit-text-stroke: 2px rgba(184, 78, 52, .32); }
.cert-pv small { font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(160, 67, 44, .55); }
.cert-pvtag { display: inline-block; vertical-align: 3px; margin-left: 8px; padding: 2px 9px; border-radius: 10px; background: #FCE1D6; color: #8E3A22; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.cert-bar-t small { max-width: 72ch; line-height: 1.45; }
.cert-bar-a { align-items: center; flex-wrap: wrap; }
.cert-lockchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; background: #F1EFE8; border: 1px dashed #D3CDBE; color: #3D4A43; font-weight: 600; font-size: 14px; }
.cert-printlock { display: none; }
.cert-set { display: flex; flex-direction: column; align-items: center; gap: 24px; }
@media print {
  body.cert-open .cert-set { display: block; break-after: page; page-break-after: always; }
  body.cert-open .cert-set:last-child { break-after: auto; page-break-after: auto; }
  body.cert-open .cert-pv { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.cert-locked .cert-pages { display: none !important; }
  body.cert-locked .cert-printlock { display: flex !important; flex-direction: column; gap: 10px; padding: 1in; font-family: 'IBM Plex Sans', system-ui, sans-serif; color: #16241D; }
  body.cert-locked .cert-printlock b { font-family: 'Archivo', sans-serif; font-size: 28px; } body.cert-locked .cert-printlock span { font-size: 16px; max-width: 60ch; line-height: 1.5; }
}
/* v5.19 console › Certificates */
body.dz-admin .cx-status { display: flex; gap: 14px; align-items: flex-start; border-top: 3px solid var(--tm-eb, #B7791F); }
body.dz-admin .cx-status.is-final { border-top-color: var(--tg-eb, #1F7A4D); }
body.dz-admin .cx-st-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tm-bg, #FDF1D3); color: var(--tm-eb, #8A5E07); }
body.dz-admin .cx-status.is-final .cx-st-ic { background: var(--tg-bg, #E3F4E8); color: var(--tg-eb, #1F7A4D); }
body.dz-admin .cx-st-t b { font-size: 16px; } body.dz-admin .cx-st-t p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; max-width: 80ch; }
body.dz-admin .cx-tiles .cx-date { font-size: 20px; line-height: 1.2; }
body.dz-admin .cx-steps { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; max-width: 90ch; }
body.dz-admin .cx-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
body.dz-admin .cx-acts .btn { display: inline-flex; align-items: center; gap: 8px; }
body.dz-admin .cx-tmpl pre { white-space: pre-wrap; }
body.dz-admin .ax-card.cx-status { padding: 16px 20px !important; }
body.dz-admin .cx-body { padding: 16px 20px 18px; margin: 0; }
body.dz-admin .cx-body .help:last-child { margin-bottom: 0; }
body.dz-admin .cx-mail { display: flex; gap: 10px; align-items: flex-start; } body.dz-admin .cx-mail .cx-tmpl { flex: 1; min-width: 0; margin: 0; }
body.dz-admin .cx-mail > .btn { flex: none; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { body.dz-admin .cx-mail { flex-direction: column; } body.dz-admin .cx-mail > .btn { margin-top: 0; } }

/* =====================================================================================================================
   v5.21 Awareness report (.ar): a co-branded results pack. On screen: Letter-width paper sheets, one per section. In
   print: Letter portrait, one section per page (the @page margins and running footer are injected by admin.js as
   #arPageStyle), colors kept, cards never split. Fixed paper colors whatever the console theme, like the certificate.
   ===================================================================================================================== */
body.dz-admin .ar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
body.dz-admin .ar-tools .btn { display: inline-flex; align-items: center; gap: 8px; }
.ar { --ink: #16241D; --ink2: #3D4A43; --muted: #56615A; --line: #E6E2D8; --paper: #FFFFFF; --wash: #F6F4EE; --green: #1F7A4D; --green2: #2E9A5E;
  --good: #1F7A4D; --good-bg: #E3F4E8; --mid: #8A5E07; --mid-bg: #FDF1D3; --low: #A63A22; --low-bg: #FCE1D6; --blue: #2A5C9A; --sand: #C9A95C; --cta: #B84E34;
  color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 13.5px; line-height: 1.5; max-width: 8.5in; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.ar * { box-sizing: border-box; }
.ar-page { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(22, 36, 29, .07); padding: 0.55in 0.6in; display: flex; flex-direction: column; gap: 16px; }
.ar h1, .ar h2, .ar h3 { font-family: 'Archivo', sans-serif; color: var(--ink); margin: 0; }
.ar-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ar-arena { height: 34px; width: auto; display: block; }
.ar-x { font-size: 22px; font-weight: 300; color: #9A9384; }
.ar-client { height: 36px; max-width: 200px; object-fit: contain; display: block; }
.ar-client-name { font-family: 'Archivo', sans-serif; font-size: 18px; }
.ar-status { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 12px; }
.ar-status.final { background: var(--good-bg); color: var(--good); } .ar-status.live { background: var(--mid-bg); color: var(--mid); }
.ar-title { padding: 6px 0 2px; }
.ar-eb { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--cta); margin-bottom: 6px; }
.ar-title h1 { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.ar-sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.ar-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ar-kpi { border-radius: 10px; padding: 12px 14px; background: var(--wash); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ar-kpi b { font-family: 'Archivo', sans-serif; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ar-kpi span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.ar-kpi small { font-size: 11.5px; color: var(--muted); }
.ar-kpi.t-good { background: var(--good-bg); border-color: #BFE3CB; } .ar-kpi.t-good b { color: var(--good); }
.ar-kpi.t-mid { background: var(--mid-bg); border-color: #F0D9A0; } .ar-kpi.t-mid b { color: var(--mid); }
.ar-kpi.t-low { background: var(--low-bg); border-color: #F2C3B1; } .ar-kpi.t-low b { color: var(--low); }
.ar-kpi.k-green b { color: var(--green); } .ar-kpi.k-blue b { color: var(--blue); } .ar-kpi.k-sand b { color: #7A5A0C; } .ar-kpi.k-rose b { color: var(--low); }
.ar-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--paper); }
.ar-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ar-cap { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.ar-card > .ar-cap:last-child { margin-bottom: 0; margin-top: 10px; }
.ar-empty { margin: 8px 0 0; color: var(--muted); font-style: italic; }
.ar-heads { border-left: 4px solid var(--green); background: #FBFAF6; }
.ar-heads ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ar-heads b { color: var(--ink); }
.ar-about p { margin: 6px 0 0; color: var(--ink2); }
.ar-run { display: flex; justify-content: space-between; gap: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6F6A5E; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ar-sh { display: flex; align-items: flex-start; gap: 12px; }
.ar-sn { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.ar-sh h2 { font-size: 22px; font-weight: 800; } .ar-sh p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.ar-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ar-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ar-mini .ar-kpi b { font-size: 22px; }
/* funnel */
.ar-funnel { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ar-frow { display: grid; grid-template-columns: 2.3in minmax(0, 1fr) 0.95in 0.4in; align-items: center; gap: 10px; font-size: 12.5px; }
.ar-flab { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-ftrack { height: 16px; background: var(--wash); border-radius: 4px; overflow: hidden; }
.ar-fbar { display: block; height: 100%; border-radius: 4px; }
.ar-fbar.k-ink { background: #4F5B55; } .ar-fbar.k-blue { background: var(--blue); } .ar-fbar.k-green { background: var(--green2); } .ar-fbar.k-cta { background: var(--cta); }
.ar-fval { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; } .ar-fval b { color: var(--ink); }
.ar-fdrop { font-size: 11px; color: #6F6A5E; text-align: right; font-variant-numeric: tabular-nums; }
/* weekly columns */
.ar-cols { display: flex; align-items: flex-end; gap: 8px; height: 150px; margin-top: 8px; padding-bottom: 34px; position: relative; }
.ar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; min-width: 0; }
.ar-cv { font-size: 11.5px; font-weight: 700; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.ar-cbar { width: 100%; max-width: 44px; background: var(--green2); border-radius: 4px 4px 0 0; min-height: 2px; }
.ar-cl { position: absolute; top: 100%; margin-top: 6px; text-align: center; font-size: 11px; color: var(--ink2); line-height: 1.25; white-space: nowrap; }
.ar-cl small { display: block; font-size: 9.5px; color: var(--muted); }
/* tables */
.ar-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ar-table th { text-align: left; font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1.5px solid #D3CDBE; }
.ar-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ar-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-table tbody tr:last-child td { border-bottom: 0; }
.ar-bt { white-space: nowrap; } .ar-bt .ar-track { display: inline-block; width: 1.3in; vertical-align: middle; margin-right: 8px; }
.ar-bv { font-weight: 700; font-variant-numeric: tabular-nums; }
.ar-track { height: 10px; background: var(--wash); border-radius: 5px; overflow: hidden; display: block; flex: 1; }
.ar-fill { display: block; height: 100%; border-radius: 5px; }
.ar-fill.t-good { background: var(--green2); } .ar-fill.t-mid { background: #E0A526; } .ar-fill.t-low { background: #D2603F; } .ar-fill.t-na, .ar-fill.k-mute { background: #B8B2A4; }
.ar-pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ar-pill.t-good { background: var(--good-bg); color: var(--good); } .ar-pill.t-mid { background: var(--mid-bg); color: var(--mid); } .ar-pill.t-low { background: var(--low-bg); color: var(--low); } .ar-pill.t-na { background: var(--wash); color: var(--muted); }
.ar-heat .ar-hc { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.ar-heat .ar-hc.t-good { background: var(--good-bg); color: var(--good); } .ar-heat .ar-hc.t-mid { background: var(--mid-bg); color: var(--mid); } .ar-heat .ar-hc.t-low { background: var(--low-bg); color: var(--low); } .ar-heat .ar-hc.t-na { color: var(--muted); }
.ar-heat td { border-bottom: 2px solid #fff; }
.ar-medal { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--wash); color: var(--ink2); }
.ar-medal.m0 { background: #F3E2A8; color: #6B4E00; } .ar-medal.m1 { background: #E3E6EA; color: #3F4750; } .ar-medal.m2 { background: #F1D3BA; color: #6E3B12; }
/* strengths / gaps */
.ar-good { border-top: 3px solid var(--green2); } .ar-gap { border-top: 3px solid var(--cta); }
.ar-pz { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ar-pz li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #FBFAF6; border: 1px solid var(--line); }
.ar-pz-t { display: flex; flex-direction: column; min-width: 0; } .ar-pz-t small { color: var(--muted); font-size: 11px; }
.ar-pz-v { flex: none; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 17px; padding: 2px 8px; border-radius: 8px; }
.ar-pz-v.t-good { background: var(--good-bg); color: var(--good); } .ar-pz-v.t-mid { background: var(--mid-bg); color: var(--mid); } .ar-pz-v.t-low { background: var(--low-bg); color: var(--low); }
/* field guide comparison */
.ar-cmp { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ar-cl2 { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ar-crow { display: grid; grid-template-columns: 1.25in minmax(0, 1fr) 0.45in; align-items: center; gap: 8px; font-size: 12.5px; } .ar-crow b { text-align: right; font-variant-numeric: tabular-nums; }
/* recommendations + definitions */
.ar-recs ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; } .ar-recs li { padding-left: 4px; color: var(--ink2); } .ar-recs li b { color: var(--ink); }
.ar-recs li::marker { font-family: 'Archivo', sans-serif; font-weight: 800; color: var(--green); }
.ar-defs dl { margin: 8px 0 0; display: grid; grid-template-columns: 1.55in minmax(0, 1fr); gap: 5px 14px; font-size: 12px; }
.ar-defs dt { font-weight: 700; } .ar-defs dd { margin: 0; color: var(--ink2); }
.ar-foot { margin: 12px 0 0; font-size: 11px; color: #6F6A5E; }
/* phones and narrow windows */
@media (max-width: 760px) {
  .ar-page { padding: 20px 16px; } .ar-title h1 { font-size: 30px; } .ar-kpis, .ar-two, .ar-mini { grid-template-columns: minmax(0, 1fr); }
  .ar-frow { grid-template-columns: minmax(0, 1fr) 0.9in; } .ar-frow .ar-ftrack { grid-column: 1 / -1; } .ar-fdrop { display: none; }
  .ar-card { overflow-x: auto; } .ar-status { margin-left: 0; } .ar-bt .ar-track { width: 70px; }
}
/* print: one section per Letter page, nothing but the report */
@media print {
  html, body.dz-admin { background: #fff !important; }
  body.dz-admin .ax-side, body.dz-admin .ax-head, body.dz-admin .ar-tools, body.dz-admin #toast, body.dz-admin .cb-watermark { display: none !important; }
  body.dz-admin .ax-main, body.dz-admin #stage, body.dz-admin .view-host { margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }
  .ar { max-width: none; gap: 0; font-size: 12.5px; }
  .ar-page { border: 0; border-radius: 0; box-shadow: none; padding: 0; gap: 14px; break-after: page; page-break-after: always; }
  .ar-page:last-child { break-after: auto; page-break-after: auto; }
  .ar-card, .ar-kpi, .ar-frow, .ar-two, .ar-table tr, .ar-sh, .ar-pz li { break-inside: avoid; page-break-inside: avoid; }
  .ar, .ar * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .ar-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .ar-two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ar-title h1 { font-size: 36px; }
}
@media print { body.dz-admin .skip-link { display: none !important; } }
.ar-appx .ar-defs dl { grid-template-columns: 1.7in minmax(0, 1fr); gap: 9px 16px; font-size: 12.5px; }
.ar-cl { font-size: 10.5px; } .ar-cl small { font-size: 9.5px; }
/* v5.21.2 achievements: tiles open the badge case; team badges under the personal ones */
button.dz-bd-c { background: none; border: 0; padding: 4px 2px; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
button.dz-bd-c:hover .bm { box-shadow: 0 0 0 3px var(--line2, #D3CDBE); } button.dz-bd-c:focus-visible { outline: 2px solid var(--accent-2, #1F7A4D); outline-offset: 2px; }
.dz-achv-all { background: none; border: 0; padding: 0; font: 600 12px 'IBM Plex Mono', monospace; color: var(--accent-text, #1F7A4D); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.dz-achv-team { margin: 14px 20px 16px; padding-top: 12px; border-top: 1px solid var(--line, #E6E2D8); display: flex; flex-direction: column; gap: 8px; }
.dz-achv-th { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .dz-achv-th > span:first-child { display: flex; flex-direction: column; } .dz-achv-th small { color: var(--faint); font-size: 11.5px; }
.dz-achv-tb { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-tb-c { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--bc); background: color-mix(in srgb, var(--bc) 14%, #fff); }
.dz-tb-c:focus-visible { outline: 2px solid var(--bc); outline-offset: 2px; }
.dz-achv-team p { margin: 0; } .dz-achv-more { align-self: flex-start; }
/* v5.21.3: a case example that isn't open yet */
.g-case.g-case-lock { opacity: .85; font-style: italic; }

/* ---------- v5.22 How to play: the page tab (.instr-tab.htp) and the onboarding pop-up (.instr-modal.htp) ---------- */
.htp { --htp-top: 0px; --htp-pad: 0px; --htp-cost: #a13d1a; color: var(--ink); }
body.dz .card.instr-tab.htp { --htp-pad: clamp(22px, 3vw, 40px); max-width: 1000px; padding: var(--htp-pad); }
@media (max-width: 900px) { .htp { --htp-top: calc(var(--dz-top-h) + env(safe-area-inset-top, 0px)); } }
.htp p { white-space: pre-line; }
.htp-hero .stand-h { margin: 0 0 12px; }
.htp-lede { font-size: 17px; line-height: 1.55; color: var(--ink); margin: 0 0 14px; max-width: 72ch; }
.htp-note { border-left: 3px solid var(--fill-edge); background: var(--paper); border-radius: 0 8px 8px 0; padding: 12px 16px; max-width: 72ch; }
.htp-note p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.htp-note p:last-child { margin: 0; }

/* jump bar: sticks under the phone top bar (the desktop rail is on the side, so it sticks to the top there) */
.htp-nav { position: sticky; top: var(--htp-top); z-index: 6; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 24px calc(-1 * var(--htp-pad)) 0; padding: 10px var(--htp-pad); background: var(--surface); border-bottom: 1px solid var(--line); }
.htp-nav::-webkit-scrollbar { display: none; }
.htp-nav button { flex: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; min-height: 36px; cursor: pointer; }
.htp-nav button:hover { color: var(--ink); border-color: var(--red); }
.htp-nav button[aria-current="true"] { background: var(--fill); border-color: var(--fill-edge); color: var(--fill-ink); }

.htp-sec { padding: 30px 0 4px; scroll-margin-top: calc(var(--htp-top) + 70px); }
.htp-sh { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.htp-sh-ic { width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--red-tint); color: var(--red-ink); }
.htp-sh-ic svg { width: 19px; height: 19px; }
body.dz .htp-sh h3 { margin: 1px 0 0; font-size: 22px; font-weight: 800; line-height: 1.2; outline: none; }
.htp-sh p { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Start here */
.htp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.htp-step { border: 1px solid var(--line); border-top: 3px solid var(--fill-edge); border-radius: var(--dz-rad); background: var(--surface); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.htp-step-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.htp-step-n { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); font-weight: 700; }
.htp-step-ic { color: var(--red-ink); display: inline-flex; }
.htp-step-ic svg { width: 18px; height: 18px; }
.htp-step b { font-size: 15.5px; line-height: 1.3; }
.htp-step p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); flex: 1; }
.htp-link { align-self: flex-start; margin-top: 4px; display: inline-flex; gap: 6px; align-items: center; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--red-ink); background: none; border: 0; padding: 6px 0; min-height: 32px; cursor: pointer; }
.htp-link svg { width: 14px; height: 14px; }
.htp-link:hover { text-decoration: underline; }

/* The game: the coordinator's sections */
.htp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.htp-card { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: var(--dz-rad); padding: 16px; background: var(--surface); min-width: 0; }
.htp-card-ic { width: 34px; height: 34px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--paper); color: var(--red-ink); border: 1px solid var(--line); }
.htp-card-ic svg { width: 17px; height: 17px; }
.htp .htp-card h4 { margin: 3px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.25; }
.htp .htp-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.htp .htp-card p:last-child { margin: 0; }

/* Scoring */
.htp-group { margin: 0 0 20px; }
body.dz .htp-group h4 { margin: 0 0 10px; font-family: var(--mono); font-stretch: 100%; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.htp-count { font-family: var(--mono); letter-spacing: .04em; text-transform: none; font-size: 11.5px; color: var(--red-ink); background: var(--red-tint); border-radius: 999px; padding: 2px 8px; }
.htp-gsub { margin: -4px 0 12px; font-size: 13.5px; color: var(--muted); }
.htp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; }
.htp-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.htp-tile { border: 1px solid var(--line); border-radius: var(--dz-rad); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.htp-tile-top { display: flex; align-items: center; gap: 8px; }
.htp-tile-ic { color: var(--red-ink); display: inline-flex; }
.htp-tile-ic svg { width: 17px; height: 17px; }
.htp-tile-n { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.htp-tile-l { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.htp-tile small { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.htp-tile.cost .htp-tile-n, .htp-tile.cost .htp-tile-ic { color: var(--htp-cost); }
.htp-tile.free .htp-tile-n { color: var(--red-ink); }
.htp-tile.lvl { gap: 4px; }
.htp-tile.lvl .htp-tile-n { font-size: 30px; }
.htp-lvl { display: inline-flex; gap: 4px; margin-bottom: 4px; }
.htp-lvl i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.htp-lvl i.on { background: var(--red); }
.htp-example { border: 1px dashed var(--line-2); border-radius: var(--dz-rad); padding: 14px 16px; background: var(--paper); margin: 0 0 20px; }
.htp-cap { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.htp-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.htp-eq span { display: inline-flex; flex-direction: column; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; min-width: 64px; }
.htp-eq span b { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.htp-eq span small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.htp-eq i { font-style: normal; font-weight: 700; font-size: 17px; color: var(--muted); }
.htp-eq .res { background: var(--red-tint); border-color: var(--fill-edge); }
.htp-example p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.htp-faq { border: 1px solid var(--line); border-radius: var(--dz-rad); background: var(--surface); overflow: hidden; }
.htp-faq details + details { border-top: 1px solid var(--line); }
.htp-faq summary { list-style: none; cursor: pointer; padding: 12px 16px; min-height: 48px; box-sizing: border-box; font-weight: 700; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.htp-faq summary::-webkit-details-marker { display: none; }
.htp-faq summary:hover { background: var(--paper); }
.htp-faq summary svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.htp-faq details[open] summary svg { transform: rotate(180deg); }
.htp-faq details p { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 75ch; }

/* Badges */
.htp-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.htp-bd { display: flex; align-items: flex-start; gap: 12px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); padding: 12px 14px; cursor: pointer; min-width: 0; }
.htp-bd:hover { border-color: var(--bc); }
.htp-bd-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--bc); background: color-mix(in srgb, var(--bc) 13%, #fff); }
.htp-bd-ic svg { width: 19px; height: 19px; }
.htp-bd-t { min-width: 0; }
.htp-bd-t b { display: block; font-size: 14px; line-height: 1.3; }
.htp-bd-t small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.htp-bd-ok { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; font-weight: 700; color: #157a49; background: #e6f4ec; border-radius: 999px; padding: 2px 8px; }
.htp-bd-ok svg { width: 11px; height: 11px; }
.htp-bd.got { border-color: color-mix(in srgb, var(--bc) 45%, var(--line)); }
.htp-tier { font-size: 13px; font-weight: 700; color: var(--ink); margin: 14px 0 8px; }
.htp-tier:first-of-type { margin-top: 0; }

/* Find your way */
.htp-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.htp-go { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--dz-rad); padding: 12px 14px; min-height: 60px; cursor: pointer; min-width: 0; }
.htp-go:hover { border-color: var(--red); }
.htp-go:hover > svg { color: var(--red-ink); }
.htp-go-t { flex: 1; min-width: 0; }
.htp-go-t b { display: block; font-size: 14.5px; }
.htp-go-t small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.htp-go > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.htp-help { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--dz-rad); padding: 14px 16px; }
.htp-help p { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.htp-help p b { color: var(--ink); }
.htp-help a { color: var(--red-ink); font-weight: 600; }

/* the pop-up: header (title + jump bar) stays put, the body scrolls */
body.dz .instr-modal.htp { width: min(840px, 100%); max-height: min(90vh, 920px); }
.instr-modal.htp #instrNav:empty { display: none; }
.instr-modal.htp .htp-nav { position: static; margin: 14px 0 0; padding: 0 0 12px; }
body.dz .instr-modal.htp .instr-sections { display: block; overflow-y: auto; margin: 0 -8px; padding: 4px 8px 8px; gap: 0; min-height: 0; flex: 1 1 auto; }
.instr-modal.htp .htp-intro { padding-top: 14px; }
.instr-modal.htp .htp-intro:empty { display: none; }
.instr-modal.htp .htp-sec { scroll-margin-top: 0; padding-top: 22px; }
.instr-modal.htp .htp-sec:first-of-type { padding-top: 18px; }
.instr-modal.htp .htp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.dz .instr-modal.htp .actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 1100px) { .htp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .htp-cards, .htp-map { grid-template-columns: minmax(0, 1fr); }
  .htp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .htp-tile-n { font-size: 21px; }
  .htp-tile.lvl .htp-tile-n { font-size: 24px; }
  body.dz .htp-sh h3 { font-size: 20px; }
  .htp-lede { font-size: 16px; }
}
@media (max-width: 520px) {
  .htp-steps, .instr-modal.htp .htp-steps { grid-template-columns: minmax(0, 1fr); }
  .htp-tiles.three { gap: 8px; }
  .htp-tile.lvl { padding: 12px 10px; }
  .htp-tile.lvl .htp-tile-l { font-size: 12.5px; }
  .htp-tiles:not(.three) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .htp-tiles:not(.three) .htp-tile { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 12px 14px; }
  .htp-tiles:not(.three) .htp-tile-top { grid-row: 1 / span 2; flex-direction: column; align-items: flex-start; gap: 2px; }
  .htp-tiles:not(.three) .htp-tile-n { font-size: 19px; }
  .htp-tiles:not(.three) .htp-tile small { margin-top: 1px; }
  .htp-eq { gap: 5px; }
  .htp-eq span { padding: 6px 8px; min-width: 0; }
  .htp-eq span b { font-size: 17px; }
  .htp-eq i { font-size: 15px; }
  body.dz .instr-modal.htp .actions .btn { flex: 1 1 auto; }
  .htp-help > .htp-card-ic { display: none; }
}
@media (prefers-reduced-motion: reduce) { .htp-faq summary svg { transition: none; } }

/* v5.22.1 console: registered-player count beside Players (a count, not an alert, so it stays neutral) */
body.dz-admin .navbadge.nb-count { background: rgba(255,255,255,.12); color: var(--console-text, #E8ECEF); font-weight: 600; }
body.dz-admin nav.side button.active .navbadge.nb-count { background: rgba(255,255,255,.2); color: #fff; }

/* v5.22.2 Home: the department race lists every department, one line each, and scrolls inside its card.
   Desktop: the card ends level with "Within reach" (the list takes what's left). Your row is sticky,
   so it pins to the top or bottom edge while it's scrolled out of view. */
.dz-home-main { align-items: stretch; }
.dz-race { display: flex; flex-direction: column; min-height: 0; }
.dz-race-rows { flex: 1 1 0; height: 0; min-height: 190px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.dz-race-rows:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.dz-race-r { grid-template-columns: 22px minmax(0, 1fr) minmax(44px, 28%) 30px; grid-template-areas: "rk nm tr sc"; padding: 7px 0; }
.dz-race-r .sc { text-align: right; }
.dz-race-r .tr { height: 5px; }
.dz-race-r.me { position: sticky; top: 0; bottom: 0; z-index: 1; padding: 7px 20px; box-shadow: 0 -1px 0 var(--line), 0 1px 0 var(--line); }
.dz-race-foot { padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 1280px) { .dz-race-rows { flex: none; height: auto; min-height: 0; max-height: 320px; } }

/* v5.22.3 case board: Previously / Habits / Field notes as bars under the briefing, closed by default */
.dz-case-grid.dz-case-g + .dz-case-extras.dz-xbars, .dz-case-extras.dz-xbars { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 0; align-items: start; }
body.dz .card.dz-xb { padding: 0; overflow: hidden; }
.dz-xb > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 16px 18px; border-radius: inherit; }
.dz-xb > summary::-webkit-details-marker { display: none; }
.dz-xb > summary:hover { background: color-mix(in srgb, var(--ink) 3%, var(--panel)); }
.dz-xb > summary:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.dz-xb-ic { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; }
.dz-xb-ic svg { width: 19px; height: 19px; }
.dz-xb-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dz-case-extras .dz-xb-t b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.dz-xb-t small { font-size: 12.5px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-xb-pill { align-self: flex-start; margin-top: 5px; font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.dz-xb-chev { color: var(--muted); display: grid; place-items: center; transition: transform .18s ease; }
.dz-xb-chev svg { width: 18px; height: 18px; }
.dz-xb[open] .dz-xb-chev { transform: rotate(180deg); }
.dz-xb-body { padding: 16px 18px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.dz-xb-body .fn-list { margin: 0; }
.dz-xb-body p { margin: 0; line-height: 1.5; }
.dz-xb-hab .dz-xb-ic, .dz-xb-hab .dz-xb-pill { background: color-mix(in srgb, var(--fill) 34%, var(--panel)); color: var(--red-ink); }
.dz-xb-fn .dz-xb-ic, .dz-xb-fn .dz-xb-pill { background: var(--learn-tint); color: var(--learn-ink); }
.dz-xb-fn .dz-xb-pill { border-color: var(--learn-edge); }
.dz-xb-prev .dz-xb-ic, .dz-xb-prev .dz-xb-pill { background: color-mix(in srgb, var(--quest, #2F5E9E) 12%, var(--panel)); color: var(--quest-ink, var(--quest, #2F5E9E)); }
body.dz .dz-xb-hab[open] { border-top: 3px solid var(--red); }
body.dz .dz-xb-fn[open] { border-top: 3px solid var(--learn); }
body.dz .dz-xb-prev[open] { border-top: 3px solid var(--quest, #2F5E9E); }
@media (prefers-reduced-motion: reduce) { .dz-xb-chev { transition: none; } }
@media (max-width: 640px) { .dz-xb > summary { padding: 14px 14px; gap: 12px; } .dz-xb-body { padding: 14px; } }
/* field note rows: the reading time sat in a fourth cell of a three-column grid and wrapped under the dot as "1 / min" */
.fn-row { grid-template-columns: 20px minmax(0, 1fr) auto auto; }
.fn-row .fn-rt { white-space: nowrap; }
.dz-xb-body .fn-badge { display: block; line-height: 1.5; }
.dz-xb-body .fn-badge svg { vertical-align: -1px; }

/* v5.22.4 Puzzle 1 call: evidence only (no per-line tagging); lines read as transcript, not buttons */
.sk-call-ev .sk-line { cursor: default; }
.sk-call-ev .sk-line:hover { border-color: var(--line); background: inherit; }
