/* CyberQuest - Windows 95 Style Cybersecurity Training Game */
/* Shared Styles */

:root {
  --win-bg: #c0c0c0;
  --win-shadow: #808080;
  --win-dark: #404040;
  --win-light: #ffffff;
  --win-title: #000080;
  --win-title-2: #1084d0;
  --win-text: #000000;
  --good: #008000;
  --bad: #c00000;
  --warn: #b8860b;
  --info: #1f5f99;
  --hover: #e8e8ff;
  --panel: #ffffe1;          /* Win95 tooltip/balloon yellow */
  --panel-dark: #10151f;
  --focus: #000080;
  --ink-soft: #404040;
  --paper-good: #f0fff0;
  --paper-bad: #fff0f0;
  --paper-neutral: #f5f5f5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: "MS Sans Serif", "Tahoma", "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
  color: var(--win-text);
  background: #008080;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* Desktop */
.desktop {
  position: fixed;
  inset: 0 0 28px 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
}

.icon {
  width: 88px;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  color: white;
  border: 1px dotted transparent;
  position: relative;
}

.icon:hover .icon-img {
  filter: brightness(0.85);
}

.icon.selected {
  border-color: rgba(255,255,255,0.6);
  background: rgba(0,0,128,0.3);
}

.icon-img {
  width: 48px;
  height: 48px;
  margin: 0 auto 4px;
  display: block;
  image-rendering: pixelated;
}

.icon-label {
  font-size: 12px;
  color: white;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
  line-height: 1.2;
  word-wrap: break-word;
}

.badge-count {
  position: absolute;
  top: 0; right: 8px;
  background: #ff0000;
  color: white;
  font-weight: bold;
  font-size: 11px;
  border: 1px solid #800000;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.4);
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Window */
.window {
  position: absolute;
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 1px 1px 0 #000, inset -1px -1px 0 var(--win-shadow);
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 60px);
}

.window.hidden { display: none; }

.title-bar {
  background: linear-gradient(90deg, var(--win-title), var(--win-title-2));
  color: white;
  font-weight: bold;
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.title-bar .title { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.title-bar .title-icon { width: 16px; height: 16px; }

.title-buttons { display: flex; gap: 2px; }

.tb-btn {
  width: 18px; height: 16px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  color: black;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 1;
}

.tb-btn:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

.window-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  background: var(--win-bg);
}

.status-bar {
  border-top: 1px solid var(--win-shadow);
  padding: 4px 6px;
  display: flex;
  gap: 4px;
  background: var(--win-bg);
}

.status-bar .panel {
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 2px 8px;
  flex: 1;
  font-size: 11px;
}

.progress {
  flex: 2;
  height: 16px;
  background: white;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 1px;
}

.progress > div {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, #000080 0 8px, transparent 8px 10px);
  transition: width 0.3s;
}

/* Email mockup inside window */
.email {
  background: white;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

.email .head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid #c0c0c0;
  background: white;
}

.email .subject {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  color: black;
}

.email .meta-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  flex-wrap: wrap;
}

.email .meta-label {
  color: #404040;
  width: 40px;
  flex-shrink: 0;
  font-weight: bold;
}

.sender {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  position: relative;
}

.sender .name { font-weight: bold; color: black; }
.sender .addr {
  color: #404040;
  font-size: 11px;
  background: #f0f0f0;
  padding: 0 4px;
  border: 1px dashed #808080;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
}

.sender:hover .addr {
  opacity: 1;
  visibility: visible;
}

.email .body {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #111;
  background: white;
}
.email .body p { margin: 0 0 0.85em; }
.email .body p:last-child { margin-bottom: 0; }
.email .body ul, .email .body ol { margin: 0 0 0.85em 1.2em; }

.email .body a {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
  position: relative;
}

.email .body a:hover::after {
  content: attr(data-real);
  position: absolute;
  left: 0; top: 100%;
  margin-top: 4px;
  background: #ffffe1;
  color: black;
  padding: 2px 6px;
  border: 1px solid black;
  font-size: 11px;
  white-space: nowrap;
  z-index: 5;
  font-weight: normal;
}

/* Win95 Buttons */
.win-btn {
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  box-shadow: inset 1px 1px 0 var(--win-bg), 1px 1px 0 black;
  color: black;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  min-width: 80px;
}

.win-btn:active:not(:disabled) {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  box-shadow: inset -1px -1px 0 var(--win-bg);
  padding: 6px 13px 4px 15px;
}

.win-btn:disabled { color: #808080; text-shadow: 1px 1px 0 white; cursor: not-allowed; }
.win-btn.primary { font-weight: bold; }

.controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 1000;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  padding: 2px 6px;
  font-weight: bold;
  cursor: pointer;
  height: 22px;
}

.start-btn:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

.taskbar-divider {
  width: 1px;
  background: var(--win-shadow);
  height: 18px;
  margin: 0 4px;
  box-shadow: 1px 0 0 white;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  height: 22px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  cursor: pointer;
  font-size: 11px;
  min-width: 140px;
}

.task-item.active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  background: linear-gradient(135deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%) 0 0/4px 4px,
              linear-gradient(135deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%) 2px 2px/4px 4px,
              var(--win-bg);
}

/* System-tray buttons (sound toggle). Sits left of the clock and takes over
   the auto-margin that used to push the clock to the right edge. */
.tray-btn {
  margin-left: auto;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  background: var(--win-bg);
  padding: 2px 6px;
  height: 22px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.tray-btn:active {
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-shadow);
  border-bottom: 1px solid var(--win-shadow);
}

.tray-btn.cq-muted { opacity: 0.55; }

/* When the tray button is present it owns the auto-margin, so the clock
   simply sits next to it. */
.tray-btn + .clock { margin-left: 2px; }

.clock {
  margin-left: auto;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 2px 8px;
  font-size: 11px;
  height: 22px;
  display: flex;
  align-items: center;
}

/* CRT effect overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 3px);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* ====================================================== */
/* Intro / login screen — modern (it is about the test,    */
/* not the simulated computer; the Win95 machine boots     */
/* after Start). Uses the shared modern tokens below.      */
/* ====================================================== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 30%, #1d3350 0%, #0f1a2b 70%);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--m-ink);
}
.login-screen.hidden { display: none; }
.login-screen.fade-out {
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}

.login-window {
  width: min(520px, 100%);
  margin: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: wd-scene-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.login-body { padding: 28px 32px 26px; }

.intro-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--m-faint); margin-bottom: 8px;
}
.intro-title { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.login-tagline { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--m-soft); }

.intro-blurb {
  background: var(--m-tint);
  border: 1px solid var(--m-line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.5;
}
.intro-blurb p { margin: 0 0 2px; font-weight: 600; }
.intro-blurb .intro-tips-hint { font-weight: normal; font-size: 13px; color: var(--m-soft); margin: 0 0 12px; }
.intro-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.intro-tips label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.intro-tips input[type="checkbox"] {
  flex: none; width: 18px; height: 18px; margin: 1px 0 0;
  accent-color: var(--m-accent); cursor: pointer;
}
.intro-tips input:checked + span { color: var(--m-soft); }
.intro-tips li.intro-tip-missed span { color: var(--m-fail); font-weight: 600; }
.intro-tips-progress { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--m-faint); }
.intro-tips-progress.done { color: var(--m-pass); }

.login-sound-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0 0; padding: 12px 16px;
  background: #eef4fd; border-radius: 12px;
  font-size: 13px; line-height: 1.5; color: #2459a8;
}
.login-sound-note-icon { font-size: 15px; line-height: 1.3; }

.login-form { display: grid; grid-template-columns: 1fr; row-gap: 6px; margin-top: 20px; }
.login-form label { font-size: 13px; font-weight: 600; }
.login-form input {
  width: 100%;
  font: inherit; font-size: 15px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #cfd5df;
  border-radius: 10px;
  color: var(--m-ink);
}
.login-form input:focus { outline: none; border-color: var(--m-accent); box-shadow: 0 0 0 3px rgba(47, 111, 208, 0.2); }
.login-error {
  background: var(--m-fail-bg); color: var(--m-fail);
  border-radius: 10px; padding: 10px 12px; font-size: 13px;
}
.login-error.hidden { display: none; }
.login-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.login-start-hint { flex: 1; font-size: 13px; color: var(--m-faint); }
.intro-tips input:focus-visible { outline: 2px solid var(--m-accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .login-body { padding: 22px 20px 20px; }
  .login-actions { flex-direction: column; align-items: stretch; }
}

/* ====================================================== */
/* Workday — Yearly Training                               */
/* ====================================================== */

/* Event modal layer */

 .wd-narrative-body {
  background: white; border: 1px solid #c0c0c0; padding: 10px 12px;
  line-height: 1.5; font-size: 12px;
}

.wd-decisions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

/* Debrief */

.wd-timeline {
  background: white; border: 1px inset #c0c0c0; padding: 4px;
}
.wd-timeline-row {
  display: flex; gap: 10px; padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
  align-items: flex-start;
}
.wd-timeline-row:last-child { border-bottom: none; }
.wd-timeline-good { background: #f0fff0; }
.wd-timeline-bad  { background: #fff0f0; }
.wd-timeline-skipped { background: #f5f5f5; color: #808080; font-style: italic; }

.wd-tl-main { flex: 1; }
.wd-tl-title { font-weight: bold; }
.wd-tl-choice { font-size: 11px; color: #404040; margin: 2px 0; }
.wd-tl-feedback { font-size: 11px; line-height: 1.4; margin-top: 4px; }
.wd-tl-points {
  font-family: "Courier New", monospace; font-weight: bold;
  flex: 0 0 40px; text-align: right;
}
.wd-timeline-good .wd-tl-points { color: var(--good); }
.wd-timeline-bad .wd-tl-points { color: var(--bad); }

/* ====================================================== */
/* Workday — Desktop-native rendering                      */
/* ====================================================== */

/* Shared decision buttons used by toast / popup / bubble / mail */
.wd-decisions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.wd-decision-btn {
  text-align: left;
  min-height: 32px;
  padding: 8px 12px;
  background: white;
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
}
.wd-decision-btn:hover { background: var(--hover); }
.wd-decision-btn:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}
/* Win95 focus: a dotted rectangle inside the button, plus an outer ring so it
   survives on the busy mail pane. Keyboard only. */
.wd-decision-btn:focus-visible,
.win-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
  box-shadow: 0 0 0 2px var(--focus);
}

.wd-leaving { opacity: 0; transform: scale(0.96); transition: opacity 180ms, transform 180ms; }

/* ------------------------------------------------------ */
/* Notification stack — every toast shares this column     */
/* ------------------------------------------------------ */
/* Bottom-right above the taskbar, newest at the bottom, at most three deep
   (helpers.js retires the oldest). It sits under the popup and bubble
   backdrops on purpose: when a decision is on screen, the toasts dim with the
   rest of the desktop and the decision is the only bright thing. */
.wd-notify-stack {
  position: fixed;
  right: 16px;
  bottom: 40px;
  z-index: 4100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 330px;
  max-width: calc(100vw - 32px);
}
.wd-notify-stack > * {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ------------------------------------------------------ */
/* "You've got mail" toast                                 */
/* ------------------------------------------------------ */
.wd-mail-toast {
  pointer-events: auto;
  background: white;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.25), 0 0 0 4px rgba(0,128,128,0.15);
  overflow: hidden;
  font-size: 12px;
  animation: wd-mail-toast-in 280ms cubic-bezier(0.2, 1, 0.3, 1);
  transition: opacity 200ms, transform 200ms;
}
@keyframes wd-mail-toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.wd-mail-toast-header {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: white;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
}
.wd-mail-toast-icon { font-size: 14px; }
.wd-mail-toast-title { flex: 1; }
.wd-mail-toast-close {
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  font-weight: bold;
  width: 18px; height: 16px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.wd-mail-toast-body {
  padding: 8px 10px 6px;
  background: #fff;
}
.wd-mail-toast-from {
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-mail-toast-subject {
  color: #404040;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-mail-toast-actions {
  padding: 6px 10px 10px;
  display: flex;
  justify-content: flex-end;
  background: white;
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADINGS
════════════════════════════════════════════════════════════ */

.wd-section { padding: 12px 20px 10px; border-top: 1px solid #c0c0c0; }
.wd-section-title {
  font-weight: bold;
  font-size: 12px;
  color: #000080;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY BREAKDOWN
════════════════════════════════════════════════════════════ */

.wd-category-breakdown { display: flex; flex-direction: column; gap: 6px; }

/* ---------- bonus: lunch game high score ---------- */

/* Visually off to one side of the scoring sections — a warm, playful strip
   rather than another graded panel, so nobody reads it as part of the result. */
.wd-bonus-section {
  background: linear-gradient(180deg, #fffdf2, #fdf6df);
}
.wd-bonus-section .wd-section-title { color: #7a5c00; }

.wd-bonus-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e2d49a;
  border-radius: 4px;
}

.wd-bonus-icon { font-size: 26px; line-height: 1; flex: 0 0 auto; }

.wd-bonus-main {
  flex: 0 0 96px;
  text-align: center;
  border-right: 1px solid #e6dcb8;
  padding-right: 12px;
}
.wd-bonus-score {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.05;
  color: #6b4e00;
}
.wd-bonus-label {
  font-size: 10.5px;
  color: #8a7433;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.wd-bonus-note {
  flex: 1 1 auto;
  font-size: 11.5px;
  line-height: 1.45;
  color: #6a5a2e;
}

.wd-bonus-skipped .wd-bonus-score { color: #a99c72; }

.wd-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.wd-cat-icon { flex: 0 0 16px; text-align: center; }
.wd-cat-name { flex: 0 0 160px; }
.wd-cat-bar-wrap {
  flex: 1;
  height: 10px;
  background: #e0e0e0;
  border: 1px solid #bbb;
  overflow: hidden;
}
.wd-cat-bar { height: 100%; transition: width 800ms ease-out; }
.wd-cat-pct {
  flex: 0 0 36px;
  text-align: right;
  font-family: "Courier New", monospace;
  font-weight: bold;
}
.wd-cat-count { flex: 0 0 42px; color: #606060; font-size: 11px; }

/* ═══════════════════════════════════════════════════════════
   TIER BADGES (timeline + key)
════════════════════════════════════════════════════════════ */

.wd-tier-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tier-best    { background: #166534; color: #bbf7d0; }
.tier-good    { background: #2563a0; color: #bfdbfe; }

.tier-neutral { background: #555;    color: #d0d0d0; }

.tier-worst   { background: #7f1d1d; color: #fecaca; }

/* Updated timeline row to accommodate tier badge */
.wd-tl-score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 70px;
  padding-left: 8px;
}
.wd-timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}

/* Tier scoring key */
.wd-tier-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 11px;
}
.wd-tier-key-row span:not(.wd-tier-badge) { color: #404040; }

/* ═══════════════════════════════════════════════════════════
   ALREADY-COMPLETED DIALOG (modern card, see .wd-modern-card)
════════════════════════════════════════════════════════════ */

.ac-scores {
  margin: 18px 0 0;
  border: 1px solid var(--m-line);
  border-radius: 12px;
  overflow: hidden;
}
.ac-score-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ac-score-row + .ac-score-row { border-top: 1px solid var(--m-line); }
.ac-score-row span:first-child { color: var(--m-soft); }
.ac-score-row span:last-child { font-weight: 600; }
.ac-result.is-pass span:last-child { color: var(--m-pass); }
.ac-result.is-fail span:last-child { color: var(--m-fail); }

.wd-mail-toast-open {
  font-size: 11px;
  padding: 3px 10px;
  min-width: 0;
}

/* Mail desktop icon flash when new mail arrives */
.icon.wd-icon-flash { animation: wd-icon-flash 1.6s ease-in-out 2; }
@keyframes wd-icon-flash {
  0%,100% { filter: none; }
  50%     { filter: brightness(1.4) drop-shadow(0 0 6px #ffffaa); }
}

/* ------------------------------------------------------ */
/* Outlook-clone Mail App (rendered into #game)            */
/* ------------------------------------------------------ */
/* When workday manages the mail app body, drop padding so the
   sidebar + reading pane go edge to edge. */
#game[data-wd-managed] { padding: 0; display: flex; flex-direction: column; }

.wd-mailapp {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 380px;
  background: #ece9d8;
  font-size: 12px;
}
.wd-mailapp-toolbar {
  background: linear-gradient(180deg, #f5f4ef, #e2dfd1);
  border-bottom: 1px solid var(--win-shadow);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  color: #000080;
}
.wd-mailapp-counts {
  font-weight: normal;
  font-size: 11px;
  color: #404040;
  font-family: "Courier New", monospace;
}
.wd-mailapp-split {
  flex: 1;
  display: flex;
  min-height: 0;
}
.wd-mailapp-sidebar {
  width: 240px;
  flex: 0 0 240px;
  border-right: 1px solid var(--win-shadow);
  background: #fdfdf7;
  overflow-y: auto;
}
.wd-mailapp-reading {
  flex: 1;
  background: white;
  overflow-y: auto;
  padding: 0;
}

.wd-inbox-item {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e2d3;
  cursor: pointer;
  align-items: flex-start;
}
.wd-inbox-item:hover { background: #f3efe1; }
.wd-inbox-item-selected, .wd-inbox-item-selected:hover {
  background: #316ac5;
  color: white;
}
.wd-inbox-item-selected .wd-inbox-item-from,
.wd-inbox-item-selected .wd-inbox-item-subject,
.wd-inbox-item-selected .wd-inbox-item-preview,
.wd-inbox-item-selected .wd-inbox-item-time,
.wd-inbox-item-selected .wd-inbox-item-status {
  color: white;
}
.wd-inbox-item-status {
  flex: 0 0 14px;
  font-size: 12px;
  font-weight: bold;
  color: #316ac5;
  text-align: center;
  margin-top: 2px;
}
.wd-inbox-item-handled .wd-inbox-item-status { color: #008000; }
.wd-inbox-item-main {
  flex: 1;
  min-width: 0;
}
.wd-inbox-item-from {
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-inbox-item-unread .wd-inbox-item-from { color: #000080; }
.wd-inbox-item-handled .wd-inbox-item-from { color: #404040; font-weight: normal; }
.wd-inbox-item-subject {
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.wd-inbox-item-handled .wd-inbox-item-subject { color: #606060; }
.wd-inbox-item-preview {
  color: #606060;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.wd-inbox-item-time {
  color: #606060;
  font-size: 11px;
  font-family: "Courier New", monospace;
  flex: 0 0 auto;
  margin-top: 2px;
}

.wd-mail-empty-pane {
  padding: 40px 16px;
  text-align: center;
  color: #808080;
  font-style: italic;
}
.wd-inbox-empty-list {
  padding: 24px 12px;
  text-align: center;
  color: #808080;
  font-style: italic;
}

/* Reading pane: reuse the .email styles, plus action area */
.wd-mailapp-reading .email {
  border: none;
  background: white;
}
.wd-mailapp-reading .email .head {
  padding: 14px 18px 10px;
  border-bottom: 1px solid #d0d0d0;
}
.wd-mailapp-reading .email .subject {
  font-size: 16px;
  margin-bottom: 10px;
}
.wd-mailapp-reading .email .meta-row {
  margin-bottom: 2px;
}
.wd-mailapp-reading .email .body {
  padding: 18px 20px 22px;
  font-size: 13px;
  line-height: 1.6;
  background: white;
  max-width: 680px;
}

.wd-mail-actions {
  background: var(--win-bg);
  border-top: 1px solid var(--win-shadow);
  padding: 12px 14px;
}
.wd-mail-actions-label {
  font-weight: bold;
  color: #000080;
  margin-bottom: 6px;
  font-size: 12px;
}

/* Per-mail feedback shown after the user has decided */
.wd-mail-feedback {
  margin: 0;
  padding: 12px 14px;
  border-top: 2px solid #c0c0c0;
}
.wd-mail-feedback-good { background: #e8ffe8; }
.wd-mail-feedback-bad  { background: #ffe8e8; }
.wd-mail-feedback-head {
  font-weight: bold;
  margin-bottom: 6px;
}
.wd-mail-feedback-body {
  font-size: 12px;
  line-height: 1.5;
}
.wd-mail-feedback-points {
  float: right;
  font-family: "Courier New", monospace;
  font-weight: bold;
}
.wd-mail-feedback-good .wd-mail-feedback-points { color: var(--good); }
.wd-mail-feedback-bad  .wd-mail-feedback-points { color: var(--bad); }

/* expose sender addr on hover (already partial in core .email) */
.email .sender .addr {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  background: #ffffe1;
  color: black;
  padding: 2px 6px;
  border: 1px solid black;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
  font-weight: normal;
}


@keyframes wd-toast-in {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ------------------------------------------------------ */
/* System Popup — Win95 modal dialog with backdrop         */
/* ------------------------------------------------------ */
.wd-syspopup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 4500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wd-overlay-in 160ms ease-out;
}
@keyframes wd-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wd-syspopup {
  width: min(440px, 92%);
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  animation: wd-popup-in 180ms ease-out;
}
@keyframes wd-popup-in {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.wd-syspopup-titlebar {
  background: linear-gradient(90deg, #800000, #c00000);
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 12px;
}
.wd-syspopup-body {
  padding: 14px 14px 4px;
  background: var(--win-bg);
  font-size: 12px;
  line-height: 1.5;
}
.wd-syspopup-actions {
  padding: 10px 14px 14px;
  background: var(--win-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wd-syspopup-actions .wd-decision-btn {
  text-align: center;
  min-width: 120px;
}

/* ------------------------------------------------------ */
/* Speech Bubble — narrative / task moments                */
/* ------------------------------------------------------ */
/* Lighter than the popup backdrop: a narrative moment is a scene, not an
   alarm, but it should still be the one thing you are looking at. */
.wd-bubble-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 4150;
  animation: wd-overlay-in 200ms ease-out;
}
.wd-bubble-backdrop.wd-leaving { transform: none; }
.wd-bubble {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  width: min(520px, 92%);
  background: #ffffe1;
  border: 2px solid #000;
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  padding: 0;
  z-index: 4200;
  font-size: 12px;
  animation: wd-bubble-in 220ms cubic-bezier(0.2, 1, 0.3, 1);
}
@keyframes wd-bubble-in {
  from { opacity: 0; transform: translate(-50%, 24px) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.wd-bubble-speaker {
  background: #fff5b8;
  border-bottom: 1px solid #000;
  border-radius: 12px 12px 0 0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: #000080;
}
.wd-bubble-icon { font-size: 16px; }
.wd-bubble-speaker > span:nth-child(2) { flex: 1; }

.wd-bubble-body {
  padding: 12px 14px;
  line-height: 1.55;
  color: #000;
}
.wd-bubble-actions {
  padding: 0 14px 14px;
}
/* little tail at the bottom of the bubble */
.wd-bubble-tail {
  position: absolute;
  bottom: -14px;
  left: 48px;
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 14px solid #ffffe1;
  filter: drop-shadow(0 2px 0 #000);
}
.wd-bubble-tail::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -14px;
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 16px solid #000;
  z-index: -1;
}

/* ------------------------------------------------------ */
/* Resume window (still a real Win95 window)               */
/* ------------------------------------------------------ */
.wd-finale-window {
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35), 1px 1px 0 #000, inset -1px -1px 0 var(--win-shadow);
  animation: wd-popup-in 220ms ease-out;
}

/* ------------------------------------------------------ */
/* UNIVERSAL link tooltip: any <a data-real="..."> shows   */
/* its real URL in a tooltip on hover.                     */
/* ------------------------------------------------------ */
a[data-real] {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
  position: relative;
}
a[data-real]:hover::after {
  content: attr(data-real);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  background: #ffffe1;
  color: #000;
  padding: 2px 6px;
  border: 1px solid #000;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10000;
  font-weight: normal;
  font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
  pointer-events: none;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

/* ====================================================== */
/* Slack — toast + app                                     */
/* ====================================================== */
.wd-slack-toast {
  pointer-events: auto;
  background: white;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.25), 0 0 0 4px rgba(74,21,75,0.15);
  overflow: hidden;
  font-size: 12px;
  animation: wd-toast-in 280ms cubic-bezier(0.2, 1, 0.3, 1);
  transition: opacity 200ms, transform 200ms;
}
.wd-slack-toast-header {
  background: linear-gradient(90deg, #4a154b, #611f64);
  color: white; font-weight: bold;
  padding: 5px 8px;
  display: flex; align-items: center; gap: 6px;
}
.wd-slack-toast-icon { font-size: 14px; }
.wd-slack-toast-title { flex: 1; }
.wd-slack-toast-close {
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  font-weight: bold;
  width: 18px; height: 16px;
  cursor: pointer; font-size: 11px; line-height: 1;
}
.wd-slack-toast-body {
  padding: 8px 10px 6px; background: #fff;
}
.wd-slack-toast-from { font-weight: bold; color: #000; }
.wd-slack-toast-preview {
  color: #404040; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wd-slack-toast-actions {
  padding: 6px 10px 10px; background: white;
  display: flex; justify-content: flex-end;
}

/* Slack app */
.wd-slackapp {
  display: flex; flex: 1; height: 100%; min-height: 380px;
  background: #fff; font-size: 13px;
}
.wd-slackapp-sidebar {
  width: 200px; flex: 0 0 200px;
  background: #3f0e40; color: #d6b6d6;
  overflow-y: auto;
  padding: 0;
}
.wd-slack-workspace {
  background: #350d36;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.wd-slack-ws-name { color: #fff; font-weight: bold; font-size: 14px; }
.wd-slack-ws-user { color: #b3b3b3; font-size: 11px; margin-top: 2px; }
.wd-slack-section {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.wd-slack-section-label {
  text-transform: uppercase;
  font-size: 10px; letter-spacing: 0.5px;
  color: #b289b2; padding: 4px 12px; font-weight: bold;
}
.wd-slack-thread {
  padding: 4px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: #d6b6d6;
}
.wd-slack-thread:hover { background: rgba(255,255,255,0.05); color: #fff; }
.wd-slack-thread-selected, .wd-slack-thread-selected:hover {
  background: #1164a3; color: #fff;
}
.wd-slack-thread-unread { color: #fff; font-weight: bold; }
.wd-slack-thread-replied { opacity: 0.65; }
.wd-slack-dot { color: #ec5f5f; font-size: 8px; }
.wd-slack-empty-channel {
  padding: 4px 14px; font-size: 11px; color: #876c87; font-style: italic;
}
.wd-slackapp-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: #fff;
}
.wd-slack-empty-pane {
  padding: 60px 20px; text-align: center; color: #888; font-style: italic;
}
.wd-slack-convo {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
}
.wd-slack-convo-header {
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 18px;
}
.wd-slack-convo-title { font-weight: bold; color: #1d1c1d; }
.wd-slack-convo-sub { color: #696969; font-size: 12px; margin-top: 2px; }
.wd-slack-messages {
  flex: 1; overflow-y: auto;
  padding: 14px 18px;
}
.wd-slack-msg { display: flex; gap: 10px; margin-bottom: 12px; }
.wd-slack-msg-avatar {
  width: 36px; height: 36px; flex: 0 0 36px;
  background: #4a154b; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; border-radius: 6px;
  text-transform: uppercase;
}
.wd-slack-msg-bubble { flex: 1; min-width: 0; }
.wd-slack-msg-meta {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px;
}
.wd-slack-msg-name { font-weight: bold; color: #1d1c1d; }

.wd-slack-msg-body { color: #1d1c1d; line-height: 1.55; }
.wd-slack-input {
  border-top: 1px solid #d0d0d0;
  padding: 12px 18px;
  background: #fafafa;
}
.wd-slack-input-prompt {
  font-size: 11px; color: #696969; margin-bottom: 6px;
}
.wd-slack-input-sent {
  color: #1d1c1d; background: #f6f6f6;
}

.wd-slack-input-msg { font-style: italic; color: #404040; }

/* ====================================================== */
/* Tasks app                                               */
/* ====================================================== */
.wd-task-toast {
  pointer-events: auto;
  background: white;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.25), 0 0 0 4px rgba(184,134,11,0.15);
  overflow: hidden;
  font-size: 12px;
  animation: wd-mail-toast-in 280ms cubic-bezier(0.2, 1, 0.3, 1);
}
.wd-task-toast-header {
  background: linear-gradient(90deg, #b8860b, #e0a82e);
  color: white; font-weight: bold;
  padding: 5px 8px;
  display: flex; align-items: center; gap: 6px;
}
.wd-task-toast-icon { font-size: 14px; }
.wd-task-toast-title { flex: 1; }
.wd-task-toast-close {
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  font-weight: bold; width: 18px; height: 16px; cursor: pointer; font-size: 11px;
}
.wd-task-toast-body {
  padding: 8px 10px;
  color: #000;
}
.wd-task-toast-actions {
  padding: 6px 10px 10px;
  background: white;
  display: flex; justify-content: flex-end;
}

.wd-tasksapp {
  display: flex; height: 100%; flex: 1;
  background: #ece9d8; min-height: 380px;
}
.wd-tasks-list {
  width: 280px; flex: 0 0 280px;
  background: #fdfdf7;
  border-right: 1px solid var(--win-shadow);
  overflow-y: auto;
}
.wd-tasks-list-header {
  background: linear-gradient(180deg, #f5f4ef, #e2dfd1);
  border-bottom: 1px solid var(--win-shadow);
  padding: 6px 12px; font-weight: bold; color: #000080;
}
.wd-tasks-empty {
  padding: 24px 12px; text-align: center; color: #808080; font-style: italic;
}
.wd-task-row {
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  border-bottom: 1px solid #e5e2d3;
}
.wd-task-row:hover { background: #f3efe1; }
.wd-task-row-selected, .wd-task-row-selected:hover {
  background: #316ac5; color: white;
}
.wd-task-row-status {
  font-weight: bold; font-size: 14px; flex: 0 0 14px; text-align: center;
}
.wd-task-row-done .wd-task-row-status { color: #008000; }
.wd-task-row-selected.wd-task-row-done .wd-task-row-status { color: #b6f0b6; }
.wd-task-row-label { flex: 1; font-size: 12px; }
.wd-task-row-done .wd-task-row-label {
  text-decoration: line-through;
  color: #606060;
}
.wd-task-row-selected.wd-task-row-done .wd-task-row-label { color: #d8e8ff; }

.wd-tasks-workspace {
  flex: 1; min-width: 0;
  background: #fff;
  overflow-y: auto;
}
.wd-tasks-workspace-empty {
  padding: 60px 20px; text-align: center; color: #808080; font-style: italic;
}
.wd-task-actions {
  background: var(--win-bg);
  border-top: 1px solid var(--win-shadow);
  padding: 12px 14px;
}
.wd-task-actions-label {
  font-weight: bold; color: #000080;
  margin-bottom: 6px; font-size: 12px;
}
.wd-task-done {
  margin: 12px 14px;
  padding: 12px;
  background: #e8ffe8;
  border: 1px solid #008000;
  color: #004000;
  font-weight: bold;
}
.wd-task-done-sub { display: block; margin-top: 4px; font-weight: normal; color: #404040; font-size: 11px; }

/* Generic task fallback */
.wd-task-generic { padding: 16px 20px; }
.wd-task-generic-title {
  font-size: 14px; font-weight: bold; color: #000080; margin-bottom: 6px;
}
.wd-task-generic-body {
  background: white; border: 1px solid #c0c0c0; padding: 10px 12px;
  line-height: 1.5; margin-bottom: 12px;
}

/* ----- Browser-style task workspace ----- */
.wd-browser {
  display: flex; flex-direction: column;
  background: #f0f0f0;
  height: 100%;
}
.wd-browser-chrome {
  background: linear-gradient(180deg, #d4d0c8, #a8a4a0);
  border-bottom: 1px solid #404040;
  padding: 4px 8px 0;
}
.wd-browser-tabs { display: flex; }
.wd-browser-tab {
  background: #fff;
  border: 1px solid #404040; border-bottom: none;
  padding: 4px 14px;
  font-size: 12px; border-radius: 4px 4px 0 0;
  max-width: 240px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wd-browser-addr {
  background: #fff; margin-top: 2px;
  border: 1px inset #c0c0c0;
  padding: 4px 8px;
  font-family: "Courier New", monospace; font-size: 12px;
  display: flex; gap: 6px; align-items: center;
}
.wd-browser-lock { color: #008000; }
.wd-browser-page {
  flex: 1; background: white; padding: 18px 22px; overflow-y: auto;
}
.wd-form { display: flex; flex-direction: column; gap: 4px; max-width: 320px; }
.wd-form label { font-size: 11px; color: #404040; margin-top: 6px; }
.wd-form input, .wd-form .cq-secret {
  font-family: inherit; font-size: 13px;
  padding: 4px 8px;
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  background: #fff;
}

/* ----- Google Drive share-dialog task workspace ----- */
.wd-share-page { background: #f8f9fa; padding: 12px 16px; }
.wd-share-request {
  background: #fff; border: 1px solid #c0c0c0;
  padding: 8px 12px; line-height: 1.5; margin-bottom: 12px;
}
/* Dialog and answers side by side when there is room, stacked when not, so
   all four answers are visible without scrolling on a laptop screen. */
.wd-share-body { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.wd-share-body .wd-task-actions { flex: 1 1 230px; border: 1px solid var(--win-shadow); }
.wd-share-dialog {
  flex: 1 1 280px;
  max-width: 420px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px rgba(60,64,67,0.15);
  padding: 14px 16px 10px;
  font-family: Arial, Helvetica, sans-serif;
  color: #202124;
}
.wd-share-title { font-size: 17px; margin-bottom: 10px; }
.wd-share-add {
  border: 1px solid #dadce0; border-radius: 4px;
  padding: 9px 10px; color: #5f6368; font-size: 13px;
}
.wd-share-section { font-size: 13px; font-weight: bold; margin: 14px 0 6px; }
.wd-share-person, .wd-share-access {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 4px 0;
}
.wd-share-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1a73e8; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: bold; flex: none;
}
.wd-share-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-share-role { color: #5f6368; }
.wd-share-access-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e8eaed;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.wd-share-access-text { display: flex; flex-direction: column; }
.wd-share-access-text small { color: #5f6368; font-size: 12px; }
.wd-share-access-alt { opacity: 0.6; border-top: 1px dashed #dadce0; margin-top: 4px; padding-top: 8px; }

/* ----- QR flyer taped by the entrance (narrative bubble) ----- */
.wd-qr-flyer {
  background: #fffbe9;
  border: 1px solid #d6c89a;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.18);
  padding: 12px 14px;
  margin: 0 auto 10px;
  max-width: 280px;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  transform: rotate(-1deg);
}
.wd-qr-flyer-kicker { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #a33; }
.wd-qr-flyer-name { font-size: 20px; font-weight: bold; color: #3b2a14; }
.wd-qr-flyer-sub { font-size: 12px; color: #6b5a3a; margin-bottom: 6px; }
.wd-qr-flyer-offer { font-size: 13px; font-weight: bold; color: #1f1f1f; margin-bottom: 8px; }
.wd-qr-flyer-code { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* The sticker sits a little crooked on top of the print — the physical tell. */
.wd-qr-sticker {
  width: 84px; height: 84px;
  background: #fff;
  padding: 4px;
  border: 1px solid #bbb;
  box-shadow: 1px 2px 3px rgba(0,0,0,0.3);
  transform: rotate(6deg) translate(3px, -2px);
}
.wd-qr-flyer-cta { font-size: 11px; color: #3b2a14; font-style: italic; }

/* ====================================================== */
/* Ambient flavour toasts (notification stack, no decision) */
/* ====================================================== */
/* A desktop notification, so pure Win95: bevelled frame and hard shadow,
   the same family as the consequence toasts (.cq-consequence). */
.wd-ambient-toast {
  pointer-events: auto;
  cursor: pointer;
  background: #fff;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  font-size: 11px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  animation: wd-ambient-in 220ms ease-out;
  transition: opacity 250ms, transform 250ms;
  overflow: hidden;
}
@keyframes wd-ambient-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wd-ambient-toast-header {
  background: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow);
  padding: 3px 8px;
  display: flex; align-items: center; gap: 6px;
  color: #000;
}
.wd-ambient-icon { font-size: 12px; }
.wd-ambient-title { flex: 1; font-weight: bold; }

.wd-ambient-body {
  padding: 6px 10px;
  color: #404040;
  line-height: 1.45;
}

/* ====================================================== */
/* Mascot Notification — Clibbie with speech bubble         */
/* ====================================================== */
.mascot-notification {
  position: fixed;
  bottom: 36px;
  right: 16px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}

.mascot-notification.mascot-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Speech bubble */
.mascot-bubble {
  position: relative;
  /* The mascot overlaps the bubble's bottom edge (negative margin below);
     keep the bubble on top so its last button isn't covered by the image. */
  z-index: 1;
  background: #ffffe1;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: -40px;
  max-width: 320px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  font-size: 13px;
  line-height: 1.5;
  color: #000;
  animation: mascot-bubble-in 280ms ease-out;
}

@keyframes mascot-bubble-in {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.mascot-bubble-name {
  font-weight: bold;
  color: #000080;
  font-size: 12px;
  margin-bottom: 4px;
}

.mascot-bubble p {
  margin: 0 0 4px;
}

/* Tail pointing down-right toward the mascot */
.mascot-bubble-tail {
  position: absolute;
  bottom: -14px;
  right: calc(50% - 12px);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 14px solid #ffffe1;
  filter: drop-shadow(0 2px 0 #000);
}

.mascot-bubble-tail::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -14px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 16px solid #000;
  z-index: -1;
}

/* Mascot image — large and clear */
.mascot-img {
  width: 320px;
  height: 320px;
  image-rendering: pixelated;
  object-fit: contain;
  animation: mascot-bounce 600ms ease-in-out 2;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.25));
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-4px); }
}

/* ── Download animation (shown before glitch) ─────────────────────── */
.wd-download-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  animation: wd-overlay-in 160ms ease-out;
}

.wd-download-box {
  background: var(--win-bg, #c0c0c0);
  border: 2px outset #fff;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  min-width: 280px;
  animation: wd-popup-in 180ms ease-out;
}

.wd-download-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.wd-download-filename {
  font-size: 14px;
  font-weight: bold;
  color: #000;
  margin-bottom: 16px;
}

.wd-download-progress {
  width: 100%;
  height: 12px;
  background: #808080;
  border: 1px inset #c0c0c0;
  margin-bottom: 8px;
  overflow: hidden;
}

.wd-download-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #000080 0%, #1084d0 50%, #000080 100%);
  background-size: 20px 100%;
  width: 0%;
  animation: wd-download-fill 1.5s ease-in-out forwards;
}

.wd-download-status {
  font-size: 12px;
  color: #404040;
}

@keyframes wd-download-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ── Realistic Windows Defender ransomware alert ───────────────────── */
.wd-ransom-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  animation: wd-overlay-in 160ms ease-out;
}

.wd-ransom-alert {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.1);
  width: 420px;
  max-width: 90vw;
  font-family: -apple-system, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  animation: wd-popup-in 180ms ease-out;
}

.wd-ransom-alert-header {
  background: #c41e3a;
  color: #fff;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 7px 7px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wd-ransom-icon {
  font-size: 18px;
}

.wd-ransom-alert-body {
  padding: 18px;
  background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
}

.wd-ransom-threat-name {
  font-size: 16px;
  font-weight: 700;
  color: #c41e3a;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.wd-ransom-details {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 16px;
}

.wd-ransom-file-list {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
}

.wd-ransom-file {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.wd-ransom-file-icon {
  font-size: 16px;
}

.wd-ransom-file-name {
  flex: 1;
  color: #333;
  font-family: 'Consolas', 'Monaco', monospace;
}

.wd-ransom-file-status {
  background: #c41e3a;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.wd-ransom-alert-btn {
  margin: 0 18px 18px;
  width: calc(100% - 36px);
  background: #0078d4;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}

.wd-ransom-alert-btn:hover {
  background: #106ebe;
}

/* ── Glitch / Ransomware scare effect ─────────────────────────────── */

.wd-glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
}

.wd-glitch-dialog {
  background: var(--win-bg, #c0c0c0);
  border: 2px outset #fff;
  padding: 28px 36px;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  max-width: 420px;
}

.wd-glitch-dialog-text {
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.5;
  color: #000;
}

.wd-glitch-dismiss-btn {
  font-size: 13px;
  padding: 6px 18px;
}

/* ── Fake browser password-reset window ───────────────────────────── */
.wd-fake-browser {
  width: 480px;
  max-width: 95vw;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.wd-fake-browser-toolbar {
  background: #dee1e6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.wd-fake-browser-dots {
  display: flex;
  gap: 6px;
}

.wd-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.wd-dot-red    { background: #ff5f57; }
.wd-dot-yellow { background: #febc2e; }
.wd-dot-green  { background: #28c840; }

/* The red dot really closes the fake page, as in a real browser. */
.wd-fake-browser-close {
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.wd-fake-browser-close:hover::after,
.wd-fake-browser-close:focus-visible::after {
  content: '×';
  position: absolute;
  inset: 0;
  font: bold 10px/12px sans-serif;
  color: #4d0000;
  text-align: center;
}
.wd-fake-browser-close:focus-visible { outline: 2px solid #1a5fd0; outline-offset: 2px; }

.wd-fake-browser-url {
  flex: 1;
  background: #fff;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.wd-url-lock { font-size: 11px; }
.wd-url-text { color: #555; }

.wd-fake-browser-body {
  background: #fff;
  padding: 32px 36px;
}

.wd-reset-header {
  text-align: center;
  margin-bottom: 24px;
}

.wd-reset-logo {
  font-size: 28px;
  font-weight: 700;
  color: #1259EF;
  letter-spacing: -0.5px;
}

.wd-reset-subtitle {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

.wd-reset-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wd-reset-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-top: 6px;
}

.wd-reset-input {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.wd-reset-input:focus {
  border-color: #1259EF;
}

.wd-reset-submit {
  margin-top: 16px;
  padding: 10px;
  background: #1259EF;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.wd-reset-submit:hover { background: #0d47b3; }

.wd-reset-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  font-size: 11px;
  color: #999;
}

/* ── Phish login notifications ────────────────────────────────────── */
.wd-phish-notif-layer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@keyframes wd-notif-slide {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.wd-phish-notif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #1c1c1e;
  color: #f0f0f0;
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  animation: wd-notif-slide 0.35s ease-out both;
  pointer-events: auto;
}

.wd-phish-notif-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.wd-phish-notif-body {
  flex: 1;
  min-width: 0;
}

.wd-phish-notif-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
  color: #ff453a;
}

.wd-phish-notif-detail {
  font-size: 12px;
  line-height: 1.4;
  color: #ddd;
  word-break: break-word;
}

.wd-phish-notif-loc {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}

/* =============================================================
   GAME LAYER — staging, motion and the playable interactions.
   Everything below is additive: nothing here restyles the
   original Win95 chrome, it only adds theatre on top of it.
   ============================================================= */

/* ---------- screen shake ---------- */

@keyframes cq-shake-hard {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-8px, 4px) rotate(-0.4deg); }
  20% { transform: translate(7px, -5px) rotate(0.35deg); }
  30% { transform: translate(-6px, -3px) rotate(-0.3deg); }
  40% { transform: translate(5px, 4px) rotate(0.25deg); }
  55% { transform: translate(-4px, 2px); }
  70% { transform: translate(3px, -2px); }
  85% { transform: translate(-1px, 1px); }
}

@keyframes cq-shake-soft {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 1px); }
}

.cq-shake-hard { animation: cq-shake-hard 0.6s cubic-bezier(.36,.07,.19,.97) both; }
.cq-shake-soft { animation: cq-shake-soft 0.3s ease-in-out both; }

/* ---------- sign-on sequence (splash → domain logon → desktop) ---------- */

.cq-signon {
  position: fixed;
  inset: 0;
  z-index: 12000;
  overflow: hidden;
  cursor: progress;
  font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
  /* Opaque from the first frame: the overlay is what hides the login form and
     the desktop, and the CRT warm-up below plays over this black, never over
     whatever happens to be behind it. */
  background: #000;
}

/* ---- stage 1: the product splash ---- */

.cq-splash {
  position: absolute;
  inset: 0;
  /* The deep blue-to-black wash every 90s boot screen used. */
  background:
    radial-gradient(120% 90% at 50% 38%, #2c4b93 0%, #16295c 45%, #060a18 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: cq-splash-warmup 0.5s ease-out both;
  transition: opacity 0.35s ease;
}

/* CRT warm-up: the tube widens open before it settles. */
@keyframes cq-splash-warmup {
  0%   { opacity: 0; transform: scaleY(0.04); filter: brightness(3); }
  40%  { opacity: 1; transform: scaleY(0.35); filter: brightness(1.8); }
  100% { opacity: 1; transform: scaleY(1);    filter: brightness(1); }
}

.cq-splash.cq-splash-out { opacity: 0; pointer-events: none; }

.cq-splash-card {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 40px;
  animation: cq-splash-rise 0.9s 0.25s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes cq-splash-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cq-splash-logo {
  width: 104px;
  height: 104px;
  flex: none;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.45));
}

/* A slow lean, so the panes read as a waving flag rather than a static gif. */
.cq-splash-flag {
  transform-origin: 32px 32px;
  animation: cq-splash-wave 3.4s ease-in-out infinite;
}

@keyframes cq-splash-wave {
  0%, 100% { transform: skewY(-2deg) scaleX(1); }
  50%      { transform: skewY(2deg)  scaleX(0.97); }
}

.cq-splash-brand {
  font-size: 44px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.cq-splash-ver {
  font-size: 26px;
  vertical-align: super;
  margin-left: 6px;
  color: #ffd54a;
}

.cq-splash-edition {
  margin-top: 8px;
  font-size: 13px;
  color: #b9c8e8;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.cq-splash-foot {
  position: absolute;
  left: 0; right: 0;
  bottom: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 48px;
}

/* Win95 progress well: sunken, filled by marching blue blocks. */
.cq-splash-track {
  width: min(360px, 60vw);
  height: 18px;
  padding: 2px;
  background: #9aa4b8;
  border-top: 2px solid #4a5468;
  border-left: 2px solid #4a5468;
  border-right: 2px solid #e6ecf8;
  border-bottom: 2px solid #e6ecf8;
  overflow: hidden;
}

.cq-splash-blocks {
  height: 100%;
  width: 40%;
  background:
    repeating-linear-gradient(90deg,
      #4f9cf5 0 10px,
      transparent 10px 13px);
  animation: cq-splash-march 1.5s linear infinite;
}

@keyframes cq-splash-march {
  from { transform: translateX(-105%); }
  to   { transform: translateX(255%); }
}

.cq-splash-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #7e8dad;
  letter-spacing: 0.3px;
}

/* ---- stage 2: the domain logon dialog ---- */

.cq-signon-shell {
  position: absolute;
  inset: 0;
  /* Bare desktop teal — the wallpaper is up, nothing is drawn on it yet. */
  background: #008080;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cq-signon-shell.cq-signon-in { opacity: 1; }

.cq-signon-dialog {
  width: 384px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.45);
  padding: 2px;
  transform-origin: center;
  animation: cq-signon-pop 0.22s ease-out 0.12s both;
}

/* The short, unbouncy snap a Win95 dialog opened with. */
@keyframes cq-signon-pop {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.cq-signon-titlebar {
  background: linear-gradient(90deg, var(--win-title) 0%, var(--win-title-2) 100%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cq-signon-titlebar svg { width: 16px; height: 16px; flex: none; }

.cq-signon-body { padding: 14px 14px 12px; }

.cq-signon-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--win-shadow);
  box-shadow: 0 1px 0 0 var(--win-light);
}

.cq-signon-avatar svg {
  width: 34px;
  height: 34px;
  display: block;
  image-rendering: pixelated;
}

.cq-signon-welcome { font-size: 13px; margin-bottom: 3px; }

.cq-signon-meta {
  font-size: 11px;
  color: #4a4a4a;
  word-break: break-all;
}

.cq-signon-status {
  font-size: 12px;
  margin-bottom: 8px;
  min-height: 15px;
}

/* Each new status line fades up in place — one line, never a scrolling log. */
.cq-signon-status-tick { animation: cq-signon-line 0.22s ease-out both; }

@keyframes cq-signon-line {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cq-signon-track {
  height: 20px;
  padding: 2px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  overflow: hidden;
}

/* Segmented fill: the classic run of navy tiles with a hairline between them. */
.cq-signon-fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg,
      var(--win-title) 0 11px,
      var(--win-bg) 11px 13px);
  transition: width 0.45s cubic-bezier(.3,.9,.3,1);
}

.cq-signon-note {
  margin-top: 10px;
  font-size: 11px;
  color: #4a4a4a;
}

.cq-signon-skip {
  position: absolute;
  bottom: 14px; right: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Hand-over: the overlay simply lifts, revealing the desktop underneath. */
.cq-signon-done {
  animation: cq-signon-handover 0.6s ease-in forwards;
}

@keyframes cq-signon-handover {
  0%   { opacity: 1; filter: brightness(1); }
  35%  { opacity: 1; filter: brightness(1.25); }
  100% { opacity: 0; filter: brightness(1); }
}

/* ---- the desktop drawing itself after the hand-over ---- */

.cq-desk-arrive .icon {
  animation: cq-icon-arrive 0.3s ease-out both;
}

.cq-desk-arrive .icon:nth-child(1) { animation-delay: 0.05s; }
.cq-desk-arrive .icon:nth-child(2) { animation-delay: 0.17s; }
.cq-desk-arrive .icon:nth-child(3) { animation-delay: 0.29s; }
.cq-desk-arrive .icon:nth-child(4) { animation-delay: 0.41s; }
.cq-desk-arrive .icon:nth-child(5) { animation-delay: 0.53s; }
.cq-desk-arrive .icon:nth-child(6) { animation-delay: 0.65s; }

@keyframes cq-icon-arrive {
  from { opacity: 0; transform: translateY(4px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.cq-taskbar-arrive {
  animation: cq-taskbar-arrive 0.32s 0.55s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes cq-taskbar-arrive {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Respect a reduced-motion preference: keep the staging, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  .cq-splash,
  .cq-splash-card,
  .cq-splash-flag,
  .cq-signon-dialog,
  .cq-desk-arrive .icon,
  .cq-taskbar-arrive { animation: none; }

  .cq-splash-blocks { animation: cq-splash-march 3s linear infinite; }
  .cq-signon-fill { transition: none; }
}
/* ---------- keypress prompt ---------- */

.cq-keypress {
  border: 1px solid #9aa8c4;
  background: linear-gradient(180deg, #f2f6ff, #e3eaf8);
  padding: 14px 12px;
  text-align: center;
  margin-bottom: 6px;
}

.cq-keypress-prompt { font-size: 12px; margin-bottom: 10px; }

.cq-keypress-combos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

/* One platform per row: [Windows] [Win]+[L] — the OS labels are right-aligned
   in a fixed column so both key rows line up under each other. */
.cq-keypress-combo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cq-keypress-os {
  font-size: 10.5px;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 58px;
  text-align: right;
}

.cq-keypress-combo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cq-key {
  display: inline-block;
  min-width: 34px;
  padding: 7px 11px;
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  background: #fafafa;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #7a7a7a;
  border-bottom: 3px solid #6a6a6a;
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  animation: cq-key-breathe 2.2s ease-in-out infinite;
}

@keyframes cq-key-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

.cq-key-plus { font-weight: bold; color: #566; }

.cq-key-hit .cq-key {
  animation: none;
  transform: translateY(3px);
  border-bottom-width: 1px;
  background: #cfe8cf;
}

.cq-keypress-sub {
  font-size: 11px;
  color: #4a5568;
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.45;
}

/* The button, not the keystroke, is what acts — so it has to be the obvious
   thing in the panel. Chunky Win95 face, raised, and it sinks when pressed. */
.cq-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: bold;
  cursor: pointer;
  color: #1a2233;
  background: linear-gradient(180deg, #f6f8ff, #d8dff0);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #6f7d99;
  border-bottom: 3px solid #5d6a85;
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

.cq-lock-btn:hover { background: linear-gradient(180deg, #fff, #e6ecfa); }

.cq-lock-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: none;
}

.cq-lock-btn:disabled {
  cursor: default;
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: none;
  background: #cfe8cf;
}

.cq-lock-btn-icon { font-size: 13px; line-height: 1; }

.cq-keypress-or {
  text-align: center;
  font-size: 11px;
  color: #808080;
  font-style: italic;
  margin: 4px 0;
}

/* ---------- credential trap ---------- */
/* A pop-up browser window standing on its own over the desktop (the event
   uses `frame: 'browser'`, so there is no game dialog around it). The window
   is part of the computer, so its chrome is Win95 — bevelled frame, navy
   title bar, an Internet Explorer-style address bar. The page inside keeps
   the phishing site's own modern design. */

.wd-syspopup-overlay-bare {
  /* A real pop-up does not dim the screen; a faint wash just keeps the
     desktop behind it from taking clicks. */
  background: rgba(0, 0, 0, 0.08);
}

.cq-trap-window {
  width: min(460px, 94vw);
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 1px 1px 0 #000, 4px 4px 0 rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: cq-trap-open 160ms ease-out;
}
@keyframes cq-trap-open {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.cq-trap-window.cq-trap-maxed {
  width: 96vw;
  height: 90vh;
  display: flex;
  flex-direction: column;
}
.cq-trap-maxed .cq-trap-page { flex: 1; overflow: auto; }

.cq-trap-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 5px;
  background: linear-gradient(90deg, var(--win-title), var(--win-title-2));
  color: #fff;
  cursor: default;
  user-select: none;
  touch-action: none;
}
.cq-trap-favicon {
  flex: none;
  width: 16px; height: 16px;
  background: #fff;
  color: var(--win-title);
  border: 1px solid #000;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.cq-trap-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cq-trap-winctl { display: flex; gap: 2px; }
/* Same bevelled caption buttons as every other window (.tb-btn). */
.cq-trap-winbtn {
  width: 18px; height: 16px;
  padding: 0;
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  color: #000;
  font-family: inherit;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
}
.cq-trap-winbtn:active:not(:disabled) {
  border-top-color: var(--win-dark);
  border-left-color: var(--win-dark);
  border-right-color: var(--win-light);
  border-bottom-color: var(--win-light);
}
.cq-trap-winbtn:disabled { color: var(--win-shadow); cursor: default; text-shadow: 1px 1px 0 #fff; }
.cq-trap-close { margin-left: 2px; }

.cq-trap-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow);
}
.cq-trap-chrome::before { content: 'Address'; font-size: 11px; color: #000; flex: none; }
.cq-trap-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 3px 6px;
  cursor: text;
  overflow: hidden;
  white-space: nowrap;
}
.cq-trap-lock { font-size: 10px; flex: none; }
/* Reading this is the entire point of the moment, so it stays selectable
   even though the surrounding chrome suppresses selection. */
.cq-trap-urltext {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
}

.cq-trap-page {
  /* The website itself: its own modern type, not the OS font. */
  font-family: 'Segoe UI', -apple-system, Roboto, Arial, sans-serif;
  background: #f3f5f8;
  padding: 26px 22px 14px;
  text-align: center;
}
.cq-trap-card {
  background: #fff;
  max-width: 320px;
  margin: 0 auto;
  padding: 24px 26px 18px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(31, 42, 68, 0.12);
  text-align: left;
}
.cq-trap-logo {
  font-size: 22px;
  font-weight: 700;
  color: #1f2a44;
  letter-spacing: -0.5px;
}
.cq-trap-heading { font-size: 20px; font-weight: 600; color: #1b1b1b; margin: 12px 0 2px; }
.cq-trap-sub { font-size: 12px; color: #5f6673; margin-bottom: 16px; }

.cq-trap-form label {
  display: block;
  font-size: 11px;
  color: #445;
  margin-bottom: 3px;
}
.cq-trap-form input, .cq-trap-form .cq-secret {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 9px;
  font-size: 13px;
  border: 1px solid #b9c0cc;
  border-radius: 4px;
  margin-bottom: 12px;
  font-family: inherit;
}
.cq-trap-form input:focus, .cq-trap-form .cq-secret:focus { outline: 2px solid #4a7fd6; border-color: #4a7fd6; }
.cq-trap-form input[readonly] { background: #f2f4f7; color: #667; }

.cq-trap-submit {
  width: 100%;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2f6fd0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.cq-trap-submit:hover { background: #2559ab; }

.cq-trap-links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
  color: #2f6fd0;
}
.cq-trap-foot { font-size: 10px; color: #8a92a0; margin-top: 14px; }

/* ---------- conversation (the multi-turn encounter) ---------- */

.cq-convo { font-size: 12px; }

.cq-convo-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d8d8d8;
  margin-bottom: 8px;
}

.cq-convo-who { font-weight: bold; }
.cq-convo-meta { font-size: 11px; color: #777; }

.cq-convo-turn {
  margin-left: auto;
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: #999;
}

/* Inside the Slack pane the surrounding container already scrolls; a second
   scrollbar here would trap the transcript in a box. */
.cq-convo-log { padding-right: 4px; }

.cq-convo-line { display: flex; gap: 7px; margin-bottom: 9px; align-items: flex-start; }

.cq-convo-avatar {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 4px;
  background: #4a154b;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cq-convo-you .cq-convo-avatar { background: #2f6fd0; }

.cq-convo-bubble {
  background: #f2f2f2;
  border: 1px solid #dcdcdc;
  padding: 6px 9px;
  line-height: 1.5;
  max-width: 88%;
}

.cq-convo-you .cq-convo-bubble { background: #eaf2fd; border-color: #c6dbf5; }

@keyframes cq-convo-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cq-convo-latest { animation: cq-convo-in 0.28s ease-out; }
.cq-convo-latest .cq-convo-bubble { border-color: #b9b9b9; box-shadow: 0 1px 4px rgba(0,0,0,0.10); }

.cq-convo-replies { margin-top: 10px; border-top: 1px solid #d8d8d8; padding-top: 8px; }

.cq-convo-replies-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 5px;
  font-style: italic;
}

/* ---------- decision button press-and-commit ---------- */

.wd-decision-btn { transition: transform 0.08s ease, box-shadow 0.08s ease; }
.wd-decision-btn:active { transform: translateY(1px) scale(0.995); }

/* ---------- inbox row settling once handled ---------- */

@keyframes cq-row-settle {
  0%   { background: #d9f0d9; }
  100% { background: transparent; }
}

.wd-inbox-item-handled { animation: cq-row-settle 1.1s ease-out; }

/* ---------- results: staged reveal ---------- */

.wd-grade-pending {
  opacity: 0;
  transform: scale(2.6) rotate(-14deg);
}

@keyframes cq-stamp-land {
  0%   { opacity: 0; transform: scale(2.6) rotate(-14deg); }
  60%  { opacity: 1; transform: scale(0.92) rotate(3deg); }
  78%  { transform: scale(1.05) rotate(-1.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.wd-grade-stamped { animation: cq-stamp-land 0.5s cubic-bezier(.3, 1.5, .5, 1) forwards; }

/* Category bars are re-driven from 0 during the reveal. */
.wd-cat-bar { transition: width 0.7s cubic-bezier(.2, .9, .3, 1); }

/* ---------- results: the epilogue ---------- */

.wd-epilogue-section { background: var(--win-bg); }

.wd-epi-intro {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 8px;
}

/* Sunken white list, same as the decision review, so both read as one system. */
.wd-epilogue {
  background: #fff;
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 4px;
}

.wd-epi-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #000;
  border-left: 4px solid transparent;
}

.wd-epi-row + .wd-epi-row { border-top: 1px solid #e0e0e0; }

.wd-epi-bad  { border-left-color: var(--bad);  background: var(--paper-bad); }
.wd-epi-good { border-left-color: var(--good); background: var(--paper-good); }

.wd-epi-time {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  flex: 0 0 38px;
  padding-top: 1px;
}

.wd-epi-mark { flex: 0 0 12px; font-weight: bold; }
.wd-epi-bad  .wd-epi-mark { color: var(--bad); }
.wd-epi-good .wd-epi-mark { color: var(--good); }

.wd-epi-text b { color: #000; }

/* ---------- mail actions (sit with the replies, not in the chrome) ---------- */

/* Things you do *to* the email rather than say back to it. They live in the
   same block as the reply options — that is where the choice is actually
   being made — but read as actions, not as sentences. */
.cq-mail-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #b8b8b8;
}

.cq-mail-action {
  width: auto;
  flex: 0 0 auto;
  text-align: center;
  font-weight: bold;
  padding: 5px 12px;
}

.cq-mail-action-report:hover { background: #ffe0e0; }

/* ---------- consequence toasts (payoff.js) ---------- */

/* These live in the shared notification stack. They used to float above every
   backdrop so a payoff was never dimmed out by the next event — the scheduler
   now holds that event back until the payoff has been read (clock.js), so the
   toast can recede with the rest of the desktop when a decision lands. */

.cq-consequence {
  pointer-events: auto;
  display: flex;
  background: var(--panel);
  color: #000;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(.2, .9, .3, 1);
}

.cq-consequence-in  { opacity: 1; transform: translateX(0); }
.cq-consequence.wd-leaving { opacity: 0; transform: translateX(28px); transition-duration: 0.2s; }

/* Accent stripe + tone word (see payoff.js): colour is never the only cue. */
.cq-consequence { --tone: var(--good); }
.cq-consequence-bar { width: 6px; flex: 0 0 6px; background: var(--tone); }
.cq-consequence-verify   { --tone: var(--info); }
.cq-consequence-reaction { --tone: var(--win-shadow); }
.cq-consequence-ouch     { --tone: var(--warn); }
.cq-consequence-critical { --tone: var(--bad); }

.cq-consequence-tone {
  margin-left: auto;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tone);
}

.cq-consequence-main { padding: 8px 11px 10px; min-width: 0; }

.cq-consequence-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 3px;
}

.cq-consequence-icon { font-size: 12px; }
.cq-consequence-from { font-weight: bold; color: #000; }
.cq-consequence-channel { color: var(--ink-soft); font-size: 10px; }

.cq-consequence-title {
  font-size: 12px;
  font-weight: bold;
  color: #000;
  margin-bottom: 4px;
}

.cq-consequence-body {
  font-size: 11.5px;
  line-height: 1.45;
  color: #202020;
}

.cq-consequence-body b { color: #000; }
.cq-consequence-body p { margin: 0; }
.cq-consequence-body p + p { margin-top: 5px; }
.cq-consequence-reaction-line { font-style: italic; color: var(--ink-soft); }

/* ---------- lock screen ---------- */

.cq-lockscreen {
  position: fixed;
  inset: 0;
  z-index: 11500;
  background: #000820;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.cq-lockscreen-in  { opacity: 1; }
.cq-lockscreen-out { opacity: 0; transition: opacity 0.45s ease; }

.cq-lockscreen-panel {
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  padding: 26px 44px 30px;
  text-align: center;
  color: #000;
  transform: scale(1.14);
  transition: transform 0.22s cubic-bezier(.2, 1.4, .4, 1);
}

.cq-lockscreen-in .cq-lockscreen-panel { transform: scale(1); }

.cq-lockscreen-icon { font-size: 40px; margin-bottom: 10px; }

.cq-lockscreen-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
}

.cq-lockscreen-user {
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: #fff;
  border: 1px inset var(--win-bg);
  padding: 4px 12px;
  display: inline-block;
  margin-bottom: 10px;
}

.cq-lockscreen-sub {
  font-size: 11px;
  color: #404040;
  max-width: 320px;
}

/* Incoming side of a conversation — the counterpart to .cq-convo-you, which
   was styled while this one was left to inherit. */
.cq-convo-them .cq-convo-bubble {
  background: #f4f4f6;
  border-color: #dcdce2;
}


/* ------------------------------------------------------ */
/* Voicemail — the one moment you listen to                */
/* ------------------------------------------------------ */
/* A softphone must not look like a warning. The default popup wears alarm
   red, which would announce the attack before a word of it played, so this
   frame borrows the ordinary Win95 title bar instead. */
.wd-syspopup-calm .wd-syspopup-titlebar {
  background: linear-gradient(90deg, var(--win-title), var(--win-title-2));
}
.wd-syspopup-wide {
  width: min(560px, 94%);
  max-height: 88vh;
  overflow-y: auto;
}

/* No window chrome — the handset sits alone on a dimmed desktop, and the
   answers are not in the scene until the message has been heard. */
.wd-vm-overlay {
  position: fixed;
  inset: 0;
  z-index: 4600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.42), rgba(0,0,0,0.68));
  animation: wd-overlay-in 260ms ease-out;
}

.cq-vm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.cq-vm-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Room for the lid to swing up into — see .cq-flip-lid. */
  padding-top: 176px;
}

/* The answers grow in underneath once the recording ends. The 0fr→1fr grid
   trick animates to the content's real height, which max-height cannot do
   without a guessed magic number. */
.cq-vm-side {
  display: grid;
  grid-template-rows: 0fr;
  width: 340px;
  max-width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: grid-template-rows 520ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 400ms ease-out 120ms;
}
.cq-vm-side-inner { overflow: hidden; min-height: 0; }
.cq-vm-side-in {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

/* ── the handset ─────────────────────────────────────────── */
.cq-flip {
  position: relative;
  width: 176px;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.55));
  perspective: 860px;
  perspective-origin: 50% 20%;
  /* Lands on the desk rather than appearing on it. */
  animation: cq-flip-drop 520ms cubic-bezier(0.17, 0.89, 0.32, 1.28) both;
}
@keyframes cq-flip-drop {
  from { opacity: 0; transform: translateY(26px) scale(0.92) rotate(-3deg); }
  to   { opacity: 1; transform: none; }
}

/* Two short kicks, like a handset skidding on a desk. */
.cq-flip-buzz { animation: cq-flip-shake 130ms linear 4; }
@keyframes cq-flip-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-1.5px, 1px) rotate(-0.5deg); }
  75%      { transform: translate(1.5px, -1px) rotate(0.5deg); }
}

/* ── lid ─────────────────────────────────────────────────── */
/* The lid is taken out of flow and hinged to the top edge of the base, so the
   handset itself never moves: shut, the lid lies over the base; open, it
   swings up into the space .cq-vm-stage reserves for it. Anything in flow —
   the hint line below — stays put through the whole animation. */
.cq-flip-lid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 3px);
  height: 174px;
  /* Above the base at all times: shut, it lies on top of it; open, its hinge
     is the nearer of the two. */
  z-index: 3;
  transform-style: preserve-3d;
  transform-origin: bottom center;
  /* Shut: folded down over the base, outer shell facing us. */
  transform: rotateX(-179deg);
  transition: transform 760ms cubic-bezier(0.22, 1.04, 0.36, 1);
}
.cq-flip[data-state="open"] .cq-flip-lid,
.cq-flip[data-state="menu"] .cq-flip-lid,
.cq-flip[data-state="volume"] .cq-flip-lid,
.cq-flip[data-state="playing"] .cq-flip-lid,
.cq-flip[data-state="ended"] .cq-flip-lid {
  transform: rotateX(-9deg);
}

.cq-flip-shell,
.cq-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px 12px 4px 4px;
  overflow: hidden;
}

/* Outer shell — the only face you see while it's shut. */
.cq-flip-shell {
  transform: rotateX(180deg);
  background: linear-gradient(155deg, #4a4f57, #23262b 60%, #17191c);
  border: 1px solid #101215;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cq-flip-ext {
  width: 74%;
  background: #12331f;
  border: 1px solid #0a1d12;
  border-radius: 3px;
  padding: 7px 4px;
  text-align: center;
  color: #8ff0b0;
  font-family: "Courier New", monospace;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}
.cq-flip-ext-icon { font-size: 13px; animation: cq-flip-blink 1.1s steps(1) infinite; }
.cq-flip-ext-line { font-size: 8.5px; letter-spacing: 0.2px; margin-top: 2px; }
.cq-flip-ext-sub  { font-size: 8px; opacity: 0.65; }
@keyframes cq-flip-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.15; } }
.cq-flip-lens {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6a7078, #1b1d21 70%);
  border: 1px solid #0d0f11;
}

/* Inner face — the screen. */
.cq-flip-face {
  background: linear-gradient(160deg, #43484f, #2a2d33);
  border: 1px solid #101215;
  padding: 9px 8px 10px;
}
.cq-flip-screen {
  position: relative;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: #0d1a12;
  border: 1px solid #05100a;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.75);
  color: #a9f5c4;
  font-family: "Courier New", monospace;
}
/* The portrait sits behind the UI, dimmed so text stays readable. Pixel art
   must not be resampled smooth — that is the whole look. */
.cq-flip-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 50% 22%;
  image-rendering: pixelated;
  opacity: 0;
  filter: saturate(0.55) brightness(0.62) contrast(1.05);
  transition: opacity 620ms ease-out 180ms;
}
.cq-flip[data-state="open"] .cq-flip-photo,
.cq-flip[data-state="menu"] .cq-flip-photo,
.cq-flip[data-state="volume"] .cq-flip-photo,
.cq-flip[data-state="playing"] .cq-flip-photo,
.cq-flip[data-state="ended"] .cq-flip-photo { opacity: 1; }

/* A single diagonal sheen so the screen reads as glass. */
.cq-flip-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, rgba(255,255,255,0.14) 0 28%, transparent 46%);
  pointer-events: none;
}

.cq-flip-panel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  animation: cq-flip-panel-in 260ms ease-out both;
}
@keyframes cq-flip-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.cq-flip[data-state="open"]    .cq-flip-panel-note,
.cq-flip[data-state="menu"]    .cq-flip-panel-menu,
.cq-flip[data-state="volume"]  .cq-flip-panel-volume,
.cq-flip[data-state="playing"] .cq-flip-panel-play,
.cq-flip[data-state="ended"]   .cq-flip-panel-end { display: flex; }

.cq-flip-bell   { font-size: 17px; animation: cq-flip-blink 1.1s steps(1) infinite; }
.cq-flip-title  { font-size: 10px; font-weight: bold; letter-spacing: 0.3px; }
.cq-flip-caller { font-size: 9.5px; color: #dff7e7; }
.cq-flip-sub    { font-size: 8px; opacity: 0.8; }

/* Menu */
.cq-flip-panel-menu { justify-content: flex-start; padding-top: 10px; }
.cq-flip-menu-title {
  font-size: 8.5px;
  opacity: 0.75;
  border-bottom: 1px solid rgba(169,245,196,0.3);
  width: 100%;
  padding-bottom: 3px;
  margin-bottom: 5px;
}
.cq-flip-item {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 9px;
  color: #a9f5c4;
  background: none;
  border: none;
  padding: 4px 5px;
  cursor: pointer;
  border-radius: 2px;
}
.cq-flip-item:hover { background: rgba(169,245,196,0.18); }
/* The selected row, the way these menus always highlighted. */
.cq-flip-item-on {
  background: #a9f5c4;
  color: #0d1a12;
  font-weight: bold;
}
.cq-flip-item-on:hover { background: #c4ffd9; }
.cq-flip-details {
  font-size: 8px;
  opacity: 0.8;
  text-align: left;
  width: 100%;
  padding: 3px 5px;
  line-height: 1.5;
}

/* Sound check — a handset volume meter */
.cq-flip-panel-volume { justify-content: flex-start; padding-top: 10px; gap: 3px; }
.cq-flip-vol {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin: 2px 0 4px;
}
.cq-flip-vol span {
  width: 5px;
  background: #a9f5c4;
  border-radius: 1px;
  opacity: 0.35;
  animation: cq-flip-vol-up 1.4s ease-in-out infinite;
}
.cq-flip-vol span:nth-child(1) { height: 25%; animation-delay: 0s; }
.cq-flip-vol span:nth-child(2) { height: 42%; animation-delay: 0.12s; }
.cq-flip-vol span:nth-child(3) { height: 60%; animation-delay: 0.24s; }
.cq-flip-vol span:nth-child(4) { height: 80%; animation-delay: 0.36s; }
.cq-flip-vol span:nth-child(5) { height: 100%; animation-delay: 0.48s; }
@keyframes cq-flip-vol-up {
  0%, 20%   { opacity: 0.35; }
  45%, 85%  { opacity: 1; }
  100%      { opacity: 0.35; }
}
.cq-flip-item-center { text-align: center; margin-top: 4px; }

/* Playing */
.cq-flip-playing { font-size: 9px; letter-spacing: 0.4px; }
.cq-flip-bars {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 22px;
  width: 100%;
  margin: 5px 0 3px;
}
.cq-flip-bars span {
  flex: 1 1 auto;
  height: 50%;               /* overridden inline — see _voicemailHTML */
  background: rgba(169,245,196,0.4);
  border-radius: 1px;
}
.cq-flip-bars-live span {
  background: #a9f5c4;
  animation: cq-flip-bounce 720ms ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -43ms);
}
@keyframes cq-flip-bounce {
  from { transform: scaleY(0.35); }
  to   { transform: scaleY(1.2); }
}
.cq-flip-track {
  width: 100%;
  height: 2px;
  background: rgba(169,245,196,0.25);
}
.cq-flip-fill {
  height: 100%;
  width: 0;
  background: #a9f5c4;
  transition: width 240ms linear;
}
.cq-flip-time { font-size: 8.5px; margin-top: 3px; opacity: 0.9; }

/* ── base ────────────────────────────────────────────────── */
.cq-flip-base {
  position: relative;
  background: linear-gradient(165deg, #4a4f57, #26292e 55%, #191b1f);
  border: 1px solid #101215;
  border-radius: 4px 4px 12px 12px;
  padding: 7px 8px 9px;
  z-index: 2;
}
.cq-flip-grille {
  height: 4px;
  margin: 0 auto 6px;
  width: 52%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #14161a 0 2px, #3c4149 2px 4px);
}
.cq-flip-softrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 7px;
}
.cq-flip-soft {
  flex: 1 1 0;
  min-width: 0;
  font-family: inherit;
  font-size: 8px;
  color: #dfe3e8;
  background: linear-gradient(180deg, #565c66, #383d45);
  border: 1px solid #14161a;
  border-radius: 3px;
  padding: 4px 2px;
  cursor: pointer;
  transition: transform 90ms ease-out, background 120ms ease-out;
}
.cq-flip-soft:hover:not(:disabled) { background: linear-gradient(180deg, #656c77, #434952); }
.cq-flip-soft:active:not(:disabled) { transform: translateY(1px); }
.cq-flip-soft:disabled { opacity: 0.35; cursor: default; }

.cq-flip-ok {
  flex: 0 0 34px;
  height: 26px;
  font-family: inherit;
  font-size: 8.5px;
  font-weight: bold;
  color: #12331f;
  background: radial-gradient(circle at 40% 32%, #cfe9d8, #8fae9c);
  border: 1px solid #14161a;
  border-radius: 13px;
  cursor: pointer;
  transition: transform 90ms ease-out;
}
.cq-flip-ok:active:not(:disabled) { transform: translateY(1px); }
.cq-flip-ok:disabled { opacity: 0.4; cursor: default; }
/* While the phone waits to be picked up, the OK key breathes. */
.cq-flip[data-state="closed"] .cq-flip-ok,
.cq-flip[data-state="open"] .cq-flip-ok,
.cq-flip[data-state="menu"] .cq-flip-ok,
.cq-flip[data-state="volume"] .cq-flip-ok {
  animation: cq-flip-pulse 1.7s ease-in-out infinite;
}
@keyframes cq-flip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169,245,196,0); }
  50%      { box-shadow: 0 0 0 4px rgba(169,245,196,0.28); }
}

.cq-flip-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.cq-flip-keys span {
  font-size: 8px;
  color: #c3c8cf;
  text-align: center;
  padding: 3px 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #4d535c, #343941);
  border: 1px solid #191c20;
}

/* Shut, the whole handset is one big target. */
.cq-flip-hit {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
.cq-flip[data-state="closed"] .cq-flip-hit { display: block; }

/* Everything below reads on the dimmed desktop, not on a grey dialog. */
.cq-flip-hint {
  font-size: 11px;
  color: #e8eef4;
  font-style: italic;
  text-align: center;
  min-height: 26px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.cq-vm-transcript {
  width: 280px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #8a8a92;
  padding: 8px;
  font-size: 11px;
  line-height: 1.55;
  max-height: 180px;
  overflow-y: auto;
  user-select: text;
}

.cq-vm-note {
  font-size: 11px;
  color: #cfe0ef;
  font-style: italic;
  padding-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.cq-vm-note:empty { padding: 0; }

.cq-vm-gate-label {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Respect a stated preference for less motion: the phone still opens and
   still plays, it just stops swinging, buzzing and pulsing to do it. */
@media (prefers-reduced-motion: reduce) {
  .cq-flip,
  .cq-flip-buzz,
  .cq-flip-bell,
  .cq-flip-ext-icon,
  .cq-flip-panel,
  .cq-flip-bars-live span,
  .cq-flip[data-state="closed"] .cq-flip-ok,
  .cq-flip[data-state="open"] .cq-flip-ok,
  .cq-flip[data-state="menu"] .cq-flip-ok,
  .cq-flip[data-state="volume"] .cq-flip-ok,
  .cq-flip-vol span {
    animation: none;
  }
  .cq-flip-lid { transition-duration: 1ms; }
}

/* ------------------------------------------------------ */
/* Voice-clone reveal                                      */
/* ------------------------------------------------------ */
.cq-reveal { font-size: 12px; line-height: 1.55; }
.cq-reveal p { margin: 0 0 8px; }
.cq-reveal-lead { font-size: 13px; }
.cq-reveal-quiet { font-size: 11px; color: #555; font-style: italic; }

/* Playing: swap the ▶ glyph for a pause mark without touching the markup. */

.cq-reveal-stats {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}
.cq-reveal-stats div {
  flex: 1 1 0;
  background: #fff;
  border: 1px inset var(--win-bg);
  padding: 7px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cq-reveal-stats b { font-size: 13px; color: #000080; }
.cq-reveal-stats small { font-size: 10px; color: #555; line-height: 1.3; }

.cq-reveal-rules {
  background: #fffbe6;
  border: 1px solid #e0d28a;
  padding: 9px 10px;
  margin-top: 10px;
}
.cq-reveal-rules-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 5px;
  color: #000080;
}
.cq-reveal-rules ol { margin: 0; padding-left: 18px; }
.cq-reveal-rules li { margin-bottom: 5px; font-size: 11.5px; line-height: 1.5; }
.cq-reveal-rules li:last-child { margin-bottom: 0; }

/* ======================================================================== */
/* Widgets (js/workday/widgets.js) — share dialog, cert warning,             */
/* authenticator push, signup form, QR scan.                                 */
/* ======================================================================== */

/* The widgets toggle parts of themselves with the `hidden` attribute; class
   display rules below must never win over it. */
.cq-share [hidden], .cq-cert [hidden], .cq-auth [hidden],
.cq-pwform [hidden], .cq-qr [hidden], .cq-qr-or[hidden],
.wd-bubble-actions .wd-decisions[hidden] { display: none !important; }

/* shared: follow-up choices inside a widget */
.cq-wchoice { display: flex; flex-direction: column; gap: 6px; }
.cq-wchoice-prompt { font-size: 12px; font-weight: bold; margin-bottom: 2px; }
.cq-wchoice-btn { text-align: left; }

/* ---- share dialog ---- */
.cq-share { font-family: Arial, Helvetica, sans-serif; color: #202124; max-width: 460px; }
.cq-share-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #dadce0; border-radius: 6px;
  padding: 6px 10px; margin-bottom: 10px; font-size: 13px;
}
.cq-share-file { font-weight: bold; }
.cq-share-download, .cq-share-copy {
  background: #fff; border: 1px solid #dadce0; border-radius: 16px;
  padding: 5px 12px; font-size: 12px; cursor: pointer; color: #1a73e8;
}
.cq-share-download:hover, .cq-share-copy:hover { background: #f1f5fe; }
.cq-share-dialog, .cq-share-mail {
  background: #fff; border-radius: 8px; padding: 14px 16px 12px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px rgba(60,64,67,0.15);
}
.cq-share-title { font-size: 17px; margin-bottom: 10px; }
.cq-share-addwrap { position: relative; }
.cq-share-input {
  width: 100%; box-sizing: border-box; border: 1px solid #dadce0; border-radius: 4px;
  padding: 9px 10px; font-size: 13px; font-family: inherit;
}
.cq-share-input:focus { outline: 2px solid #1a73e8; border-color: #1a73e8; }
.cq-share-suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2; background: #fff;
  border: 1px solid #dadce0; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.cq-share-suggest-item {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px;
  background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit;
}
.cq-share-suggest-item:hover { background: #f1f3f4; }
.cq-share-suggest-text { display: flex; flex-direction: column; font-size: 13px; }
.cq-share-suggest-text small { color: #5f6368; font-size: 12px; }
.cq-share-section { font-size: 13px; font-weight: bold; margin: 14px 0 6px; }
.cq-share-person, .cq-share-access { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 3px 0; }
.cq-share-avatar {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #1a73e8; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: bold; font-size: 13px;
}
.cq-share-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-share-role-fixed { color: #5f6368; }
.cq-share-select {
  border: 0; background: transparent; font-size: 13px; font-weight: bold;
  font-family: inherit; cursor: pointer; padding: 2px 0;
}
.cq-share-select:hover { background: #f1f3f4; }
.cq-share-access-icon {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #e8eaed;
  display: inline-flex; align-items: center; justify-content: center;
}
.cq-share-access-text { display: flex; flex-direction: column; align-items: flex-start; }
.cq-share-access-text small { color: #5f6368; font-size: 12px; }
.cq-share-note { min-height: 16px; font-size: 12px; color: #b3261e; margin-top: 8px; }
.cq-share-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.cq-share-send {
  background: #1a73e8; color: #fff; border: 0; border-radius: 16px;
  padding: 7px 20px; font-size: 13px; cursor: pointer;
}
.cq-share-send:hover { background: #1765cc; }
.cq-share-mail-head { font-size: 15px; font-weight: bold; margin-bottom: 10px; }
.cq-share-mail-row { display: flex; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #eee; }
.cq-share-mail-row span { color: #5f6368; width: 64px; }

/* ---- certificate interstitial ---- */
/* The browser around the page is Win95 (sunken frame, IE-style address
   bar); the error page inside keeps the browser vendor's modern look. */
.cq-cert {
  background: #fff;
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}
.cq-cert-chrome {
  display: flex; align-items: center; gap: 6px; background: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow); padding: 4px 6px; font-size: 11px;
}
.cq-cert-chrome::before { content: 'Address'; color: #000; flex: none; }
.cq-cert-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: #fff; padding: 3px 6px;
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}
.cq-cert-badge { color: #c5221f; font-weight: bold; white-space: nowrap; }
.cq-cert-url {
  color: #000; font-family: "Courier New", monospace; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cq-cert-page { padding: 16px 18px 14px; color: #202124; font-family: Arial, Helvetica, sans-serif; }
.cq-cert-icon {
  width: 34px; height: 34px; border-radius: 50%; background: #d93025; color: #fff;
  font-weight: bold; font-size: 22px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.cq-cert-title { font-size: 18px; margin-bottom: 8px; }
.cq-cert-text, .cq-cert-more p { font-size: 12px; line-height: 1.5; color: #3c4043; margin: 0 0 8px; }
.cq-cert-code { font-size: 10px; color: #5f6368; font-family: monospace; margin-bottom: 12px; }
.cq-cert-actions { display: flex; justify-content: space-between; align-items: center; }
.cq-cert-advanced {
  background: #fff; border: 1px solid #dadce0; border-radius: 4px; padding: 6px 12px;
  color: #1a73e8; font-size: 12px; cursor: pointer;
}
.cq-cert-back {
  background: #1a73e8; color: #fff; border: 0; border-radius: 4px; padding: 7px 16px;
  font-size: 12px; cursor: pointer;
}
.cq-cert-more { margin-top: 12px; border-top: 1px solid #eee; padding-top: 10px; }
.cq-cert-proceed {
  background: none; border: 0; padding: 0; color: #5f6368; text-decoration: underline;
  font-size: 12px; cursor: pointer;
}
.cq-cert-after { padding: 12px 14px; background: var(--win-bg); }

/* ---- authenticator push ---- */
.cq-auth { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cq-auth-phone {
  width: 230px; background: #111; border-radius: 26px; padding: 12px 10px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.cq-auth-notch { width: 60px; height: 6px; border-radius: 3px; background: #333; margin: 0 auto 10px; }
.cq-auth-screen {
  background: #f4f6fa; border-radius: 16px; padding: 14px 12px; min-height: 250px;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif; color: #1f2a44; text-align: center;
}
.cq-auth-app { font-size: 11px; font-weight: bold; color: #1f2a44; margin-bottom: 14px; }
.cq-auth-q { font-size: 15px; font-weight: bold; margin-bottom: 4px; }
.cq-auth-acct { font-size: 11px; color: #667; margin-bottom: 12px; }
.cq-auth-details { background: #fff; border-radius: 10px; padding: 6px 10px; text-align: left; margin-bottom: 14px; }
.cq-auth-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 4px 0; border-bottom: 1px solid #eef0f4; }
.cq-auth-row:last-child { border-bottom: 0; }
.cq-auth-row span { color: #667; }
.cq-auth-buttons { display: flex; gap: 8px; }
.cq-auth-deny, .cq-auth-approve {
  flex: 1; border: 0; border-radius: 10px; padding: 9px 0; font-size: 13px; font-weight: bold; cursor: pointer;
}
.cq-auth-deny { background: #e4e7ee; color: #1f2a44; }
.cq-auth-approve { background: #2f6fd0; color: #fff; }
.cq-auth-done {
  width: 44px; height: 44px; border-radius: 50%; background: #e4e7ee; color: #1f2a44;
  margin: 26px auto 12px; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.cq-auth-after { width: 100%; }

/* ---- signup form ---- */
.cq-pwform-form { max-width: 320px; font-family: Arial, Helvetica, sans-serif; }
.cq-pwform-form label { display: block; font-size: 12px; color: #404040; margin: 8px 0 3px; }
.cq-pwform-form input, .cq-pwform-form .cq-secret {
  width: 100%; box-sizing: border-box; border: 1px solid #a0a0a0; padding: 6px 8px; font-size: 13px;
}
.cq-pwform-form input[readonly], .cq-pwform-form .cq-secret[aria-readonly="true"] { background: #f2f4f7; color: #667; }
.cq-pwform-form input:focus, .cq-pwform-form .cq-secret:focus { outline: 2px solid #4a7fd6; border-color: #4a7fd6; }
.cq-pwform-fieldwrap { position: relative; }
.cq-pwform-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 3; background: #fff;
  border: 1px solid #c8c8c8; box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.cq-pwform-opt {
  display: flex; gap: 8px; align-items: center; width: 100%; padding: 7px 9px;
  background: none; border: 0; border-bottom: 1px solid #eee; cursor: pointer; text-align: left;
}
.cq-pwform-opt:last-child { border-bottom: 0; }
.cq-pwform-opt:hover { background: #eaf2fd; }
.cq-pwform-opt span:last-child { display: flex; flex-direction: column; font-size: 12px; }
.cq-pwform-opt small { color: #667; font-size: 11px; }
.cq-pwform-opt-icon { font-size: 16px; }
.cq-pwform-note { min-height: 15px; font-size: 11px; color: #2f6f3a; margin-top: 6px; }
.cq-pwform-submit {
  margin-top: 8px; background: #2f6fd0; color: #fff; border: 0; padding: 7px 16px;
  font-size: 13px; cursor: pointer;
}
.cq-pwform-submit:hover { background: #2559ab; }

/* ---- QR scan ---- */
.cq-qr { margin-bottom: 8px; }
.cq-qr-raise { width: 100%; }
.cq-qr-raise, .cq-qr-cancel {
  background: var(--win-bg); border: 2px outset #fff; padding: 6px 10px; font-size: 12px; cursor: pointer;
}
.cq-qr-phone {
  width: 220px; margin: 0 auto; background: #111; border-radius: 22px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.cq-qr-view {
  position: relative; height: 200px; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #3b3b3b 0 6px, #333 6px 12px);
}
.cq-qr-frame {
  position: absolute; left: 50%; top: 42%; width: 90px; height: 90px; transform: translate(-50%, -50%);
  border: 3px solid rgba(255,255,255,0.8); border-radius: 10px; transition: border-color 0.2s;
}
.cq-qr-locked .cq-qr-frame { border-color: #ffd54a; }
.cq-qr-preview {
  position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(250,250,250,0.95);
  border: 0; border-radius: 10px; padding: 6px 8px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; font-size: 11px; opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.cq-qr-locked .cq-qr-preview { opacity: 1; transform: none; pointer-events: auto; }
.cq-qr-preview-app { color: #555; font-size: 10px; }
.cq-qr-page { background: #fff; border-radius: 14px; overflow: hidden; min-height: 200px; }
.cq-qr-page-url { background: #eee; font-size: 10px; padding: 5px 8px; color: #333; }
.cq-qr-page-body { padding: 14px 12px; text-align: center; font-family: Arial, sans-serif; }
.cq-qr-page-title { font-size: 14px; font-weight: bold; margin-bottom: 4px; }
.cq-qr-page-sub { font-size: 11px; color: #666; margin-bottom: 14px; }
.cq-qr-signin {
  background: #1a73e8; color: #fff; border: 0; border-radius: 4px; padding: 8px 14px; font-size: 12px; cursor: pointer;
}
.cq-qr-cancel { background: #2a2a2a; color: #ddd; border: 1px solid #444; border-radius: 10px; }
.cq-qr-or { font-size: 11px; color: #555; margin: 6px 0 4px; }

/* A conversation inside a narrative bubble must not grow off the top of the
   screen; the log scrolls instead. */
.wd-bubble .cq-convo-log { max-height: 36vh; overflow-y: auto; }

/* ---- debrief: your habits ---- */
.wd-habits { display: flex; flex-wrap: wrap; gap: 10px; }
.wd-habit-col { flex: 1 1 260px; background: #fff; border: 1px inset #c0c0c0; padding: 8px 10px; }
.wd-habit-head { font-weight: bold; font-size: 12px; margin-bottom: 4px; }
.wd-habit-have .wd-habit-head { color: var(--good); }
.wd-habit-build .wd-habit-head { color: #a15c00; }
.wd-habit-col ul { margin: 0; padding-left: 18px; font-size: 12px; }
.wd-habit-col li { margin: 4px 0; }
.wd-habit-pct { color: #606060; font-family: "Courier New", monospace; }
.wd-habit-none { list-style: none; margin-left: -18px; color: #606060; font-style: italic; }
.wd-habit-moments { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.wd-habit-link { font-size: 11px; color: #000080; }

/* ---- debrief: replay the moment ---- */
.wd-replay { margin-top: 6px; font-size: 11px; }
.wd-replay summary { cursor: pointer; color: #000080; font-weight: bold; }
.wd-replay-facts { margin: 6px 0; display: grid; gap: 3px; }
.wd-replay-facts div { display: flex; gap: 8px; align-items: baseline; }
.wd-replay-facts span { flex: 0 0 110px; color: #606060; }
.wd-replay-facts code { background: #fff8d6; border: 1px solid #e6d27a; padding: 0 4px; word-break: break-all; }
.wd-replay-marks { background: #fffbe8; border-left: 3px solid #d9b34a; padding: 5px 8px; margin: 6px 0; }
.wd-replay-marks-title { font-weight: bold; margin-bottom: 2px; }
.wd-replay-marks ul { margin: 0; padding-left: 16px; }
.wd-replay-original {
  background: #fff; border: 1px solid #d0d0d0; padding: 8px 10px; margin-top: 6px;
  max-height: 260px; overflow: auto; line-height: 1.45;
}
.wd-replay-turn { margin-bottom: 6px; }
.wd-tl-flash { animation: wd-tl-flash 1.2s ease-out; }
@keyframes wd-tl-flash { 0% { box-shadow: inset 0 0 0 3px #d9b34a; } 100% { box-shadow: inset 0 0 0 0 transparent; } }

/* ------------------------------------------------------ */
/* Modern popup frame (`frame: 'modern'` on the event).     */
/* For popups whose content is a phone app (off the         */
/* computer): a clean rounded card instead of a Win95 dialog. */
/* ------------------------------------------------------ */
.wd-syspopup-modern {
  background: #ffffff;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1f2a44;
}
.wd-syspopup-modern .wd-syspopup-titlebar,
.wd-syspopup-modern.wd-syspopup-calm .wd-syspopup-titlebar {
  background: #ffffff;
  color: #1f2a44;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #eceef3;
}
.wd-syspopup-modern .wd-syspopup-body {
  background: #ffffff;
  color: #4a5670;
  font-size: 13px;
  padding: 12px 18px 4px;
}
.wd-syspopup-modern .wd-syspopup-actions {
  background: #ffffff;
  padding: 10px 18px 18px;
  gap: 8px;
}
.wd-syspopup-modern .wd-decision-btn {
  background: #f4f6fa;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1f2a44;
  transition: background 0.12s, border-color 0.12s;
}
.wd-syspopup-modern .wd-decision-btn:hover { background: #eaf1fd; border-color: #b9cff3; }
.wd-syspopup-modern .wd-decision-btn:active { border: 1px solid #9ab8ea; }
/* Widget pieces that assumed the grey Win95 surface around them. */
.wd-syspopup-modern .cq-wchoice-prompt { color: #1f2a44; font-size: 13px; font-weight: 600; }
.wd-syspopup-modern .cq-auth-phone { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }

/* ------------------------------------------------------ */
/* In-person scene cards (js/workday/scenes.js).           */
/* An illustrated card over a dimmed desktop, for moments  */
/* that happen away from the screen.                       */
/* ------------------------------------------------------ */
.wd-scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4150;
  background: rgba(12, 18, 32, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: wd-overlay-in 220ms ease-out;
}
.wd-scene-backdrop.wd-leaving { transform: none; }

.wd-scene {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 4200;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1f2a44;
  transform: translate(-50%, -50%);
  animation: wd-scene-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes wd-scene-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.wd-scene.wd-leaving { opacity: 0; transform: translate(-50%, -50%) scale(0.97); }

.wd-scene-art { flex: 0 0 auto; height: 190px; line-height: 0; background: #eef2f8; }
.wd-scene-art svg { width: 100%; height: 100%; display: block; }

.wd-scene-content { padding: 18px 24px 22px; overflow-y: auto; }
.wd-scene-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #7a869c; margin-bottom: 4px;
}
.wd-scene-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.wd-scene-body { font-size: 14px; line-height: 1.55; color: #4a5670; margin-bottom: 14px; }
.wd-scene-actions .wd-decisions { display: flex; flex-direction: column; gap: 8px; }

/* Replies: rounded option cards instead of Win95 buttons. */
.wd-scene .wd-decision-btn {
  width: 100%;
  text-align: left;
  background: #f4f6fa;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #1f2a44;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.wd-scene .wd-decision-btn:hover { background: #eaf1fd; border-color: #b9cff3; }
.wd-scene .wd-decision-btn:active { transform: scale(0.99); border: 1px solid #9ab8ea; }

/* Conversation inside a scene: chat bubbles. */
.wd-scene .cq-convo { font-size: 14px; }
.wd-scene .cq-convo-head { border-bottom: 1px solid #eceef3; padding-bottom: 8px; margin-bottom: 12px; }
.wd-scene .cq-convo-meta { font-size: 12px; color: #7a869c; }
.wd-scene .cq-convo-turn {
  font-family: inherit; font-size: 11px; color: #7a869c; background: #f1f3f7;
  border: 0; border-radius: 10px; padding: 2px 8px;
}
.wd-scene .cq-convo-log { max-height: 30vh; overflow-y: auto; }
.wd-scene .cq-convo-avatar {
  border-radius: 50%; width: 30px; height: 30px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.wd-scene .cq-convo-bubble {
  background: #f1f3f7; border: 0; border-radius: 4px 16px 16px 16px;
  padding: 9px 13px; line-height: 1.5; color: #1f2a44;
}
.wd-scene .cq-convo-you { flex-direction: row-reverse; }
.wd-scene .cq-convo-you .cq-convo-bubble { background: #2f6fd0; color: #ffffff; border-radius: 16px 4px 16px 16px; }
.wd-scene .cq-convo-replies { border-top: 1px solid #eceef3; margin-top: 10px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wd-scene .cq-convo-replies-label { font-size: 12px; font-weight: 600; color: #7a869c; font-style: normal; }

/* Other widgets that can appear in a scene. */
.wd-scene .cq-qr-raise {
  background: #1f2a44; color: #ffffff; border: 0; border-radius: 12px; padding: 11px 14px;
  font-size: 14px; font-family: inherit;
}
.wd-scene .cq-qr-raise:hover { background: #2b3a5c; }
.wd-scene .cq-qr-or { font-size: 12px; color: #7a869c; margin: 10px 0 8px; }
.wd-scene .cq-keypress { background: #f4f6fa; border: 1px solid #dfe3ea; border-radius: 12px; }
.wd-scene .cq-lock-btn { border-radius: 10px; }
.wd-scene .cq-keypress-or { color: #7a869c; }

/* Voicemail: open the answers before the message has finished. */
.cq-vm-skip {
  display: block;
  margin: 8px auto 0;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.cq-vm-skip:hover { background: rgba(255, 255, 255, 0.26); }
.cq-vm-skip[hidden] { display: none; }
.wd-scene .cq-lock-btn {
  background: #1f2a44; color: #ffffff; border: 0; border-radius: 12px;
  box-shadow: none; padding: 10px 22px; font-size: 14px; font-weight: 600;
}
.wd-scene .cq-lock-btn:hover { background: #2b3a5c; }

/* Share dialog: General access is a choice, not a default. */
.cq-share-access-pick { position: relative; }
.cq-share-access-btn {
  background: #ffffff; border: 1px solid #dadce0; border-radius: 16px;
  padding: 4px 12px; font-size: 13px; font-weight: bold; font-family: inherit;
  color: #1a73e8; cursor: pointer;
}
.cq-share-access-btn:hover { background: #f1f5fe; }
.cq-share-access-btn[data-value] { border-color: transparent; color: #202124; padding-left: 4px; }
.cq-share-access-menu {
  position: absolute; left: 0; top: 30px; z-index: 3; width: 290px;
  background: #ffffff; border-radius: 8px; padding: 6px 0;
  box-shadow: 0 2px 6px rgba(60,64,67,0.3), 0 6px 16px rgba(60,64,67,0.2);
}
.cq-share-access-opt {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 14px;
  background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit;
}
.cq-share-access-opt:hover { background: #f1f3f4; }
.cq-share-access-opt span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.cq-share-access-opt small { color: #5f6368; font-size: 12px; }
.cq-share-access-opt-icon { font-size: 15px; }
.cq-share-role-pick { margin-left: auto; }
.cq-share-role-menu { left: auto; right: 0; width: 250px; }
/* The menus open inline and push the dialog down, so the task pane can
   never clip them. */
.cq-share-access-menu, .cq-share-role-menu {
  position: static; width: auto; left: auto; right: auto; top: auto;
  margin: 4px 0 8px; border: 1px solid #e3e6ea;
  box-shadow: 0 2px 8px rgba(60,64,67,0.14);
}


/* Reduced motion: the critical-mistake shake and toast slide become a plain
   state change. The sound and the toast text still carry the moment. */
@media (prefers-reduced-motion: reduce) {
  .cq-shake-hard, .cq-shake-soft { animation: none !important; }
  .cq-consequence { transform: none; transition: opacity 0.2s ease; }
  .cq-consequence.wd-leaving { transform: none; }
}


/* ---------- debrief tabs (finale.js) ---------- */

.wd-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 20px 0;
  border-bottom: 2px solid var(--win-light);
  background: var(--win-bg);
  flex-wrap: wrap;
}
.wd-tab {
  font-family: inherit;
  font-size: 12px;
  min-height: 28px;
  padding: 4px 12px;
  background: var(--win-bg);
  color: #000;
  cursor: pointer;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: none;
  margin-bottom: -2px;
}
.wd-tab:hover { background: var(--hover); }
.wd-tab-active {
  font-weight: bold;
  padding-top: 6px;
  margin-top: -2px;
  background: var(--win-bg);
  position: relative;
  z-index: 1;
}
.wd-tab:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
  box-shadow: 0 0 0 2px var(--focus);
}
.wd-tab-panel[hidden] { display: none; }
.wd-tab-panel { border-top: none; }
.wd-review-note {
  margin: 8px 0;
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
}


/* ------------------------------------------------------ */
/* Shared modern language — everything off the computer:   */
/* scenes, the results card, the intro, and the small test */
/* dialogs (resume, already completed).                    */
/* ------------------------------------------------------ */
.wd-results, .wd-modern-card, .login-screen {
  --m-ink: #1f2a44;
  --m-soft: #5b6680;
  --m-faint: #8a94a8;
  --m-line: #e6e9f0;
  --m-tint: #f6f7fa;
  --m-accent: #2f6fd0;
  --m-pass: #1f8a5b;
  --m-pass-bg: #e7f5ee;
  --m-fail: #c2473d;
  --m-fail-bg: #fbecea;
  --m-mid: #c98a14;
}
.wd-modern-card {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10002;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--m-ink);
  transform: translate(-50%, -50%);
  animation: wd-scene-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wd-modern-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(12, 18, 32, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: wd-overlay-in 220ms ease-out;
}
.wd-modern-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--m-faint); margin-bottom: 6px;
}
.wd-modern-title { margin: 0 0 6px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.wd-modern-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--m-soft); }
.wd-modern-note { margin: 14px 0 0; font-size: 13px; color: var(--m-faint); }
.wd-modern-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.wd-modern-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #f4f6fa;
  border: 1px solid #dfe3ea;
  color: #1f2a44;
  transition: background 0.12s, border-color 0.12s;
}
.wd-modern-btn:hover:not(:disabled) { background: #eaf1fd; border-color: #b9cff3; }
.wd-modern-btn-primary { background: #1f2a44; border-color: #1f2a44; color: #fff; }
.wd-modern-btn-primary:hover:not(:disabled) { background: #2b3a5c; border-color: #2b3a5c; }
.wd-modern-btn:disabled { background: #e3e7ee; border-color: #e3e7ee; color: #8a94a8; cursor: default; }
.wd-modern-btn:focus-visible { outline: 2px solid #2f6fd0; outline-offset: 2px; }

/* ------------------------------------------------------ */
/* End-of-day results card (finale.js).                    */
/* Same modern card language as the in-person scenes: the  */
/* test is over, so it steps out of the Win95 chrome.      */
/* Everything is scoped under .wd-results so the shared    */
/* debrief class names keep working without the old look.  */
/* ------------------------------------------------------ */
.wd-results-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5990;
  background: rgba(12, 18, 32, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: wd-overlay-in 220ms ease-out;
}
.wd-results {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 6000;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--m-ink);
  transform: translate(-50%, -50%);
  animation: wd-scene-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wd-results-scroll { overflow-y: auto; }

/* ---- header: done message, verdict, scores ---- */
.wd-res-head { padding: 28px 32px 24px; }
.wd-res-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--m-faint); margin-bottom: 14px;
}
.wd-res-done { display: flex; gap: 14px; align-items: flex-start; }
.wd-res-done-icon {
  flex: 0 0 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--m-pass-bg); color: var(--m-pass);
}
.wd-res-title { margin: 2px 0 4px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.wd-res-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--m-soft); }

.wd-res-result {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--m-tint);
  border: 1px solid var(--m-line);
  border-radius: 14px;
}
.wd-res-verdict {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.wd-res-verdict::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.wd-res-verdict.is-pass { background: var(--m-pass-bg); color: var(--m-pass); }
.wd-res-verdict.is-fail { background: var(--m-fail-bg); color: var(--m-fail); }

.wd-res-scores { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 14px; }
.wd-res-score-label { font-size: 13px; font-weight: 600; color: var(--m-soft); }
.wd-res-score-value {
  font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; margin: 2px 0 10px;
}
.wd-res-score-value small { font-size: 15px; font-weight: 500; color: var(--m-faint); margin-left: 4px; letter-spacing: 0; }
.wd-res-meter { position: relative; height: 8px; border-radius: 999px; background: #e3e7ee; }
.wd-res-meter-fill {
  height: 100%; width: 0; border-radius: inherit;
  transition: width 1.2s cubic-bezier(.2, .9, .3, 1);
}
.wd-res-meter-fill.is-pass { background: var(--m-pass); }
.wd-res-meter-fill.is-fail { background: var(--m-fail); }
.wd-res-meter-mark {
  position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px;
  background: var(--m-ink); border-radius: 1px; opacity: 0.55;
}
.wd-res-score-need { margin-top: 8px; font-size: 12px; color: var(--m-faint); }

/* Verdict pops in rather than the old rubber stamp. */
.wd-results .wd-grade-pending { opacity: 0; transform: scale(0.85); }
.wd-results .wd-grade-stamped { animation: wd-res-pop 0.4s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes wd-res-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- tabs ---- */
.wd-results .wd-tabs {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 0 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--m-line);
}
.wd-results .wd-tab {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 44px; margin: 0 0 -1px; padding: 0 12px;
  background: none; color: var(--m-soft); cursor: pointer;
  border: 0; border-bottom: 2px solid transparent;
  border-radius: 0;
}
.wd-results .wd-tab:hover { color: var(--m-ink); background: none; }
.wd-results .wd-tab-active { color: var(--m-ink); border-bottom-color: var(--m-accent); padding-top: 0; margin-top: 0; }
.wd-results .wd-tab:focus-visible { outline: 2px solid var(--m-accent); outline-offset: -2px; box-shadow: none; border-radius: 6px; }

/* ---- sections ---- */
.wd-results .wd-section { padding: 22px 32px; border-top: 0; background: none; }
.wd-results .wd-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--m-faint); margin-bottom: 10px;
}
.wd-results .wd-epi-intro,
.wd-results .wd-review-note { font-size: 13px; font-style: normal; color: var(--m-soft); margin: 0 0 12px; }
.wd-results a { color: var(--m-accent); }

/* habits */
.wd-results .wd-habits { gap: 12px; }
.wd-results .wd-habit-col {
  background: var(--m-tint); border: 1px solid var(--m-line); border-radius: 12px; padding: 14px 16px;
}
.wd-results .wd-habit-head { font-size: 14px; margin-bottom: 8px; }
.wd-results .wd-habit-have .wd-habit-head { color: var(--m-pass); }
.wd-results .wd-habit-build .wd-habit-head { color: #a8650b; }
.wd-results .wd-habit-col ul { padding-left: 0; list-style: none; font-size: 14px; }
.wd-results .wd-habit-col li { margin: 0 0 10px; }
.wd-results .wd-habit-col li:last-child { margin-bottom: 0; }
.wd-results .wd-habit-pct { font-family: inherit; font-variant-numeric: tabular-nums; color: var(--m-faint); margin-left: 4px; }
.wd-results .wd-habit-none { margin-left: 0; color: var(--m-soft); font-style: normal; line-height: 1.5; }
.wd-results .wd-habit-moments { flex-direction: column; gap: 4px; margin-top: 6px; }
.wd-results .wd-habit-link { font-size: 13px; color: var(--m-accent); text-decoration: none; }
.wd-results .wd-habit-link:hover { text-decoration: underline; }

/* what happened */
.wd-results .wd-epilogue { background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wd-results .wd-epi-row {
  gap: 12px; padding: 12px 14px; font-size: 14px; color: var(--m-ink);
  border: 1px solid var(--m-line); border-left: 3px solid transparent; border-radius: 10px;
}
.wd-results .wd-epi-row + .wd-epi-row { border-top: 1px solid var(--m-line); }
.wd-results .wd-epi-bad  { border-left-color: var(--m-fail); background: #ffffff; }
.wd-results .wd-epi-good { border-left-color: var(--m-pass); background: #ffffff; }
.wd-results .wd-epi-time { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--m-faint); flex-basis: 42px; }
.wd-results .wd-epi-bad  .wd-epi-mark { color: var(--m-fail); }
.wd-results .wd-epi-good .wd-epi-mark { color: var(--m-pass); }
.wd-results .wd-epi-text b { color: inherit; }

/* categories */
.wd-results .wd-category-breakdown { gap: 14px; }
.wd-results .wd-cat-row { gap: 14px; font-size: 14px; }
.wd-results .wd-cat-name { flex: 0 0 190px; font-weight: 500; }
.wd-results .wd-cat-bar-wrap { height: 8px; background: #e3e7ee; border: 0; border-radius: 999px; }
.wd-results .wd-cat-bar { border-radius: inherit; }
.wd-results .wd-cat-good .wd-cat-bar { background: var(--m-pass); }
.wd-results .wd-cat-mid  .wd-cat-bar { background: var(--m-mid); }
.wd-results .wd-cat-low  .wd-cat-bar { background: var(--m-fail); }
.wd-results .wd-cat-pct { font-family: inherit; font-variant-numeric: tabular-nums; flex-basis: 44px; font-weight: 600; }
.wd-results .wd-cat-count { flex-basis: 64px; white-space: nowrap; font-size: 13px; color: var(--m-faint); text-align: right; font-variant-numeric: tabular-nums; }

/* decision review */
.wd-results .wd-tier-key-row { gap: 8px 14px; font-size: 13px; margin-bottom: 12px; }
.wd-results .wd-tier-key-row span:not(.wd-tier-badge) { color: var(--m-soft); }
.wd-results .wd-tier-badge {
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.wd-results .tier-best    { background: var(--m-pass-bg); color: var(--m-pass); }
.wd-results .tier-good    { background: #e8f0fc; color: #2459a8; }
.wd-results .tier-neutral { background: #eef0f4; color: #5b6680; }
.wd-results .tier-worst   { background: var(--m-fail-bg); color: var(--m-fail); }
.wd-results .wd-timeline { background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wd-results .wd-timeline-row {
  gap: 14px; padding: 14px 16px; font-size: 14px;
  background: #ffffff; border: 1px solid var(--m-line); border-left: 3px solid var(--m-line); border-radius: 12px;
}
.wd-results .wd-timeline-row:last-child { border-bottom: 1px solid var(--m-line); }
.wd-results .wd-timeline-good { border-left-color: var(--m-pass); }
.wd-results .wd-timeline-bad  { border-left-color: var(--m-fail); }
.wd-results .wd-timeline-skipped { background: var(--m-tint); color: var(--m-soft); font-style: normal; }
.wd-results .wd-tl-title { font-weight: 600; }
.wd-results .wd-tl-choice { font-size: 13px; color: var(--m-soft); margin: 4px 0; }
.wd-results .wd-tl-feedback { font-size: 13px; line-height: 1.55; color: #3d4760; margin-top: 6px; }
.wd-results .wd-tl-points { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 13px; }
.wd-results .wd-timeline-good .wd-tl-points { color: var(--m-pass); }
.wd-results .wd-timeline-bad  .wd-tl-points { color: var(--m-fail); }
.wd-results .wd-replay { margin-top: 10px; font-size: 13px; }
.wd-results .wd-replay summary { color: var(--m-accent); font-weight: 600; }
.wd-results .wd-replay-facts code { background: var(--m-tint); border: 1px solid var(--m-line); border-radius: 4px; padding: 1px 6px; }
.wd-results .wd-replay-marks { background: #fdf6e3; border-left: 3px solid #e0b544; border-radius: 0 8px 8px 0; padding: 8px 12px; }
.wd-results .wd-replay-original { border: 1px solid var(--m-line); border-radius: 8px; padding: 10px 12px; }
.wd-results .wd-tl-flash { animation: wd-res-flash 1.2s ease-out; }
@keyframes wd-res-flash { 0% { box-shadow: 0 0 0 3px rgba(47, 111, 208, 0.45); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* bonus */
.wd-results .wd-bonus-section { padding-top: 6px; }
.wd-results .wd-bonus-row { padding: 12px 16px; background: #fdf8ea; border: 1px solid #efe2b8; border-radius: 12px; }
.wd-results .wd-bonus-main { border-right-color: #ecdfb6; }
.wd-results .wd-bonus-note { font-size: 13px; }

.wd-res-foot {
  padding: 16px 32px 22px;
  border-top: 1px solid var(--m-line);
  font-size: 13px; color: var(--m-soft); text-align: center;
}

@media (max-width: 560px) {
  .wd-res-head { padding: 22px 20px 20px; }
  .wd-results .wd-tabs, .wd-results .wd-section, .wd-res-foot { padding-left: 20px; padding-right: 20px; }
  .wd-res-scores { grid-template-columns: 1fr; gap: 18px; }
  .wd-results .wd-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .wd-results .wd-tab { flex: 0 0 auto; white-space: nowrap; }
  .wd-results .wd-cat-name { flex-basis: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .wd-results, .wd-results-backdrop { animation: none; }
  .wd-results .wd-grade-pending { opacity: 1; transform: none; }
  .wd-results .wd-grade-stamped { animation: none; }
  .wd-res-meter-fill, .wd-results .wd-cat-bar { transition: none; }
}


/* Voice-clone reveal as a scene card (modern, not Win95). */
.wd-scene .cq-reveal { font-size: 14px; line-height: 1.55; color: #4a5670; }
.wd-scene .cq-reveal p { margin: 0 0 10px; }
.wd-scene .cq-reveal-lead { font-size: 16px; color: #1f2a44; }
.wd-scene .cq-reveal-quiet { font-size: 13px; color: #7a869c; font-style: normal; }
.wd-scene .cq-reveal-stats { gap: 10px; margin: 16px 0; }
.wd-scene .cq-reveal-stats div {
  background: #f4f6fa; border: 1px solid #e3e7ee; border-radius: 12px;
  padding: 12px 8px; gap: 4px;
}
.wd-scene .cq-reveal-stats b { font-size: 16px; color: #1f2a44; }
.wd-scene .cq-reveal-stats small { font-size: 12px; color: #7a869c; }
.wd-scene .cq-reveal-rules {
  background: #eef4fd; border: 0; border-radius: 12px; padding: 14px 16px; margin-top: 16px;
}
.wd-scene .cq-reveal-rules-title { font-size: 13px; font-weight: 700; color: #2459a8; margin-bottom: 8px; }
.wd-scene .cq-reveal-rules ol { margin: 0; padding-left: 20px; color: #1f2a44; }
.wd-scene .cq-reveal-rules li { margin: 0 0 6px; font-size: 14px; }
.wd-scene .cq-reveal-rules li:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .wd-scene .cq-reveal-stats { flex-direction: column; }
}

/* The test's password boxes are editable <div>s, not inputs (see
   secretFieldHTML in utils.js): any input that looks like a password field
   makes the participant's own password manager (Safari, 1Password,
   Bitwarden…) pop its suggestion over the test's. */
.cq-secret {
  display: block;
  line-height: 1.4; text-align: left; white-space: nowrap; overflow: hidden;
  background: #fff; color: #1f2a44; cursor: text; letter-spacing: 1px;
  -webkit-user-select: text; user-select: text;
}
.cq-secret:empty::before {
  content: attr(data-placeholder); color: #8a8f99; letter-spacing: normal; pointer-events: none;
}
.cq-secret[aria-readonly="true"] { cursor: default; }
.cq-secret.is-disabled { background: #f2f2f2; }
